|
@@ -249,7 +249,7 @@
|
249
|
249
|
<el-table-column label="总价" align="center">
|
250
|
250
|
<template slot-scope="scope">
|
251
|
251
|
<span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
|
252
|
|
- <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number).toFixed(2)}}</span>
|
|
252
|
+ <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
|
253
|
253
|
</template>
|
254
|
254
|
</el-table-column>
|
255
|
255
|
<el-table-column label="生产厂家" align="center">
|
|
@@ -961,7 +961,7 @@ export default {
|
961
|
961
|
this.tableShow = true
|
962
|
962
|
this.tableList = []
|
963
|
963
|
var list = response.data.data.list
|
964
|
|
-
|
|
964
|
+ console.log("lisrt233232323232233223",list)
|
965
|
965
|
this.manufacturerList = response.data.data.manufacturerList
|
966
|
966
|
this.dealerList = response.data.data.dealerList
|
967
|
967
|
var drugFlowList = response.data.data.drugFlowList
|
|
@@ -971,6 +971,8 @@ export default {
|
971
|
971
|
for(let i=0;i<drugFlowList.length;i++){
|
972
|
972
|
if(drugFlowList[i].count_unit == drugFlowList[i].XtBaseDrug.max_unit){
|
973
|
973
|
drugFlowList[i].count = drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number
|
|
974
|
+
|
|
975
|
+
|
974
|
976
|
}
|
975
|
977
|
if(drugFlowList[i].count_unit == drugFlowList[i].XtBaseDrug.min_unit){
|
976
|
978
|
drugFlowList[i].count = drugFlowList[i].count
|
|
@@ -983,16 +985,20 @@ export default {
|
983
|
985
|
}
|
984
|
986
|
if(is_sys == 0 || is_sys == 12){
|
985
|
987
|
var flowlist = response.data.data.flowlist
|
|
988
|
+ console.log("flowlist233232232323233223",flowlist)
|
986
|
989
|
this.drugFlowList = []
|
987
|
990
|
for(let i=0;i<flowlist.length;i++){
|
988
|
991
|
if(flowlist[i].count_unit == flowlist[i].max_unit){
|
989
|
|
- flowlist[i].count = flowlist[i].count * flowlist[i].min_number
|
|
992
|
+ flowlist[i].count = flowlist[i].count * flowlist[i].min_number
|
|
993
|
+ flowlist[i].count_unit = flowlist[i].min_unit
|
990
|
994
|
}
|
991
|
995
|
if(flowlist[i].count_unit == flowlist[i].min_unit){
|
992
|
996
|
flowlist[i].count = flowlist[i].count
|
993
|
997
|
}
|
994
|
998
|
}
|
995
|
999
|
this.drugFlowList = flowlist
|
|
1000
|
+ console.log("this.drugFlowList32323232322323323232322323我的",flowlist)
|
|
1001
|
+
|
996
|
1002
|
}
|
997
|
1003
|
|
998
|
1004
|
for(let i=0;i<list.length;i++){
|
|
@@ -1257,10 +1263,7 @@ export default {
|
1257
|
1263
|
return jsonData.map(v => filterVal.map(j => v[j]));
|
1258
|
1264
|
},
|
1259
|
1265
|
getAllPriceOne(drug_id,price,min_price,max_unit,count_unit,min_number,is_sys){
|
1260
|
|
- console.log("drugfalowlist22332233232",this.drugFlowList)
|
1261
|
|
- console.log("max_unit23223232323",max_unit)
|
1262
|
|
- console.log("count_unit2323333",count_unit)
|
1263
|
|
- console.log("is_sys232232323",is_sys)
|
|
1266
|
+
|
1264
|
1267
|
var total = 0
|
1265
|
1268
|
var all_price = 0
|
1266
|
1269
|
for(let i=0;i<this.drugFlowList.length;i++){
|
|
@@ -1271,7 +1274,7 @@ export default {
|
1271
|
1274
|
if(max_unit == count_unit && is_sys!=0 && is_sys!=12){
|
1272
|
1275
|
total = total * min_number
|
1273
|
1276
|
}
|
1274
|
|
- all_price = total * price
|
|
1277
|
+ all_price = (total/min_number) * price
|
1275
|
1278
|
|
1276
|
1279
|
return all_price
|
1277
|
1280
|
},
|