|
@@ -303,7 +303,10 @@
|
303
|
303
|
<template slot-scope="scope">
|
304
|
304
|
<tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
|
305
|
305
|
<td style="border-right: none; border-inline-end:none;text-align: center">
|
306
|
|
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getBatchNumber(item.warehousing_detail_id)}}</span>
|
|
306
|
+ <span v-if="is_sys == 1 || is_sys == 5">
|
|
307
|
+ {{getBatchNumber(item.warehousing_detail_id)}}
|
|
308
|
+ </span>
|
|
309
|
+ <span v-if="is_sys == 12">{{getBatchNumber(item.warehousing_detail_id)}}</span>
|
307
|
310
|
<span v-if="is_sys == 0">{{getBatchNumberOne(item.batch_number)}}</span>
|
308
|
311
|
</td>
|
309
|
312
|
</tr>
|
|
@@ -1218,6 +1221,7 @@ export default {
|
1218
|
1221
|
if (is_sys == 1) {
|
1219
|
1222
|
if (drugFlowList.length > 0) {
|
1220
|
1223
|
for (let i = 0; i < drugFlowList.length; i++) {
|
|
1224
|
+ drugFlowList[i].childOne = []
|
1221
|
1225
|
drugFlowList[i].child = []
|
1222
|
1226
|
if (drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.max_unit) {
|
1223
|
1227
|
drugFlowList[i].count =drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number;
|
|
@@ -1227,12 +1231,12 @@ export default {
|
1227
|
1231
|
}
|
1228
|
1232
|
for(let j=0;j<drugListOne.length;j++){
|
1229
|
1233
|
if(drugFlowList[i].drug_id == drugListOne[j].drug_id){
|
1230
|
|
- drugFlowList[i].child.push(drugListOne[j])
|
|
1234
|
+ drugFlowList[i].childOne.push(drugListOne[j])
|
1231
|
1235
|
}
|
1232
|
1236
|
}
|
1233
|
1237
|
}
|
1234
|
1238
|
}
|
1235
|
|
- console.log("数据元23322323232323322332我的",drugFlowList)
|
|
1239
|
+
|
1236
|
1240
|
this.drugFlowList = drugFlowList;
|
1237
|
1241
|
}
|
1238
|
1242
|
|
|
@@ -1240,6 +1244,7 @@ export default {
|
1240
|
1244
|
var flowlist = response.data.data.flowlist;
|
1241
|
1245
|
this.drugFlowList = [];
|
1242
|
1246
|
for (let i = 0; i < flowlist.length; i++) {
|
|
1247
|
+ flowlist[i].childOne = []
|
1243
|
1248
|
flowlist[i].child = []
|
1244
|
1249
|
if (flowlist[i].count_unit == flowlist[i].max_unit) {
|
1245
|
1250
|
flowlist[i].count = flowlist[i].count * flowlist[i].min_number;
|
|
@@ -1248,24 +1253,8 @@ export default {
|
1248
|
1253
|
if (flowlist[i].count_unit == flowlist[i].min_unit) {
|
1249
|
1254
|
flowlist[i].count = flowlist[i].count;
|
1250
|
1255
|
}
|
1251
|
|
- // if(list[i].is_sys == 1){
|
1252
|
|
- // for(let j=0;j<drugListOne.length;j++){
|
1253
|
|
- // if(flowlist[i].drug_id == drugListOne[j].drug_id){
|
1254
|
|
- // flowlist[i].child.push(drugListOne[j])
|
1255
|
|
- // }
|
1256
|
|
- // }
|
1257
|
|
- // }
|
1258
|
|
- // if(list[i].is_sys == 0){
|
1259
|
|
- // for(let j=0;j<drugListTwo.length;j++){
|
1260
|
|
- // if(flowlist[i].drug_id == drugListTwo[j].drug_id){
|
1261
|
|
- // flowlist[i].child.push(drugListTwo[j])
|
1262
|
|
- // }
|
1263
|
|
- // }
|
1264
|
|
- // }
|
1265
|
|
-
|
1266
|
1256
|
}
|
1267
|
1257
|
this.drugFlowList = flowlist;
|
1268
|
|
- console.log("数据我的喔喔喔喔喔喔",this.drugFlowList)
|
1269
|
1258
|
}
|
1270
|
1259
|
|
1271
|
1260
|
for (let i = 0; i < list.length; i++) {
|
|
@@ -1277,23 +1266,79 @@ export default {
|
1277
|
1266
|
list[i].number = "";
|
1278
|
1267
|
}
|
1279
|
1268
|
list[i].child = []
|
|
1269
|
+ list[i].childOne = []
|
1280
|
1270
|
if(list[i].is_sys == 1 ){
|
1281
|
1271
|
for(let j=0;j<drugListOne.length;j++){
|
1282
|
1272
|
if(list[i].drug_id == drugListOne[j].drug_id){
|
1283
|
|
- list[i].child.push(drugListOne[j])
|
|
1273
|
+ list[i].childOne.push(drugListOne[j])
|
1284
|
1274
|
}
|
1285
|
1275
|
}
|
1286
|
1276
|
}
|
1287
|
1277
|
if(list[i].is_sys == 0 || list[i].is_sys == 5 || list[i].is_sys == 12){
|
1288
|
1278
|
for(let j=0;j<drugListTwo.length;j++){
|
1289
|
1279
|
if(list[i].drug_id == drugListTwo[j].drug_id){
|
1290
|
|
- list[i].child.push(drugListTwo[j])
|
|
1280
|
+ list[i].childOne.push(drugListTwo[j])
|
1291
|
1281
|
}
|
1292
|
1282
|
}
|
1293
|
1283
|
}
|
1294
|
1284
|
}
|
1295
|
|
- console.log("list2332323232232323",list)
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+ console.log("is_sys2332232323wo",is_sys)
|
|
1289
|
+ if(is_sys == 1 || is_sys == 5){
|
|
1290
|
+ for(let i=0;i<list.length;i++){
|
|
1291
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1292
|
+ list[i].childOne[j].over_count_total = this.getOutCountSix(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
|
|
1293
|
+ }
|
|
1294
|
+ }
|
|
1295
|
+
|
|
1296
|
+ for(let i=0;i<list.length;i++){
|
|
1297
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1298
|
+ if(list[i].childOne[j].over_count_total !=""){
|
|
1299
|
+ list[i].child.push(list[i].childOne[j])
|
|
1300
|
+ }
|
|
1301
|
+ }
|
|
1302
|
+ }
|
1296
|
1303
|
this.tableList = list;
|
|
1304
|
+ }
|
|
1305
|
+
|
|
1306
|
+ if(is_sys == 12){
|
|
1307
|
+ for(let i=0;i<list.length;i++){
|
|
1308
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1309
|
+ list[i].childOne[j].over_count_total = this.getOutCountSeven(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
|
|
1310
|
+ }
|
|
1311
|
+ }
|
|
1312
|
+
|
|
1313
|
+ for(let i=0;i<list.length;i++){
|
|
1314
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1315
|
+ if(list[i].childOne[j].over_count_total !=""){
|
|
1316
|
+ list[i].child.push(list[i].childOne[j])
|
|
1317
|
+ }
|
|
1318
|
+ }
|
|
1319
|
+ }
|
|
1320
|
+ this.tableList = list;
|
|
1321
|
+ }
|
|
1322
|
+
|
|
1323
|
+ if(is_sys == 0){
|
|
1324
|
+ console.log("list999992332232323",list)
|
|
1325
|
+ for(let i=0;i<list.length;i++){
|
|
1326
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1327
|
+ console.log("hhhahhawiiw",this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id))
|
|
1328
|
+ list[i].childOne[j].over_count_total = this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
|
|
1329
|
+ }
|
|
1330
|
+ }
|
|
1331
|
+
|
|
1332
|
+ for(let i=0;i<list.length;i++){
|
|
1333
|
+ for(let j=0;j<list[i].childOne.length;j++){
|
|
1334
|
+ if(list[i].childOne[j].over_count_total !=""){
|
|
1335
|
+ list[i].child.push(list[i].childOne[j])
|
|
1336
|
+ }
|
|
1337
|
+ }
|
|
1338
|
+ }
|
|
1339
|
+ this.tableList = list;
|
|
1340
|
+ }
|
|
1341
|
+
|
1297
|
1342
|
|
1298
|
1343
|
}
|
1299
|
1344
|
});
|
|
@@ -1488,12 +1533,11 @@ export default {
|
1488
|
1533
|
this.manufacturerList = response.data.data.manufacturerList;
|
1489
|
1534
|
this.dealerList = response.data.data.dealerList;
|
1490
|
1535
|
this.outInfoList = response.data.data.outInfoList
|
1491
|
|
- console.log("outInfoList2233232232",this.outInfoList)
|
1492
|
1536
|
}
|
1493
|
1537
|
});
|
1494
|
1538
|
},
|
1495
|
1539
|
toExport() {
|
1496
|
|
- console.log("exportlist23323232233",this.exportList)
|
|
1540
|
+
|
1497
|
1541
|
if (this.order_id == "") {
|
1498
|
1542
|
this.$message.error("请勾选出库单");
|
1499
|
1543
|
return;
|
|
@@ -1656,14 +1700,11 @@ export default {
|
1656
|
1700
|
var total = 0
|
1657
|
1701
|
var max_str = ""
|
1658
|
1702
|
var min_str = ""
|
1659
|
|
- console.log("outlist",this.outList)
|
1660
|
|
- console.log("warehouse_info_id",warehouse_info_id)
|
1661
|
1703
|
for(let j=0;j<this.outList.length;j++){
|
1662
|
1704
|
if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
|
1663
|
1705
|
arr.push(this.outList[j])
|
1664
|
1706
|
}
|
1665
|
1707
|
}
|
1666
|
|
- console.log("arr23322332",arr)
|
1667
|
1708
|
if(arr.length > 0){
|
1668
|
1709
|
for(let i=0;i<arr.length;i++){
|
1669
|
1710
|
total +=arr[i].count
|
|
@@ -1692,8 +1733,6 @@ export default {
|
1692
|
1733
|
var total = 0
|
1693
|
1734
|
var max_str = ""
|
1694
|
1735
|
var min_str = ""
|
1695
|
|
- console.log("outlist",this.outList)
|
1696
|
|
- console.log("warehouse_info_id",warehouse_info_id)
|
1697
|
1736
|
for(let j=0;j<this.outList.length;j++){
|
1698
|
1737
|
if(this.outList[i].count_unit == max_unit){
|
1699
|
1738
|
this.outList[i].count = this.outList[i].count * min_number
|
|
@@ -1702,7 +1741,6 @@ export default {
|
1702
|
1741
|
arr.push(this.outList[j])
|
1703
|
1742
|
}
|
1704
|
1743
|
}
|
1705
|
|
- console.log("arr23322332",arr)
|
1706
|
1744
|
if(arr.length > 0){
|
1707
|
1745
|
for(let i=0;i<arr.length;i++){
|
1708
|
1746
|
|
|
@@ -1912,14 +1950,12 @@ export default {
|
1912
|
1950
|
arr.push(this.tabList[j])
|
1913
|
1951
|
}
|
1914
|
1952
|
}
|
1915
|
|
- console.log("Arr233322332",arr)
|
1916
|
1953
|
if(arr.length > 0){
|
1917
|
1954
|
for(let i=0;i<arr.length;i++){
|
1918
|
1955
|
total +=arr[i].count
|
1919
|
1956
|
}
|
1920
|
1957
|
}
|
1921
|
1958
|
price = retail_price
|
1922
|
|
- console.log("price",price)
|
1923
|
1959
|
if (total < min_number) {
|
1924
|
1960
|
min_str = total
|
1925
|
1961
|
}
|
|
@@ -1935,10 +1971,7 @@ export default {
|
1935
|
1971
|
min_str = (total % min_number)
|
1936
|
1972
|
}
|
1937
|
1973
|
}
|
1938
|
|
- console.log("max_str2323232323",max_str)
|
1939
|
|
- console.log("min_str",min_str)
|
1940
|
|
- console.log("max_unit",max_unit)
|
1941
|
|
- console.log("min",min_unit)
|
|
1974
|
+
|
1942
|
1975
|
|
1943
|
1976
|
if(max_unit!=min_unit){
|
1944
|
1977
|
all_price = max_str * price + min_str * price
|
|
@@ -1946,7 +1979,6 @@ export default {
|
1946
|
1979
|
if(max_unit == min_unit){
|
1947
|
1980
|
all_price = max_str * price + min_str * price
|
1948
|
1981
|
}
|
1949
|
|
- console.log("arr_pirce",all_price)
|
1950
|
1982
|
if(all_price > 0){
|
1951
|
1983
|
return all_price.toFixed(2)
|
1952
|
1984
|
}else{
|