|
@@ -47,7 +47,7 @@
|
47
|
47
|
<div style="display:flex; align-items:center;margin-bottom:10px;">
|
48
|
48
|
<!--<el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>-->
|
49
|
49
|
<el-button type="primary" size="small" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
|
50
|
|
- <el-link target="_blank" href="https://kuyi.shengws.com/drugTemplate.xlsx" :underline="false"
|
|
50
|
+ <el-link target="_blank" href="https://kuyi.shengws.com/drugsTemplate.xlsx" :underline="false"
|
51
|
51
|
style="margin-left:15px">
|
52
|
52
|
<el-button
|
53
|
53
|
class="filter-item"
|
|
@@ -89,16 +89,7 @@
|
89
|
89
|
</div>
|
90
|
90
|
</template>
|
91
|
91
|
</el-table-column>
|
92
|
|
- <!-- <el-table-column prop="date" label="最大单位" width="60" align="center">
|
93
|
|
- <template slot-scope="scope">
|
94
|
|
- <div>{{scope.row.max_unit}}</div>
|
95
|
|
- </template>
|
96
|
|
- </el-table-column>
|
97
|
|
- <el-table-column label="最小单位" width="60" align="center">
|
98
|
|
- <template slot-scope="scope">
|
99
|
|
- <div>{{scope.row.min_unit}}</div>
|
100
|
|
- </template>
|
101
|
|
- </el-table-column> -->
|
|
92
|
+
|
102
|
93
|
<el-table-column prop="date" label="进货价" width="100" align="center">
|
103
|
94
|
<template slot-scope="scope">
|
104
|
95
|
<div>{{scope.row.last_price}}</div>
|
|
@@ -937,17 +928,17 @@
|
937
|
928
|
|
938
|
929
|
var isHasDrugName = header.includes('*药品名称');
|
939
|
930
|
console.log("isHasDrugName",isHasDrugName)
|
940
|
|
- var isHasUnval = header.includes('*拆零');
|
941
|
|
- console.log("isHasUnval",isHasUnval)
|
942
|
|
- var isHasMinUnit= header.includes('*拆零单位');
|
943
|
|
- console.log("isHasMinUnit",isHasMinUnit)
|
944
|
931
|
var isHasDosage = header.includes('*剂量')
|
945
|
932
|
console.log("isHasDosage",isHasDosage)
|
946
|
|
-
|
947
|
933
|
var isHasMaxUnit= header.includes('*剂量单位');
|
948
|
934
|
console.log("isHasMaxUnit",isHasMaxUnit)
|
|
935
|
+ var isHasUnval = header.includes('*拆零');
|
|
936
|
+ console.log("isHasUnval",isHasUnval)
|
|
937
|
+ var isHasMinUnit= header.includes('*拆零单位');
|
|
938
|
+ console.log("isHasMinUnit",isHasMinUnit)
|
949
|
939
|
var isHasPackingUnit = header.includes('*包装单位')
|
950
|
940
|
console.log("isHasPackingUnit",isHasPackingUnit)
|
|
941
|
+
|
951
|
942
|
var isHasDrugType = header.includes('*药品类型');
|
952
|
943
|
console.log("isHasDrugType",isHasDrugType)
|
953
|
944
|
var isHasDrugStockLimit = header.includes('*库存警戒');
|
|
@@ -956,14 +947,14 @@
|
956
|
947
|
console.log("isHasDrugOriginPlace",isHasDrugOriginPlace)
|
957
|
948
|
var isHasDrugDosageForm = header.includes('*药品剂型');
|
958
|
949
|
console.log("isHasDrugDosageForm",isHasDrugDosageForm)
|
959
|
|
-
|
960
|
|
- var isHasUnitMatrixing= header.includes("*单位换算");
|
961
|
|
- console.log("isHasUnitMatrixing",isHasUnitMatrixing)
|
|
950
|
+
|
962
|
951
|
var isHasRetailPrice = header.includes('*拆零零售价');
|
963
|
952
|
console.log("isHasRetailPrice",isHasRetailPrice)
|
964
|
|
- var isHasLastPrice = header.includes('*进货价');
|
965
|
953
|
var isHasPackingPrice= header.includes('*包装零售价');
|
966
|
|
- console.log("isHasLastPrice",isHasLastPrice)
|
|
954
|
+ console.log("isHasLastPrice",isHasPackingPrice)
|
|
955
|
+ var isHasLastPrice = header.includes('*进货价');
|
|
956
|
+ console.log("进货价",isHasLastPrice)
|
|
957
|
+
|
967
|
958
|
var isHasDrugClassifye = header.includes('*药物分类');
|
968
|
959
|
console.log("isHasDrugClassifye",isHasDrugClassifye)
|
969
|
960
|
var isHasManufacturer = header.includes('*生产厂商');
|
|
@@ -972,8 +963,9 @@
|
972
|
963
|
console.log("isHasDrugDose",isHasDrugDose)
|
973
|
964
|
var isDrugDoseUnit = header.includes('*默认单次用量单位');
|
974
|
965
|
console.log("isDrugDoseUnit",isDrugDoseUnit)
|
975
|
|
- if (!(isHasDrugName && isHasUnval && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit && isHasMinUnit && isHasUnitMatrixing && isHasRetailPrice && isHasLastPrice && isHasPackingPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit && isHasDosage && isHasPackingUnit)) {
|
976
|
|
- console.log("分区222222222222222222222222222222")
|
|
966
|
+ if (!(isHasDrugName && isHasDosage && isHasMaxUnit && isHasUnval && isHasMinUnit && isHasPackingUnit && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace &&
|
|
967
|
+ isHasDrugDosageForm && isHasRetailPrice && isHasPackingPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit)) {
|
|
968
|
+
|
977
|
969
|
this.dialogVisible = true;
|
978
|
970
|
return
|
979
|
971
|
}
|
|
@@ -996,74 +988,49 @@
|
996
|
988
|
}
|
997
|
989
|
|
998
|
990
|
|
999
|
|
- if (results[i]['*拆零'] === undefined) {
|
1000
|
|
- obj['min_number'] = ''
|
1001
|
|
- } else {
|
1002
|
|
- if (key == '*拆零') {
|
1003
|
|
- obj['min_number'] = results[i][key].replace(/\s/g,"")
|
1004
|
|
- }
|
1005
|
|
- }
|
1006
|
|
-
|
1007
|
|
- if (results[i]['*拆零单位'] === undefined) {
|
1008
|
|
- obj['min_unit'] = ''
|
1009
|
|
- } else {
|
1010
|
|
- if (key == '*拆零单位') {
|
1011
|
|
- obj['min_unit'] = results[i][key].replace(/\s/g,"")
|
1012
|
|
- }
|
1013
|
|
- }
|
1014
|
|
-
|
1015
|
|
-
|
1016
|
|
- if (results[i]['*剂量'] === undefined) {
|
1017
|
|
- obj['dosage'] = ''
|
|
991
|
+ if (results[i]['*剂量'] === undefined) {
|
|
992
|
+ obj['dose'] = ''
|
1018
|
993
|
} else {
|
1019
|
994
|
if (key == '*剂量') {
|
1020
|
|
- obj['dosage'] = results[i][key].replace(/\s/g,"")
|
|
995
|
+ obj['dose'] = results[i][key].replace(/\s/g,"")
|
1021
|
996
|
}
|
1022
|
997
|
}
|
1023
|
998
|
|
1024
|
999
|
if (results[i]['*剂量单位'] === undefined) {
|
1025
|
|
- obj['max_unit'] = ''
|
|
1000
|
+ obj['dose_unit'] = ''
|
1026
|
1001
|
} else {
|
1027
|
1002
|
if (key == '*剂量单位') {
|
1028
|
|
- obj['max_unit'] = results[i][key].replace(/\s/g,"")
|
1029
|
|
- }
|
1030
|
|
- }
|
1031
|
|
-
|
1032
|
|
- if (results[i]['*包装单位'] === undefined) {
|
1033
|
|
- obj['packing_unit'] = ''
|
1034
|
|
- } else {
|
1035
|
|
- if (key == '*包装单位') {
|
1036
|
|
- obj['packing_unit'] = results[i][key].replace(/\s/g,"")
|
|
1003
|
+ obj['dose_unit'] = results[i][key].replace(/\s/g,"")
|
1037
|
1004
|
}
|
1038
|
1005
|
}
|
1039
|
1006
|
|
1040
|
1007
|
|
1041
|
|
- if (results[i]['默认给药途径'] === undefined) {
|
1042
|
|
- obj['delivery_way'] = ''
|
|
1008
|
+
|
|
1009
|
+ if (results[i]['*拆零'] === undefined) {
|
|
1010
|
+ obj['min_number'] = ''
|
1043
|
1011
|
} else {
|
1044
|
|
- if (key == '默认给药途径') {
|
1045
|
|
- obj['delivery_way'] = results[i][key].replace(/\s/g,"")
|
|
1012
|
+ if (key == '*拆零') {
|
|
1013
|
+ obj['min_number'] = results[i][key].replace(/\s/g,"")
|
1046
|
1014
|
}
|
1047
|
1015
|
}
|
1048
|
1016
|
|
1049
|
|
- if (results[i]['默认执行频率'] === undefined) {
|
1050
|
|
- obj['execution_frequency'] = ''
|
|
1017
|
+ if (results[i]['*拆零单位'] === undefined) {
|
|
1018
|
+ obj['min_unit'] = ''
|
1051
|
1019
|
} else {
|
1052
|
|
- if (key == '默认执行频率') {
|
1053
|
|
- obj['execution_frequency'] = results[i][key].replace(/\s/g,"")
|
|
1020
|
+ if (key == '*拆零单位') {
|
|
1021
|
+ obj['min_unit'] = results[i][key].replace(/\s/g,"")
|
1054
|
1022
|
}
|
1055
|
1023
|
}
|
1056
|
1024
|
|
1057
|
|
- if (results[i]['默认开药天数'] === undefined) {
|
1058
|
|
- obj['drug_day'] = ''
|
|
1025
|
+
|
|
1026
|
+ if (results[i]['*包装单位'] === undefined) {
|
|
1027
|
+ obj['max_unit'] = ''
|
1059
|
1028
|
} else {
|
1060
|
|
- if (key == '默认开药天数') {
|
1061
|
|
- obj['drug_day'] = results[i][key].replace(/\s/g,"")
|
|
1029
|
+ if (key == '*包装单位') {
|
|
1030
|
+ obj['max_unit'] = results[i][key].replace(/\s/g,"")
|
1062
|
1031
|
}
|
1063
|
1032
|
}
|
1064
|
1033
|
|
1065
|
|
-
|
1066
|
|
-
|
1067
|
1034
|
if (results[i]['*药品类型'] === undefined) {
|
1068
|
1035
|
obj['drug_type'] = ''
|
1069
|
1036
|
} else {
|
|
@@ -1099,28 +1066,6 @@
|
1099
|
1066
|
}
|
1100
|
1067
|
|
1101
|
1068
|
|
1102
|
|
- if (results[i]['*医保等级'] === undefined) {
|
1103
|
|
- obj['medical_insurance_level'] = ''
|
1104
|
|
- } else {
|
1105
|
|
- if (key == '*医保等级') {
|
1106
|
|
- obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
|
1107
|
|
- }
|
1108
|
|
- }
|
1109
|
|
-
|
1110
|
|
-
|
1111
|
|
-
|
1112
|
|
-
|
1113
|
|
- if (results[i]['*单位换算'] === undefined) {
|
1114
|
|
- obj['unit_matrixing'] = ''
|
1115
|
|
- } else {
|
1116
|
|
- if (key == '*单位换算') {
|
1117
|
|
- obj['unit_matrixing'] = results[i][key].replace(/\s/g,"")
|
1118
|
|
- }
|
1119
|
|
- }
|
1120
|
|
-
|
1121
|
|
-
|
1122
|
|
-
|
1123
|
|
-
|
1124
|
1069
|
if (results[i]['*拆零零售价'] === undefined) {
|
1125
|
1070
|
obj['retail_price'] = ''
|
1126
|
1071
|
} else {
|
|
@@ -1195,6 +1140,22 @@
|
1195
|
1140
|
}
|
1196
|
1141
|
}
|
1197
|
1142
|
|
|
1143
|
+ if (results[i]['默认给药途径'] === undefined) {
|
|
1144
|
+ obj['delivery_way'] = ''
|
|
1145
|
+ } else {
|
|
1146
|
+ if (key == '经销商') {
|
|
1147
|
+ obj['delivery_way'] = results[i][key].replace(/\s/g,"")
|
|
1148
|
+ }
|
|
1149
|
+ }
|
|
1150
|
+
|
|
1151
|
+ if (results[i]['默认执行频率'] === undefined) {
|
|
1152
|
+ obj['execution_frequency'] = ''
|
|
1153
|
+ } else {
|
|
1154
|
+ if (key == '默认执行频率') {
|
|
1155
|
+ obj['execution_frequency'] = results[i][key].replace(/\s/g,"")
|
|
1156
|
+ }
|
|
1157
|
+ }
|
|
1158
|
+
|
1198
|
1159
|
if (results[i]['限制性用药'] === undefined) {
|
1199
|
1160
|
obj['lmt_used_flag'] = ''
|
1200
|
1161
|
} else {
|
|
@@ -1415,12 +1376,14 @@
|
1415
|
1376
|
|
1416
|
1377
|
}
|
1417
|
1378
|
}
|
1418
|
|
-
|
|
1379
|
+ for(let i=0;i<tableData.length;i++){
|
|
1380
|
+ tableData[i].dose = parseInt(tableData[i].dose)
|
|
1381
|
+ }
|
1419
|
1382
|
let params = {
|
1420
|
1383
|
'drugs':tableData
|
1421
|
1384
|
};
|
1422
|
1385
|
console.log("params222222222",params)
|
1423
|
|
-
|
|
1386
|
+
|
1424
|
1387
|
postDrugInformation(params).then(response=>{
|
1425
|
1388
|
if(response.data.state == 1){
|
1426
|
1389
|
var msg = response.data.data.msg;
|