|
@@ -796,9 +796,7 @@ export default {
|
796
|
796
|
getAllPrice() {
|
797
|
797
|
var total_price = 0;
|
798
|
798
|
for (let i = 0; i < this.recordInfo.tableList.length; i++) {
|
799
|
|
- total_price +=
|
800
|
|
- this.recordInfo.tableList[i].supply_price *
|
801
|
|
- this.recordInfo.tableList[i].supply_count;
|
|
799
|
+ total_price += this.recordInfo.tableList[i].supply_price *this.recordInfo.tableList[i].supply_count - (this.recordInfo.tableList[i].supply_price**this.recordInfo.tableList[i].supply_count*(this.recordInfo.tableList[i].deposit_rate/100));
|
802
|
800
|
}
|
803
|
801
|
this.total_price = total_price;
|
804
|
802
|
// this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
|
|
@@ -932,20 +930,27 @@ export default {
|
932
|
930
|
orderInfo[i].max_unit =drugList[j].max_unit
|
933
|
931
|
orderInfo[i].min_unit =drugList[j].min_unit
|
934
|
932
|
}
|
935
|
|
-
|
|
933
|
+
|
|
934
|
+ orderInfo[i].count = this.getWarehoseInfoSix(orderInfo[i].drug_warehouse_info,orderInfo[i].drug.max_unit,orderInfo[i].drug.min_unit,orderInfo[i].drug.min_number,orderInfo[i].warehouse_out_id)
|
936
|
935
|
}
|
937
|
|
- orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
|
|
936
|
+
|
|
937
|
+ // orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
|
938
|
938
|
}
|
|
939
|
+
|
|
940
|
+
|
939
|
941
|
if (orderInfo[i].is_source == 2) {
|
940
|
942
|
for (let j = 0; j < goodList.length; j++) {
|
941
|
943
|
if (orderInfo[i].project_id == goodList[j].id) {
|
942
|
944
|
orderInfo[i].unitList = [{ id: 1, name: "" }];
|
943
|
945
|
orderInfo[i].unitList[0].name = goodList[j].packing_unit;
|
944
|
946
|
}
|
|
947
|
+
|
|
948
|
+ orderInfo[i].count = this.getTotalStockCountSix(orderInfo[i].good_warehouse_info,orderInfo[i].warehouse_out_id)
|
945
|
949
|
}
|
946
|
950
|
orderInfo[i].sum_count = orderInfo[i].count
|
947
|
951
|
orderInfo[i].min_number = 0
|
948
|
|
- orderInfo[i].count = orderInfo[i].count;
|
|
952
|
+
|
|
953
|
+ // orderInfo[i].count = orderInfo[i].count;
|
949
|
954
|
orderInfo[i].max_unit =""
|
950
|
955
|
orderInfo[i].min_unit =""
|
951
|
956
|
}
|
|
@@ -1165,6 +1170,7 @@ export default {
|
1165
|
1170
|
id:this.id,
|
1166
|
1171
|
}
|
1167
|
1172
|
console.log("审核2322323232323",params)
|
|
1173
|
+
|
1168
|
1174
|
checkReturnOrder(params).then(response=>{
|
1169
|
1175
|
if(response.data.state == 1){
|
1170
|
1176
|
|
|
@@ -1266,6 +1272,66 @@ export default {
|
1266
|
1272
|
toPrint() {
|
1267
|
1273
|
this.$router.push({ path: "/good/return/print?&id=" + this.id });
|
1268
|
1274
|
},
|
|
1275
|
+
|
|
1276
|
+ getWarehoseInfoSix(arr, max_unit, min_unit, min_number,warehouse_out_id) {
|
|
1277
|
+ var total = 0;
|
|
1278
|
+ var max_str = "";
|
|
1279
|
+ var min_str = "";
|
|
1280
|
+ var newArr = []
|
|
1281
|
+ if (arr.length > 0) {
|
|
1282
|
+ for (let i = 0; i < arr.length; i++) {
|
|
1283
|
+ if(warehouse_out_id == arr[i].supply_warehouse_id){
|
|
1284
|
+ newArr.push(arr[i])
|
|
1285
|
+ }
|
|
1286
|
+
|
|
1287
|
+ }
|
|
1288
|
+ }
|
|
1289
|
+
|
|
1290
|
+ if(newArr.length > 0){
|
|
1291
|
+ for(let i=0;i<newArr.length;i++){
|
|
1292
|
+ total += parseInt(newArr[i].stock_max_number+ newArr[i].stock_min_number);
|
|
1293
|
+ }
|
|
1294
|
+ }
|
|
1295
|
+ console.log("total232323232",total)
|
|
1296
|
+ if (total < min_number) {
|
|
1297
|
+ min_str = total + min_unit;
|
|
1298
|
+ }
|
|
1299
|
+ if (total == 0) {
|
|
1300
|
+ min_str = "";
|
|
1301
|
+ max_str = "";
|
|
1302
|
+ }
|
|
1303
|
+ if (total >= min_number) {
|
|
1304
|
+ if (parseInt(total / min_number) != 0) {
|
|
1305
|
+ max_str = parseInt(total / min_number) + max_unit;
|
|
1306
|
+ }
|
|
1307
|
+ if (total % min_number != 0) {
|
|
1308
|
+ min_str = (total % min_number) + min_unit;
|
|
1309
|
+ }
|
|
1310
|
+ }
|
|
1311
|
+ console.log("hh2332232332",max_str + min_str)
|
|
1312
|
+ return max_str + min_str;
|
|
1313
|
+ },
|
|
1314
|
+ getTotalStockCountSix(arr,warehouse_out_id) {
|
|
1315
|
+ var total_count = 0;
|
|
1316
|
+ var newArr =[]
|
|
1317
|
+ for (let i = 0; i < arr.length; i++) {
|
|
1318
|
+ if(arr[i].supply_warehouse_id == warehouse_out_id){
|
|
1319
|
+ newArr.push(arr[i])
|
|
1320
|
+ }
|
|
1321
|
+ }
|
|
1322
|
+ if(newArr.length > 0){
|
|
1323
|
+ for(let i=0;i<newArr.length;i++){
|
|
1324
|
+ total_count += arr[i].stock_count;
|
|
1325
|
+ }
|
|
1326
|
+ }
|
|
1327
|
+
|
|
1328
|
+ if(total_count > 0){
|
|
1329
|
+ return total_count;
|
|
1330
|
+ }else{
|
|
1331
|
+ return ""
|
|
1332
|
+ }
|
|
1333
|
+
|
|
1334
|
+ },
|
1269
|
1335
|
},
|
1270
|
1336
|
created() {
|
1271
|
1337
|
const tempObj = {};
|