Parcourir la source

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

see999 il y a 4 ans
Parent
révision
5a78933a19

+ 10 - 0
src/api/his/his.js Voir le fichier

@@ -365,6 +365,16 @@ export function getRecordList (params) {
365 365
 
366 366
 
367 367
 
368
+export function getCheckAccountFormData (params) {
369
+  return request({
370
+    url: '/api/comparedata/get',
371
+    method: 'get',
372
+    params:params,
373
+  })
374
+}
375
+
376
+
377
+
368 378
 
369 379
 
370 380
 

+ 14 - 0
src/store/modules/globalConfig.js Voir le fichier

@@ -1829,6 +1829,20 @@ const global_config = {
1829 1829
       },{
1830 1830
         id: 30,
1831 1831
         name: '次'
1832
+      },{
1833
+        id: 31,
1834
+        name: '米'
1835
+      },{
1836
+        id: 32,
1837
+        name: '对'
1838
+      },
1839
+      {
1840
+        id: 31,
1841
+        name: '对'
1842
+      },
1843
+      {
1844
+        id: 32,
1845
+        name: '米'
1832 1846
       },
1833 1847
 
1834 1848
     ],

+ 28 - 5
src/xt_pages/data/components/consumables.vue Voir le fichier

@@ -66,7 +66,7 @@
66 66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
67 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 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-link target="_blank" href="https://kuyi.shengws.com/stock_template.xlsx" :underline="false"
69
+        <el-link target="_blank" href="https://kuyi.shengws.com/stock_template.xlsx" :underline="false"
70 70
                  style="margin-left:15px">
71 71
           <el-button
72 72
             class="filter-item"
@@ -83,7 +83,7 @@
83 83
           type="primary"
84 84
           size="small"
85 85
         >下载日志
86
-        </el-button> -->
86
+        </el-button>
87 87
       </div>
88 88
 
89 89
     <el-table
@@ -1284,10 +1284,10 @@
1284 1284
            }
1285 1285
 
1286 1286
            if (results[i]['备注'] === undefined) {
1287
-                obj['is_mark'] = ''
1287
+                obj['remark'] = ''
1288 1288
               } else {
1289 1289
              if (key == '备注') {
1290
-               obj['is_mark'] = results[i][key].replace(/\s/g,"")
1290
+               obj['remark'] = results[i][key].replace(/\s/g,"")
1291 1291
               }
1292 1292
            }
1293 1293
 
@@ -1383,7 +1383,30 @@
1383 1383
              tableData[i].special_medical = 2
1384 1384
           }
1385 1385
        }
1386
-     
1386
+        
1387
+       for(let i=0;i<tableData.length;i++){
1388
+          tableData[i].retail_price = parseInt(tableData[i].retail_price) 
1389
+           
1390
+          if(tableData[i].buy_price == ""){
1391
+             tableData[i].buy_price = 0
1392
+          }else{
1393
+             tableData[i].buy_price = parseInt(tableData[i].buy_price)
1394
+          }
1395
+
1396
+          if(tableData[i].is_special_diseases == ""){
1397
+             tableData[i].is_special_diseases = 0
1398
+          }else{
1399
+            tableData[i].is_special_diseases = parseInt(tableData[i].is_special_diseases)
1400
+          }
1401
+
1402
+          if(tableData[i].is_record == ""){
1403
+             tableData[i].is_record = 0
1404
+          }else{
1405
+            tableData[i].is_record = parseInt(tableData[i].is_record)
1406
+          }
1407
+         
1408
+        
1409
+       }
1387 1410
        
1388 1411
        let params = {
1389 1412
           'goods':tableData 

+ 245 - 10
src/xt_pages/data/components/drugs.vue Voir le fichier

@@ -62,9 +62,9 @@
62 62
       
63 63
     </div>
64 64
     <div style="display:flex; align-items:center;margin-bottom:10px;">
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>
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"
65
+        <el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
66
+        <el-button type="primary" size="small" 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 68
                  style="margin-left:15px">
69 69
           <el-button
70 70
             class="filter-item"
@@ -81,7 +81,7 @@
81 81
           type="primary"
82 82
           size="small"
83 83
         >下载日志
84
-        </el-button> -->
84
+        </el-button>
85 85
       </div>
86 86
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
87 87
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
@@ -948,7 +948,7 @@
948 948
        
949 949
        var tableData = []
950 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}
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,"statistics_category_id":0,"drug_control_id":0,"pharmacology_category_id":0}
952 952
          for (var key in results[i]) {
953 953
 
954 954
            if (results[i]['*药品名称'] === undefined) {
@@ -1080,11 +1080,173 @@
1080 1080
             if (results[i]['*经销商'] === undefined) {
1081 1081
                 obj['dealer'] = ''
1082 1082
               } else {
1083
-           if (key == '*经销商') {
1084
-               obj['dealer'] = results[i][key].replace(/\s/g,"")
1083
+            if (key == '*经销商') {
1084
+                obj['dealer'] = results[i][key].replace(/\s/g,"")
1085
+              }
1086
+           }
1087
+
1088
+           if (results[i]['拼音'] === undefined) {
1089
+                obj['pinyin'] = ''
1090
+              } else {
1091
+            if (key == '拼音') {
1092
+                obj['pinyin'] = results[i][key].replace(/\s/g,"")
1093
+              }
1094
+           }
1095
+
1096
+           if (results[i]['五笔'] === undefined) {
1097
+                obj['wubi'] = ''
1098
+              } else {
1099
+            if (key == '五笔') {
1100
+                obj['wubi'] = results[i][key].replace(/\s/g,"")
1101
+              }
1102
+           }
1103
+
1104
+            if (results[i]['药品别名'] === undefined) {
1105
+                obj['drug_alias'] = ''
1106
+              } else {
1107
+            if (key == '药品别名') {
1108
+                obj['drug_alias'] = results[i][key].replace(/\s/g,"")
1109
+              }
1110
+           }
1111
+
1112
+            if (results[i]['别名拼音'] === undefined) {
1113
+                obj['drug_alias_pinyin'] = ''
1114
+              } else {
1115
+            if (key == '别名拼音') {
1116
+                obj['drug_alias_pinyin'] = results[i][key].replace(/\s/g,"")
1117
+              }
1118
+           }
1119
+
1120
+           if (results[i]['开药控制'] === undefined) {
1121
+                obj['drug_control'] = ''
1122
+              } else {
1123
+            if (key == '开药控制') {
1124
+                obj['drug_control'] = results[i][key].replace(/\s/g,"")
1125
+              }
1126
+           }
1127
+
1128
+            if (results[i]['批准文号'] === undefined) {
1129
+                obj['number'] = ''
1130
+              } else {
1131
+            if (key == '批准文号') {
1132
+                obj['number'] = results[i][key].replace(/\s/g,"")
1133
+              }
1134
+           }
1135
+
1136
+          if (results[i]['审批标志'] === undefined) {
1137
+                obj['hosp_appr_flag'] = ''
1138
+              } else {
1139
+            if (key == '审批标志') {
1140
+                obj['hosp_appr_flag'] = results[i][key].replace(/\s/g,"")
1141
+              }
1142
+           }
1143
+
1144
+            if (results[i]['审批标志'] === undefined) {
1145
+                obj['hosp_appr_flag'] = ''
1146
+              } else {
1147
+            if (key == '审批标志') {
1148
+                obj['hosp_appr_flag'] = results[i][key].replace(/\s/g,"")
1149
+              }
1150
+           }
1151
+
1152
+            if (results[i]['医保编码'] === undefined) {
1153
+                obj['medical_insurance_number'] = ''
1154
+              } else {
1155
+            if (key == '医保编码') {
1156
+                obj['medical_insurance_number'] = results[i][key].replace(/\s/g,"")
1157
+              }
1158
+           }
1159
+
1160
+            if (results[i]['药理分类'] === undefined) {
1161
+                obj['pharmacology_category'] = ''
1162
+              } else {
1163
+            if (key == '药理分类') {
1164
+                obj['pharmacology_category'] = results[i][key].replace(/\s/g,"")
1165
+              }
1166
+           }
1167
+
1168
+           if (results[i]['统计分类'] === undefined) {
1169
+                obj['statistics_category'] = ''
1170
+              } else {
1171
+            if (key == '统计分类') {
1172
+                obj['statistics_category'] = results[i][key].replace(/\s/g,"")
1173
+              }
1174
+           }
1175
+
1176
+           if (results[i]['本位码'] === undefined) {
1177
+                obj['code'] = ''
1178
+              } else {
1179
+            if (key == '本位码') {
1180
+                obj['code'] = results[i][key].replace(/\s/g,"")
1181
+              }
1182
+           }
1183
+
1184
+           if (results[i]['是否特病目录'] === undefined) {
1185
+                obj['is_special_diseases'] = ''
1186
+              } else {
1187
+            if (key == '是否特病目录') {
1188
+                obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
1189
+              }
1190
+           }
1191
+
1192
+           if (results[i]['是否备案'] === undefined) {
1193
+                obj['is_record'] = ''
1194
+              } else {
1195
+            if (key == '是否备案') {
1196
+                obj['is_record'] = results[i][key].replace(/\s/g,"")
1197
+              }
1198
+           }
1199
+
1200
+           if (results[i]['处方药标志'] === undefined) {
1201
+                obj['prescription_mark'] = ''
1202
+              } else {
1203
+            if (key == '处方药标志') {
1204
+                obj['prescription_mark'] = results[i][key].replace(/\s/g,"")
1205
+              }
1206
+           }
1207
+
1208
+            if (results[i]['社保目录编码'] === undefined) {
1209
+                obj['social_security_directory_code'] = ''
1210
+              } else {
1211
+            if (key == '社保目录编码') {
1212
+                obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
1213
+              }
1214
+           }
1215
+           
1216
+
1217
+            if (results[i]['备案日期'] === undefined) {
1218
+                obj['record_date'] = ''
1219
+              } else {
1220
+            if (key == '备案日期') {
1221
+                obj['record_date'] = results[i][key].replace(/\s/g,"")
1222
+              }
1223
+           }
1224
+
1225
+            if (results[i]['药品备注'] === undefined) {
1226
+                obj['drug_remark'] = ''
1227
+              } else {
1228
+            if (key == '药品备注') {
1229
+                obj['drug_remark'] = results[i][key].replace(/\s/g,"")
1230
+              }
1231
+           }
1232
+
1233
+             if (results[i]['状态'] === undefined) {
1234
+                obj['drug_status'] = ''
1235
+              } else {
1236
+            if (key == '状态') {
1237
+                obj['drug_status'] = results[i][key].replace(/\s/g,"")
1085 1238
               }
1086
-          
1087 1239
            }
1240
+
1241
+            if (results[i]['限制说明'] === undefined) {
1242
+                obj['limit_remark'] = ''
1243
+              } else {
1244
+            if (key == '限制说明') {
1245
+                obj['limit_remark'] = results[i][key].replace(/\s/g,"")
1246
+              }
1247
+           }
1248
+
1249
+
1088 1250
          }
1089 1251
          tableData.push(obj)
1090 1252
          console.log("表哥2222",tableData)
@@ -1099,10 +1261,16 @@
1099 1261
 
1100 1262
         var drugClassify =  this.getDictionaryDataConfig('system','drug_classify')
1101 1263
        
1102
-
1264
+        var drug_control =  this.getDictionaryDataConfig('system','drug_control')
1103 1265
         var goodUnit =  this.$store.getters.good_unit
1104
-       
1266
+        
1267
+        var pharmacology_category = this.getDictionaryDataConfig('system','pharmacology_category')
1268
+        console.log("药理分类",pharmacology_category)
1105 1269
 
1270
+        var statistics_category = this.getDictionaryDataConfig('system','statistics_category')
1271
+        console.log("统计分类",statistics_category)
1272
+         
1273
+       
1106 1274
         for(let i=0;i<tableData.length;i++){ 
1107 1275
           for(let j=0;j<drugType.length;j++){
1108 1276
             if(tableData[i].drug_type == drugType[j].name){
@@ -1140,18 +1308,85 @@
1140 1308
                tableData[i].dealer_id = this.dealer[j].id
1141 1309
             }
1142 1310
           }
1311
+
1312
+          for(let j=0;j<pharmacology_category.length;j++){
1313
+             if(tableData[i].pharmacology_category == pharmacology_category[j].name){
1314
+                tableData[i].pharmacology_category_id = pharmacology_category[j].id  
1315
+             }
1316
+          }
1317
+
1318
+         for(let j=0;j<statistics_category.length;j++){
1319
+            if(tableData[i].statistics_category == statistics_category[j].name){
1320
+                tableData[i].statistics_category_id = statistics_category[j].id
1321
+            }
1322
+         } 
1323
+
1324
+         for(let j=0;j<drug_control.length;j++){
1325
+           if(tableData[i].drug_control == drug_control[j].name){
1326
+               tableData[i].drug_control_id = drug_control[j].id
1327
+            }
1328
+         } 
1329
+         if(tableData[i].is_special_diseases == ""){
1330
+            tableData[i].is_special_diseases = 0
1331
+         }
1332
+
1333
+         if(tableData[i].is_special_diseases == "是"){
1334
+            tableData[i].is_special_diseases = 1
1335
+         }
1336
+         if(tableData[i].is_special_diseases == "否"){
1337
+            tableData[i].is_special_diseases = 2
1338
+         }
1339
+
1340
+      
1341
+          
1342
+          if(tableData[i].is_record == ""){
1343
+             tableData[i].is_record = 0
1344
+          }
1345
+          if(tableData[i].is_record == "是"){
1346
+            tableData[i].is_record = 1
1347
+          }
1348
+          if(tableData[i].is_record == "否"){
1349
+            tableData[i].is_record = 2
1350
+          }
1351
+         
1352
+          if(tableData[i].prescription_mark == ""){
1353
+              tableData[i].prescription_mark = 0
1354
+          }
1355
+          if(tableData[i].prescription_mark == "是"){
1356
+             tableData[i].prescription_mark =1
1357
+          }
1358
+          if(tableData[i].prescription_mark == "否"){
1359
+            tableData[i].prescription_mark =2 
1360
+          }
1361
+
1362
+          if(tableData[i].hosp_appr_flag == ""){
1363
+             tableData[i].hosp_appr_flag = 0
1364
+          } 
1143 1365
           
1366
+          if(tableData[i].hosp_appr_flag == "无需审批"){
1367
+              tableData[i].hosp_appr_flag = 1
1368
+          }
1369
+          if(tableData[i].hosp_appr_flag == "审批通过"){
1370
+              tableData[i].hosp_appr_flag = 2
1371
+          }
1372
+          if(tableData[i].hosp_appr_flag == "审批不通过"){
1373
+              tableData[i].hosp_appr_flag = 3
1374
+          }
1375
+         
1144 1376
         }
1145 1377
        }
1146 1378
        for(let i=0;i<tableData.length;i++){
1147 1379
           tableData[i].retail_price = parseInt(tableData[i].retail_price)
1148 1380
           tableData[i].last_price = parseInt(tableData[i].last_price)
1149 1381
        }
1382
+
1383
+
1150 1384
        
1151 1385
        let params = {
1152 1386
           'drugs':tableData 
1153 1387
         }
1154 1388
        console.log("params2222",params)
1389
+    
1155 1390
         postDrugInformation(params).then(response=>{
1156 1391
            if(response.data.state == 1){
1157 1392
              var msg =  response.data.data.msg

+ 234 - 8
src/xt_pages/data/components/project.vue Voir le fichier

@@ -39,9 +39,9 @@
39 39
             </div>
40 40
         </div>
41 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"
42
+        <el-button type="primary" size="small" @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" size="small" 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 45
                  style="margin-left:15px">
46 46
           <el-button
47 47
             class="filter-item"
@@ -60,7 +60,7 @@
60 60
           type="primary"
61 61
           size="small"
62 62
         >下载日志
63
-        </el-button> -->
63
+        </el-button>
64 64
       </div>
65 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">
66 66
             <el-table-column
@@ -375,7 +375,7 @@ export default {
375 375
                page:this.page,
376 376
                is_mark:this.is_mark,
377 377
             }
378
-           console.log("222",params)
378
+          
379 379
           getProjectList(params).then(response=>{
380 380
              if(response.data.state == 1){
381 381
                var projecList = response.data.data.projecList
@@ -544,7 +544,7 @@ export default {
544 544
        
545 545
        var tableData = []
546 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}
547
+         let obj = {"cost_classify_id":0,"medical_insurance_level_id":0,"executive_section_id":0,"tube_color_id":0,"statistical_classification_id":0,"category":0,"specail_project":0,"medical_status":0}
548 548
          for (var key in results[i]) {
549 549
            if (results[i]['*项目名称'] === undefined) {
550 550
                 obj['project_name'] = ''
@@ -593,6 +593,150 @@ export default {
593 593
                obj['medical_coverage'] = results[i][key].replace(/\s/g,"")
594 594
               }
595 595
           }
596
+
597
+        if (results[i]['拼音'] === undefined) {
598
+                obj['pinyin'] = ''
599
+              } else {
600
+         if (key == '拼音') {
601
+               obj['pinyin'] = results[i][key].replace(/\s/g,"")
602
+              }
603
+          }
604
+
605
+        if (results[i]['五笔'] === undefined) {
606
+                obj['wubi'] = ''
607
+              } else {
608
+         if (key == '五笔') {
609
+               obj['wubi'] = results[i][key].replace(/\s/g,"")
610
+              }
611
+          }
612
+
613
+         if (results[i]['统计分类'] === undefined) {
614
+                obj['statistical_classification'] = ''
615
+              } else {
616
+         if (key == '统计分类') {
617
+               obj['statistical_classification'] = results[i][key].replace(/\s/g,"")
618
+              }
619
+          }
620
+
621
+         if (results[i]['是否特病目录'] === undefined) {
622
+                obj['disease_directory'] = ''
623
+              } else {
624
+         if (key == '是否特病目录') {
625
+               obj['disease_directory'] = results[i][key].replace(/\s/g,"")
626
+              }
627
+          }
628
+         if (results[i]['是否备案'] === undefined) {
629
+                obj['is_record'] = ''
630
+              } else {
631
+         if (key == '是否备案') {
632
+               obj['is_record'] = results[i][key].replace(/\s/g,"")
633
+              }
634
+          }
635
+
636
+         if (results[i]['医保编码'] === undefined) {
637
+                obj['medical_code'] = ''
638
+              } else {
639
+         if (key == '医保编码') {
640
+               obj['medical_code'] = results[i][key].replace(/\s/g,"")
641
+              }
642
+          }
643
+
644
+         if (results[i]['试管颜色'] === undefined) {
645
+                obj['tube_color'] = ''
646
+              } else {
647
+         if (key == '试管颜色') {
648
+               obj['tube_color'] = results[i][key].replace(/\s/g,"")
649
+              }
650
+          }
651
+
652
+          if (results[i]['单次用量'] === undefined) {
653
+                obj['single_dose'] = ''
654
+              } else {
655
+         if (key == '单次用量') {
656
+               obj['single_dose'] = results[i][key].replace(/\s/g,"")
657
+              }
658
+          }
659
+
660
+           if (results[i]['用法'] === undefined) {
661
+                obj['delivery_way'] = ''
662
+              } else {
663
+          if (key == '用法') {
664
+               obj['delivery_way'] = results[i][key].replace(/\s/g,"")
665
+              }
666
+          }
667
+
668
+          if (results[i]['频率'] === undefined) {
669
+                obj['execution_frequency'] = ''
670
+              } else {
671
+          if (key == '频率') {
672
+               obj['execution_frequency'] = results[i][key].replace(/\s/g,"")
673
+              }
674
+          }
675
+
676
+
677
+          if (results[i]['天数'] === undefined) {
678
+                obj['number_days'] = ''
679
+              } else {
680
+          if (key == '天数') {
681
+               obj['number_days'] = results[i][key].replace(/\s/g,"")
682
+              }
683
+          }
684
+
685
+ 
686
+         if (results[i]['总量'] === undefined) {
687
+                obj['total'] = ''
688
+              } else {
689
+          if (key == '总量') {
690
+               obj['total'] = results[i][key].replace(/\s/g,"")
691
+              }
692
+          }
693
+
694
+          if (results[i]['状态'] === undefined) {
695
+                obj['medical_status'] = ''
696
+              } else {
697
+          if (key == '状态') {
698
+               obj['medical_status'] = results[i][key].replace(/\s/g,"")
699
+              }
700
+          }
701
+
702
+          if (results[i]['类别'] === undefined) {
703
+                obj['category'] = ''
704
+              } else {
705
+          if (key == '类别') {
706
+               obj['category'] = results[i][key].replace(/\s/g,"")
707
+              }
708
+          }
709
+
710
+            if (results[i]['特检项目'] === undefined) {
711
+                obj['specail_project'] = ''
712
+              } else {
713
+          if (key == 'specail_project') {
714
+               obj['category'] = results[i][key].replace(/\s/g,"")
715
+              }
716
+          }
717
+
718
+           if (results[i]['社保目录编码'] === undefined) {
719
+                obj['social_security_directory_code'] = ''
720
+              } else {
721
+           if (key == '社保目录编码') {
722
+               obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
723
+              }
724
+          }
725
+
726
+           if (results[i]['备案日期'] === undefined) {
727
+                obj['record_date'] = ''
728
+              } else {
729
+           if (key == '备案日期') {
730
+               obj['record_date'] = results[i][key].replace(/\s/g,"")
731
+              }
732
+          }
733
+           if (results[i]['备注'] === undefined) {
734
+                obj['remark'] = ''
735
+              } else {
736
+           if (key == '备注') {
737
+               obj['remark'] = results[i][key].replace(/\s/g,"")
738
+              }
739
+          }
596 740
          }
597 741
          tableData.push(obj)
598 742
          console.log("项目列表",tableData)
@@ -601,10 +745,16 @@ export default {
601 745
         console.log("费用类别",costClassify)
602 746
         var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
603 747
         console.log("医保等级",medicalInsuranceLevel)
604
-      
748
+        
749
+        var statistical_classification = getDictionaryDataConfig('system','statistics_category')
750
+        console.log("统计分类",statistical_classification)
751
+
752
+        var tube_color = this.getDictionaryDataConfig('system','tube_color')
753
+        console.log("试管颜色",tube_color)
754
+
605 755
         for(let i=0;i<tableData.length;i++){ 
606 756
           for(let j=0;j<costClassify.length;j++){
607
-            console.log("222222",costClassify[j].name)
757
+          
608 758
              if(tableData[i].cost_classify === costClassify[j].name){
609 759
                  tableData[i].cost_classify_id = costClassify[j].id
610 760
              }
@@ -623,6 +773,80 @@ export default {
623 773
                 tableData[i].executive_section_id = this.departMentList[j].id
624 774
              }
625 775
           }
776
+
777
+
778
+          for(let j=0;j<statistical_classification.length;j++){
779
+             if(tableData[i].statistical_classification == statistical_classification[j].name){
780
+                 tableData[i].statistical_classification_id = statistical_classification[j].id
781
+             }
782
+          }
783
+
784
+       
785
+
786
+          if(tableData[i].disease_directory == ""){
787
+              tableData[i].disease_directory = 0
788
+          }
789
+          if(tableData[i].disease_directory == "是"){
790
+             tableData[i].disease_directory = 1
791
+          }
792
+
793
+         if(tableData[i].disease_directory == "否"){
794
+             tableData[i].disease_directory = 2
795
+          }
796
+
797
+          if(tableData[i].is_record == ""){
798
+             tableData[i].is_record = 0
799
+          }
800
+           if(tableData[i].is_record == "是"){
801
+             tableData[i].is_record = 1
802
+          }
803
+
804
+          if(tableData[i].is_record == "否"){
805
+             tableData[i].is_record = 2
806
+          }
807
+
808
+          for(let j=0;j<tube_color.length;j++){
809
+             if(tableData[i].tube_color == tube_color[j].name){
810
+                tableData[i].tube_color_id = tube_color[j].id
811
+             }
812
+          }
813
+
814
+          if(tableData[i].category == ""){
815
+             tableData[i].category = 0
816
+          }
817
+          if(tableData[i].category == "常规诊疗项目"){
818
+             tableData[i].category = 1
819
+          }
820
+
821
+           if(tableData[i].category == "辅助器具项目"){
822
+             tableData[i].category = 2
823
+          }
824
+
825
+          if(tableData[i].category == "加收项目"){
826
+             tableData[i].category = 3
827
+          }
828
+
829
+          if(tableData[i].specail_project == ""){
830
+            tableData[i].specail_project = 0
831
+          }
832
+          if(tableData[i].specail_project == "是"){
833
+             tableData[i].specail_project = 1
834
+          }
835
+          if(tableData[i].specail_project == "否"){
836
+             tableData[i].specail_project = 2
837
+          }
838
+          if(tableData[i].medical_status == ""){
839
+             tableData[i].medical_status = 0
840
+          }
841
+
842
+          if(tableData[i].medical_status == "停用"){
843
+            tableData[i].medical_status = 1
844
+          }
845
+          if(tableData[i].medical_status == "收费"){
846
+            tableData[i].medical_status = 2
847
+          }
848
+
849
+        
626 850
         }
627 851
        }
628 852
 
@@ -634,10 +858,12 @@ export default {
634 858
           'projects':tableData 
635 859
         }
636 860
        console.log("params2222",params)
861
+       
637 862
         postProjectInformation(params).then(response=>{
638 863
            if(response.data.state == 1){
639 864
              var msg =  response.data.data.msg
640 865
              this.$message.success("导入成功!")
866
+             
641 867
            }else{
642 868
              this.$message.error("导入失败")
643 869
            }

+ 1 - 1
src/xt_pages/data/specialDictionary.vue Voir le fichier

@@ -12,7 +12,7 @@
12 12
           <consumables></consumables>
13 13
         </el-tab-pane>
14 14
         <el-tab-pane label="项目" name="3">
15
-        <project></project>
15
+         <project></project>
16 16
         </el-tab-pane>
17 17
         <el-tab-pane label="项目组套" name="4">
18 18
         <inspection></inspection>

+ 21 - 19
src/xt_pages/dialysis/components/consumables.vue Voir le fichier

@@ -160,7 +160,9 @@
160 160
       this.query.page = 1
161 161
       this.GetDialysisgoods()
162 162
     },
163
-    methods: { handleSizeChange(val) {
163
+    methods: {
164
+
165
+      handleSizeChange(val) {
164 166
         this.query.limit = val;
165 167
         this.GetDialysisgoods();
166 168
       },
@@ -180,7 +182,7 @@
180 182
 
181 183
       },
182 184
       getGoodUserInfo(good_type_id,good_user,last_good_user) {
183
-        var arrlist =[] 
185
+        var arrlist =[]
184 186
         if (good_user != null && good_user.length > 0) {
185 187
           let desc = ""
186 188
           for (let b = 0; b < good_user.length; b++){
@@ -191,7 +193,7 @@
191 193
           return desc
192 194
         }
193 195
         return ""
194
-       
196
+
195 197
         // else if (good_user != null && good_user.length <= 0) {
196 198
         //   if (last_good_user != null && last_good_user.length > 0) {
197 199
         //     let desc = ""
@@ -213,7 +215,7 @@
213 215
             this.$message.error(response.data.msg)
214 216
             return false
215 217
           } else {
216
-           
218
+
217 219
             this.list = []
218 220
             this.good_types = []
219 221
             this.allGoodInfo = []
@@ -233,9 +235,9 @@
233 235
             }
234 236
 
235 237
             this.arrKey.push(...arr)
236
-          
238
+
237 239
             this.allGoodInfo = res.data.dialysis_goods
238
-           
240
+
239 241
             for(let i = 0; i < res.data.dialysis_goods.length; i++){
240 242
               let arr =[]
241 243
               let obj = {
@@ -276,15 +278,15 @@
276 278
 
277 279
               }
278 280
             }
279
-           
281
+
280 282
           //  console.log("99999999",this.list)
281
-           let a = [] 
283
+           let a = []
282 284
           this.list.map(item => {
283 285
             a.push(item.good_type)
284 286
           })
285 287
           // console.log('aaaaaaaaa',a)
286 288
           let b = []
287
-       
289
+
288 290
           a.map(item => {
289 291
             let obj = []
290 292
             item.map((it,index) => {
@@ -293,9 +295,9 @@
293 295
               let str = 'name' + index
294 296
               c[str] = it.name
295 297
               obj.push(c)
296
-              
298
+
297 299
             })
298
-            
300
+
299 301
             b.push(obj)
300 302
           })
301 303
           var temp = []
@@ -304,7 +306,7 @@
304 306
             var objC = {...b[i]}
305 307
             temp.push(objC)
306 308
           }
307
-       
309
+
308 310
           // console.log("temp--------",temp)
309 311
           var tempTwo = []
310 312
           temp.map(item => {
@@ -314,18 +316,18 @@
314 316
             })
315 317
             let obj2 = {}
316 318
             obj.map((i,ind) => {
317
-            
319
+
318 320
               let str = 'name' + ind
319 321
               obj2[str] = i[str]
320 322
             })
321 323
             tempTwo.push(obj2)
322 324
             console.log(325556574342354234234,tempTwo)
323 325
           })
324
-          
326
+
325 327
           this.arrList.push(...tempTwo)
326 328
           console.log("cccccccc",this.arrList)
327 329
           }
328
-        })  
330
+        })
329 331
       },
330 332
       selectSchedulType(scheduleType) {
331 333
         this.schedulType = scheduleType
@@ -368,9 +370,9 @@
368 370
 
369 371
        exportList(){
370 372
          import('@/vendor/Export2Excel').then(excel => {
371
-         
372
-        
373
-       
373
+
374
+
375
+
374 376
          var arrTwo = []
375 377
          for(let i=0;i<this.arrKey.length;i++){
376 378
             arrTwo.push('name'+i)
@@ -385,7 +387,7 @@
385 387
          console.log("33333",this.arrList)
386 388
          const data = this.formatJson(filterVal,this.arrList)
387 389
          console.log("data",data)
388
-      
390
+
389 391
          excel.export_json_to_excel({
390 392
            header: tHeader,
391 393
            data,

+ 13 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue Voir le fichier

@@ -1386,8 +1386,13 @@ export default {
1386 1386
 
1387 1387
           // this.advices = response.data.data.advices
1388 1388
 
1389
-          this.advices =  response.data.data.advices.concat(response.data.data.doctorAdvice)
1389
+           var advices =  response.data.data.advices.concat(response.data.data.doctorAdvice)
1390
+           
1391
+          var newAdvices = this.unique(advices)
1392
+           console.log("newAdvices",newAdvices)
1390 1393
 
1394
+           this.advices = newAdvices
1395
+          console.log("去重后",this.advices)
1391 1396
           this.monitors = response.data.data.monitors
1392 1397
           this.summary = response.data.data.summary
1393 1398
           this.org_template_info = response.data.data.org_template_info
@@ -1588,7 +1593,11 @@ export default {
1588 1593
           // checker: 0,
1589 1594
         }
1590 1595
       )
1591
-    }
1596
+    },
1597
+     unique(arr) {
1598
+        const res = new Map();
1599
+        return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
1600
+    },
1592 1601
   },
1593 1602
   watch: {
1594 1603
     'patientInfo.gender': function() {
@@ -1614,7 +1623,8 @@ export default {
1614 1623
         this.patientInfo_source_2 = false
1615 1624
         this.patientInfo_source_1 = false
1616 1625
       }
1617
-    }
1626
+    },
1627
+   
1618 1628
   },
1619 1629
   created() {
1620 1630
     var xtuser = this.$store.getters.xt_user

+ 2 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue Voir le fichier

@@ -484,6 +484,8 @@
484 484
         this.form.p_type = 14
485 485
         this.form.sick_type = this.sick[0].id
486 486
         this.form.diagnosis = this.diagnoses[0].id
487
+        this.form.id_card_type = 2
488
+        this.form.certificates = 1
487 489
 
488 490
         // this.form.name = patientInfo.name
489 491
         // this.form.gender = patientInfo.gender
@@ -493,7 +495,6 @@
493 495
         // this.form.birthday = patientInfo.birthday
494 496
         // this.form.id_card = patientInfo.id_card_no
495 497
         // this.form.social_type = patientInfo.health_care_type
496
-        // this.form.id_card_type = 1
497 498
         // if( this.form.social_type == 0){
498 499
         //   this.form.social_type = ""
499 500
         // }

+ 479 - 178
src/xt_pages/outpatientCharges/costComparison.vue Voir le fichier

@@ -1,140 +1,219 @@
1 1
 <template>
2
-  <div class="main-contain incomeStatistics">
3
-    <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
7
-      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
-        <div>
9
-          <el-input size="small" style="width:150px;" v-model="keywords"
10
-                    class="filter-item"/>
11
-          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
-            搜索
13
-          </el-button>
2
+    <div class="main-contain incomeStatistics">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
14 5
         </div>
15
-        <el-button size="small" type="primary" @click="dialogFormVisible = true" >医保对账</el-button>
16
-      </div>
17
-      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
18
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
19
-        <el-table-column
20
-          prop="date"
21
-          label="序号"
22
-          width="60"
23
-          align="center"
24
-          type="index"
25
-        >
26
-        </el-table-column>
27
-        <el-table-column align="center" prop="name" label="对账申请人">
28
-          <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
29
-        </el-table-column>
30
-        <el-table-column align="center" prop="name" label="开始日期">
31
-          <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
32
-        </el-table-column>
33
-        <el-table-column align="center" prop="name" label="结束日期">
34
-          <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
35
-        </el-table-column>
36
-        <el-table-column align="center" prop="name" label="险种类型">
37
-          <template slot-scope="scope">
38
-            <div  v-if="scope.row.insutype == '310'">职工基本医疗保险</div>
39
-            <div  v-if="scope.row.insutype == '320'">公务员医疗补助</div>
40
-            <div  v-if="scope.row.insutype == '330'">大额医疗费用补助</div>
41
-            <div  v-if="scope.row.insutype == '340'">离休人员医疗保障</div>
42
-            <div  v-if="scope.row.insutype == '390'">城乡居民基本医疗保险</div>
43
-            <div  v-if="scope.row.insutype == '392'">城乡居民大病医疗保险</div>
44
-            <div  v-if="scope.row.insutype == '510'">生育保险</div>
45
-          </template>
46
-        </el-table-column>
47
-        <el-table-column align="center" prop="name" label="对账类型">
48
-          <template slot-scope="scope">
49
-            <div  v-if="scope.row.check_type == 1">总账</div>
50
-            <div  v-if="scope.row.check_type == 2">明细</div>
51
-          </template>
52
-        </el-table-column>
53
-        <el-table-column align="center" prop="name" label="结算笔数">
54
-          <template slot-scope="scope">{{scope.row.num}}</template>
55
-        </el-table-column>
56
-        <el-table-column align="center" prop="name" label="医疗费用总数">
57
-          <template slot-scope="scope">
58
-            {{scope.row.cost_total}}元
59
-          </template>
60
-        </el-table-column>
61
-        <el-table-column align="center" prop="name" width="160" label="基本医疗基金总费用">
62
-          <template slot-scope="scope">
63
-            {{scope.row.func_total}}元
64
-          </template>
65
-        </el-table-column>
66
-        <el-table-column align="center" prop="name" label="个人支付总费用">
67
-          <template slot-scope="scope">
68
-            {{scope.row.psn_pay}}元
69
-          </template>
70
-        </el-table-column>
71
-      </el-table>
72
-      <el-pagination
73
-        @size-change="handleSizeChange"
74
-        @current-change="handleCurrentChange"
75
-        :page-sizes="[10, 50, 100]"
76
-        :page-size="10"
77
-        background
78
-        style="margin-top:20px;float: right"
79
-        layout="total, sizes, prev, pager, next, jumper"
80
-        :total="total"
81
-
82
-      >
83
-      </el-pagination>
84
-      <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
85
-        <el-form :model="form" label-width="100px">
86
-          <el-form-item label="时间" :label-width="formLabelWidth">
87
-            <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
88
-                            @change="handleStartTimeChange" :editable="false" :clearable="false"
89
-                            style="width: 200px;" type="date" placeholder="选择开始日期"
90
-                            format="yyyy-MM-dd"
91
-                            value-format="yyyy-MM-dd"
92
-                            align="right"></el-date-picker>
93
-            -
94
-
95
-            <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
96
-                            @change="handleEndTimeChange" :editable="false" :clearable="false"
97
-                            style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
98
-                            format="yyyy-MM-dd"
99
-                            value-format="yyyy-MM-dd"
100
-                            align="right"></el-date-picker>
101
-          </el-form-item>
102
-          <el-form-item label="险种类型" :label-width="formLabelWidth">
103
-            <el-select v-model=" insutype" placeholder="请选择" style="width: 200px;">
104
-              <el-option
105
-                v-for="item in insutypes"
106
-                :key="item.value"
107
-                :label="item.label"
108
-                :value="item.value">
109
-              </el-option>
110
-            </el-select>
111
-          </el-form-item>
112
-          <el-form-item label="对账类型" :label-width="formLabelWidth">
113
-            <el-select v-model="check_type" placeholder="请选择" style="width: 200px;">
114
-              <el-option
115
-                v-for="item in options"
116
-                :key="item.value"
117
-                :label="item.label"
118
-                :value="item.value">
119
-              </el-option>
120
-            </el-select>
121
-          </el-form-item>
122
-        </el-form>
123
-        <div slot="footer" class="dialog-footer">
124
-          <el-button @click="dialogFormVisible = false">取 消</el-button>
125
-          <el-button type="primary" @click="confirm">确 定</el-button>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:130px;" v-model="keywords"
10
+                              class="filter-item"/>
11
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
+                               @click="searchAction">
13
+                        搜索
14
+                    </el-button>
15
+                    <el-date-picker v-model="query_start_time" prefix-icon="el-icon-date"
16
+                                    @change="handleStartTimeChange" :editable="false" :clearable="false"
17
+                                    style="width: 130px;" type="date" placeholder="选择开始日期"
18
+                                    format="yyyy-MM-dd"
19
+                                    value-format="yyyy-MM-dd"
20
+                                    align="right"></el-date-picker>
21
+                    -
22
+
23
+                    <el-date-picker v-model="query_end_time" prefix-icon="el-icon-date"
24
+                                    @change="handleEndTimeChange" :editable="false" :clearable="false"
25
+                                    style="width: 130px;margin-right:10px;" type="date" placeholder="选择结束日期"
26
+                                    format="yyyy-MM-dd"
27
+                                    value-format="yyyy-MM-dd"
28
+                                    align="right"></el-date-picker>
29
+
30
+
31
+                    <label class="title">险种<span class="name"></span> : </label>
32
+                    <el-select v-model="query_insutype" style="width:140px;margin-right:10px;" placeholder="请选择"
33
+                               @change="changeInsutype">
34
+                        <el-option
35
+                                v-for="item in insutypes"
36
+                                :key="item.value"
37
+                                :label="item.label"
38
+                                :value="item.value">
39
+                        </el-option>
40
+                    </el-select>
41
+
42
+
43
+                    <label class="title">清算类别<span class="name"></span> : </label>
44
+                    <el-select v-model="query_clr_type" style="width:100px;margin-right:10px;" placeholder="请选择"
45
+                               @change="changeClrType">
46
+                        <el-option
47
+                                v-for="item in clrOptions"
48
+                                :key="item.value"
49
+                                :label="item.label"
50
+                                :value="item.value">
51
+                        </el-option>
52
+                    </el-select>
53
+
54
+                </div>
55
+
56
+            </div>
57
+            <div style="float: right;margin-bottom: 10px">
58
+                <el-button size="small" type="primary" @click="dialogFormVisible = true">医保对账</el-button>
59
+                <el-button size="small" type="primary" @click="getFormData">下载对账报表</el-button>
60
+            </div>
61
+
62
+
63
+            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
64
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
65
+                      highlight-current-row
66
+                      @select="selectCostInfo"
67
+                      @selection-change="changeCostInfoTableData"
68
+                      @select-all="changeAllCostInfoTableData"
69
+                      row-key="row_key"
70
+                      ref="multipleTable"
71
+            >
72
+                <el-table-column
73
+                        align="center"
74
+                        type="selection"
75
+                        width="55"
76
+                ></el-table-column>
77
+                <el-table-column
78
+                        prop="date"
79
+                        label="序号"
80
+                        width="60"
81
+                        align="center"
82
+                        type="index"
83
+                >
84
+                </el-table-column>
85
+                <el-table-column align="center" prop="name" label="对账结果">
86
+                    <template slot-scope="scope">{{'平'}}</template>
87
+                </el-table-column>
88
+                <el-table-column align="center" prop="name" label="操作机构">
89
+                    <!--<template slot-scope="scope">{{// this.$store.getters.xt_user.org.org_name}}</template>-->
90
+                </el-table-column>
91
+                <el-table-column align="center" prop="name" label="对账申请人">
92
+                    <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
93
+                </el-table-column>
94
+                <el-table-column align="center" prop="name" label="开始时间">
95
+                    <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
96
+                </el-table-column>
97
+                <el-table-column align="center" prop="name" label="结束时间">
98
+                    <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
99
+                </el-table-column>
100
+                <el-table-column align="center" prop="name" label="险种类型">
101
+                    <template slot-scope="scope">
102
+                        <div v-if="scope.row.insutype == '310'">职工基本医疗保险</div>
103
+                        <div v-if="scope.row.insutype == '320'">公务员医疗补助</div>
104
+                        <div v-if="scope.row.insutype == '330'">大额医疗费用补助</div>
105
+                        <div v-if="scope.row.insutype == '340'">离休人员医疗保障</div>
106
+                        <div v-if="scope.row.insutype == '390'">城乡居民基本医疗保险</div>
107
+                        <div v-if="scope.row.insutype == '392'">城乡居民大病医疗保险</div>
108
+                        <div v-if="scope.row.insutype == '510'">生育保险</div>
109
+                    </template>
110
+                </el-table-column>
111
+                <el-table-column align="center" prop="name" label="对账类型">
112
+                    <template slot-scope="scope">
113
+                        <div v-if="scope.row.check_type == 1">总账</div>
114
+                        <div v-if="scope.row.check_type == 2">明细</div>
115
+                    </template>
116
+                </el-table-column>
117
+                <el-table-column align="center" prop="name" label="清算经办机构">
118
+                    <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
119
+                </el-table-column>
120
+                <el-table-column align="center" prop="name" label="定点医药机构医疗费总额(元)">
121
+                    <template slot-scope="scope">{{scope.row.setl_optins}}</template>
122
+                </el-table-column>
123
+                <el-table-column align="center" prop="name" label="医保中心医疗费总额(元)">
124
+                    <template slot-scope="scope">{{scope.row.cost_total}}</template>
125
+                </el-table-column>
126
+                <el-table-column align="center" prop="name" label="定点医药机构基金总额(元)">
127
+                    <template slot-scope="scope">{{scope.row.cost_total}}</template>
128
+                </el-table-column>
129
+                <el-table-column align="center" prop="name" label="医保中心基金总额(元)">
130
+                    <template slot-scope="scope">{{scope.row.func_total}}</template>
131
+                </el-table-column>
132
+                <el-table-column align="center" prop="name" label="定点医药机构个人账号总额(元)">
133
+                    <template slot-scope="scope">{{scope.row.func_total}}</template>
134
+                </el-table-column>
135
+                <el-table-column align="center" prop="name" label="医保中心个人账号总额(元)">
136
+                    <template slot-scope="scope">{{scope.row.psn_pay}}</template>
137
+                </el-table-column>
138
+                <el-table-column align="center" prop="name" label="定点医药机构结算笔数">
139
+                    <template slot-scope="scope">{{scope.row.psn_pay}}</template>
140
+                </el-table-column>
141
+                <el-table-column align="center" prop="name" label="医保中心结算笔数">
142
+                    <template slot-scope="scope">{{scope.row.num}}</template>
143
+                </el-table-column>
144
+
145
+            </el-table>
146
+            <el-pagination
147
+                    @size-change="handleSizeChange"
148
+                    @current-change="handleCurrentChange"
149
+                    :page-sizes="[10, 50, 100]"
150
+                    :page-size="10"
151
+                    background
152
+                    style="margin-top:20px;float: right"
153
+                    layout="total, sizes, prev, pager, next, jumper"
154
+                    :total="total"
155
+            >
156
+            </el-pagination>
157
+            <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
158
+                <el-form :model="form" label-width="100px">
159
+                    <el-form-item label="时间" label-width="100px">
160
+                        <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
161
+                                        @change="handleStartTimeChange" :editable="false" :clearable="false"
162
+                                        style="width: 200px;" type="date" placeholder="选择开始日期"
163
+                                        format="yyyy-MM-dd"
164
+                                        value-format="yyyy-MM-dd"
165
+                                        align="right"></el-date-picker>
166
+                        -
167
+
168
+                        <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
169
+                                        @change="handleEndTimeChange" :editable="false" :clearable="false"
170
+                                        style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
171
+                                        format="yyyy-MM-dd"
172
+                                        value-format="yyyy-MM-dd"
173
+                                        align="right"></el-date-picker>
174
+                    </el-form-item>
175
+                    <el-form-item label="险种类型" :label-width="formLabelWidth">
176
+                        <el-select v-model="insutype" placeholder="请选择" style="width: 200px;">
177
+                            <el-option
178
+                                    v-for="item in insutypes"
179
+                                    :key="item.value"
180
+                                    :label="item.label"
181
+                                    :value="item.value">
182
+                            </el-option>
183
+                        </el-select>
184
+                    </el-form-item>
185
+                    <el-form-item label="对账类型" :label-width="formLabelWidth">
186
+                        <el-select v-model="check_type" placeholder="请选择" style="width: 200px;">
187
+                            <el-option
188
+                                    v-for="item in options"
189
+                                    :key="item.value"
190
+                                    :label="item.label"
191
+                                    :value="item.value">
192
+                            </el-option>
193
+                        </el-select>
194
+                    </el-form-item>
195
+                </el-form>
196
+                <div slot="footer" class="dialog-footer">
197
+                    <el-button @click="dialogFormVisible = false">取 消</el-button>
198
+                    <el-button type="primary" @click="confirm">确 定</el-button>
199
+                </div>
200
+            </el-dialog>
126 201
         </div>
127
-      </el-dialog>
128
-    </div>
129 202
 
130 203
 
131
-  </div>
204
+    </div>
132 205
 </template>
133 206
 
134 207
 
135 208
 <script>
136 209
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
137
-  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, getList } from '@/api/his/his'
210
+  import {
211
+    getCheckAccountFormData,
212
+    getDoctorList,
213
+    getExportConsumeDetailList,
214
+    getHisOrderList,
215
+    getList
216
+  } from '@/api/his/his'
138 217
   import { uParseTime } from '@/utils/tools'
139 218
   import { fetchAllAdminUsers } from '@/api/doctor'
140 219
   import axios from 'axios'
@@ -145,6 +224,7 @@
145 224
     },
146 225
     data() {
147 226
       return {
227
+        form: {},
148 228
         crumbs: [
149 229
           { path: false, name: '门诊收费' },
150 230
           { path: false, name: '医保费用对照' }
@@ -155,65 +235,207 @@
155 235
         dialogFormVisible: false,
156 236
         total: 0,
157 237
         adminUserOptions: [],
158
-        start_time:"",
159
-        end_time:"",
160
-        insutype:"",
161
-        check_type:"",
162
-
163
-        options:[
238
+        start_time: '',
239
+        end_time: '',
240
+        insutype: '',
241
+        check_type: '',
242
+        keywords: '',
243
+        query_start_time: '',
244
+        query_end_time: '',
245
+        selection:[],
246
+        query_insutype: '',
247
+        query_clr_type: '',
248
+        fromData: [],
249
+        options: [
164 250
           {
165
-            value:1,
166
-            label:"总账",
167
-          },  {
168
-            value:2,
169
-            label:"明细",
170
-          },
251
+            value: 1,
252
+            label: '总账'
253
+          }, {
254
+            value: 2,
255
+            label: '明细'
256
+          }
171 257
         ],
172
-
173
-        insutypes:[
258
+        clrOptions: [
174 259
           {
175
-            value:"310",
176
-            label:"职工基本医疗保险",
177
-          },  {
178
-            value:"320",
179
-            label:"公务员医疗补助",
180
-          },  {
181
-            value:"330",
182
-            label:"大额医疗费用补助",
183
-          },  {
184
-            value:"340",
185
-            label:"离休人员医疗保障",
260
+            value: '11',
261
+            label: '门诊'
262
+          }, {
263
+            value: '21',
264
+            label: '住院'
265
+          }, {
266
+            value: '41',
267
+            label: '药店购药'
268
+          }, {
269
+            value: '99',
270
+            label: '其他'
271
+          }
272
+        ],
273
+        insutypes: [
274
+          {
275
+            value: '310',
276
+            label: '职工基本医疗保险'
277
+          }, {
278
+            value: '320',
279
+            label: '公务员医疗补助'
280
+          }, {
281
+            value: '330',
282
+            label: '大额医疗费用补助'
283
+          }, {
284
+            value: '340',
285
+            label: '离休人员医疗保障'
186 286
           },
187 287
           {
188
-            value:"390",
189
-            label:"城乡居民基本医疗保险",
288
+            value: '390',
289
+            label: '城乡居民基本医疗保险'
190 290
           }, {
191
-            value:"392",
192
-            label:"城乡居民大病医疗保险",
291
+            value: '392',
292
+            label: '城乡居民大病医疗保险'
193 293
           }, {
194
-            value:"510",
195
-            label:"生育保险",
294
+            value: '510',
295
+            label: '生育保险'
196 296
           }
197 297
 
198
-
298
+          // 1617724800
199 299
 
200 300
         ]
201 301
 
202 302
       }
203 303
     },
204 304
     methods: {
205
-      confirm(){
206
-        if(this.check_type == 1){
305
+      changeInsutype() {
306
+        let params = {
307
+          'page': 1,
308
+          'limit': 10,
309
+          'keywords': this.keywords,
310
+          'insutype': this.query_insutype,
311
+          'clr_type': "11",
312
+          'start_time': this.query_start_time,
313
+          'end_time': this.query_end_time,
314
+        }
315
+        this.tableData = []
316
+        getList(params).then(response => {
317
+          if (response.data.state == 0) {
318
+            this.$message.error(response.data.msg)
319
+            return false
320
+          } else {
321
+            this.tableData = response.data.data.list
322
+            this.total = response.data.data.total
323
+          }
324
+        })
325
+
326
+      }, changeClrType(val) {
327
+        if (val != "11"){
328
+          this.tableData = []
329
+          this.total = 0
330
+        }else{
331
+          let params = {
332
+            'page': 1,
333
+            'limit': 10,
334
+            'keywords': this.keywords,
335
+            'insutype': this.query_insutype,
336
+            'clr_type': "11",
337
+            'start_time': this.query_start_time,
338
+            'end_time': this.query_end_time,
339
+          }
340
+          this.tableData = []
341
+          getList(params).then(response => {
342
+            if (response.data.state == 0) {
343
+              this.$message.error(response.data.msg)
344
+              return false
345
+            } else {
346
+              this.tableData = response.data.data.list
347
+              this.total = response.data.data.total
348
+            }
349
+          })
350
+        }
351
+      },
352
+      handleStartTimeChange() {
353
+
354
+        let params = {
355
+          'page': 1,
356
+          'limit': 10,
357
+          'keywords': this.keywords,
358
+          'insutype': "",
359
+          'clr_type': "11",
360
+          'start_time': this.query_start_time,
361
+          'end_time': this.query_end_time,
362
+        }
363
+        this.tableData = []
364
+        getList(params).then(response => {
365
+          if (response.data.state == 0) {
366
+            this.$message.error(response.data.msg)
367
+            return false
368
+          } else {
369
+            this.tableData = response.data.data.list
370
+            this.total = response.data.data.total
371
+          }
372
+        })
373
+
374
+      }, handleEndTimeChange() {
375
+
376
+        let params = {
377
+          'page': 1,
378
+          'limit': 10,
379
+          'keywords': this.keywords,
380
+          'insutype': "",
381
+          'clr_type': "11",
382
+          'start_time': this.query_start_time,
383
+          'end_time': this.query_end_time,
384
+        }
385
+        this.tableData = []
386
+        getList(params).then(response => {
387
+          if (response.data.state == 0) {
388
+            this.$message.error(response.data.msg)
389
+            return false
390
+          } else {
391
+            this.tableData = response.data.data.list
392
+            this.total = response.data.data.total
393
+          }
394
+        })
395
+
396
+      },
397
+
398
+      searchAction() {
399
+        let params = {
400
+          'page': 1,
401
+          'limit': 10,
402
+          'keywords': this.keywords,
403
+          'insutype': "",
404
+          'clr_type': "11",
405
+          'start_time': "",
406
+          'end_time': "",
407
+        }
408
+        this.tableData = []
409
+        getList(params).then(response => {
410
+          if (response.data.state == 0) {
411
+            this.$message.error(response.data.msg)
412
+            return false
413
+          } else {
414
+            this.tableData = response.data.data.list
415
+            this.total = response.data.data.total
416
+          }
417
+        })
418
+
419
+      },
420
+      selectCostInfo(selection, row) {
421
+        this.selection = selection
422
+
423
+      }, changeCostInfoTableData(val) {
424
+        this.selection = val
425
+      }, changeAllCostInfoTableData(selection) {
426
+        this.selection = selection
427
+
428
+
429
+      }, confirm() {
430
+        if (this.check_type == 1) {
207 431
           let params = {
208 432
             start_time: this.start_time,
209 433
             end_time: this.end_time,
210 434
             insutype: this.insutype,
211 435
             clr_type: '11'
212 436
           }
213
-
214 437
           var that = this
215
-
216
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
438
+          if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
217 439
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
218 440
               params: params
219 441
             })
@@ -222,11 +444,32 @@
222 444
                   that.$message.error(response.data.msg)
223 445
                   return false
224 446
                 } else {
225
-                  this.page =1
226
-                  this.limit = 10
227
-                  this.keywords = ""
228
-                  this.getList()
447
+                  var result_desc = ''
448
+
449
+                  if (response.data.data.stmt_rslt == 0) {
450
+                    result_desc = '对账平'
451
+                  } else if (response.data.data.stmt_rslt == 1) {
452
+                    result_desc = '中心多' + '\n' + response.data.data.stmt_rslt_dscr
453
+
454
+                  } else if (response.data.data.stmt_rslt == 2) {
455
+                    result_desc = '机构多' + '\n' + response.data.data.stmt_rslt_dscr
456
+                  }
457
+
458
+                  that.$alert(result_desc, '对账结果', {
459
+                    confirmButtonText: '确定',
460
+                    callback: action => {
461
+                      this.dialogFormVisible = false
462
+                    }
463
+                  })
229 464
 
465
+                  that.page = 1
466
+                  that.limit = 10
467
+                  that.keywords = ''
468
+                  that.query_start_time = ''
469
+                  that.query_end_time = ''
470
+                  that.query_insutype = ''
471
+                  that.query_clr_type = ''
472
+                  that.getList()
230 473
                 }
231 474
               })
232 475
               .catch(function(error) {
@@ -235,10 +478,10 @@
235 478
 
236 479
           }
237 480
 
238
-        }else {
481
+        } else {
239 482
           let params = {
240 483
             start_time: this.start_time,
241
-            end_time: this.end_time,
484
+            end_time: this.end_time
242 485
           }
243 486
           var that = this
244 487
           axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
@@ -249,20 +492,16 @@
249 492
                 that.$message.error(response.data.msg)
250 493
                 return false
251 494
               } else {
252
-                this.page =1
495
+                this.page = 1
253 496
                 this.limit = 10
254
-                this.keywords = ""
497
+                this.keywords = ''
255 498
                 this.getList()
256 499
               }
257 500
             })
258 501
             .catch(function(error) {
259 502
 
260 503
             })
261
-
262
-
263 504
         }
264
-
265
-
266 505
       },
267 506
       getInsutype(type) {
268 507
 
@@ -290,8 +529,11 @@
290 529
         let params = {
291 530
           'page': this.page,
292 531
           'limit': this.limit,
293
-          'keywords': this.keywords
294
-
532
+          'keywords': this.keywords,
533
+          'insutype': this.query_insutype,
534
+          'clr_type': this.query_clr_type,
535
+          'start_time': this.query_start_time,
536
+          'end_time': this.query_end_time
295 537
         }
296 538
         this.tableData = []
297 539
         getList(params).then(response => {
@@ -313,6 +555,65 @@
313 555
         this.page = page
314 556
         this.getList()
315 557
 
558
+      }, getFormData() {
559
+        if (this.selection.length == 0) {
560
+          this.$message.error('请选择要下载的对账记录')
561
+          return
562
+        }
563
+
564
+        let params = {
565
+          'start_time': this.getTimes(this.selection[0].start_time),
566
+          'end_time': this.getTimes(this.selection[0].end_time),
567
+          'insutype': this.selection[0].insutype
568
+        }
569
+        getCheckAccountFormData(params).then(response => {
570
+          if (response.data.state == 0) {
571
+            this.$message.error(response.data.msg)
572
+            return false
573
+          } else {
574
+            this.fromData = response.data.data.list
575
+            var list = []
576
+
577
+            for (let i = 0; i < this.fromData.length; i++) {
578
+              let obj = {
579
+                '结算金额': this.fromData[i].medfee_sumamt,
580
+                '姓名': this.fromData[i].psn_name,
581
+                '身份证': this.fromData[i].id_card_no,
582
+                '个人编号': this.fromData[i].psn_no,
583
+                '门诊流水号': this.fromData[i].mdtrt_id,
584
+                '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
585
+                '起付线': this.fromData[i].act_pay_dedc,
586
+                '统筹基金': this.fromData[i].fund_pay_sumamt,
587
+                '个人支付': this.fromData[i].psn_cash_pay,
588
+                '个账支付': this.fromData[i].acct_pay,
589
+                '现金支付': this.fromData[i].cash_pay,
590
+                '总费用': this.fromData[i].sumamt,
591
+                '冲销标志': '已结算'
592
+              }
593
+              list.push(obj)
594
+            }
595
+            var insutype_name = ''
596
+            if (this.query_insutype == '310') {
597
+              insutype_name = '职工基本医疗保险'
598
+            } else if (this.query_insutype == '390') {
599
+              insutype_name = '城乡居民基本医疗保险'
600
+            }
601
+
602
+            import('@/vendor/Export2Excel').then(excel => {
603
+              const tHeader = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
604
+              const filterVal = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
605
+              const data = this.formatJson(filterVal, list)
606
+              excel.export_json_to_excel({
607
+                header: tHeader,
608
+                data,
609
+                filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
610
+              })
611
+            })
612
+          }
613
+        })
614
+
615
+      }, formatJson(filterVal, jsonData) {
616
+        return jsonData.map(v => filterVal.map(j => v[j]))
316 617
       }
317 618
     },
318 619
     created() {

+ 13 - 4
src/xt_pages/outpatientCharges/incomeStatistics.vue Voir le fichier

@@ -51,18 +51,27 @@
51 51
           type="index"
52 52
         >
53 53
         </el-table-column>
54
-        <el-table-column align="center" prop="name" label="就诊号">
55
-          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
54
+        <el-table-column align="center" prop="name" label="收费日期">
55
+          <template slot-scope="scope">{{ scope.row.selt_time }}</template>
56 56
         </el-table-column>
57
+
58
+
57 59
         <el-table-column align="center" prop="name" label="患者名字">
58
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
60
+          <template slot-scope="scope">{{ scope.row.psn_name }}</template>
59 61
         </el-table-column>
60 62
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
61 63
           <!--<template slot-scope="scope"></template>-->
62 64
         <!--</el-table-column>-->
63
-        <el-table-column align="center" prop="name" label="应收金额">
65
+        <el-table-column align="center" prop="name" label="金额">
64 66
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
65 67
         </el-table-column>
68
+
69
+        <el-table-column align="center" prop="name" label="总金额">
70
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
71
+        </el-table-column>
72
+
73
+
74
+
66 75
         <el-table-column align="center" prop="name" label="实收金额">
67 76
           <template slot-scope="scope">{{scope.row.reality_price}}</template>
68 77
         </el-table-column>

+ 5 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Voir le fichier

@@ -138,11 +138,11 @@
138 138
                         >退号
139 139
                         </el-button>
140 140
 
141
-                        <!--<el-button-->
142
-                        <!--v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"-->
143
-                        <!--size="small" @click="open(11)" type="primary"-->
144
-                        <!--&gt;撤销明细-->
145
-                        <!--</el-button>-->
141
+                        <el-button
142
+                        v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"
143
+                        size="small" @click="open(11)" type="primary"
144
+                        >撤销明细
145
+                        </el-button>
146 146
 
147 147
                     </div>
148 148
                     <!--<el-button size="small" @click="query" type="primary"-->

+ 328 - 243
src/xt_pages/outpatientCharges/summary.vue Voir le fichier

@@ -1,167 +1,176 @@
1 1
 <template>
2
-  <div class="main-contain outpatientChargesManagement">
3
-    <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
7
-      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
-        <div>
9
-          <el-input size="small" style="width:150px;"  v-model="keywords"
10
-                    class="filter-item"/>
11
-          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
-            搜索
13
-          </el-button>
14
-          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15
-            <el-option
16
-              label="全部"
17
-              value="0">
18
-            </el-option>
19
-            <el-option
20
-              v-for="item,index in doctors"
21
-              :key="index"
22
-              :label="item.user_name"
23
-              :value="item.admin_user_id">
24
-            </el-option>
25
-          </el-select>
26
-          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27
-                          @change="handleStartTimeChange" :editable="false" :clearable="false"
28
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
29
-                          format="yyyy-MM-dd"
30
-                          value-format="yyyy-MM-dd"
31
-                          align="right"></el-date-picker>
32
-
33
-          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
34
-                          @change="handleEndTimeChange" :editable="false" :clearable="false"
35
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
36
-                          format="yyyy-MM-dd"
37
-                          value-format="yyyy-MM-dd"
38
-                          align="right"></el-date-picker>
39
-          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
-          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
2
+    <div class="main-contain outpatientChargesManagement">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
41 5
         </div>
42
-        <div>
43
-          <!-- <el-popover
44
-            placement="bottom"
45
-            width="210"
46
-            trigger="click">
47
-            <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
48
-            <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
49
-            <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
50
-
51
-          </el-popover> -->
52
-          <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:150px;" v-model="keywords"
10
+                              class="filter-item"/>
11
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
+                               @click="searchAction">
13
+                        搜索
14
+                    </el-button>
15
+                    <el-select size="small" v-model="admin_user_id" placeholder="请选择"
16
+                               style="width:150px;margin-left:10px;" @change="changeDoctor">
17
+                        <el-option
18
+                                label="全部"
19
+                                value="0">
20
+                        </el-option>
21
+                        <el-option
22
+                                v-for="item,index in doctors"
23
+                                :key="index"
24
+                                :label="item.user_name"
25
+                                :value="item.admin_user_id">
26
+                        </el-option>
27
+                    </el-select>
28
+                    <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
29
+                                    @change="handleStartTimeChange" :editable="false" :clearable="false"
30
+                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
31
+                                    format="yyyy-MM-dd"
32
+                                    value-format="yyyy-MM-dd"
33
+                                    align="right"></el-date-picker>
34
+
35
+                    <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
36
+                                    @change="handleEndTimeChange" :editable="false" :clearable="false"
37
+                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
38
+                                    format="yyyy-MM-dd"
39
+                                    value-format="yyyy-MM-dd"
40
+                                    align="right"></el-date-picker>
41
+                    <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
42
+                    <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
43
+                </div>
44
+                <div>
45
+                    <!-- <el-popover
46
+                      placement="bottom"
47
+                      width="210"
48
+                      trigger="click">
49
+                      <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
50
+                      <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
51
+                      <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
52
+
53
+                    </el-popover> -->
54
+                    <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
55
+                </div>
56
+            </div>
57
+            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
58
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
59
+                      highlight-current-row>
60
+                <el-table-column
61
+                        prop="date"
62
+                        label="序号"
63
+                        width="60"
64
+                        align="center"
65
+                        type="index"
66
+                >
67
+                </el-table-column>
68
+                <el-table-column align="center" prop="name" label="就诊号">
69
+                    <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
70
+                </el-table-column>
71
+                <el-table-column align="center" prop="name" label="患者名字">
72
+                    <template slot-scope="scope">{{ scope.row.patient.name }}</template>
73
+                </el-table-column>
74
+                <!--<el-table-column align="center" prop="name" label="患者类型">-->
75
+                <!--<template slot-scope="scope"></template>-->
76
+                <!--</el-table-column>-->
77
+                <el-table-column align="center" prop="name" label="应收金额">
78
+                    <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
79
+                </el-table-column>
80
+                <el-table-column align="center" prop="name" label="实收金额">
81
+                    <template slot-scope="scope">{{scope.row.reality_price}}</template>
82
+                </el-table-column>
83
+                <el-table-column align="center" prop="name" label="科室">
84
+                    <template slot-scope="scope">{{scope.row.department_name}}</template>
85
+                </el-table-column>
86
+                <el-table-column align="center" prop="name" label="收费日期">
87
+                    <template slot-scope="scope"> {{scope.row.setl_time}}</template>
88
+                </el-table-column>
89
+                <el-table-column align="center" prop="name" label="收费员">
90
+                    <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
91
+                </el-table-column>
92
+                <el-table-column align="center" prop="name" label="状态">
93
+                    <template slot-scope="scope">
94
+                        <div v-if="scope.row.order_status == 1">待结算</div>
95
+                        <div v-if="scope.row.order_status == 2">已结算</div>
96
+                        <div v-if="scope.row.order_status == 3">已退费</div>
97
+                    </template>
98
+                </el-table-column>
99
+                <el-table-column align="center" prop="name" label="操作">
100
+                    <template slot-scope="scope">
101
+                        <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
102
+                        <el-button size="mini" type="primary" @click="toPrint(scope.row)"
103
+                                   v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">
104
+                            结算单
105
+                        </el-button>
106
+                        <el-button size="mini" type="primary" @click="toRefund(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106)">
107
+                            退费
108
+                        </el-button>
109
+                    </template>
110
+                </el-table-column>
111
+            </el-table>
112
+            <el-pagination
113
+                    @size-change="handleSizeChange"
114
+                    @current-change="handleCurrentChange"
115
+                    :page-sizes="[10, 50, 100]"
116
+                    :page-size="10"
117
+                    background
118
+                    style="margin-top:20px;float: right"
119
+                    layout="total, sizes, prev, pager, next, jumper"
120
+                    :total="total"
121
+
122
+            >
123
+            </el-pagination>
53 124
         </div>
54
-      </div>
55
-      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
56
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
57
-        <el-table-column
58
-          prop="date"
59
-          label="序号"
60
-          width="60"
61
-          align="center"
62
-          type="index"
63
-        >
64
-        </el-table-column>
65
-        <el-table-column align="center" prop="name" label="就诊号">
66
-          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
67
-        </el-table-column>
68
-        <el-table-column align="center" prop="name" label="患者名字">
69
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
70
-        </el-table-column>
71
-        <!--<el-table-column align="center" prop="name" label="患者类型">-->
72
-          <!--<template slot-scope="scope"></template>-->
73
-        <!--</el-table-column>-->
74
-        <el-table-column align="center" prop="name" label="应收金额">
75
-          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
76
-        </el-table-column>
77
-        <el-table-column align="center" prop="name" label="实收金额">
78
-          <template slot-scope="scope">{{scope.row.reality_price}}</template>
79
-        </el-table-column>
80
-        <el-table-column align="center" prop="name" label="科室">
81
-          <template slot-scope="scope">{{scope.row.department_name}}</template>
82
-        </el-table-column>
83
-        <el-table-column align="center" prop="name" label="收费日期">
84
-          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
85
-        </el-table-column>
86
-        <el-table-column align="center" prop="name" label="收费员">
87
-          <template slot-scope="scope">{{ scope.row.doctor_name }}</template>
88
-        </el-table-column>
89
-        <el-table-column align="center" prop="name" label="状态">
90
-          <template slot-scope="scope">
91
-            <div v-if="scope.row.order_status == 1">待结算</div>
92
-            <div v-if="scope.row.order_status == 2">已结算</div>
93
-            <div v-if="scope.row.order_status == 3">已退费</div>
94
-          </template>
95
-        </el-table-column>
96
-        <el-table-column align="center" prop="name" label="操作">
97
-          <template slot-scope="scope">
98
-            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
99
-            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">结算单</el-button>
100
-          </template>
101
-        </el-table-column>
102
-      </el-table>
103
-      <el-pagination
104
-        @size-change="handleSizeChange"
105
-        @current-change="handleCurrentChange"
106
-        :page-sizes="[10, 50, 100]"
107
-        :page-size="10"
108
-        background
109
-        style="margin-top:20px;float: right"
110
-        layout="total, sizes, prev, pager, next, jumper"
111
-        :total="total"
112
-
113
-      >
114
-      </el-pagination>
115
-    </div>
116 125
 
117
-    <el-dialog
118
-      class="centerDialog"
119
-      width="1200px"
120
-      title="打印"
121
-      :visible.sync="statementVisible">
122
-      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
123
-    <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
124
-    </el-dialog>
125
-    <el-dialog
126
-      class="centerDialog"
127
-      width="900px"
128
-      title="打印"
129
-      :visible.sync="listVisible">
130
-      <listPrint></listPrint>
131
-    </el-dialog>
132
-    <el-dialog
133
-      class="centerDialog"
134
-      width="900px"
135
-      title="打印"
136
-      :visible.sync="allListVisible">
137
-      <allListPrint :paramsObj='paramsObj'></allListPrint>
138
-    </el-dialog>
139
-
140
-    <el-dialog
141
-            class="centerDialog"
142
-            width="1200px"
143
-            title="打印"
144
-            :visible.sync="statementVisible9504">
145
-      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
146
-      <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
147
-      <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
148
-    </el-dialog>
149
-
150
-
151
-  </div>
126
+        <el-dialog
127
+                class="centerDialog"
128
+                width="1200px"
129
+                title="打印"
130
+                :visible.sync="statementVisible">
131
+            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
132
+            <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
133
+        </el-dialog>
134
+        <el-dialog
135
+                class="centerDialog"
136
+                width="900px"
137
+                title="打印"
138
+                :visible.sync="listVisible">
139
+            <listPrint></listPrint>
140
+        </el-dialog>
141
+        <el-dialog
142
+                class="centerDialog"
143
+                width="900px"
144
+                title="打印"
145
+                :visible.sync="allListVisible">
146
+            <allListPrint :paramsObj='paramsObj'></allListPrint>
147
+        </el-dialog>
148
+
149
+        <el-dialog
150
+                class="centerDialog"
151
+                width="1200px"
152
+                title="打印"
153
+                :visible.sync="statementVisible9504">
154
+            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
155
+            <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
156
+            <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
157
+        </el-dialog>
158
+
159
+
160
+    </div>
152 161
 </template>
153 162
 
154 163
 
155 164
 <script>
156 165
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
157
-  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
166
+  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from '@/api/his/his'
158 167
   import { uParseTime } from '@/utils/tools'
159
-  import statementPrint from './statementPrint'
160 168
   import NewStatementPrint from './newStatementPrint'
161 169
   import listPrint from './listPrint'
162 170
   import allListPrint from './allListPrint'
163 171
   import NewStatementPrintTwo from './newStatementPrintTwo'
164
-
172
+  import { fetchAllAdminUsers } from '@/api/doctor'
173
+  import axios from 'axios'
165 174
 
166 175
   export default {
167 176
     components: {
@@ -175,38 +184,115 @@
175 184
       return {
176 185
         orderObj: {},
177 186
         statementVisible: false,
178
-        statementVisible9504:false,
179
-        orderObj9504:{},
187
+        statementVisible9504: false,
188
+        orderObj9504: {},
180 189
         crumbs: [
181 190
           { path: false, name: '门诊收费' },
182 191
           { path: false, name: '项目消费明细汇总' }
183 192
         ],
184 193
         tableData: [],
185
-        limit:10,
186
-        page:1,
187
-        keywords:"",
188
-        start_time:"",
189
-        end_time:"",
190
-        total:"",
191
-        doctors:[],
192
-        admin_user_id:"",
193
-        listVisible:false,
194
-        allListVisible:false
194
+        limit: 10,
195
+        page: 1,
196
+        keywords: '',
197
+        start_time: '',
198
+        end_time: '',
199
+        total: '',
200
+        doctors: [],
201
+        admin_user_id: '',
202
+        listVisible: false,
203
+        allListVisible: false,
204
+        adminUserOptions:[],
195 205
 
196 206
       }
197 207
     },
198 208
     methods: {
199
-      toPrint(row){
200
-        if(this.$store.getters.xt_user.org_id == 9504 ||this.$store.getters.xt_user.org_id == 10028){
209
+      fetchAllAdminUsers() {
210
+        fetchAllAdminUsers().then(response => {
211
+          if (response.data.state == 1) {
212
+            this.adminUserOptions = response.data.data.users
213
+
214
+          }
215
+        })
216
+      },
217
+      getName(admin_user_id) {
218
+        for (let i = 0; i < this.adminUserOptions.length; i++) {
219
+          if (this.adminUserOptions[i].id == admin_user_id) {
220
+            return this.adminUserOptions[i].name
221
+          }
222
+        }
223
+
224
+      },toRefund(row){
225
+        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106) {
226
+          var that = this
227
+          this.$confirm('是否退费', '退费', {
228
+            confirmButtonText: '确 定',
229
+            cancelButtonText: '取 消',
230
+            type: 'warning'
231
+          }).then(() => {
232
+            let params = {
233
+              'order_id': row.id,
234
+              'patient_id': row.patient_id,
235
+              'record_time': that.getTimes(row.settle_accounts_date),
236
+              'admin_user_id': that.$store.getters.xt_user.user.id,
237
+            }
238
+            axios.get('http://127.0.0.1:9532/api/refund/post', {
239
+              params: params
240
+            })
241
+              .then(function(response) {
242
+                if (response.data.state == 0) {
243
+                  that.$message.error(response.data.msg)
244
+                  return false
245
+                } else {
246
+                  if (response.data.data.failed_code == -10) {
247
+                    that.$message.error(response.data.data.msg)
248
+                  } else {
249
+                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
250
+                    that.getHisOrderList()
251
+
252
+                  }
253
+                }
254
+              })
255
+              .catch(function(error) {
256
+              })
257
+          }).catch(() => {
258
+          })
259
+
260
+        } else {
261
+          this.$confirm('是否退费', '退费', {
262
+            confirmButtonText: '确 定',
263
+            cancelButtonText: '取 消',
264
+            type: 'warning'
265
+          }).then(() => {
266
+            let params = {
267
+              'order_id': this.order.id,
268
+              'patient_id': this.patientInfo.id,
269
+              'record_time': this.record_date
270
+
271
+            }
272
+            Refund(params).then(response => {
273
+              if (response.data.state == 0) {
274
+                this.$message.error(response.data.msg)
275
+                return false
276
+              } else {
277
+                this.$message({ message: '退费成功', type: 'success' })
278
+                this.getHisOrderList()
279
+              }
280
+            })
281
+          }).catch(() => {
282
+          })
283
+        }
284
+      },
285
+      toPrint(row) {
286
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
201 287
           this.statementVisible9504 = true
202 288
           let obj = {
203 289
             order_id: row.id,
204 290
             patient_id: row.patient_id,
205 291
             record_time: this.getTimes(row.settle_accounts_date),
206
-            admin_user_id: this.$store.getters.xt_user.user.id,
292
+            admin_user_id: this.$store.getters.xt_user.user.id
207 293
           }
208 294
           this.orderObj9504 = obj
209
-        }else {
295
+        } else {
210 296
           this.statementVisible = true
211 297
           let obj = {
212 298
             order_id: row.id
@@ -215,10 +301,10 @@
215 301
         }
216 302
 
217 303
       },
218
-      export_detail(){
219
-        let params= {
220
-          start_time:this.start_time,
221
-          end_time: this.end_time,
304
+      export_detail() {
305
+        let params = {
306
+          start_time: this.start_time,
307
+          end_time: this.end_time
222 308
         }
223 309
         getExportConsumeDetailList(params).then(response => {
224 310
           if (response.data.state == 0) {
@@ -227,144 +313,139 @@
227 313
           } else {
228 314
 
229 315
             let list = []
230
-            for (let i =0; i < response.data.data.order.length; i++){
231
-            let order =   response.data.data.order[i]
232
-              let number = ""
233
-              let name = ""
234
-              let department = ""
235
-              let doctor_name = ""
236
-              let balance_accounts = ""
316
+            for (let i = 0; i < response.data.data.order.length; i++) {
317
+              let order = response.data.data.order[i]
318
+              let number = ''
319
+              let name = ''
320
+              let department = ''
321
+              let doctor_name = ''
322
+              let balance_accounts = ''
237 323
 
238
-              let order_status = ""
324
+              let order_status = ''
239 325
 
240
-
241
-
242
-              if(order.his_patient != null && order.his_patient.number.length > 0){
326
+              if (order.his_patient != null && order.his_patient.number.length > 0) {
243 327
                 number = order.his_patient.number
244 328
 
245 329
               }
246 330
 
247
-              if(order.his_patient != null ){
248
-                if(order.his_patient.balance_accounts_type == 1){
249
-                  balance_accounts = "自费"
331
+              if (order.his_patient != null) {
332
+                if (order.his_patient.balance_accounts_type == 1) {
333
+                  balance_accounts = '自费'
250 334
                 }
251 335
 
252
-                if(order.his_patient.balance_accounts_type == 2){
253
-                  balance_accounts = "医保"
336
+                if (order.his_patient.balance_accounts_type == 2) {
337
+                  balance_accounts = '医保'
254 338
                 }
255 339
               }
256 340
 
257
-              if(order.patient != null && order.patient.name.length > 0){
341
+              if (order.patient != null && order.patient.name.length > 0) {
258 342
                 name = order.patient.name
259 343
 
260 344
               }
261 345
 
262
-              if(order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0){
346
+              if (order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0) {
263 347
                 department = order.p_info.department.name
264 348
 
265 349
               }
266 350
 
267
-              if(order.p_info != null && order.p_info.doctor.length > 0){
351
+              if (order.p_info != null && order.p_info.doctor.length > 0) {
268 352
                 doctor_name = order.p_info.doctor
269 353
               }
270 354
 
271
-              if(order.order_status == 1){
272
-                order_status = "待结算"
355
+              if (order.order_status == 1) {
356
+                order_status = '待结算'
273 357
               }
274 358
 
275
-              if(order.order_status == 2){
276
-                order_status = "已结算"
359
+              if (order.order_status == 2) {
360
+                order_status = '已结算'
277 361
               }
278 362
 
279
-              if(order.order_status == 3){
280
-                order_status = "已退费"
363
+              if (order.order_status == 3) {
364
+                order_status = '已退费'
281 365
               }
282 366
 
283
-
284 367
               let obj = {
285
-                "就诊号":number,
286
-                "患者姓名":name,
287
-                "应收金额":order.medfee_sumamt,
288
-                "实收金额":order.medfee_sumamt,
289
-                "科室":department,
290
-                "医生姓名":doctor_name,
291
-                "收费类别":balance_accounts,
292
-                "收费者姓名":doctor_name,
293
-                "总金额":order.medfee_sumamt,
294
-                "现金支付":"",
295
-                "账户支付":"",
296
-                "支付宝支付":"",
297
-                "微信支付":"",
298
-                "其他支付":"",
299
-                "收费日期":"",
300
-                "收费状态":order_status,
301
-                "退费日期":"",
368
+                '就诊号': number,
369
+                '患者姓名': name,
370
+                '应收金额': order.medfee_sumamt,
371
+                '实收金额': order.medfee_sumamt,
372
+                '科室': department,
373
+                '医生姓名': doctor_name,
374
+                '收费类别': balance_accounts,
375
+                '收费者姓名': doctor_name,
376
+                '总金额': order.medfee_sumamt,
377
+                '现金支付': '',
378
+                '账户支付': '',
379
+                '支付宝支付': '',
380
+                '微信支付': '',
381
+                '其他支付': '',
382
+                '收费日期': '',
383
+                '收费状态': order_status,
384
+                '退费日期': ''
302 385
               }
303 386
               list.push(obj)
304 387
             }
305 388
             import('@/vendor/Export2Excel').then(excel => {
306
-              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
307
-              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
389
+              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费日期', '收费状态', '退费日期']
390
+              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费日期', '收费状态', '退费日期']
308 391
               const data = this.formatJson(filterVal, list)
309 392
               excel.export_json_to_excel({
310 393
                 header: tHeader,
311 394
                 data,
312
-                filename: "消费明细"
395
+                filename: '消费明细'
313 396
               })
314 397
             })
315 398
 
316 399
           }
317 400
         })
318 401
 
319
-      },  formatJson(filterVal, jsonData) {
402
+      }, formatJson(filterVal, jsonData) {
320 403
         return jsonData.map(v => filterVal.map(j => v[j]))
321 404
       },
322
-      changeDoctor(){
405
+      changeDoctor() {
323 406
         this.page = 1
324
-        this.keywords=""
407
+        this.keywords = ''
325 408
         this.getHisOrderList()
326 409
       },
327
-      handleSizeChange(limit){
328
-        this.limit = limit;
410
+      handleSizeChange(limit) {
411
+        this.limit = limit
329 412
         this.getHisOrderList()
330 413
 
331
-      },handleCurrentChange(page){
332
-        this.page = page;
414
+      }, handleCurrentChange(page) {
415
+        this.page = page
333 416
         this.getHisOrderList()
334 417
 
335
-
336 418
       },
337
-      handleStartTimeChange(){
419
+      handleStartTimeChange() {
338 420
         this.page = 1
339
-        this.keywords=""
421
+        this.keywords = ''
340 422
         this.getHisOrderList()
341
-      },handleEndTimeChange(){
423
+      }, handleEndTimeChange() {
342 424
         this.page = 1
343
-        this.keywords=""
425
+        this.keywords = ''
344 426
         this.getHisOrderList()
345 427
       },
346
-      searchAction(){
428
+      searchAction() {
347 429
         this.page = 1
348 430
         this.getHisOrderList()
349 431
 
350
-
351 432
       },
352 433
       getTimes(time) {
353
-        return uParseTime(time, "{y}-{m}-{d}");
434
+        return uParseTime(time, '{y}-{m}-{d}')
354 435
       },
355 436
       toDetail(row) {
356
-        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number+"&id="+row.id)
437
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id=' + row.patient.id + '&number=' + row.number + '&id=' + row.id)
357 438
       }, getTime(value, temp) {
358 439
         if (value != undefined) {
359 440
           return uParseTime(value, temp)
360 441
         }
361 442
         return ''
362
-      },getHisOrderList(){
363
-        let params= {
364
-          page : this.page,
443
+      }, getHisOrderList() {
444
+        let params = {
445
+          page: this.page,
365 446
           limit: this.limit,
366
-          keywords:this.keywords,
367
-          start_time:this.start_time,
447
+          keywords: this.keywords,
448
+          start_time: this.start_time,
368 449
           end_time: this.end_time,
369 450
           type: this.admin_user_id
370 451
         }
@@ -378,7 +459,7 @@
378 459
           }
379 460
         })
380 461
 
381
-      },getDoctorList(){
462
+      }, getDoctorList() {
382 463
         getDoctorList().then(response => {
383 464
           if (response.data.state == 0) {
384 465
             this.$message.error(response.data.msg)
@@ -388,16 +469,20 @@
388 469
           }
389 470
         })
390 471
       },
391
-      open(index){
392
-        if(index == 1){
472
+      open(index) {
473
+        if (index == 1) {
393 474
           this.listVisible = true
394
-        }else if(index == 2){
475
+        } else if (index == 2) {
395 476
           this.allListVisible = true
396 477
         }
397 478
       }
398 479
     }, created() {
399
-     this.getDoctorList()
400
-     this.getHisOrderList()
480
+
481
+
482
+      this.fetchAllAdminUsers()
483
+      this.getDoctorList()
484
+      this.getHisOrderList()
485
+
401 486
 
402 487
 
403 488
     }

+ 0 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Voir le fichier

@@ -2251,10 +2251,6 @@
2251 2251
       comfirm() {
2252 2252
         console.log("222222222222",this.curPrescriptions)
2253 2253
 
2254
-        if (this.dayorMonth == 'month') {
2255
-          this.$message.error('月结状态下,无法添加药品或者项目')
2256
-          return
2257
-        }
2258 2254
 
2259 2255
         if (this.curPrescriptions.order_status == 2) {
2260 2256
           this.$message.error('该处方已经结算,无法继续添加药品或者项目')

+ 10 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Voir le fichier

@@ -982,7 +982,11 @@
982 982
                 this.doctors = response.data.data.doctors
983 983
                 this.department = response.data.data.department
984 984
 
985
-
985
+                for (let i = 0; i < this.doctors.length; i++){
986
+                  if(this.doctors[i].user_type == 1){
987
+                    this.doctors.splice(i,1)
988
+                  }
989
+                }
986 990
 
987 991
                 this.case_history = case_history
988 992
                 this.info = response.data.data.info
@@ -1154,7 +1158,11 @@
1154 1158
               this.doctors = response.data.data.doctors
1155 1159
               this.department = response.data.data.department
1156 1160
 
1157
-
1161
+              for (let i = 0; i < this.doctors.length; i++){
1162
+                if(this.doctors[i].user_type == 1){
1163
+                  this.doctors.splice(i,1)
1164
+                }
1165
+              }
1158 1166
               this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1159 1167
               if (this.case_history.breathing <= 0) {
1160 1168
                 this.case_history.breathing = ""

+ 179 - 71
src/xt_pages/outpatientRegistration/index.vue Voir le fichier

@@ -178,7 +178,9 @@
178 178
                         <el-input v-model.number="total" readonly></el-input>
179 179
                     </el-form-item>
180 180
                 </el-form>
181
-                <el-button style="float:right" v-loading="loadingone" @click="saveHisPatient9504('form')" type="primary">挂号</el-button>
181
+                <el-button style="float:right" v-loading="loadingone" @click="saveHisPatient9504('form')"
182
+                           type="primary">挂号
183
+                </el-button>
182 184
             </div>
183 185
 
184 186
         </div>
@@ -408,7 +410,7 @@
408 410
                         <!-- <el-input v-model="form.name"></el-input> -->
409 411
                     </el-form-item>
410 412
                 </el-form>
411
-                <el-button style="float:right" @click="saveHisPatient('form')" type="primary">挂号</el-button>
413
+                <el-button style="float:right" @click="saveHisPatient('form')" v-loading="loadingone" type="primary">挂号</el-button>
412 414
             </div>
413 415
 
414 416
         </div>
@@ -427,7 +429,7 @@
427 429
     saveHisPatient
428 430
   } from '@/api/project/project'
429 431
   import { getDictionaryDataConfig } from '@/utils/data'
430
-  import { uParseTime,jsGetAge } from '@/utils/tools'
432
+  import { jsGetAge, uParseTime } from '@/utils/tools'
431 433
   import { getInitData } from '@/api/his/his'
432 434
   import axios from 'axios'
433 435
 
@@ -438,6 +440,7 @@
438 440
     },
439 441
     data() {
440 442
       return {
443
+        loadingone: false,
441 444
         read_loading: false,
442 445
         registers: [
443 446
           { value: 11, label: '普通门诊' },
@@ -479,7 +482,7 @@
479 482
           total: '',
480 483
           phone: '',
481 484
           social_type: '',
482
-          id_card_type: 1
485
+          id_card_type: 2
483 486
 
484 487
         },
485 488
         medical_care: [
@@ -656,20 +659,20 @@
656 659
         this.form.phone = val.phone
657 660
         this.form.idCard = val.id_card_no
658 661
 
659
-        var thisLen =  this.form.idCard.length;
660
-        var birth = "";
662
+        var thisLen = this.form.idCard.length
663
+        var birth = ''
661 664
         if (thisLen == 15) {
662
-          birth = "19" + this.form.idCard.substr(6, 6);
665
+          birth = '19' + this.form.idCard.substr(6, 6)
663 666
         } else {
664
-          birth = this.form.idCard.substr(6, 8);
667
+          birth = this.form.idCard.substr(6, 8)
665 668
         }
666 669
         var births =
667 670
           birth.substr(0, 4) +
668
-          "-" +
671
+          '-' +
669 672
           birth.substr(4, 2) +
670
-          "-" +
671
-          birth.substr(6, 2);
672
-        this.form.age = jsGetAge(births, "-");
673
+          '-' +
674
+          birth.substr(6, 2)
675
+        this.form.age = jsGetAge(births, '-')
673 676
       },
674 677
       querySearchAsync(keyword, cb) {
675 678
         let key = ''
@@ -915,7 +918,6 @@
915 918
           return
916 919
         }
917 920
 
918
-
919 921
         this.$refs[formName].validate((valid) => {
920 922
           if (valid) {
921 923
             var params = {
@@ -966,16 +968,39 @@
966 968
                       that.$message.error(response.data.data.msg)
967 969
                     } else {
968 970
                       that.$message({ message: '挂号成功', type: 'success' })
969
-                      that.getPatientList()
971
+                      that.form.settlementValue = ''
972
+                      that.form.medicalInsuranceCard = ''
973
+                      that.form.name = ''
974
+                      that.form.sex = ''
975
+                      that.form.certificates = ''
976
+                      that.form.medicalCare = ''
977
+                      that.form.birthday = ''
978
+                      that.form.age = ''
979
+                      that.form.idCard = ''
980
+                      that.form.register = ''
981
+                      that.form.doctor = ''
982
+                      that.form.department = ''
983
+                      that.form.costChecked = false
984
+                      that.form.registrationFee = ''
985
+                      that.form.medicalExpenses = ''
986
+                      that.form.cost = ''
987
+                      that.form.total = ''
988
+                      that.form.phone = ''
989
+                      that.form.social_type = ''
970 990
                       that.loadingone = false
971 991
 
992
+
993
+                      that.form.p_type = 14
994
+                      that.form.sick_type = that.sick[0].id
995
+                      that.form.diagnosis = that.diagnoses[0].id
996
+
972 997
                     }
973 998
                   }
974 999
                 })
975 1000
                 .catch(function(error) {
976 1001
 
977 1002
                 })
978
-            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1003
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538) {
979 1004
               var that = this
980 1005
 
981 1006
               axios.get('http://127.0.0.1:9532/api/register/get', {
@@ -991,14 +1016,36 @@
991 1016
                     that.$refs.register.hide()
992 1017
                     return false
993 1018
                   } else {
1019
+                    that.loadingone = false
1020
+
994 1021
                     if (response.data.data.failed_code == -10) {
995 1022
                       that.$message.error(response.data.data.msg)
996 1023
                       return
997 1024
                     } else {
998
-                      that.$refs.register.hide()
999
-                      that.getPatientList()
1000 1025
                       that.$message({ message: '挂号成功', type: 'success' })
1001
-                      that.loadingone = false
1026
+                      that.form.settlementValue = ''
1027
+                      that.form.medicalInsuranceCard = ''
1028
+                      that.form.name = ''
1029
+                      that.form.sex = ''
1030
+                      that.form.certificates = ''
1031
+                      that.form.medicalCare = ''
1032
+                      that.form.birthday = ''
1033
+                      that.form.age = ''
1034
+                      that.form.idCard = ''
1035
+                      that.form.register = ''
1036
+                      that.form.doctor = ''
1037
+                      that.form.department = ''
1038
+                      that.form.costChecked = false
1039
+                      that.form.registrationFee = ''
1040
+                      that.form.medicalExpenses = ''
1041
+                      that.form.cost = ''
1042
+                      that.form.total = ''
1043
+                      that.form.phone = ''
1044
+                      that.form.social_type = ''
1045
+
1046
+                      that.form.p_type = 14
1047
+                      that.form.sick_type = that.sick[0].id
1048
+                      that.form.diagnosis = that.diagnoses[0].id
1002 1049
                     }
1003 1050
                     // var his_info = response.data.data.his_info
1004 1051
                     // that.hisPatientInfo = his_info
@@ -1012,26 +1059,32 @@
1012 1059
                 if (response.data.state == 1) {
1013 1060
                   var patient = response.data.data.patient
1014 1061
                   this.getTodaySchedulePatient()
1015
-                  this.$message.success('保存成功')
1016
-                  this.form.settlementValue = '',
1017
-                    this.form.medicalInsuranceCard = '',
1018
-                    this.form.name = '',
1019
-                    this.form.sex = '',
1020
-                    this.form.certificates = '',
1021
-                    this.form.medicalCare = '',
1022
-                    this.form.birthday = '',
1023
-                    this.form.age = '',
1024
-                    this.form.idCard = '',
1025
-                    this.form.register = '',
1026
-                    this.form.doctor = '',
1027
-                    this.form.department = '',
1028
-                    this.form.costChecked = false,
1029
-                    this.form.registrationFee = '',
1030
-                    this.form.medicalExpenses = '',
1031
-                    this.form.cost = '',
1032
-                    this.form.total = '' ,
1033
-                    this.form.phone = '',
1034
-                    this.form.social_type = ''
1062
+                  that.$message({ message: '挂号成功', type: 'success' })
1063
+                  that.form.settlementValue = ''
1064
+                  that.form.medicalInsuranceCard = ''
1065
+                  that.form.name = ''
1066
+                  that.form.sex = ''
1067
+                  that.form.certificates = ''
1068
+                  that.form.medicalCare = ''
1069
+                  that.form.birthday = ''
1070
+                  that.form.age = ''
1071
+                  that.form.idCard = ''
1072
+                  that.form.register = ''
1073
+                  that.form.doctor = ''
1074
+                  that.form.department = ''
1075
+                  that.form.costChecked = false
1076
+                  that.form.registrationFee = ''
1077
+                  that.form.medicalExpenses = ''
1078
+                  that.form.cost = ''
1079
+                  that.form.total = ''
1080
+                  that.form.phone = ''
1081
+                  that.form.social_type = ''
1082
+                  that.loadingone = false
1083
+
1084
+                  that.form.p_type = 14
1085
+                  that.form.sick_type = that.sick[0].id
1086
+                  that.form.diagnosis = that.diagnoses[0].id
1087
+
1035 1088
                 } else {
1036 1089
                   this.$message.error('今日患者已挂号!')
1037 1090
                 }
@@ -1169,15 +1222,35 @@
1169 1222
                     that.$refs.register.hide()
1170 1223
                     return false
1171 1224
                   } else {
1225
+                    that.loadingone = false
1226
+
1172 1227
                     if (response.data.data.failed_code == -10) {
1173 1228
                       that.$message.error(response.data.data.msg)
1174 1229
                     } else {
1175
-                      that.$refs.register.hide()
1176
-                      that.getPatientList()
1177 1230
                       that.$message({ message: '挂号成功', type: 'success' })
1178
-                      that.loadingone = false
1179
-                      var his_info = response.data.data.his_info
1180
-                      that.hisPatientInfo = his_info
1231
+                      that.form.settlementValue = ''
1232
+                      that.form.medicalInsuranceCard = ''
1233
+                      that.form.name = ''
1234
+                      that.form.sex = ''
1235
+                      that.form.certificates = ''
1236
+                      that.form.medicalCare = ''
1237
+                      that.form.birthday = ''
1238
+                      that.form.age = ''
1239
+                      that.form.idCard = ''
1240
+                      that.form.register = ''
1241
+                      that.form.doctor = ''
1242
+                      that.form.department = ''
1243
+                      that.form.costChecked = false
1244
+                      that.form.registrationFee = ''
1245
+                      that.form.medicalExpenses = ''
1246
+                      that.form.cost = ''
1247
+                      that.form.total = ''
1248
+                      that.form.phone = ''
1249
+                      that.form.social_type = ''
1250
+
1251
+                      that.form.p_type = 14
1252
+                      that.form.sick_type = that.sick[0].id
1253
+                      that.form.diagnosis = that.diagnoses[0].id
1181 1254
 
1182 1255
                     }
1183 1256
 
@@ -1186,7 +1259,7 @@
1186 1259
                 .catch(function(error) {
1187 1260
 
1188 1261
                 })
1189
-            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1262
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538) {
1190 1263
               var that = this
1191 1264
 
1192 1265
               axios.get('http://127.0.0.1:9532/api/register/get', {
@@ -1199,15 +1272,37 @@
1199 1272
                   if (response.data.state == 0) {
1200 1273
                     that.$message.error(response.data.msg)
1201 1274
                     that.loadingone = false
1202
-                    that.$refs.register.hide()
1203 1275
                     return false
1204 1276
                   } else {
1205
-                    that.$refs.register.hide()
1206
-                    that.getPatientList()
1207
-                    that.$message({ message: '挂号成功', type: 'success' })
1208 1277
                     that.loadingone = false
1209
-                    var his_info = response.data.data.his_info
1210
-                    that.hisPatientInfo = his_info
1278
+                    if (response.data.data.failed_code == -10) {
1279
+                      that.$message.error(response.data.data.msg)
1280
+                    } else {
1281
+                      that.$message({ message: '挂号成功', type: 'success' })
1282
+                      that.form.settlementValue = ''
1283
+                      that.form.medicalInsuranceCard = ''
1284
+                      that.form.name = ''
1285
+                      that.form.sex = ''
1286
+                      that.form.certificates = ''
1287
+                      that.form.medicalCare = ''
1288
+                      that.form.birthday = ''
1289
+                      that.form.age = ''
1290
+                      that.form.idCard = ''
1291
+                      that.form.register = ''
1292
+                      that.form.doctor = ''
1293
+                      that.form.department = ''
1294
+                      that.form.costChecked = false
1295
+                      that.form.registrationFee = ''
1296
+                      that.form.medicalExpenses = ''
1297
+                      that.form.cost = ''
1298
+                      that.form.total = ''
1299
+                      that.form.phone = ''
1300
+                      that.form.social_type = ''
1301
+
1302
+                      that.form.p_type = 14
1303
+                      that.form.sick_type = that.sick[0].id
1304
+                      that.form.diagnosis = that.diagnoses[0].id
1305
+                    }
1211 1306
                   }
1212 1307
                 })
1213 1308
                 .catch(function(error) {
@@ -1218,26 +1313,31 @@
1218 1313
                 if (response.data.state == 1) {
1219 1314
                   var patient = response.data.data.patient
1220 1315
                   this.getTodaySchedulePatient()
1221
-                  this.$message.success('保存成功')
1222
-                  this.form.settlementValue = '',
1223
-                    this.form.medicalInsuranceCard = '',
1224
-                    this.form.name = '',
1225
-                    this.form.sex = '',
1226
-                    this.form.certificates = '',
1227
-                    this.form.medicalCare = '',
1228
-                    this.form.birthday = '',
1229
-                    this.form.age = '',
1230
-                    this.form.idCard = '',
1231
-                    this.form.register = '',
1232
-                    this.form.doctor = '',
1233
-                    this.form.department = '',
1234
-                    this.form.costChecked = false,
1235
-                    this.form.registrationFee = '',
1236
-                    this.form.medicalExpenses = '',
1237
-                    this.form.cost = '',
1238
-                    this.form.total = '' ,
1239
-                    this.form.phone = '',
1240
-                    this.form.social_type = ''
1316
+                  that.$message({ message: '挂号成功', type: 'success' })
1317
+                  that.form.settlementValue = ''
1318
+                  that.form.medicalInsuranceCard = ''
1319
+                  that.form.name = ''
1320
+                  that.form.sex = ''
1321
+                  that.form.certificates = ''
1322
+                  that.form.medicalCare = ''
1323
+                  that.form.birthday = ''
1324
+                  that.form.age = ''
1325
+                  that.form.idCard = ''
1326
+                  that.form.register = ''
1327
+                  that.form.doctor = ''
1328
+                  that.form.department = ''
1329
+                  that.form.costChecked = false
1330
+                  that.form.registrationFee = ''
1331
+                  that.form.medicalExpenses = ''
1332
+                  that.form.cost = ''
1333
+                  that.form.total = ''
1334
+                  that.form.phone = ''
1335
+                  that.form.social_type = ''
1336
+                  that.loadingone = false
1337
+
1338
+                  that.form.p_type = 14
1339
+                  that.form.sick_type = that.sick[0].id
1340
+                  that.form.diagnosis = that.diagnoses[0].id
1241 1341
                 } else {
1242 1342
                   this.$message.error('今日患者已挂号!')
1243 1343
                 }
@@ -1327,8 +1427,16 @@
1327 1427
 
1328 1428
     },
1329 1429
     created() {
1330
-      this.getInitData()
1331 1430
 
1431
+      if(this.$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10028){
1432
+        this.form.certificates = 2
1433
+        this.form.id_card_type = 1
1434
+      }else{
1435
+        this.form.certificates = 1
1436
+        this.form.id_card_type = 2
1437
+      }
1438
+
1439
+      this.getInitData()
1332 1440
       //获取当前机构有人员信息
1333 1441
       this.getAllDoctorList()
1334 1442
       //获取今日排班的患者

Fichier diff supprimé car celui-ci est trop grand
+ 503 - 451
src/xt_pages/outpatientRegistration/registrationHistory.vue


+ 29 - 7
src/xt_pages/stock/detail/print.vue Voir le fichier

@@ -68,7 +68,7 @@
68 68
               <td style="line-height: 50px" v-if="type == 3">
69 69
                 
70 70
                   <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
71
-                  <span v-else>{{(getStockCount(stock.id) * getPrice(stock.id)).toFixed(2)}}</span> 
71
+                  <span v-else>{{(getStockCount(stock.id) * getReailPrice(stock.id)).toFixed(2)}}</span> 
72 72
                
73 73
              </td>
74 74
               <td style="line-height: 50px"></td>
@@ -79,7 +79,10 @@
79 79
             <tbody>
80 80
             <tr>
81 81
               <td width="633" style="line-height: 50px">合计</td>
82
-              <td width="80" style="line-height: 50px">{{calTotalPrice()}}</td>
82
+              <td width="80" style="line-height: 50px">
83
+                <span v-if="type == 1">{{calTotalPrice()}}</span>
84
+                <span v-if="type == 3">{{getTotalPrice().toFixed(2)}}</span>
85
+              </td>
83 86
               <td></td>
84 87
             </tr>
85 88
 
@@ -196,6 +199,7 @@
196 199
             var informationlist = response.data.data.infomationList
197 200
             console.log('数据列表',informationlist)
198 201
             this.informationList = informationlist
202
+            this.stockDatas = []
199 203
             for (let i = 0; i < response.data.data.list.length; i++) {
200 204
               if (this.type == 1) {
201 205
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
@@ -208,11 +212,12 @@
208 212
                 }
209 213
 
210 214
               } else if (this.type == 3) {
211
-              
215
+                
212 216
                 if (response.data.data.list[i].query_warehouseout_info.length > 0) {
213 217
                   this.stockDatas.push(response.data.data.list[i])
214 218
                 }
215
-              
219
+               
220
+                console.log("出库打印数据源",this.stockDatas)
216 221
                 
217 222
               } else if (this.type == 4) {
218 223
                 if (response.data.data.list[i].query_cancel_stock_info.length > 0) {
@@ -225,7 +230,12 @@
225 230
             for(let i = 0; i <this.stockDatas.length;i++){
226 231
               obj = this.stockDatas[i]
227 232
             }
228
-            console.log("9999999",this.stockDatas)
233
+           console.log("9999999",this.stockDatas)
234
+           
235
+           var newArr =  this.unique(this.stockDatas)
236
+           console.log("耗材出库去重",newArr)
237
+
238
+           this.stockDatas = newArr
229 239
             // if (this.stockDatas.length < 50) {
230 240
             //   var nl = 50 - this.stockDatas.length
231 241
             //   for (let index = 0; index < nl; index++) {
@@ -288,7 +298,8 @@
288 298
           }
289 299
         }
290 300
         return  Math.floor(total_price * 100) / 100
291
-      }, calTotalPrice() {
301
+      },
302
+       calTotalPrice() {
292 303
 
293 304
         var amountPrice = 0
294 305
         for (let i = 0; i < this.stockDatas.length; i++) {
@@ -384,7 +395,18 @@
384 395
           }
385 396
        }
386 397
        return price
387
-     }
398
+     },
399
+     getTotalPrice(){
400
+       var total_price = 0
401
+       for(let i=0;i<this.stockDatas.length;i++){
402
+         total_price += (this.getStockCount(this.stockDatas[i].id) * this.getReailPrice(this.stockDatas[i].id))
403
+       }
404
+       return total_price
405
+     },
406
+     unique(arr) {
407
+        const res = new Map();
408
+        return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
409
+     },
388 410
     },
389 411
     created() {
390 412
       var xtuser = this.$store.getters.xt_user

+ 59 - 16
src/xt_pages/stock/detail/stockOutDetail.vue Voir le fichier

@@ -180,7 +180,7 @@
180 180
       <el-pagination
181 181
         @size-change="handleSizeChange"
182 182
         @current-change="handleCurrentChange"
183
-        :page-sizes="[10, 50, 100]"
183
+        :page-sizes="[10, 50, 100,1000,1500]"
184 184
         :page-size="10"
185 185
         background
186 186
         style="margin-top:20px;float: right"
@@ -195,7 +195,7 @@
195 195
 <script>
196 196
 import { uParseTime } from "@/utils/tools";
197 197
 import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
198
-import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood } from "@/api/stock";
198
+import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood,getGoodInfoList } from "@/api/stock";
199 199
 
200 200
 export default {
201 201
   name: "stockOutDetail",
@@ -226,6 +226,7 @@ export default {
226 226
     this.fetchAllAdminUsers();
227 227
     this.goodUnit = this.$store.getters.good_unit
228 228
     this.getPrintStockGood()
229
+    this.getList()
229 230
   },
230 231
   data() {
231 232
     return {
@@ -258,7 +259,8 @@ export default {
258 259
       dealer: [],
259 260
       goodUnit:[],
260 261
       tableList:[],
261
-      stockTotal:[]
262
+      stockTotal:[],
263
+      goodInfoData:[]
262 264
     };
263 265
   },
264 266
   methods: {
@@ -638,13 +640,14 @@ export default {
638 640
             console.log("stockTotal",stockTotal)
639 641
             this.stockTotal = stockTotal
640 642
             var list =  response.data.data.list
641
-            // console.log("导出数据",list)
643
+            console.log("导出数据",list)
644
+            this.tableList = []
642 645
             for(let i=0;i<list.length;i++){
643 646
               if (list[i].query_warehouseout_info.length > 0) {
644 647
                 this.tableList.push(list[i])
645 648
               }
646 649
             }
647
-          // console.log("表哥",this.tableList)
650
+           console.log("耗材出库表格数据",this.tableList)
648 651
           }
649 652
       })
650 653
     },
@@ -711,35 +714,66 @@ export default {
711 714
       },
712 715
       unique(arr) {
713 716
         const res = new Map();
714
-        return arr.filter((arr) => !res.has(arr.specification_name) && res.set(arr.specification_name, 1));
717
+        return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
718
+      },
719
+      getList() {
720
+        let params = {
721
+          page: 1,
722
+          limit: 1000,
723
+          keyword: "",
724
+          is_use:"",
725
+          good_kind:"",
726
+          is_charge: "",
727
+          is_mark:"",
728
+          manufacturer:"",
729
+        }
730
+       
731
+        getGoodInfoList(params).then(response => {
732
+          if (response.data.state == 0) {
733
+            this.$message.error(response.data.msg)
734
+            return false
735
+          } else {
736
+            this.goodInfoData = []
737
+            for (let i = 0; i < response.data.data.list.length; i++) {
738
+              this.goodInfoData.push(response.data.data.list[i])
739
+            }
740
+           
741
+          }
742
+        })
715 743
       },
716 744
 
717 745
      exportList(){
718
-
746
+      console.log("数据22222",this.tableList)
747
+      console.log("数据3333",this.goodInfoData)
748
+      for(let i=0;i<this.tableList.length;i++){
749
+         for(let j=0;j<this.goodInfoData.length;j++){
750
+            if(this.tableList[i].id === this.goodInfoData[j].id){
751
+               this.tableList[i].retail_price = this.goodInfoData[j].retail_price
752
+            }
753
+         }
754
+      }
755
+      console.log('合并后',this.tableList)
719 756
       var obj = {index:"合计",total:0}
720
-       obj.total = this.calTotalPrice()
757
+       obj.total = this.getTotalPrice()
721 758
        for(let i=0;i<this.tableList.length;i++){
722 759
         this.tableList[i].index = i+1
723 760
         this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
724 761
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
725
-        this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].price
726
-        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].query_warehouseout_info[0].price).toFixed(2)
762
+        // this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].buy_price
763
+        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].retail_price).toFixed(2)
727 764
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
728 765
        }
729 766
        var arr = this.unique(this.tableList)
730
-       console.log("22222222222222222气",arr)
767
+     
731 768
        this.tableList = arr
732 769
        this.tableList.push(obj)
733 770
        import('@/vendor/Export2Excel').then(excel => {
734 771
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
735
-       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
736
-
737
-
738
-
772
+       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','retail_price','total','remark']
739 773
 
740 774
        const data = this.formatJson(filterVal, this.tableList)
741 775
        console.log("data",data)
742
-
776
+       
743 777
         excel.export_json_to_excel({
744 778
            header: tHeader,
745 779
            data,
@@ -760,6 +794,15 @@ export default {
760 794
        }
761 795
       return name
762 796
      },
797
+    getTotalPrice(){
798
+       var total_price = 0
799
+       for(let i=0;i<this.tableList.length;i++){
800
+         total_price += this.getStockCount(this.tableList[i].id) * this.tableList[i].retail_price
801
+       }
802
+       return total_price
803
+     },
804
+
805
+     
763 806
   }
764 807
 };
765 808
 </script>

+ 37 - 3
src/xt_pages/stock/drugs/components/drugOutDetail.vue Voir le fichier

@@ -197,6 +197,7 @@ import { uParseTime } from "@/utils/tools";
197 197
 import { fetchAllAdminUsers } from "@/api/doctor";
198 198
 import {GetAllConfig } from "@/api/stock";
199 199
 import {getDrugOutDetail } from "@/api/drug/drug_stock"
200
+ import {getBaseDrugLibList} from '@/api/data'
200 201
 export default {
201 202
   name: "stockOutDetail",
202 203
 
@@ -224,6 +225,7 @@ export default {
224 225
     this.GetConfigInfo();
225 226
     this.fetchAllAdminUsers();
226 227
     this.getlist()
228
+    this.getBaseDrugLibList()
227 229
   },
228 230
   data() {
229 231
     return {
@@ -255,7 +257,8 @@ export default {
255 257
       selectedTableData: [],
256 258
       dealer: [],
257 259
       tableData:[],
258
-      tableList:[]
260
+      tableList:[],
261
+      drugList:[]
259 262
     };
260 263
   },
261 264
   methods: {
@@ -449,15 +452,21 @@ export default {
449 452
     },
450 453
 
451 454
      exportList(){
455
+
452 456
         for(let i=0;i<this.tableList.length;i++){
457
+          for(let j=0;j<this.drugList.length;j++){
458
+             if(this.tableList[i].drug_id == this.drugList[j].id){
459
+               this.tableList[i].retail_price = this.drugList[j].retail_price
460
+             }
461
+          }
453 462
           this.tableList[i].index = i+1
454 463
         }
455 464
        import('@/vendor/Export2Excel').then(excel => {
456 465
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
457
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total_price','remark']
466
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','retail_price','total_price','remark']
458 467
        let obj = {'index':'合计','total_price':0}
459 468
        for(let i=0;i<this.tableList.length;i++){
460
-         obj.total_price += this.tableList[i].price * this.tableList[i].count
469
+         obj.total_price += this.tableList[i].retail_price * this.tableList[i].count
461 470
        }
462 471
        for(let j=0;j<this.tableList.length;j++){
463 472
           this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
@@ -478,6 +487,31 @@ export default {
478 487
      formatJson(filterVal, jsonData) {
479 488
         return jsonData.map(v => filterVal.map(j => v[j]));
480 489
      },
490
+
491
+    getBaseDrugLibList() {
492
+        let params = {
493
+          page: 1,
494
+          limit: 1000,
495
+          keyword:"",
496
+          is_use: "",
497
+          is_charge: "",
498
+          is_inject: "",
499
+          manufacturer:"",
500
+          is_record:""
501
+        }
502
+        getBaseDrugLibList(params).then(response => {
503
+          if (response.data.state == 0) {
504
+            this.$message.error(response.data.msg)
505
+            return false
506
+          } else {
507
+            this.drugList = []
508
+            for (let i = 0; i < response.data.data.list.length; i++) {
509
+              this.drugList.push(response.data.data.list[i])
510
+            }
511
+            console.log("药品列表",this.drugList)
512
+          }
513
+        })
514
+      },
481 515
   }
482 516
 };
483 517
 </script>

+ 41 - 5
src/xt_pages/stock/drugs/drugOutOrderPrint.vue Voir le fichier

@@ -44,10 +44,11 @@
44 44
                   {{item.count}}
45 45
               </td>
46 46
               <td style="line-height:50px">
47
-                  {{item.price}}
47
+                  <!-- {{item.price}} -->
48
+                  {{getPrice(item.drug_id)}}
48 49
               </td>
49 50
               <td style="line-height:50px">
50
-                  {{(item.count * item.price).toFixed(2)}}
51
+                  {{(item.count * getPrice(item.drug_id)).toFixed(2)}}
51 52
               </td>
52 53
               <td style="line-height: 50px">
53 54
                  {{item.remark}}
@@ -84,6 +85,7 @@
84 85
 
85 86
 <script>
86 87
   import { getPrintStockGood } from '@/api/stock'
88
+  import { getBaseDrugLibList } from '@/api/data'
87 89
   import { getDataConfig } from '@/utils/data'
88 90
   import { jsGetAge, uParseTime } from '@/utils/tools'
89 91
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
@@ -114,6 +116,8 @@
114 116
         limit:this.$route.query.limit,
115 117
         page:this.$route.query.page,
116 118
         cancelStockDate:[],
119
+        drugList:[]
120
+       
117 121
       }
118 122
     },
119 123
     methods: {
@@ -215,15 +219,47 @@
215 219
             total += this.cancelStockDate[i].price * this.cancelStockDate[i].count
216 220
          }
217 221
          return total
222
+      },
223
+
224
+     getBaseDrugLibList() {
225
+        let params = {
226
+          page: 1,
227
+          limit: 1000,
228
+          keyword:"",
229
+          is_use: "",
230
+          is_charge: "",
231
+          is_inject: "",
232
+          manufacturer:"",
233
+          is_record:""
234
+        }
235
+        getBaseDrugLibList(params).then(response => {
236
+          if (response.data.state == 0) {
237
+            this.$message.error(response.data.msg)
238
+            return false
239
+          } else {
240
+            this.drugList = []
241
+            for (let i = 0; i < response.data.data.list.length; i++) {
242
+              this.drugList.push(response.data.data.list[i])
243
+            }
244
+            console.log("药品列表",this.drugList)
245
+          }
246
+        })
247
+      },
248
+      getPrice(id){
249
+        var price = 0
250
+        for(let i=0;i<this.drugList.length;i++){
251
+          if(id == this.drugList[i].id){
252
+             price = this.drugList[i].retail_price
253
+          }
254
+        }
255
+        return price
218 256
       }
219 257
     },
220 258
     created() {
221 259
       var xtuser = this.$store.getters.xt_user
222 260
       this.orgname = xtuser.org.org_name
223 261
       this.getlist()
224
-
225
-      
226
-
262
+      this.getBaseDrugLibList()
227 263
     }
228 264
 
229 265
   }

+ 13 - 15
src/xt_pages/workforce/appointment.vue Voir le fichier

@@ -2537,37 +2537,37 @@
2537 2537
        changeWeek(val){
2538 2538
        
2539 2539
          var start = this.getTimestamp(val) - 57600
2540
-        //  console.log("第一天时间错",start)
2540
+       
2541 2541
          this.start_time = this.getTime(start)
2542
-        //  console.log("第一天",this.start_time)
2542
+       
2543 2543
          this.newDay.push(this.start_time)  
2544 2544
          var next = start + 86400
2545 2545
          var nest_day = this.getTime(next)
2546
-        //  console.log("第二天",nest_day)
2546
+       
2547 2547
          this.newDay.push(nest_day)
2548 2548
          var last_days = start + 172800
2549 2549
          
2550 2550
          var last_day = this.getTime(last_days)
2551
-        //  console.log("第三天",last_day)
2551
+       
2552 2552
          this.newDay.push(last_day)
2553 2553
          
2554 2554
          var tuesdays = start + 259200
2555
-        //  console.log("tuesdays",tuesdays)
2555
+       
2556 2556
          var tuesday =  this.getTime(tuesdays)
2557
-        //  console.log("第四天",tuesday)
2557
+       
2558 2558
          this.newDay.push(tuesday)
2559 2559
          var fivdays = start + 345600
2560 2560
          var fiveday = this.getTime(fivdays)
2561
-        //  console.log("第五天",fiveday)
2561
+      
2562 2562
          this.newDay.push(fiveday)
2563 2563
          var sixday =  start + 432000
2564 2564
          var sixdays = this.getTime(sixday)
2565
-        //  console.log("第六天",sixdays)
2565
+      
2566 2566
          this.newDay.push(sixdays)
2567 2567
          var end = this.getTimestamp(val) + 460800
2568 2568
        
2569 2569
          this.end_time = this.getTime(end)
2570
-        //  console.log("第七天",this.end_time)
2570
+       
2571 2571
          this.newDay.push(this.end_time)
2572 2572
       
2573 2573
      
@@ -2643,10 +2643,8 @@
2643 2643
           return (new Date(time)).getTime() / 1000
2644 2644
         },
2645 2645
         submitAction(formName){
2646
-           
2647
-             var start_time = ""
2648
-             var end_time = ""
2649
-             console.log("this222",this.form.lastweek)
2646
+           var start_time = ""
2647
+           var end_time = ""
2650 2648
              //上周
2651 2649
              if(this.form.lastweek == "1"){
2652 2650
                 let weekOfday = parseInt(moment().format('d')) 
@@ -2680,8 +2678,8 @@
2680 2678
               copy_startime:copy_startime,
2681 2679
               copy_endtime:copy_endtime,
2682 2680
             }
2683
-           console.log("parasm",params)
2684
-           
2681
+           console.log("时间",params)
2682
+         
2685 2683
            this.$refs[formName].validate(valid=>{
2686 2684
               if(valid){
2687 2685
                 copyPatientSchedule(params).then(response=>{