XMLWAN 4 years ago
parent
commit
c62da800a6

+ 28 - 5
src/xt_pages/data/components/consumables.vue View File

66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
66
      <div style="display:flex; align-items:center;margin-bottom:10px;">
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
67
         <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
68
         <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
69
-        <!-- <el-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
                  style="margin-left:15px">
70
                  style="margin-left:15px">
71
           <el-button
71
           <el-button
72
             class="filter-item"
72
             class="filter-item"
83
           type="primary"
83
           type="primary"
84
           size="small"
84
           size="small"
85
         >下载日志
85
         >下载日志
86
-        </el-button> -->
86
+        </el-button>
87
       </div>
87
       </div>
88
 
88
 
89
     <el-table
89
     <el-table
1284
            }
1284
            }
1285
 
1285
 
1286
            if (results[i]['备注'] === undefined) {
1286
            if (results[i]['备注'] === undefined) {
1287
-                obj['is_mark'] = ''
1287
+                obj['remark'] = ''
1288
               } else {
1288
               } else {
1289
              if (key == '备注') {
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
              tableData[i].special_medical = 2
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
        let params = {
1411
        let params = {
1389
           'goods':tableData 
1412
           'goods':tableData 

+ 245 - 10
src/xt_pages/data/components/drugs.vue View File

62
       
62
       
63
     </div>
63
     </div>
64
     <div style="display:flex; align-items:center;margin-bottom:10px;">
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
                  style="margin-left:15px">
68
                  style="margin-left:15px">
69
           <el-button
69
           <el-button
70
             class="filter-item"
70
             class="filter-item"
81
           type="primary"
81
           type="primary"
82
           size="small"
82
           size="small"
83
         >下载日志
83
         >下载日志
84
-        </el-button> -->
84
+        </el-button>
85
       </div>
85
       </div>
86
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
86
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
87
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
87
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
948
        
948
        
949
        var tableData = []
949
        var tableData = []
950
        for(let i=0;i<results.length;i++){
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
          for (var key in results[i]) {
952
          for (var key in results[i]) {
953
 
953
 
954
            if (results[i]['*药品名称'] === undefined) {
954
            if (results[i]['*药品名称'] === undefined) {
1080
             if (results[i]['*经销商'] === undefined) {
1080
             if (results[i]['*经销商'] === undefined) {
1081
                 obj['dealer'] = ''
1081
                 obj['dealer'] = ''
1082
               } else {
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
          tableData.push(obj)
1251
          tableData.push(obj)
1090
          console.log("表哥2222",tableData)
1252
          console.log("表哥2222",tableData)
1099
 
1261
 
1100
         var drugClassify =  this.getDictionaryDataConfig('system','drug_classify')
1262
         var drugClassify =  this.getDictionaryDataConfig('system','drug_classify')
1101
        
1263
        
1102
-
1264
+        var drug_control =  this.getDictionaryDataConfig('system','drug_control')
1103
         var goodUnit =  this.$store.getters.good_unit
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
         for(let i=0;i<tableData.length;i++){ 
1274
         for(let i=0;i<tableData.length;i++){ 
1107
           for(let j=0;j<drugType.length;j++){
1275
           for(let j=0;j<drugType.length;j++){
1108
             if(tableData[i].drug_type == drugType[j].name){
1276
             if(tableData[i].drug_type == drugType[j].name){
1140
                tableData[i].dealer_id = this.dealer[j].id
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
        for(let i=0;i<tableData.length;i++){
1378
        for(let i=0;i<tableData.length;i++){
1147
           tableData[i].retail_price = parseInt(tableData[i].retail_price)
1379
           tableData[i].retail_price = parseInt(tableData[i].retail_price)
1148
           tableData[i].last_price = parseInt(tableData[i].last_price)
1380
           tableData[i].last_price = parseInt(tableData[i].last_price)
1149
        }
1381
        }
1382
+
1383
+
1150
        
1384
        
1151
        let params = {
1385
        let params = {
1152
           'drugs':tableData 
1386
           'drugs':tableData 
1153
         }
1387
         }
1154
        console.log("params2222",params)
1388
        console.log("params2222",params)
1389
+    
1155
         postDrugInformation(params).then(response=>{
1390
         postDrugInformation(params).then(response=>{
1156
            if(response.data.state == 1){
1391
            if(response.data.state == 1){
1157
              var msg =  response.data.data.msg
1392
              var msg =  response.data.data.msg

+ 234 - 8
src/xt_pages/data/components/project.vue View File

39
             </div>
39
             </div>
40
         </div>
40
         </div>
41
         <div style="display:flex; align-items:center;margin-bottom:10px;">
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
                  style="margin-left:15px">
45
                  style="margin-left:15px">
46
           <el-button
46
           <el-button
47
             class="filter-item"
47
             class="filter-item"
60
           type="primary"
60
           type="primary"
61
           size="small"
61
           size="small"
62
         >下载日志
62
         >下载日志
63
-        </el-button> -->
63
+        </el-button>
64
       </div>
64
       </div>
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">
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
             <el-table-column
66
             <el-table-column
375
                page:this.page,
375
                page:this.page,
376
                is_mark:this.is_mark,
376
                is_mark:this.is_mark,
377
             }
377
             }
378
-           console.log("222",params)
378
+          
379
           getProjectList(params).then(response=>{
379
           getProjectList(params).then(response=>{
380
              if(response.data.state == 1){
380
              if(response.data.state == 1){
381
                var projecList = response.data.data.projecList
381
                var projecList = response.data.data.projecList
544
        
544
        
545
        var tableData = []
545
        var tableData = []
546
        for(let i=0;i<results.length;i++){
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
          for (var key in results[i]) {
548
          for (var key in results[i]) {
549
            if (results[i]['*项目名称'] === undefined) {
549
            if (results[i]['*项目名称'] === undefined) {
550
                 obj['project_name'] = ''
550
                 obj['project_name'] = ''
593
                obj['medical_coverage'] = results[i][key].replace(/\s/g,"")
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
          tableData.push(obj)
741
          tableData.push(obj)
598
          console.log("项目列表",tableData)
742
          console.log("项目列表",tableData)
601
         console.log("费用类别",costClassify)
745
         console.log("费用类别",costClassify)
602
         var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
746
         var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
603
         console.log("医保等级",medicalInsuranceLevel)
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
         for(let i=0;i<tableData.length;i++){ 
755
         for(let i=0;i<tableData.length;i++){ 
606
           for(let j=0;j<costClassify.length;j++){
756
           for(let j=0;j<costClassify.length;j++){
607
-            console.log("222222",costClassify[j].name)
757
+          
608
              if(tableData[i].cost_classify === costClassify[j].name){
758
              if(tableData[i].cost_classify === costClassify[j].name){
609
                  tableData[i].cost_classify_id = costClassify[j].id
759
                  tableData[i].cost_classify_id = costClassify[j].id
610
              }
760
              }
623
                 tableData[i].executive_section_id = this.departMentList[j].id
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
           'projects':tableData 
858
           'projects':tableData 
635
         }
859
         }
636
        console.log("params2222",params)
860
        console.log("params2222",params)
861
+       
637
         postProjectInformation(params).then(response=>{
862
         postProjectInformation(params).then(response=>{
638
            if(response.data.state == 1){
863
            if(response.data.state == 1){
639
              var msg =  response.data.data.msg
864
              var msg =  response.data.data.msg
640
              this.$message.success("导入成功!")
865
              this.$message.success("导入成功!")
866
+             
641
            }else{
867
            }else{
642
              this.$message.error("导入失败")
868
              this.$message.error("导入失败")
643
            }
869
            }

+ 1 - 1
src/xt_pages/data/specialDictionary.vue View File

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

+ 13 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue View File

1386
 
1386
 
1387
           // this.advices = response.data.data.advices
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
           this.monitors = response.data.data.monitors
1396
           this.monitors = response.data.data.monitors
1392
           this.summary = response.data.data.summary
1397
           this.summary = response.data.data.summary
1393
           this.org_template_info = response.data.data.org_template_info
1398
           this.org_template_info = response.data.data.org_template_info
1588
           // checker: 0,
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
   watch: {
1602
   watch: {
1594
     'patientInfo.gender': function() {
1603
     'patientInfo.gender': function() {
1614
         this.patientInfo_source_2 = false
1623
         this.patientInfo_source_2 = false
1615
         this.patientInfo_source_1 = false
1624
         this.patientInfo_source_1 = false
1616
       }
1625
       }
1617
-    }
1626
+    },
1627
+   
1618
   },
1628
   },
1619
   created() {
1629
   created() {
1620
     var xtuser = this.$store.getters.xt_user
1630
     var xtuser = this.$store.getters.xt_user

+ 29 - 7
src/xt_pages/stock/detail/print.vue View File

68
               <td style="line-height: 50px" v-if="type == 3">
68
               <td style="line-height: 50px" v-if="type == 3">
69
                 
69
                 
70
                   <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
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
              </td>
73
              </td>
74
               <td style="line-height: 50px"></td>
74
               <td style="line-height: 50px"></td>
79
             <tbody>
79
             <tbody>
80
             <tr>
80
             <tr>
81
               <td width="633" style="line-height: 50px">合计</td>
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
               <td></td>
86
               <td></td>
84
             </tr>
87
             </tr>
85
 
88
 
196
             var informationlist = response.data.data.infomationList
199
             var informationlist = response.data.data.infomationList
197
             console.log('数据列表',informationlist)
200
             console.log('数据列表',informationlist)
198
             this.informationList = informationlist
201
             this.informationList = informationlist
202
+            this.stockDatas = []
199
             for (let i = 0; i < response.data.data.list.length; i++) {
203
             for (let i = 0; i < response.data.data.list.length; i++) {
200
               if (this.type == 1) {
204
               if (this.type == 1) {
201
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
205
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
208
                 }
212
                 }
209
 
213
 
210
               } else if (this.type == 3) {
214
               } else if (this.type == 3) {
211
-              
215
+                
212
                 if (response.data.data.list[i].query_warehouseout_info.length > 0) {
216
                 if (response.data.data.list[i].query_warehouseout_info.length > 0) {
213
                   this.stockDatas.push(response.data.data.list[i])
217
                   this.stockDatas.push(response.data.data.list[i])
214
                 }
218
                 }
215
-              
219
+               
220
+                console.log("出库打印数据源",this.stockDatas)
216
                 
221
                 
217
               } else if (this.type == 4) {
222
               } else if (this.type == 4) {
218
                 if (response.data.data.list[i].query_cancel_stock_info.length > 0) {
223
                 if (response.data.data.list[i].query_cancel_stock_info.length > 0) {
225
             for(let i = 0; i <this.stockDatas.length;i++){
230
             for(let i = 0; i <this.stockDatas.length;i++){
226
               obj = this.stockDatas[i]
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
             // if (this.stockDatas.length < 50) {
239
             // if (this.stockDatas.length < 50) {
230
             //   var nl = 50 - this.stockDatas.length
240
             //   var nl = 50 - this.stockDatas.length
231
             //   for (let index = 0; index < nl; index++) {
241
             //   for (let index = 0; index < nl; index++) {
288
           }
298
           }
289
         }
299
         }
290
         return  Math.floor(total_price * 100) / 100
300
         return  Math.floor(total_price * 100) / 100
291
-      }, calTotalPrice() {
301
+      },
302
+       calTotalPrice() {
292
 
303
 
293
         var amountPrice = 0
304
         var amountPrice = 0
294
         for (let i = 0; i < this.stockDatas.length; i++) {
305
         for (let i = 0; i < this.stockDatas.length; i++) {
384
           }
395
           }
385
        }
396
        }
386
        return price
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
     created() {
411
     created() {
390
       var xtuser = this.$store.getters.xt_user
412
       var xtuser = this.$store.getters.xt_user

+ 59 - 16
src/xt_pages/stock/detail/stockOutDetail.vue View File

180
       <el-pagination
180
       <el-pagination
181
         @size-change="handleSizeChange"
181
         @size-change="handleSizeChange"
182
         @current-change="handleCurrentChange"
182
         @current-change="handleCurrentChange"
183
-        :page-sizes="[10, 50, 100]"
183
+        :page-sizes="[10, 50, 100,1000,1500]"
184
         :page-size="10"
184
         :page-size="10"
185
         background
185
         background
186
         style="margin-top:20px;float: right"
186
         style="margin-top:20px;float: right"
195
 <script>
195
 <script>
196
 import { uParseTime } from "@/utils/tools";
196
 import { uParseTime } from "@/utils/tools";
197
 import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
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
 export default {
200
 export default {
201
   name: "stockOutDetail",
201
   name: "stockOutDetail",
226
     this.fetchAllAdminUsers();
226
     this.fetchAllAdminUsers();
227
     this.goodUnit = this.$store.getters.good_unit
227
     this.goodUnit = this.$store.getters.good_unit
228
     this.getPrintStockGood()
228
     this.getPrintStockGood()
229
+    this.getList()
229
   },
230
   },
230
   data() {
231
   data() {
231
     return {
232
     return {
258
       dealer: [],
259
       dealer: [],
259
       goodUnit:[],
260
       goodUnit:[],
260
       tableList:[],
261
       tableList:[],
261
-      stockTotal:[]
262
+      stockTotal:[],
263
+      goodInfoData:[]
262
     };
264
     };
263
   },
265
   },
264
   methods: {
266
   methods: {
638
             console.log("stockTotal",stockTotal)
640
             console.log("stockTotal",stockTotal)
639
             this.stockTotal = stockTotal
641
             this.stockTotal = stockTotal
640
             var list =  response.data.data.list
642
             var list =  response.data.data.list
641
-            // console.log("导出数据",list)
643
+            console.log("导出数据",list)
644
+            this.tableList = []
642
             for(let i=0;i<list.length;i++){
645
             for(let i=0;i<list.length;i++){
643
               if (list[i].query_warehouseout_info.length > 0) {
646
               if (list[i].query_warehouseout_info.length > 0) {
644
                 this.tableList.push(list[i])
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
       },
714
       },
712
       unique(arr) {
715
       unique(arr) {
713
         const res = new Map();
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
      exportList(){
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
       var obj = {index:"合计",total:0}
756
       var obj = {index:"合计",total:0}
720
-       obj.total = this.calTotalPrice()
757
+       obj.total = this.getTotalPrice()
721
        for(let i=0;i<this.tableList.length;i++){
758
        for(let i=0;i<this.tableList.length;i++){
722
         this.tableList[i].index = i+1
759
         this.tableList[i].index = i+1
723
         this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
760
         this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
724
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
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
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
764
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
728
        }
765
        }
729
        var arr = this.unique(this.tableList)
766
        var arr = this.unique(this.tableList)
730
-       console.log("22222222222222222气",arr)
767
+     
731
        this.tableList = arr
768
        this.tableList = arr
732
        this.tableList.push(obj)
769
        this.tableList.push(obj)
733
        import('@/vendor/Export2Excel').then(excel => {
770
        import('@/vendor/Export2Excel').then(excel => {
734
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
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
        const data = this.formatJson(filterVal, this.tableList)
774
        const data = this.formatJson(filterVal, this.tableList)
741
        console.log("data",data)
775
        console.log("data",data)
742
-
776
+       
743
         excel.export_json_to_excel({
777
         excel.export_json_to_excel({
744
            header: tHeader,
778
            header: tHeader,
745
            data,
779
            data,
760
        }
794
        }
761
       return name
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
 </script>
808
 </script>

+ 37 - 3
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

197
 import { fetchAllAdminUsers } from "@/api/doctor";
197
 import { fetchAllAdminUsers } from "@/api/doctor";
198
 import {GetAllConfig } from "@/api/stock";
198
 import {GetAllConfig } from "@/api/stock";
199
 import {getDrugOutDetail } from "@/api/drug/drug_stock"
199
 import {getDrugOutDetail } from "@/api/drug/drug_stock"
200
+ import {getBaseDrugLibList} from '@/api/data'
200
 export default {
201
 export default {
201
   name: "stockOutDetail",
202
   name: "stockOutDetail",
202
 
203
 
224
     this.GetConfigInfo();
225
     this.GetConfigInfo();
225
     this.fetchAllAdminUsers();
226
     this.fetchAllAdminUsers();
226
     this.getlist()
227
     this.getlist()
228
+    this.getBaseDrugLibList()
227
   },
229
   },
228
   data() {
230
   data() {
229
     return {
231
     return {
255
       selectedTableData: [],
257
       selectedTableData: [],
256
       dealer: [],
258
       dealer: [],
257
       tableData:[],
259
       tableData:[],
258
-      tableList:[]
260
+      tableList:[],
261
+      drugList:[]
259
     };
262
     };
260
   },
263
   },
261
   methods: {
264
   methods: {
449
     },
452
     },
450
 
453
 
451
      exportList(){
454
      exportList(){
455
+
452
         for(let i=0;i<this.tableList.length;i++){
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
           this.tableList[i].index = i+1
462
           this.tableList[i].index = i+1
454
         }
463
         }
455
        import('@/vendor/Export2Excel').then(excel => {
464
        import('@/vendor/Export2Excel').then(excel => {
456
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
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
        let obj = {'index':'合计','total_price':0}
467
        let obj = {'index':'合计','total_price':0}
459
        for(let i=0;i<this.tableList.length;i++){
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
        for(let j=0;j<this.tableList.length;j++){
471
        for(let j=0;j<this.tableList.length;j++){
463
           this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
472
           this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
478
      formatJson(filterVal, jsonData) {
487
      formatJson(filterVal, jsonData) {
479
         return jsonData.map(v => filterVal.map(j => v[j]));
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
 </script>
517
 </script>

+ 41 - 5
src/xt_pages/stock/drugs/drugOutOrderPrint.vue View File

44
                   {{item.count}}
44
                   {{item.count}}
45
               </td>
45
               </td>
46
               <td style="line-height:50px">
46
               <td style="line-height:50px">
47
-                  {{item.price}}
47
+                  <!-- {{item.price}} -->
48
+                  {{getPrice(item.drug_id)}}
48
               </td>
49
               </td>
49
               <td style="line-height:50px">
50
               <td style="line-height:50px">
50
-                  {{(item.count * item.price).toFixed(2)}}
51
+                  {{(item.count * getPrice(item.drug_id)).toFixed(2)}}
51
               </td>
52
               </td>
52
               <td style="line-height: 50px">
53
               <td style="line-height: 50px">
53
                  {{item.remark}}
54
                  {{item.remark}}
84
 
85
 
85
 <script>
86
 <script>
86
   import { getPrintStockGood } from '@/api/stock'
87
   import { getPrintStockGood } from '@/api/stock'
88
+  import { getBaseDrugLibList } from '@/api/data'
87
   import { getDataConfig } from '@/utils/data'
89
   import { getDataConfig } from '@/utils/data'
88
   import { jsGetAge, uParseTime } from '@/utils/tools'
90
   import { jsGetAge, uParseTime } from '@/utils/tools'
89
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
91
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
114
         limit:this.$route.query.limit,
116
         limit:this.$route.query.limit,
115
         page:this.$route.query.page,
117
         page:this.$route.query.page,
116
         cancelStockDate:[],
118
         cancelStockDate:[],
119
+        drugList:[]
120
+       
117
       }
121
       }
118
     },
122
     },
119
     methods: {
123
     methods: {
215
             total += this.cancelStockDate[i].price * this.cancelStockDate[i].count
219
             total += this.cancelStockDate[i].price * this.cancelStockDate[i].count
216
          }
220
          }
217
          return total
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
     created() {
258
     created() {
221
       var xtuser = this.$store.getters.xt_user
259
       var xtuser = this.$store.getters.xt_user
222
       this.orgname = xtuser.org.org_name
260
       this.orgname = xtuser.org.org_name
223
       this.getlist()
261
       this.getlist()
224
-
225
-      
226
-
262
+      this.getBaseDrugLibList()
227
     }
263
     }
228
 
264
 
229
   }
265
   }

+ 13 - 15
src/xt_pages/workforce/appointment.vue View File

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