瀏覽代碼

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 4 年之前
父節點
當前提交
84765ec2b2

+ 10 - 0
src/api/project/project.js 查看文件

524
     params:params,
524
     params:params,
525
   })
525
   })
526
 }
526
 }
527
+
528
+
529
+export function postProjectInformation(params){
530
+  
531
+  return request({
532
+    url:"/api/postprojectinformation",
533
+    method:"post",
534
+    data:params
535
+  })
536
+}

+ 9 - 0
src/api/stock.js 查看文件

593
     method:"Post",
593
     method:"Post",
594
     data:params,
594
     data:params,
595
   })
595
   })
596
+}
597
+
598
+export function postDrugInformation(params){
599
+  
600
+  return request({
601
+    url:"/api/good/postdruginformation",
602
+    method:"post",
603
+    data:params
604
+  })
596
 }
605
 }

+ 147 - 0
src/xt_pages/components/DrugExcel/index.vue 查看文件

1
+<template>
2
+  <div>
3
+    <input id="excel-drug-input" ref="excel-drug-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
4
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">导入模板
5
+    </el-button>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+  import XLSX from 'xlsx'
11
+
12
+  export default {
13
+    props: {
14
+      beforeUpload: Function,
15
+      onSuccess: Function
16
+    },
17
+    data() {
18
+      return {
19
+        loading: false,
20
+        excelData: {
21
+          header: null,
22
+          results: null
23
+        }
24
+      }
25
+    },
26
+    methods: {
27
+      generateDate({ header, results }) {
28
+        this.excelData.header = header
29
+        this.excelData.results = results
30
+        this.onSuccess && this.onSuccess(this.excelData)
31
+      },
32
+      handleDrop(e) {
33
+        e.stopPropagation()
34
+        e.preventDefault()
35
+        if (this.loading) return
36
+        const files = e.dataTransfer.files
37
+        if (files.length !== 1) {
38
+          this.$message.error('Only support uploading one file!')
39
+          return
40
+        }
41
+        const rawFile = files[0] // only use files[0]
42
+
43
+        if (!this.isExcel(rawFile)) {
44
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
45
+          return false
46
+        }
47
+        this.upload(rawFile)
48
+        e.stopPropagation()
49
+        e.preventDefault()
50
+      },
51
+      handleDragover(e) {
52
+        e.stopPropagation()
53
+        e.preventDefault()
54
+        e.dataTransfer.dropEffect = 'copy'
55
+      },
56
+      handleUpload() {
57
+        document.getElementById('excel-drug-input').click()
58
+      },
59
+      handleClick(e) {
60
+        const files = e.target.files
61
+        const rawFile = files[0] // only use files[0]
62
+        if (!rawFile) return
63
+        this.upload(rawFile)
64
+      },
65
+      upload(rawFile) {
66
+        this.$refs['excel-drug-input'].value = null // fix can't select the same excel
67
+
68
+        if (!this.beforeUpload) {
69
+          this.readerData(rawFile)
70
+          return
71
+        }
72
+        const before = this.beforeUpload(rawFile)
73
+        if (before) {
74
+          this.readerData(rawFile)
75
+        }
76
+      },
77
+      readerData(rawFile) {
78
+        this.loading = true
79
+        return new Promise((resolve, reject) => {
80
+          const reader = new FileReader()
81
+          reader.onload = e => {
82
+            const data = e.target.result
83
+            const fixedData = this.fixdata(data)
84
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
85
+            const firstSheetName = workbook.SheetNames[0]
86
+            const worksheet = workbook.Sheets[firstSheetName]
87
+            const header = this.get_header_row(worksheet)
88
+            const results = XLSX.utils.sheet_to_json(worksheet)
89
+            this.generateDate({ header, results })
90
+            this.loading = false
91
+            resolve()
92
+          }
93
+          reader.readAsArrayBuffer(rawFile)
94
+        })
95
+      },
96
+      fixdata(data) {
97
+        let o = ''
98
+        let l = 0
99
+        const w = 10240
100
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
101
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
102
+        return o
103
+      },
104
+      get_header_row(sheet) {
105
+        if(sheet['!ref'] == undefined){
106
+          this.loading = false
107
+          return
108
+        }
109
+
110
+        const headers = []
111
+        const range = XLSX.utils.decode_range(sheet['!ref'])
112
+        let C
113
+        const R = range.s.r /* start in the first row */
114
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
115
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
116
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
117
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
118
+          headers.push(hdr)
119
+        }
120
+        return headers
121
+      },
122
+      isExcel(file) {
123
+        return /\.(xlsx|xls|csv)$/.test(file.name)
124
+      }
125
+    }
126
+  }
127
+</script>
128
+
129
+<style scoped>
130
+  #excel-project-input {
131
+    display: none;
132
+    z-index: -9999;
133
+  }
134
+
135
+  #drop {
136
+    border: 2px dashed #bbb;
137
+    width: 600px;
138
+    height: 160px;
139
+    line-height: 160px;
140
+    margin: 0 auto;
141
+    font-size: 24px;
142
+    border-radius: 5px;
143
+    text-align: center;
144
+    color: #bbb;
145
+    position: relative;
146
+  }
147
+</style>

+ 147 - 0
src/xt_pages/components/ProjectExcel/index.vue 查看文件

1
+<template>
2
+  <div>
3
+    <input id="excel-project-input" ref="excel-project-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
4
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">导入模板
5
+    </el-button>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+  import XLSX from 'xlsx'
11
+
12
+  export default {
13
+    props: {
14
+      beforeUpload: Function,
15
+      onSuccess: Function
16
+    },
17
+    data() {
18
+      return {
19
+        loading: false,
20
+        excelData: {
21
+          header: null,
22
+          results: null
23
+        }
24
+      }
25
+    },
26
+    methods: {
27
+      generateDate({ header, results }) {
28
+        this.excelData.header = header
29
+        this.excelData.results = results
30
+        this.onSuccess && this.onSuccess(this.excelData)
31
+      },
32
+      handleDrop(e) {
33
+        e.stopPropagation()
34
+        e.preventDefault()
35
+        if (this.loading) return
36
+        const files = e.dataTransfer.files
37
+        if (files.length !== 1) {
38
+          this.$message.error('Only support uploading one file!')
39
+          return
40
+        }
41
+        const rawFile = files[0] // only use files[0]
42
+
43
+        if (!this.isExcel(rawFile)) {
44
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
45
+          return false
46
+        }
47
+        this.upload(rawFile)
48
+        e.stopPropagation()
49
+        e.preventDefault()
50
+      },
51
+      handleDragover(e) {
52
+        e.stopPropagation()
53
+        e.preventDefault()
54
+        e.dataTransfer.dropEffect = 'copy'
55
+      },
56
+      handleUpload() {
57
+        document.getElementById('excel-project-input').click()
58
+      },
59
+      handleClick(e) {
60
+        const files = e.target.files
61
+        const rawFile = files[0] // only use files[0]
62
+        if (!rawFile) return
63
+        this.upload(rawFile)
64
+      },
65
+      upload(rawFile) {
66
+        this.$refs['excel-project-input'].value = null // fix can't select the same excel
67
+
68
+        if (!this.beforeUpload) {
69
+          this.readerData(rawFile)
70
+          return
71
+        }
72
+        const before = this.beforeUpload(rawFile)
73
+        if (before) {
74
+          this.readerData(rawFile)
75
+        }
76
+      },
77
+      readerData(rawFile) {
78
+        this.loading = true
79
+        return new Promise((resolve, reject) => {
80
+          const reader = new FileReader()
81
+          reader.onload = e => {
82
+            const data = e.target.result
83
+            const fixedData = this.fixdata(data)
84
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
85
+            const firstSheetName = workbook.SheetNames[0]
86
+            const worksheet = workbook.Sheets[firstSheetName]
87
+            const header = this.get_header_row(worksheet)
88
+            const results = XLSX.utils.sheet_to_json(worksheet)
89
+            this.generateDate({ header, results })
90
+            this.loading = false
91
+            resolve()
92
+          }
93
+          reader.readAsArrayBuffer(rawFile)
94
+        })
95
+      },
96
+      fixdata(data) {
97
+        let o = ''
98
+        let l = 0
99
+        const w = 10240
100
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
101
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
102
+        return o
103
+      },
104
+      get_header_row(sheet) {
105
+        if(sheet['!ref'] == undefined){
106
+          this.loading = false
107
+          return
108
+        }
109
+
110
+        const headers = []
111
+        const range = XLSX.utils.decode_range(sheet['!ref'])
112
+        let C
113
+        const R = range.s.r /* start in the first row */
114
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
115
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
116
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
117
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
118
+          headers.push(hdr)
119
+        }
120
+        return headers
121
+      },
122
+      isExcel(file) {
123
+        return /\.(xlsx|xls|csv)$/.test(file.name)
124
+      }
125
+    }
126
+  }
127
+</script>
128
+
129
+<style scoped>
130
+  #excel-project-input {
131
+    display: none;
132
+    z-index: -9999;
133
+  }
134
+
135
+  #drop {
136
+    border: 2px dashed #bbb;
137
+    width: 600px;
138
+    height: 160px;
139
+    line-height: 160px;
140
+    margin: 0 auto;
141
+    font-size: 24px;
142
+    border-radius: 5px;
143
+    text-align: center;
144
+    color: #bbb;
145
+    position: relative;
146
+  }
147
+</style>

+ 3 - 3
src/xt_pages/data/basicConfig.vue 查看文件

26
           </p>
26
           </p>
27
         </div>
27
         </div>
28
 
28
 
29
-        <div class="configBox">
29
+        <!-- <div class="configBox">
30
           <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
30
           <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
31
           <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
31
           <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
32
           <p style="margin-top:20px;">透析监测-血压数据自动获取:
32
           <p style="margin-top:20px;">透析监测-血压数据自动获取:
40
           <p style="margin-top:20px;">透析监测-血压数据自动获取:
40
           <p style="margin-top:20px;">透析监测-血压数据自动获取:
41
           <el-switch v-model="is_open_order" @change="changeFuncThree"></el-switch>
41
           <el-switch v-model="is_open_order" @change="changeFuncThree"></el-switch>
42
           </p>
42
           </p>
43
-        </div>
43
+        </div> -->
44
         <!--<div class="configBox">-->
44
         <!--<div class="configBox">-->
45
             <!--<p>药品,耗材出库</p>-->
45
             <!--<p>药品,耗材出库</p>-->
46
             <!--<p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>-->
46
             <!--<p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>-->
78
 
78
 
79
 <script>
79
 <script>
80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
81
-import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,getMonitorConfig,addOrderConfig,getOrderConfig } from '@/api/config'
81
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen} from '@/api/config'
82
 
82
 
83
 export default {
83
 export default {
84
   name: "printTemplate",
84
   name: "printTemplate",

+ 167 - 17
src/xt_pages/data/components/consumables.vue 查看文件

66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
69
-        <!-- <el-button size="mini" type="primary">下载模版</el-button>
70
-        <upload-excel :on-success='handleSuccess' :before-upload="beforeUpload"></upload-excel> -->
69
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/stock_template.xlsx" :underline="false"
70
+                 style="margin-left:15px">
71
+          <el-button
72
+            class="filter-item"
73
+            type="primary"
74
+            size="small"
75
+          >下载模版
76
+          </el-button>
77
+        </el-link>
78
+        <upload-excel :on-success='handleSuccess'></upload-excel>
79
+        <el-button
80
+          style="margin-left:10px;"
81
+          @click="generateLog()"
82
+          class="filter-item"
83
+          type="primary"
84
+          size="small"
85
+        >下载日志
86
+        </el-button> -->
71
       </div>
87
       </div>
72
 
88
 
73
     <el-table
89
     <el-table
183
       </span>
199
       </span>
184
     </el-dialog>
200
     </el-dialog>
185
 
201
 
202
+
203
+     <el-dialog
204
+      title="提示"
205
+      :visible.sync="exportLogVisible"
206
+      width="40%"
207
+    >
208
+
209
+      <div v-for="(item,index) in logs" :key="index">
210
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
211
+        <br/>
212
+        <br/>
213
+        <span>{{getContent(item)}}</span>
214
+        <span >点击</span>
215
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
216
+        <br/>
217
+        <br/>
218
+      </div>
219
+
220
+      <span slot="footer" class="dialog-footer">
221
+    <el-button @click="exportLogVisible = false">取 消</el-button>
222
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
223
+    </span>
224
+    </el-dialog>
225
+
186
   </div>
226
   </div>
187
 </template>
227
 </template>
188
 
228
 
204
     postGoodInformation
244
     postGoodInformation
205
   } from '@/api/stock'
245
   } from '@/api/stock'
206
   import UploadExcel from '@/xt_pages/components/UploadExcel'
246
   import UploadExcel from '@/xt_pages/components/UploadExcel'
247
+  import { generateLog } from '@/api/config'
207
   export default {
248
   export default {
208
     components: {
249
     components: {
209
       GoodInfoDailog,
250
       GoodInfoDailog,
285
               special_medical:"",
326
               special_medical:"",
286
               production_type:""
327
               production_type:""
287
             },
328
             },
288
-
289
-            isVisibility: false
329
+            isVisibility: false,
330
+       
290
           }
331
           }
291
         },
332
         },
292
         selectDrug:[],
333
         selectDrug:[],
306
         manufacturer:"",
347
         manufacturer:"",
307
         dialogVisible:false,
348
         dialogVisible:false,
308
         goodType:[],
349
         goodType:[],
309
-        dealers:[]
350
+        dealers:[],
351
+        exportLogVisible:false,
352
+        logs: [],
310
       }
353
       }
311
     },
354
     },
312
     methods: {
355
     methods: {
1068
        
1111
        
1069
        var tableData = []
1112
        var tableData = []
1070
        for(let i=0;i<results.length;i++){
1113
        for(let i=0;i<results.length;i++){
1071
-         let obj = {}
1114
+         let obj = {"good_kind_id":0,"good_type_id":0,"medical_insurance_id":0,"dealer_id":0,"statistic_id":0,"manufacturer_id":0,"unit_id":0}
1072
          for (var key in results[i]) {
1115
          for (var key in results[i]) {
1073
 
1116
 
1074
            if (results[i]['*耗材名称'] === undefined) {
1117
            if (results[i]['*耗材名称'] === undefined) {
1247
                obj['is_mark'] = results[i][key].replace(/\s/g,"")
1290
                obj['is_mark'] = results[i][key].replace(/\s/g,"")
1248
               }
1291
               }
1249
            }
1292
            }
1293
+
1294
+
1250
          }
1295
          }
1251
          tableData.push(obj)
1296
          tableData.push(obj)
1252
          console.log("表哥2222",tableData)
1297
          console.log("表哥2222",tableData)
1253
          var goodKind  =  this.getDictionaryDataConfig('system','good_kind')
1298
          var goodKind  =  this.getDictionaryDataConfig('system','good_kind')
1254
-         console.log("耗材种类",goodKind)
1255
-         console.log("耗材类型",this.goodType)
1299
+         
1300
+        //  console.log("耗材种类",goodKind)
1301
+        //  console.log("耗材类型",this.goodType)
1256
         var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1302
         var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1257
-        console.log("医保等级",medicalInsuranceLevel)
1258
-        console.log("生产厂商",this.manufacturers)
1259
-        console.log("经销商",this.dealers)
1303
+        // console.log("医保等级",medicalInsuranceLevel)
1304
+        // console.log("生产厂商",this.manufacturers)
1305
+        // console.log("经销商",this.dealers)
1260
         var statisticsCategory = getDictionaryDataConfig('system','statistics_category')
1306
         var statisticsCategory = getDictionaryDataConfig('system','statistics_category')
1261
-        console.log("统计分类",statisticsCategory)
1307
+        // console.log("统计分类",statisticsCategory)
1308
+       
1309
+        var goodUnit =  this.$store.getters.good_unit
1310
+       
1311
+
1262
         for(let i=0;i<tableData.length;i++){ 
1312
         for(let i=0;i<tableData.length;i++){ 
1263
           for(let j=0;j<goodKind.length;j++){
1313
           for(let j=0;j<goodKind.length;j++){
1314
+             
1264
              if(tableData[i].good_kind == goodKind[j].name){
1315
              if(tableData[i].good_kind == goodKind[j].name){
1265
                 tableData[i].good_kind_id = goodKind[j].id
1316
                 tableData[i].good_kind_id = goodKind[j].id
1266
              }    
1317
              }    
1279
         }
1330
         }
1280
 
1331
 
1281
         
1332
         
1282
-        // for(let a=0;a<this.manufacturers.length;a++){
1333
+        for(let a=0;a<this.manufacturers.length;a++){
1334
+           if(tableData[i].manufacturer == this.manufacturers[a].manufacturer_name){
1335
+               tableData[i].manufacturer_id = this.manufacturers[a].id
1336
+           }
1337
+        }
1338
+       
1339
+        for(let s=0;s<this.dealers.length;s++){
1340
+           if(tableData[i].dealer == this.dealers[s].dealer_name){
1341
+               tableData[i].dealer_id = this.dealers[s].id
1342
+           }
1343
+        }
1344
+        
1345
+        for(let h=0;h<statisticsCategory.length;h++){
1346
+           if(tableData[i].statistics_category == statisticsCategory[h].name){
1347
+               tableData[i].statistic_id = statisticsCategory[h].id
1348
+           }
1349
+         }
1350
+
1351
+         for(let c=0;c<goodUnit.length;c++){
1352
+            if(tableData[i].good_unit == goodUnit[c].name){
1353
+               tableData[i].unit_id = goodUnit[c].id
1354
+            }
1355
+         }
1356
+
1357
+        }
1358
+       }
1359
+       
1360
+       for(let i=0;i<tableData.length;i++){
1361
+          tableData[i].stock_warn_count = parseInt(tableData[i].stock_warn_count)
1283
 
1362
 
1284
-        // }
1363
+          if(tableData[i].is_special_diseases == "是"){
1364
+              tableData[i].is_special_diseases = 1
1365
+          }
1366
+          if(tableData[i].is_special_diseases == "否"){
1367
+              tableData[i].is_special_diseases = 2
1368
+          }
1285
 
1369
 
1370
+          if(tableData[i].is_record == "是"){
1371
+             tableData[i].is_record = 1
1372
+          }
1373
+          if(tableData[i].is_record == "否"){
1374
+             tableData[i].is_record = 2
1375
+          }
1286
 
1376
 
1377
+         
1287
 
1378
 
1288
-        }
1379
+          if(tableData[i].special_medical == "是"){
1380
+             tableData[i].special_medical = 1
1381
+          }
1382
+          if(tableData[i].special_medical == "否"){
1383
+             tableData[i].special_medical = 2
1384
+          }
1289
        }
1385
        }
1386
+     
1387
+       
1290
        let params = {
1388
        let params = {
1291
           'goods':tableData 
1389
           'goods':tableData 
1292
         }
1390
         }
1293
        console.log("params2222",params)
1391
        console.log("params2222",params)
1294
-        return
1392
+       
1295
        
1393
        
1296
         postGoodInformation(params).then(response=>{
1394
         postGoodInformation(params).then(response=>{
1297
            if(response.data.state == 1){
1395
            if(response.data.state == 1){
1298
              var msg =  response.data.data.msg
1396
              var msg =  response.data.data.msg
1299
              this.$message.success("导入成功!")
1397
              this.$message.success("导入成功!")
1398
+           }else{
1399
+             this.$message.error("导入失败")
1300
            }
1400
            }
1301
         })
1401
         })
1402
+      },
1403
+      generateTxt: function(log) {
1404
+        var content = ''
1405
+        var errlog = log.err_logs
1406
+        content = this.getContent(log)
1407
+        for (let i = 0; i < errlog.length; i++) {
1408
+          if (content.length == 0) {
1409
+            content = errlog[i].err_msg
1410
+          } else {
1411
+            content = content + '\n' + errlog[i].err_msg
1412
+          }
1413
+        }
1302
 
1414
 
1303
-      }
1415
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1416
+        if (typeof url === 'object' && url instanceof Blob) {
1417
+          url = URL.createObjectURL(url) // 创建blob地址
1418
+        }
1419
+        const aLink = document.createElement('a')
1420
+        aLink.href = url
1421
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1422
+        aLink.click()
1423
+
1424
+      },
1425
+      getContent(log) {
1426
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1427
+      },
1428
+      timestampToTime(timestamp) {
1429
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1430
+        var Y = date.getFullYear() + '年'
1431
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1432
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1433
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1434
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1435
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1436
+        return Y + M + D + h + m + s
1437
+      },
1438
+       generateLog() {
1439
+        let params = {
1440
+          'log_type': 5
1441
+        }
1442
+        generateLog(params).then(
1443
+          response => {
1444
+            if (response.data.state === 1) {
1445
+              this.logs = response.data.data.logs
1446
+              this.exportLogVisible = true
1447
+            } else {
1448
+              this.$message.error(response.data.msg)
1449
+            }
1450
+          }
1451
+        )
1452
+
1453
+      },
1304
     }, 
1454
     }, 
1305
     created() {
1455
     created() {
1306
       this.getList()
1456
       this.getList()

+ 381 - 5
src/xt_pages/data/components/drugs.vue 查看文件

56
       </div>
56
       </div>
57
       <div>
57
       <div>
58
         <el-button type="primary" @click="openForm(0)">新增</el-button>
58
         <el-button type="primary" @click="openForm(0)">新增</el-button>
59
+        <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button> -->
61
+      </div>
62
+      
63
+    </div>
64
+    <div style="display:flex; align-items:center;margin-bottom:10px;">
59
         <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
65
         <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60
         <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
66
         <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
67
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/drug_template.xlsx" :underline="false"
68
+                 style="margin-left:15px">
69
+          <el-button
70
+            class="filter-item"
71
+            type="primary"
72
+            size="small"
73
+          >下载模版
74
+          </el-button>
75
+        </el-link>
76
+        <upload-excel :on-success='handleSuccessTwo'></upload-excel>
77
+        <el-button
78
+          style="margin-left:10px;"
79
+          @click="generateLog()"
80
+          class="filter-item"
81
+          type="primary"
82
+          size="small"
83
+        >下载日志
84
+        </el-button> -->
61
       </div>
85
       </div>
62
-    </div>
63
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
86
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
64
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
87
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
65
              @selection-change="handleSelectionChange">
88
              @selection-change="handleSelectionChange">
176
       :total="total"
199
       :total="total"
177
     >
200
     >
178
     </el-pagination>
201
     </el-pagination>
202
+   
179
 
203
 
204
+    <el-dialog
205
+      title="提示"
206
+      :visible.sync="dialogVisible"
207
+      width="40%"
208
+    >
209
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
210
+      <span slot="footer" class="dialog-footer">
211
+    <el-button @click="dialogVisible = false">取 消</el-button>
212
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
213
+      </span>
214
+    </el-dialog>
215
+
216
+
217
+     <el-dialog
218
+      title="提示"
219
+      :visible.sync="exportLogVisible"
220
+      width="40%"
221
+    >
222
+
223
+      <div v-for="(item,index) in logs" :key="index">
224
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
225
+        <br/>
226
+        <br/>
227
+        <span>{{getContent(item)}}</span>
228
+        <span >点击</span>
229
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
230
+        <br/>
231
+        <br/>
232
+      </div>
233
+
234
+      <span slot="footer" class="dialog-footer">
235
+    <el-button @click="exportLogVisible = false">取 消</el-button>
236
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
237
+    </span>
238
+    </el-dialog>
180
   </div>
239
   </div>
181
 </template>
240
 </template>
182
 
241
 
185
   import selfPayment from './selfPayment'
244
   import selfPayment from './selfPayment'
186
   import maintain from './maintain'
245
   import maintain from './maintain'
187
   import addDrugs from './addDrugs'
246
   import addDrugs from './addDrugs'
188
-  import { GetAllManufacturer } from '@/api/stock'
189
-  import { getDataConfig } from "@/utils/data";
247
+  import { GetAllManufacturer,postDrugInformation } from '@/api/stock'
248
+  import { getDataConfig,getDictionaryDataConfig } from "@/utils/data";
190
   import { uParseTime } from '@/utils/tools'
249
   import { uParseTime } from '@/utils/tools'
191
   import {
250
   import {
192
     createBaseDrugLib,
251
     createBaseDrugLib,
198
     deleteDurg
257
     deleteDurg
199
   } from '@/api/data'
258
   } from '@/api/data'
200
  import {GetAllConfig } from "@/api/stock";
259
  import {GetAllConfig } from "@/api/stock";
260
+ import { generateLog } from '@/api/config'
261
+ import UploadExcel from '@/xt_pages/components/UploadExcel'
201
   export default {
262
   export default {
202
     components: {
263
     components: {
203
       selfPayment,
264
       selfPayment,
204
       maintain,
265
       maintain,
205
-      addDrugs
266
+      addDrugs,
267
+      UploadExcel
206
     },
268
     },
207
     data() {
269
     data() {
208
       return {
270
       return {
341
 
403
 
342
         dealer:[],
404
         dealer:[],
343
         selectDrug:[],
405
         selectDrug:[],
406
+        dialogVisible:false,
407
+        exportLogVisible:false,
408
+        logs:[]
344
       }
409
       }
345
     },
410
     },
346
     methods: {
411
     methods: {
661
           } else {
726
           } else {
662
             this.total = response.data.data.total
727
             this.total = response.data.data.total
663
             this.list = []
728
             this.list = []
664
-            console.log("333333333",response.data.data.list)
729
+           
665
             for (let i = 0; i < response.data.data.list.length; i++) {
730
             for (let i = 0; i < response.data.data.list.length; i++) {
666
               this.list.push(response.data.data.list[i])
731
               this.list.push(response.data.data.list[i])
667
             }
732
             }
838
         })
903
         })
839
        });
904
        });
840
      },
905
      },
906
+
907
+      handleSuccessTwo({ results, header }) {
908
+       console.log("hhhhhhhh",results)
909
+        if (header != undefined && header.length > 0) {
910
+            
911
+          var isHasDrugName = header.includes('*药品名称')
912
+         
913
+          var isHasDrugAlias = header.includes('*药品别名')
914
+          
915
+          var isHasDrugSpec = header.includes('*药品规格')
916
+        
917
+          var isHasDrugType =  header.includes('*药品类型')
918
+        
919
+          var isHasDrugStockLimit =  header.includes('*库存警戒')
920
+         
921
+          var isHasDrugOriginPlace= header.includes('*产地')
922
+         
923
+          var isHasDrugDosageForm = header.includes('*药品剂型')
924
+        
925
+          var isHasMaxUnit= header.includes('*最大单位')
926
+
927
+          var isHasMinUnit= header.includes('*最小单位')
928
+
929
+          var isHasUnitMatrixing= header.includes("*单位换算")
930
+        
931
+          var isHasRetailPrice = header.includes('*单零售价')
932
+        
933
+          var isHasLastPrice = header.includes('*上次进价')
934
+
935
+          var isHasDrugClassifye = header.includes('*药物分类')
936
+
937
+         var isHasManufacturer = header.includes('*生产厂商')
938
+
939
+          var isHasDealer =  header.includes('*经销商')
940
+          if (!(isHasDrugName && isHasDrugAlias && isHasDrugSpec && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit &&  isHasMinUnit && isHasUnitMatrixing &&  isHasRetailPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDealer)) {
941
+            this.dialogVisible = true
942
+            return
943
+          }
944
+        }else {
945
+          this.dialogVisible = true
946
+          return
947
+        }
948
+       
949
+       var tableData = []
950
+       for(let i=0;i<results.length;i++){
951
+         let obj = {"drug_type_id":0,"drug_dosage_form_id":0,"medical_insurance_level_id":0,"drug_classify_id":0,"manufacturer_id":0,"dealer_id":0}
952
+         for (var key in results[i]) {
953
+
954
+           if (results[i]['*药品名称'] === undefined) {
955
+                obj['drug_name'] = ''
956
+              } else {
957
+           if (key == '*药品名称') {
958
+               obj['drug_name'] = results[i][key].replace(/\s/g,"")
959
+              }
960
+           }
961
+
962
+
963
+           if (results[i]['*药品别名'] === undefined) {
964
+                obj['drug_alias'] = ''
965
+              } else {
966
+           if (key == '*药品别名') {
967
+               obj['drug_alias'] = results[i][key].replace(/\s/g,"")
968
+              }
969
+           }
970
+
971
+            if (results[i]['*药品规格'] === undefined) {
972
+                obj['drug_spec'] = ''
973
+              } else {
974
+           if (key == '*药品规格') {
975
+               obj['drug_spec'] = results[i][key].replace(/\s/g,"")
976
+              }
977
+           }
978
+
979
+            if (results[i]['*药品类型'] === undefined) {
980
+                obj['drug_type'] = ''
981
+              } else {
982
+           if (key == '*药品类型') {
983
+               obj['drug_type'] = results[i][key].replace(/\s/g,"")
984
+              }
985
+           }
986
+           
987
+
988
+           if (results[i]['*库存警戒'] === undefined) {
989
+                obj['drug_stock_limit'] = ''
990
+              } else {
991
+           if (key == '*库存警戒') {
992
+               obj['drug_stock_limit'] = results[i][key].replace(/\s/g,"")
993
+              }
994
+           }
995
+
996
+           if (results[i]['*产地'] === undefined) {
997
+                obj['drug_origin_place'] = ''
998
+              } else {
999
+           if (key == '*产地') {
1000
+               obj['drug_origin_place'] = results[i][key].replace(/\s/g,"")
1001
+              }
1002
+           }
1003
+
1004
+           if (results[i]['*药品剂型'] === undefined) {
1005
+                obj['drug_dosage_form'] = ''
1006
+              } else {
1007
+           if (key == '*药品剂型') {
1008
+               obj['drug_dosage_form'] = results[i][key].replace(/\s/g,"")
1009
+              }
1010
+           }
1011
+
1012
+
1013
+            if (results[i]['*医保等级'] === undefined) {
1014
+                obj['medical_insurance_level'] = ''
1015
+              } else {
1016
+           if (key == '*医保等级') {
1017
+               obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
1018
+              }
1019
+           }
1020
+
1021
+           if (results[i]['*最大单位'] === undefined) {
1022
+                obj['max_unit'] = ''
1023
+              } else {
1024
+           if (key == '*最大单位') {
1025
+               obj['max_unit'] = results[i][key].replace(/\s/g,"")
1026
+              }
1027
+           }
1028
+
1029
+           if (results[i]['*最小单位'] === undefined) {
1030
+                obj['min_unit'] = ''
1031
+              } else {
1032
+           if (key == '*最小单位') {
1033
+               obj['min_unit'] = results[i][key].replace(/\s/g,"")
1034
+              }
1035
+           }
1036
+
1037
+
1038
+            if (results[i]['*单位换算'] === undefined) {
1039
+                obj['unit_matrixing'] = ''
1040
+              } else {
1041
+           if (key == '*单位换算') {
1042
+               obj['unit_matrixing'] = results[i][key].replace(/\s/g,"")
1043
+              }
1044
+           }
1045
+
1046
+            if (results[i]['*单零售价'] === undefined) {
1047
+                obj['retail_price'] = ''
1048
+              } else {
1049
+           if (key == '*单零售价') {
1050
+               obj['retail_price'] = results[i][key].replace(/\s/g,"")
1051
+              }
1052
+           }
1053
+           
1054
+
1055
+         if (results[i]['*上次进价'] === undefined) {
1056
+                obj['last_price'] = ''
1057
+              } else {
1058
+           if (key == '*上次进价') {
1059
+               obj['last_price'] = results[i][key].replace(/\s/g,"")
1060
+              }
1061
+           }
1062
+
1063
+            if (results[i]['*药物分类'] === undefined) {
1064
+                obj['drug_classify'] = ''
1065
+              } else {
1066
+           if (key == '*药物分类') {
1067
+               obj['drug_classify'] = results[i][key].replace(/\s/g,"")
1068
+              }
1069
+           }
1070
+
1071
+
1072
+            if (results[i]['*生产厂商'] === undefined) {
1073
+                obj['manufacturer'] = ''
1074
+              } else {
1075
+           if (key == '*生产厂商') {
1076
+               obj['manufacturer'] = results[i][key].replace(/\s/g,"")
1077
+              }
1078
+           }
1079
+
1080
+            if (results[i]['*经销商'] === undefined) {
1081
+                obj['dealer'] = ''
1082
+              } else {
1083
+           if (key == '*经销商') {
1084
+               obj['dealer'] = results[i][key].replace(/\s/g,"")
1085
+              }
1086
+          
1087
+           }
1088
+         }
1089
+         tableData.push(obj)
1090
+         console.log("表哥2222",tableData)
1091
+      
1092
+        var drugType =  this.getDictionaryDataConfig('system','drug_type')
1093
+       
1094
+       
1095
+        var drugDosageForm = this.getDictionaryDataConfig('system','drug_dosage_form')
1096
+       
1097
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1098
+        
1099
+
1100
+        var drugClassify =  this.getDictionaryDataConfig('system','drug_classify')
1101
+       
1102
+
1103
+        var goodUnit =  this.$store.getters.good_unit
1104
+       
1105
+
1106
+        for(let i=0;i<tableData.length;i++){ 
1107
+          for(let j=0;j<drugType.length;j++){
1108
+            if(tableData[i].drug_type == drugType[j].name){
1109
+                tableData[i].drug_type_id = drugType[j].id
1110
+             }    
1111
+          }
1112
+
1113
+          for(let j=0;j<drugDosageForm.length;j++){
1114
+            if(tableData[i].drug_dosage_form == drugDosageForm[j].name){
1115
+                tableData[i].drug_dosage_form_id = drugDosageForm[j].id
1116
+            }
1117
+          }
1118
+
1119
+          for(let j=0;j<medicalInsuranceLevel.length;j++){
1120
+            if(tableData[i].medical_insurance_level == medicalInsuranceLevel[j].name){
1121
+                tableData[i].medical_insurance_level_id = medicalInsuranceLevel[j].id
1122
+            }
1123
+          }
1124
+
1125
+          for(let j=0;j<drugClassify.length;j++){
1126
+             if(tableData[i].drug_classify == drugClassify[j].name){
1127
+                tableData[i].drug_classify_id = drugClassify[j].id
1128
+             }
1129
+          } 
1130
+         
1131
+          console.log("生产",this.manufacturers)
1132
+          for(let j=0;j<this.manufacturers.length;j++){
1133
+            if(tableData[i].manufacturer == this.manufacturers[j].manufacturer_name){
1134
+               tableData[i].manufacturer_id = this.manufacturers[j].id
1135
+            }
1136
+          }
1137
+          console.log("经销商",this.dealer)
1138
+          for(let j=0;j<this.dealer.length;j++){
1139
+            if(tableData[i].dealer == this.dealer[j].dealer_name){
1140
+               tableData[i].dealer_id = this.dealer[j].id
1141
+            }
1142
+          }
1143
+          
1144
+        }
1145
+       }
1146
+       for(let i=0;i<tableData.length;i++){
1147
+          tableData[i].retail_price = parseInt(tableData[i].retail_price)
1148
+          tableData[i].last_price = parseInt(tableData[i].last_price)
1149
+       }
1150
+       
1151
+       let params = {
1152
+          'drugs':tableData 
1153
+        }
1154
+       console.log("params2222",params)
1155
+        postDrugInformation(params).then(response=>{
1156
+           if(response.data.state == 1){
1157
+             var msg =  response.data.data.msg
1158
+             this.$message.success("导入成功!")
1159
+           }else{
1160
+             this.$message.error("导入失败")
1161
+           }
1162
+        })
1163
+      },
1164
+      generateTxt: function(log) {
1165
+        var content = ''
1166
+        var errlog = log.err_logs
1167
+        content = this.getContent(log)
1168
+        for (let i = 0; i < errlog.length; i++) {
1169
+          if (content.length == 0) {
1170
+            content = errlog[i].err_msg
1171
+          } else {
1172
+            content = content + '\n' + errlog[i].err_msg
1173
+          }
1174
+        }
1175
+
1176
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1177
+        if (typeof url === 'object' && url instanceof Blob) {
1178
+          url = URL.createObjectURL(url) // 创建blob地址
1179
+        }
1180
+        const aLink = document.createElement('a')
1181
+        aLink.href = url
1182
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1183
+        aLink.click()
1184
+
1185
+      },
1186
+      getContent(log) {
1187
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1188
+      },
1189
+      timestampToTime(timestamp) {
1190
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1191
+        var Y = date.getFullYear() + '年'
1192
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1193
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1194
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1195
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1196
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1197
+        return Y + M + D + h + m + s
1198
+      },
1199
+       generateLog() {
1200
+        let params = {
1201
+          'log_type': 4
1202
+        }
1203
+        generateLog(params).then(
1204
+          response => {
1205
+            if (response.data.state === 1) {
1206
+              this.logs = response.data.data.logs
1207
+              this.exportLogVisible = true
1208
+            } else {
1209
+              this.$message.error(response.data.msg)
1210
+            }
1211
+          }
1212
+        )
1213
+      },
1214
+      getDictionaryDataConfig(module,filed_name){
1215
+        return getDictionaryDataConfig(module,filed_name)
1216
+      },
841
     },
1217
     },
842
     created() {
1218
     created() {
843
       this.getList()
1219
       this.getList()

+ 2 - 1
src/xt_pages/data/components/editInspection.vue 查看文件

146
               team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
146
               team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
147
            },
147
            },
148
            tableData:[],
148
            tableData:[],
149
-           item_id:[]
149
+           item_id:[],
150
+           projectList:[]
150
         }
151
         }
151
     },
152
     },
152
     methods:{
153
     methods:{

+ 256 - 9
src/xt_pages/data/components/project.vue 查看文件

34
             </div>
34
             </div>
35
             <div>
35
             <div>
36
              <el-button type="primary" @click="openForm(0)">新增</el-button>
36
              <el-button type="primary" @click="openForm(0)">新增</el-button>
37
-             <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
38
-                <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
39
-
37
+             <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
38
+             <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button> -->
40
             </div>
39
             </div>
41
         </div>
40
         </div>
41
+        <div style="display:flex; align-items:center;margin-bottom:10px;">
42
+        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
43
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
44
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/project_template.xlsx" :underline="false"
45
+                 style="margin-left:15px">
46
+          <el-button
47
+            class="filter-item"
48
+            type="primary"
49
+            size="small"
50
+          >下载模版
51
+          </el-button>
52
+        </el-link>
53
+
54
+        <project-excel :on-success='handleSuccessOne'></project-excel>
55
+     
56
+        <el-button
57
+          style="margin-left:10px;"
58
+          @click="generateLog()"
59
+          class="filter-item"
60
+          type="primary"
61
+          size="small"
62
+        >下载日志
63
+        </el-button> -->
64
+      </div>
42
         <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"  @selection-change="handleSelectionChange">
65
         <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"  @selection-change="handleSelectionChange">
43
             <el-table-column
66
             <el-table-column
44
               align="center"
67
               align="center"
118
 
141
 
119
         <add-project ref="addProject"></add-project>
142
         <add-project ref="addProject"></add-project>
120
         <editProject ref="editProject"></editProject>
143
         <editProject ref="editProject"></editProject>
144
+
145
+
146
+    <el-dialog
147
+      title="提示"
148
+      :visible.sync="dialogVisible"
149
+      width="40%"
150
+    >
151
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
152
+      <span slot="footer" class="dialog-footer">
153
+    <el-button @click="dialogVisible = false">取 消</el-button>
154
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
155
+      </span>
156
+    </el-dialog>
157
+
158
+
159
+     <el-dialog
160
+      title="提示"
161
+      :visible.sync="exportLogVisible"
162
+      width="40%"
163
+    >
164
+
165
+      <div v-for="(item,index) in logs" :key="index">
166
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
167
+        <br/>
168
+        <br/>
169
+        <span>{{getContent(item)}}</span>
170
+        <span >点击</span>
171
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
172
+        <br/>
173
+        <br/>
174
+      </div>
175
+
176
+      <span slot="footer" class="dialog-footer">
177
+    <el-button @click="exportLogVisible = false">取 消</el-button>
178
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
179
+    </span>
180
+    </el-dialog>
121
     </div>
181
     </div>
122
 </template>
182
 </template>
123
 
183
 
124
 <script>
184
 <script>
125
 import addProject from './addProject'
185
 import addProject from './addProject'
126
 import editProject from './editProject'
186
 import editProject from './editProject'
127
-import { getProjectList,deleteHisProject,getDePartmentList } from "@/api/project/project"
187
+import { getProjectList,deleteHisProject,getDePartmentList,postProjectInformation } from "@/api/project/project"
128
 import { getDictionaryDataConfig } from "@/utils/data";
188
 import { getDictionaryDataConfig } from "@/utils/data";
129
 import axios from 'axios'
189
 import axios from 'axios'
190
+import ProjectExcel from '@/xt_pages/components/ProjectExcel'
191
+import { generateLog } from '@/api/config'
130
 export default {
192
 export default {
131
     components:{
193
     components:{
132
         addProject,
194
         addProject,
133
-        editProject
195
+        editProject,
196
+        ProjectExcel
134
     },
197
     },
135
     data(){
198
     data(){
136
         return{
199
         return{
165
               label: '未备案'
228
               label: '未备案'
166
           }],
229
           }],
167
           is_mark:"",
230
           is_mark:"",
168
-           limit:100,
169
-           page:1,
170
-           departMentList:[]
231
+          limit:100,
232
+          page:1,
233
+          departMentList:[],
234
+           dialogVisible:false,
235
+           exportLogVisible:false,
236
+           logs:[]
237
+          
171
         }
238
         }
172
     },
239
     },
173
     methods:{
240
     methods:{
449
             this.departMentList = department
516
             this.departMentList = department
450
             }
517
             }
451
         })
518
         })
452
-     }
519
+     },
520
+      handleSuccessOne({ results, header }) {
521
+       
522
+        if (header != undefined && header.length > 0) {
523
+            
524
+          var isHasProjectName = header.includes('*项目名称')
525
+        
526
+          var isHasProjectPrice = header.includes('*零价')
527
+
528
+          var isHasProjectUnit = header.includes('*单位')
529
+
530
+          var isHasProjectCostClassify = header.includes('*费用类别')
531
+
532
+          var isHasProjectExecutiveSection = header.includes('*执行科室')
533
+         
534
+          var isHasProjectMedicalCoverage = header.includes('*医保等级')
535
+         
536
+          if (!(isHasProjectName && isHasProjectPrice && isHasProjectUnit && isHasProjectCostClassify && isHasProjectExecutiveSection && isHasProjectMedicalCoverage )) {
537
+            this.dialogVisible = true
538
+            return
539
+          }
540
+        }else {
541
+          this.dialogVisible = true
542
+          return
543
+        }
544
+       
545
+       var tableData = []
546
+       for(let i=0;i<results.length;i++){
547
+         let obj = {"cost_classify_id":0,"medical_insurance_level_id":0,"executive_section_id":0}
548
+         for (var key in results[i]) {
549
+           if (results[i]['*项目名称'] === undefined) {
550
+                obj['project_name'] = ''
551
+              } else {
552
+           if (key == '*项目名称') {
553
+               obj['project_name'] = results[i][key].replace(/\s/g,"")
554
+              }
555
+           }
556
+
557
+          if (results[i]['*零价'] === undefined) {
558
+                obj['price'] = ''
559
+              } else {
560
+           if (key == '*零价') {
561
+               obj['price'] = results[i][key].replace(/\s/g,"")
562
+              }
563
+           }
564
+
565
+         if (results[i]['*单位'] === undefined) {
566
+                obj['unit'] = ''
567
+              } else {
568
+         if (key == '*单位') {
569
+               obj['unit'] = results[i][key].replace(/\s/g,"")
570
+              }
571
+          }
572
+
573
+         if (results[i]['*费用类别'] === undefined) {
574
+                obj['cost_classify'] = ''
575
+              } else {
576
+         if (key == '*费用类别') {
577
+               obj['cost_classify'] = results[i][key].replace(/\s/g,"")
578
+              }
579
+          }
580
+
581
+        if (results[i]['*执行科室'] === undefined) {
582
+                obj['executive_section'] = ''
583
+              } else {
584
+         if (key == '*执行科室') {
585
+               obj['executive_section'] = results[i][key].replace(/\s/g,"")
586
+              }
587
+          }
588
+
589
+         if (results[i]['*医保等级'] === undefined) {
590
+                obj['medical_coverage'] = ''
591
+              } else {
592
+         if (key == '*医保等级') {
593
+               obj['medical_coverage'] = results[i][key].replace(/\s/g,"")
594
+              }
595
+          }
596
+         }
597
+         tableData.push(obj)
598
+         console.log("项目列表",tableData)
599
+        
600
+        var costClassify =  this.getDictionaryDataConfig('system','cost_classify')
601
+        console.log("费用类别",costClassify)
602
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
603
+        console.log("医保等级",medicalInsuranceLevel)
604
+      
605
+        for(let i=0;i<tableData.length;i++){ 
606
+          for(let j=0;j<costClassify.length;j++){
607
+            console.log("222222",costClassify[j].name)
608
+             if(tableData[i].cost_classify === costClassify[j].name){
609
+                 tableData[i].cost_classify_id = costClassify[j].id
610
+             }
611
+          }  
612
+
613
+          for(let j=0;j<medicalInsuranceLevel.length;j++){
614
+             if(tableData[i].medical_coverage == medicalInsuranceLevel[j].name ){
615
+                 tableData[i].medical_insurance_level_id = medicalInsuranceLevel[j].id
616
+             }
617
+          }
618
+
619
+         
620
+          
621
+          for(let j=0;j<this.departMentList.length;j++){
622
+             if(tableData[i].executive_section == this.departMentList[j].name){
623
+                tableData[i].executive_section_id = this.departMentList[j].id
624
+             }
625
+          }
626
+        }
627
+       }
628
+
629
+       for(let i=0;i<tableData.length;i++){
630
+          tableData[i].price = parseInt(tableData[i].price)
631
+       }
632
+       
633
+       let params = {
634
+          'projects':tableData 
635
+        }
636
+       console.log("params2222",params)
637
+        postProjectInformation(params).then(response=>{
638
+           if(response.data.state == 1){
639
+             var msg =  response.data.data.msg
640
+             this.$message.success("导入成功!")
641
+           }else{
642
+             this.$message.error("导入失败")
643
+           }
644
+        })
645
+      },
646
+      generateTxt: function(log) {
647
+        var content = ''
648
+        var errlog = log.err_logs
649
+        content = this.getContent(log)
650
+        for (let i = 0; i < errlog.length; i++) {
651
+          if (content.length == 0) {
652
+            content = errlog[i].err_msg
653
+          } else {
654
+            content = content + '\n' + errlog[i].err_msg
655
+          }
656
+        }
657
+
658
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
659
+        if (typeof url === 'object' && url instanceof Blob) {
660
+          url = URL.createObjectURL(url) // 创建blob地址
661
+        }
662
+        const aLink = document.createElement('a')
663
+        aLink.href = url
664
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
665
+        aLink.click()
666
+
667
+      },
668
+      getContent(log) {
669
+         console.log("日志",log)
670
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
671
+      },
672
+      timestampToTime(timestamp) {
673
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
674
+        var Y = date.getFullYear() + '年'
675
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
676
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
677
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
678
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
679
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
680
+        return Y + M + D + h + m + s
681
+      },
682
+       generateLog() {
683
+        let params = {
684
+          'log_type': 6
685
+        }
686
+        generateLog(params).then(
687
+          response => {
688
+            if (response.data.state === 1) {
689
+              this.logs = response.data.data.logs
690
+              this.exportLogVisible = true
691
+            } else {
692
+              this.$message.error(response.data.msg)
693
+            }
694
+          }
695
+        )
696
+      },
697
+      getDictionaryDataConfig(module, filed_name) {
698
+          return getDictionaryDataConfig(module, filed_name)
699
+      },
453
     },
700
     },
454
     created(){
701
     created(){
455
       this.getlist()
702
       this.getlist()

+ 2 - 2
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue 查看文件

295
         >
295
         >
296
           <template slot-scope="scope">
296
           <template slot-scope="scope">
297
             <span v-if="scope.row.execution_time != 0">
297
             <span v-if="scope.row.execution_time != 0">
298
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
298
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
299
             </span>
299
             </span>
300
             <span v-else></span>
300
             <span v-else></span>
301
           </template>
301
           </template>
385
         >
385
         >
386
           <template slot-scope="scope">
386
           <template slot-scope="scope">
387
             <span v-if="scope.row.execution_time != 0">
387
             <span v-if="scope.row.execution_time != 0">
388
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
388
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
389
             </span>
389
             </span>
390
             <span v-else></span>
390
             <span v-else></span>
391
           </template>
391
           </template>

+ 6 - 4
src/xt_pages/dialysis/dialysisDoctorAdvice.vue 查看文件

149
         >
149
         >
150
           <template slot-scope="scope">
150
           <template slot-scope="scope">
151
             <span v-if="scope.row.execution_time != 0">
151
             <span v-if="scope.row.execution_time != 0">
152
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
152
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
153
             </span>
153
             </span>
154
             <span v-else></span>
154
             <span v-else></span>
155
           </template>
155
           </template>
495
             console.log("列表数据",schedules)
495
             console.log("列表数据",schedules)
496
             var config = resp.data.config
496
             var config = resp.data.config
497
             console.log("config222222",config.is_open)
497
             console.log("config222222",config.is_open)
498
-           if(config.is_open == 0){
498
+           if(config.is_open == 0 || config.is_open == 2){
499
             this.show = true
499
             this.show = true
500
             this.showOne = false
500
             this.showOne = false
501
             let arr = []
501
             let arr = []
539
                 })
539
                 })
540
                 this.scheduleMap = a
540
                 this.scheduleMap = a
541
             }
541
             }
542
+            console.log("列表22222",this.scheduleMap)
542
             this.scheduleMap.map(ele => {
543
             this.scheduleMap.map(ele => {
543
                 let firstIndex = this.scheduleMap.findIndex(item => {
544
                 let firstIndex = this.scheduleMap.findIndex(item => {
544
                   return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
545
                   return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
554
             })
555
             })
555
             this.indexInfoList = newArr
556
             this.indexInfoList = newArr
556
            }
557
            }
557
-           if(config.is_open == 1 || config.is_open == 2){
558
+           if(config.is_open == 1){
558
              this.show = false
559
              this.show = false
559
              this.showOne  = true
560
              this.showOne  = true
560
             var schedules =  resp.data.hisAdvices
561
             var schedules =  resp.data.hisAdvices
599
                 })
600
                 })
600
                 this.scheduleMap = a
601
                 this.scheduleMap = a
601
             }
602
             }
603
+            console.log('333333344444',this.scheduleMap)
602
             this.scheduleMap.map(ele => {
604
             this.scheduleMap.map(ele => {
603
                 let firstIndex = this.scheduleMap.findIndex(item => {
605
                 let firstIndex = this.scheduleMap.findIndex(item => {
604
                   return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
606
                   return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
615
             this.indexInfoList = newArr
617
             this.indexInfoList = newArr
616
            }
618
            }
617
          }
619
          }
618
-         console.log("列表22222",this.scheduleMap)
620
+        //  console.log("列表22222",this.scheduleMap)
619
         })
621
         })
620
     },
622
     },
621
     getValue: function(val) {
623
     getValue: function(val) {

+ 29 - 5
src/xt_pages/stock/detail/print.vue 查看文件

60
                 <span v-else>{{calCount(stock)}}</span> 
60
                 <span v-else>{{calCount(stock)}}</span> 
61
               </td>
61
               </td>
62
               <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
62
               <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
63
-              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">{{stock.query_warehouseout_info[0].price}}</td>
63
+              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">
64
+                <!-- {{stock.query_warehouseout_info[0].price}} -->
65
+                {{getReailPrice(stock.id)}}
66
+              </td>
64
               <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
67
               <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
65
               <td style="line-height: 50px" v-if="type == 3">
68
               <td style="line-height: 50px" v-if="type == 3">
66
                 
69
                 
67
                   <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
70
                   <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
68
-                  <span v-else>{{(getStockCount(stock.id) * stock.query_warehouseout_info[0].price).toFixed(2)}}</span> 
71
+                  <span v-else>{{(getStockCount(stock.id) * getPrice(stock.id)).toFixed(2)}}</span> 
69
                
72
                
70
              </td>
73
              </td>
71
               <td style="line-height: 50px"></td>
74
               <td style="line-height: 50px"></td>
134
         end_time: this.$route.query.end_time,
137
         end_time: this.$route.query.end_time,
135
         stockTotal:[],
138
         stockTotal:[],
136
         wareOutInfo:[],
139
         wareOutInfo:[],
137
-        org_id:0
140
+        org_id:0,
141
+        informationList:[]
138
       }
142
       }
139
     },
143
     },
140
     methods: {
144
     methods: {
188
             var org_id = response.data.data.orgid
192
             var org_id = response.data.data.orgid
189
             console.log("org_id",org_id)
193
             console.log("org_id",org_id)
190
             this.org_id = org_id
194
             this.org_id = org_id
191
-           
195
+
196
+            var informationlist = response.data.data.infomationList
197
+            console.log('数据列表',informationlist)
198
+            this.informationList = informationlist
192
             for (let i = 0; i < response.data.data.list.length; i++) {
199
             for (let i = 0; i < response.data.data.list.length; i++) {
193
               if (this.type == 1) {
200
               if (this.type == 1) {
194
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
201
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
352
      },
359
      },
353
      getPrice(id){
360
      getPrice(id){
354
        var sum = ""
361
        var sum = ""
362
+       for(let i=0;i<this.informationList.length;i++){
363
+        for(let j=0;j<this.wareOutInfo.length;j++){
364
+           if(this.informationList[i].id == this.wareOutInfo[j].good_id){
365
+             this.wareOutInfo[j].retail_price =  this.informationList[i].retail_price 
366
+           }
367
+        }
368
+       }
369
+      
355
        for(let j=0;j<this.wareOutInfo.length;j++){
370
        for(let j=0;j<this.wareOutInfo.length;j++){
356
          if(id == this.wareOutInfo[j].good_id){
371
          if(id == this.wareOutInfo[j].good_id){
357
-            sum += this.wareOutInfo[j].price * this.wareOutInfo[j].count
372
+            sum += (this.wareOutInfo[j].retail_price * this.wareOutInfo[j].count).toFixed(2)
358
          }
373
          }
359
        }
374
        }
360
        
375
        
361
        return sum
376
        return sum
362
        
377
        
378
+     },
379
+     getReailPrice(id){
380
+       var price = 0
381
+       for(let i=0;i<this.informationList.length;i++){
382
+          if(id == this.informationList[i].id){
383
+             price = this.informationList[i].retail_price
384
+          }
385
+       }
386
+       return price
363
      }
387
      }
364
     },
388
     },
365
     created() {
389
     created() {

+ 2 - 0
src/xt_pages/stock/drugs/drugStockInOrder.vue 查看文件

397
           for (let i = 0; i < response.data.data.list.length; i++) {
397
           for (let i = 0; i < response.data.data.list.length; i++) {
398
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
398
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
399
           }
399
           }
400
+          
400
         }
401
         }
401
       });
402
       });
402
     },
403
     },
421
           for (let i = 0; i < response.data.data.list.length; i++) {
422
           for (let i = 0; i < response.data.data.list.length; i++) {
422
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
423
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
423
           }
424
           }
425
+          console.log("列表",this.warehouse.warehouseDate)
424
         }
426
         }
425
       });
427
       });
426
     },
428
     },

+ 12 - 1
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue 查看文件

586
               return;
586
               return;
587
             }
587
             }
588
           }
588
           }
589
+          for(let i=0;i<this.recordInfo.recordData.length;i++){
590
+             if(this.recordInfo.recordData[i].dealer == ""){
591
+                this.recordInfo.recordData[i].dealer = 0
592
+             }
593
+             
594
+             if(this.recordInfo.recordData[i].manufacturer == ""){
595
+               this.recordInfo.recordData[i].manufacturer = 0
596
+             }
597
+            
598
+          }
589
           const params = {
599
           const params = {
590
             stockIn: this.recordInfo.recordData
600
             stockIn: this.recordInfo.recordData
591
           };
601
           };
592
-
602
+          console.log("params",params)
603
+         
593
           EditDrugWarehouse(
604
           EditDrugWarehouse(
594
             params,
605
             params,
595
             this.warehousing_time,
606
             this.warehousing_time,

+ 18 - 3
src/xt_pages/stock/stockOutOrderDetailPrint.vue 查看文件

35
                                     <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
35
                                     <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
36
                                     <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
36
                                     <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
37
                                     <td>{{item.price}}</td>
37
                                     <td>{{item.price}}</td>
38
-                                    <td>{{getOutStockCount(item.good_id)}}</td> 
39
-                                    <td>{{(getOutStockCount(item.good_id)*item.price).toFixed(2)}}</td>
38
+                                    <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td> 
39
+                                    <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
40
                                 </tr>
40
                                 </tr>
41
                                 <tr>
41
                                 <tr>
42
                                   <td>合计</td>
42
                                   <td>合计</td>
98
             is_use:"",
98
             is_use:"",
99
             good_kind:"",
99
             good_kind:"",
100
             is_charge:"",
100
             is_charge:"",
101
-            list:[]
101
+            list:[],
102
+            wareoutList:[],
102
         }
103
         }
103
     },
104
     },
104
     methods:{
105
     methods:{
147
               total_price += this.getOutStockCount(this.warehousingOutInfo.warehousingOutData[i].good_id)*this.warehousingOutInfo.warehousingOutData[i].price
148
               total_price += this.getOutStockCount(this.warehousingOutInfo.warehousingOutData[i].good_id)*this.warehousingOutInfo.warehousingOutData[i].price
148
             }
149
             }
149
            this.allPrice = total_price
150
            this.allPrice = total_price
151
+
152
+           var wareoutList =  response.data.data.wareoutList
153
+           console.log("出库数据",wareoutList)
154
+           this.wareoutList = wareoutList
150
           }
155
           }
151
         })
156
         })
152
       },
157
       },
241
         }
246
         }
242
         return ""
247
         return ""
243
       },
248
       },
249
+
250
+      getWarehouseOutInfoCount(warehouse_out_id,good_id){
251
+        var count = 0 
252
+         for(let i=0;i<this.wareoutList.length;i++){
253
+            if(warehouse_out_id == this.wareoutList[i].warehouse_out_id && good_id == this.wareoutList[i].good_id){
254
+                count = this.wareoutList[i].count
255
+            }
256
+         }
257
+        return count
258
+      }
244
       
259
       
245
     },
260
     },
246
     created(){
261
     created(){

+ 1 - 1
src/xt_pages/stock/stockQuery.vue 查看文件

383
     },
383
     },
384
 
384
 
385
     exportList(){
385
     exportList(){
386
-         console.log("2222222",this.WarehouseInfo.warehouseInfoDate)
386
+      
387
          import('@/vendor/Export2Excel').then(excel => {
387
          import('@/vendor/Export2Excel').then(excel => {
388
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
388
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
389
          const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
389
          const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 

+ 6 - 4
src/xt_pages/user/patients.vue 查看文件

846
 
846
 
847
       },
847
       },
848
       handleSuccess({ results, header }) {
848
       handleSuccess({ results, header }) {
849
-        console.log(results)
849
+        console.log("header22222",results)
850
         if (header != undefined && header.length > 0) {
850
         if (header != undefined && header.length > 0) {
851
           var isHasName = header.includes('*姓名')
851
           var isHasName = header.includes('*姓名')
852
           var isHasGender = header.includes('*性别')
852
           var isHasGender = header.includes('*性别')
1062
                     }
1062
                     }
1063
                   }
1063
                   }
1064
 
1064
 
1065
-                  // console.log(obj)
1065
+                  console.log("2222222",obj)
1066
 
1066
 
1067
                   if (results[i]['家庭住址'] === undefined) {
1067
                   if (results[i]['家庭住址'] === undefined) {
1068
                     obj['home_address'] = ''
1068
                     obj['home_address'] = ''
1072
                     }
1072
                     }
1073
                   }
1073
                   }
1074
                 }
1074
                 }
1075
-
1075
+               
1076
                 this.export_date.push(obj)
1076
                 this.export_date.push(obj)
1077
               }
1077
               }
1078
 
1078
 
1079
               let index = 0
1079
               let index = 0
1080
-
1080
+             
1081
               for (let i = 0; i < this.export_date.length; i++) {
1081
               for (let i = 0; i < this.export_date.length; i++) {
1082
                 if (this.export_date[i].dialysis_no == '') {
1082
                 if (this.export_date[i].dialysis_no == '') {
1083
                   let new_dialysis_no = this.max_dialysis_no + index
1083
                   let new_dialysis_no = this.max_dialysis_no + index
1168
               let params = {
1168
               let params = {
1169
                 'patients': this.export_date
1169
                 'patients': this.export_date
1170
               }
1170
               }
1171
+              console.log("export2222",this.export_date)
1172
+              
1171
               postExportPatients(params).then(
1173
               postExportPatients(params).then(
1172
                 response => {
1174
                 response => {
1173
                   if (response.data.state === 1) {
1175
                   if (response.data.state === 1) {