Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
f1942a7eef

+ 8 - 0
src/api/supply.js View File

80
   })
80
   })
81
 }
81
 }
82
 
82
 
83
+export function getGoodOrderDetailList(id, ids, params) {
84
+  return request({
85
+    url: '/api/supply/getgoodorderdetaillist?id=' + id + '&ids=' + ids,
86
+    method: 'get',
87
+    params: params
88
+  })
89
+}
90
+
83
 export function updateGoodOrder(data, supplier_name, start, arrearage, payment, warehose_out_id, number, rate_of_concession, discount_amount, good_number) {
91
 export function updateGoodOrder(data, supplier_name, start, arrearage, payment, warehose_out_id, number, rate_of_concession, discount_amount, good_number) {
84
   return request({
92
   return request({
85
     url: '/api/supply/updategoodorder?supplier_id=' + supplier_name + '&start=' + start + '&arrerage=' + arrearage + '&payment=' + payment + '&warehose_out_id=' + warehose_out_id + '&number=' + number + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&good_number=' + good_number,
93
     url: '/api/supply/updategoodorder?supplier_id=' + supplier_name + '&start=' + start + '&arrerage=' + arrearage + '&payment=' + payment + '&warehose_out_id=' + warehose_out_id + '&number=' + number + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&good_number=' + good_number,

+ 1 - 1
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

628
 
628
 
629
     handleEdit: function(index, row) {
629
     handleEdit: function(index, row) {
630
    
630
    
631
-      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys})
631
+      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
632
     },
632
     },
633
     handleSearch(val){
633
     handleSearch(val){
634
       
634
       

+ 3 - 0
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue View File

818
       if(sys == 1){
818
       if(sys == 1){
819
         this.drug_show = true
819
         this.drug_show = true
820
       }
820
       }
821
+      if(parseInt(this.$route.query.supply_cancel_out_id)>0){
822
+        this.drug_show = true
823
+      }
821
      this.unitList =  getDataConfig('hemodialysis','units')
824
      this.unitList =  getDataConfig('hemodialysis','units')
822
 
825
 
823
     }
826
     }

+ 1 - 2
src/xt_pages/stock/stockOutOrder.vue View File

954
       }
954
       }
955
     },
955
     },
956
     handleEdit: function(index, row) {
956
     handleEdit: function(index, row) {
957
-      
958
-      this.$router.push({path:'/stock/stockoutorderedit?id='+row.id+"&is_sys="+row.is_sys})
957
+      this.$router.push({path:'/stock/stockoutorderedit?id='+row.id+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
959
        
958
        
960
     },
959
     },
961
     handleDelete: function(index, row) {
960
     handleDelete: function(index, row) {

+ 6 - 1
src/xt_pages/stock/stockOutOrderEdit.vue View File

25
 
25
 
26
       <div class="cell clearfix">
26
       <div class="cell clearfix">
27
         <label class="title"><span class="name">出库时间</span> : </label>
27
         <label class="title"><span class="name">出库时间</span> : </label>
28
-        <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
28
+        <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :disabled="stockShow"
29
                         style="width: 200px;"
29
                         style="width: 200px;"
30
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
30
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
31
                         value-format="yyyy-MM-dd"></el-date-picker>
31
                         value-format="yyyy-MM-dd"></el-date-picker>
60
                       @input="changeGoodName(scope.$index)"
60
                       @input="changeGoodName(scope.$index)"
61
                       style="width:150px;"
61
                       style="width:150px;"
62
                       :disabled="stockShow"
62
                       :disabled="stockShow"
63
+                      
63
                     >
64
                     >
64
                       <i class="el-icon-search el-input__icon" slot="suffix"></i>
65
                       <i class="el-icon-search el-input__icon" slot="suffix"></i>
65
                     <template slot-scope="{ item }">
66
                     <template slot-scope="{ item }">
321
         numberList:[],
322
         numberList:[],
322
         stockShow:false,
323
         stockShow:false,
323
         stockTrue:true,
324
         stockTrue:true,
325
+       
324
       }
326
       }
325
     },
327
     },
326
     methods: {
328
     methods: {
794
       if(is_sys == 1){
796
       if(is_sys == 1){
795
         this.stockShow = true
797
         this.stockShow = true
796
       }
798
       }
799
+      if(parseInt(this.$route.query.supply_cancel_out_id) >0){
800
+        this.stockShow = true
801
+      }
797
       
802
       
798
     }
803
     }
799
 
804
 

+ 10 - 10
src/xt_pages/supply/components/addGoodOrder.vue View File

1405
       getSupplyWarehouseOutById(id).then((response) => {
1405
       getSupplyWarehouseOutById(id).then((response) => {
1406
         if (response.data.state == 1) {
1406
         if (response.data.state == 1) {
1407
           var cancelList = response.data.data.cancelList;
1407
           var cancelList = response.data.data.cancelList;
1408
-          console.log("退库单", cancelList);
1408
+          // console.log("退库单", cancelList);
1409
            var drugList = response.data.data.drugList;
1409
            var drugList = response.data.data.drugList;
1410
-          console.log("药品列表", drugList);
1410
+          // console.log("药品列表", drugList);
1411
           var cancelOrderList = response.data.data.cancelOrderList;
1411
           var cancelOrderList = response.data.data.cancelOrderList;
1412
           console.log("退库单详情", cancelOrderList);
1412
           console.log("退库单详情", cancelOrderList);
1413
           var ids =""
1413
           var ids =""
1416
           }
1416
           }
1417
           if (cancelList.length > 0) {
1417
           if (cancelList.length > 0) {
1418
             var outList = response.data.data.outList;
1418
             var outList = response.data.data.outList;
1419
-            console.log("购货单2322323",outList)
1419
+            // console.log("购货单2322323",outList)
1420
             for(let i=0;i<outList.length;i++){
1420
             for(let i=0;i<outList.length;i++){
1421
               if(outList[i].is_source == 1){
1421
               if(outList[i].is_source == 1){
1422
                 for(let j=0;j<drugList.length;j++){
1422
                 for(let j=0;j<drugList.length;j++){
1435
                 for(let j=0;j<drugList.length;j++){
1435
                 for(let j=0;j<drugList.length;j++){
1436
                   if(cancelOrderList[i].project_id == drugList[j].id){
1436
                   if(cancelOrderList[i].project_id == drugList[j].id){
1437
                     if(cancelOrderList[i].supply_unit == drugList[j].max_unit){
1437
                     if(cancelOrderList[i].supply_unit == drugList[j].max_unit){
1438
-                      cancelOrderList[i].count = cancelOrderList[i].count * drugList[j].min_number
1438
+                      cancelOrderList[i].supply_count = cancelOrderList[i].supply_count * drugList[j].min_number
1439
                     }
1439
                     }
1440
                   }
1440
                   }
1441
                  }
1441
                  }
1452
                   objInfo[project_id] = {
1452
                   objInfo[project_id] = {
1453
                     project_id,
1453
                     project_id,
1454
                     child: [],
1454
                     child: [],
1455
-                    count: 0,
1455
+                    supply_count: 0,
1456
                   };
1456
                   };
1457
                 }
1457
                 }
1458
               });
1458
               });
1469
 
1469
 
1470
             for (let i = 0; i < newArr.length; i++) {
1470
             for (let i = 0; i < newArr.length; i++) {
1471
               for (let j = 0; j < newArr[i].child.length; j++) {
1471
               for (let j = 0; j < newArr[i].child.length; j++) {
1472
-                newArr[i].count += newArr[i].child[j].count;
1472
+                newArr[i].supply_count += newArr[i].child[j].supply_count;
1473
               }
1473
               }
1474
             }
1474
             }
1475
 
1475
 
1482
                 for (let j = 0; j < newArr.length; j++) {
1482
                 for (let j = 0; j < newArr.length; j++) {
1483
                   if (outList[i].project_id == newArr[j].project_id) {
1483
                   if (outList[i].project_id == newArr[j].project_id) {
1484
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1484
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1485
-                    if (outList[i].count > newArr[j].count) {
1485
+                    if (outList[i].count > newArr[j].supply_count) {
1486
                        arr.push(outList[i].project_id);
1486
                        arr.push(outList[i].project_id);
1487
                     }
1487
                     }
1488
                   }
1488
                   }
1489
                 }
1489
                 }
1490
               }
1490
               }
1491
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1491
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1492
-
1492
+              console.log("arr2332233223322332",arr)
1493
               if (arr.length == 0) {
1493
               if (arr.length == 0) {
1494
-                this.$message.error("该订单已全部生成退单,请知悉!");
1494
+                this.$message.error("该订单已全部生成退单,请知悉!");
1495
                 return
1495
                 return
1496
               }
1496
               }
1497
               console.log("arr23323232232323",arr)
1497
               console.log("arr23323232232323",arr)
1498
               if (arr.length > 0) {
1498
               if (arr.length > 0) {
1499
                 str = arr.join(",");
1499
                 str = arr.join(",");
1500
-                this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1500
+                this.$router.push({ path: "/good/return/add?id=" + id + "&ids=" + str});
1501
               }
1501
               }
1502
              }
1502
              }
1503
 
1503
 

+ 3 - 2
src/xt_pages/supply/components/addGoodReturn.vue View File

407
 import { uParseTime } from "@/utils/tools";
407
 import { uParseTime } from "@/utils/tools";
408
 import {
408
 import {
409
   getInitOrder,
409
   getInitOrder,
410
-  getGoodOrderDetail,
410
+  getGoodOrderDetailList,
411
   saveGoodReturnOrder,
411
   saveGoodReturnOrder,
412
   checkReturnOrder,
412
   checkReturnOrder,
413
   updateGoodReturn,
413
   updateGoodReturn,
852
     },
852
     },
853
     getGoodOrderDetail() {
853
     getGoodOrderDetail() {
854
       var id = this.$route.query.id;
854
       var id = this.$route.query.id;
855
-      getGoodOrderDetail(id).then((response) => {
855
+      var ids = this.$route.query.ids;
856
+      getGoodOrderDetailList(id,ids).then((response) => {
856
         if (response.data.state == 1) {
857
         if (response.data.state == 1) {
857
           var out = response.data.data.out;
858
           var out = response.data.data.out;
858
           this.id = out.id;
859
           this.id = out.id;

+ 1 - 1
src/xt_pages/supply/components/addPurchaseOrder.vue View File

906
             if (response.data.state == 1) {
906
             if (response.data.state == 1) {
907
               var info = response.data.data.info;
907
               var info = response.data.data.info;
908
               this.is_check = info.is_check
908
               this.is_check = info.is_check
909
-              this.showOne = false
909
+              this.showOne = true
910
               this.showTwo = false
910
               this.showTwo = false
911
               this.showThree = true
911
               this.showThree = true
912
               this.disabled = true;
912
               this.disabled = true;

+ 10 - 14
src/xt_pages/supply/components/editGoodOrder.vue View File

1281
           }
1281
           }
1282
           if (cancelList.length > 0) {
1282
           if (cancelList.length > 0) {
1283
             var outList = response.data.data.outList;
1283
             var outList = response.data.data.outList;
1284
-            console.log("购货单2322323", outList);
1284
+            // console.log("购货单2322323", outList);
1285
             for (let i = 0; i < outList.length; i++) {
1285
             for (let i = 0; i < outList.length; i++) {
1286
               if (outList[i].is_source == 1) {
1286
               if (outList[i].is_source == 1) {
1287
                 for (let j = 0; j < drugList.length; j++) {
1287
                 for (let j = 0; j < drugList.length; j++) {
1288
                   if (outList[i].project_id == drugList[j].id) {
1288
                   if (outList[i].project_id == drugList[j].id) {
1289
                     if (outList[i].supply_unit == drugList[j].max_unit) {
1289
                     if (outList[i].supply_unit == drugList[j].max_unit) {
1290
-                      outList[i].count =
1291
-                        outList[i].count * drugList[j].min_number;
1290
+                      outList[i].count = outList[i].count * drugList[j].min_number;
1292
                     }
1291
                     }
1293
                   }
1292
                   }
1294
                 }
1293
                 }
1299
               if (cancelOrderList[i].is_source == 1) {
1298
               if (cancelOrderList[i].is_source == 1) {
1300
                 for (let j = 0; j < drugList.length; j++) {
1299
                 for (let j = 0; j < drugList.length; j++) {
1301
                   if (cancelOrderList[i].project_id == drugList[j].id) {
1300
                   if (cancelOrderList[i].project_id == drugList[j].id) {
1302
-                    if (
1303
-                      cancelOrderList[i].supply_unit == drugList[j].max_unit
1304
-                    ) {
1305
-                      cancelOrderList[i].count =
1306
-                        cancelOrderList[i].count * drugList[j].min_number;
1301
+                    if ( cancelOrderList[i].supply_unit == drugList[j].max_unit) {
1302
+                      cancelOrderList[i].supply_count = cancelOrderList[i].supply_count * drugList[j].min_number;
1307
                     }
1303
                     }
1308
                   }
1304
                   }
1309
                 }
1305
                 }
1320
                   objInfo[project_id] = {
1316
                   objInfo[project_id] = {
1321
                     project_id,
1317
                     project_id,
1322
                     child: [],
1318
                     child: [],
1323
-                    count: 0,
1319
+                    supply_count: 0,
1324
                   };
1320
                   };
1325
                 }
1321
                 }
1326
               });
1322
               });
1337
 
1333
 
1338
               for (let i = 0; i < newArr.length; i++) {
1334
               for (let i = 0; i < newArr.length; i++) {
1339
                 for (let j = 0; j < newArr[i].child.length; j++) {
1335
                 for (let j = 0; j < newArr[i].child.length; j++) {
1340
-                  newArr[i].count += newArr[i].child[j].count;
1336
+                  newArr[i].supply_count += newArr[i].child[j].supply_count;
1341
                 }
1337
                 }
1342
               }
1338
               }
1343
 
1339
 
1350
                   for (let j = 0; j < newArr.length; j++) {
1346
                   for (let j = 0; j < newArr.length; j++) {
1351
                     if (outList[i].project_id == newArr[j].project_id) {
1347
                     if (outList[i].project_id == newArr[j].project_id) {
1352
                       //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1348
                       //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1353
-                      if (outList[i].count > newArr[j].count) {
1349
+                      if (outList[i].count > newArr[j].supply_count) {
1354
                         arr.push(outList[i].project_id);
1350
                         arr.push(outList[i].project_id);
1355
                       }
1351
                       }
1356
                     }
1352
                     }
1357
                   }
1353
                   }
1358
                 }
1354
                 }
1359
                 //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1355
                 //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1360
-
1356
+                console.log("arr233322323322332",arr)
1361
                 if (arr.length == 0) {
1357
                 if (arr.length == 0) {
1362
-                  this.$message.error("该订单已全部生成退单,请知悉!");
1358
+                  this.$message.error("该订单已全部生成退单,请知悉!");
1363
                   return;
1359
                   return;
1364
                 }
1360
                 }
1365
                 console.log("arr23323232232323", arr);
1361
                 console.log("arr23323232232323", arr);
1366
                 if (arr.length > 0) {
1362
                 if (arr.length > 0) {
1367
                   str = arr.join(",");
1363
                   str = arr.join(",");
1368
                   this.$router.push({
1364
                   this.$router.push({
1369
-                    path: "/good/return/edit?id=" + id + "&ids=" + str,
1365
+                    path: "/good/return/add?id=" + id + "&ids=" + str,
1370
                   });
1366
                   });
1371
                 }
1367
                 }
1372
               }
1368
               }

+ 9 - 8
src/xt_pages/supply/components/editGoodReturn.vue View File

1114
                   orderInfo[i].min_number =  drugList[j].min_number
1114
                   orderInfo[i].min_number =  drugList[j].min_number
1115
                   orderInfo[i].max_unit =drugList[j].max_unit
1115
                   orderInfo[i].max_unit =drugList[j].max_unit
1116
                   orderInfo[i].min_unit =drugList[j].min_unit
1116
                   orderInfo[i].min_unit =drugList[j].min_unit
1117
+                 
1117
                   orderInfo[i].sum_count = this.getWarehoseInfoTwo(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number)
1118
                   orderInfo[i].sum_count = this.getWarehoseInfoTwo(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number)
1118
-                  orderInfo[i].count = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1119
-                  orderInfo[i].supply_total = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1119
+                  // orderInfo[i].count = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1120
+                 // orderInfo[i].supply_total = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1120
                 }
1121
                 }
1121
                 
1122
                 
1122
               }
1123
               }
1123
-             // orderInfo[i].count = orderInfo[i].count 
1124
-
1124
+             orderInfo[i].count = orderInfo[i].count 
1125
+             orderInfo[i].supply_total = orderInfo[i].supply_total
1125
              
1126
              
1126
             }
1127
             }
1127
             if (orderInfo[i].is_source == 2) {
1128
             if (orderInfo[i].is_source == 2) {
1130
                   orderInfo[i].unitList = [{ id: 1, name: "" }];
1131
                   orderInfo[i].unitList = [{ id: 1, name: "" }];
1131
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
1132
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
1132
                 }
1133
                 }
1133
-                orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1134
-                orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1134
+                // orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1135
+               // orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1135
               }
1136
               }
1136
               orderInfo[i].sum_count = orderInfo[i].count
1137
               orderInfo[i].sum_count = orderInfo[i].count
1137
               orderInfo[i].min_number = 0
1138
               orderInfo[i].min_number = 0
1138
-              //orderInfo[i].count = orderInfo[i].count;
1139
-            
1139
+              orderInfo[i].count = orderInfo[i].count;
1140
+              orderInfo[i].supply_total = orderInfo[i].supply_total
1140
              
1141
              
1141
               orderInfo[i].max_unit =""
1142
               orderInfo[i].max_unit =""
1142
               orderInfo[i].min_unit =""
1143
               orderInfo[i].min_unit =""

+ 15 - 1
src/xt_pages/supply/components/goodOrderPrint.vue View File

72
                 <tr>
72
                 <tr>
73
                   <td colspan="3" style="line-height: 18px">合计</td>
73
                   <td colspan="3" style="line-height: 18px">合计</td>
74
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
74
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
75
-                  <td colspan="5" style="line-height: 18px"></td>
75
+                  <td colspan="1" style="line-height: 18px"></td>
76
+                  <td style="line-height: 18px">{{getAllPriceOne()}}</td>
76
                 </tr>
77
                 </tr>
77
                  <tr>
78
                  <tr>
78
                   <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
79
                   <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
361
         return ""
362
         return ""
362
       }
363
       }
363
      
364
      
365
+    },
366
+    getAllPriceOne() {
367
+      var total_price = 0;
368
+      for (let i = 0; i < this.tableList.length; i++) {
369
+        total_price +=(this.tableList[i].price *this.tableList[i].count)
370
+      }
371
+      this.total_price = total_price;
372
+      if(total_price > 0){
373
+         return total_price.toFixed(2);
374
+      }else{
375
+        return ""
376
+      }
377
+     
364
     },
378
     },
365
      smallToBIG(price) {
379
      smallToBIG(price) {
366
         let fraction = ['角', '分'];
380
         let fraction = ['角', '分'];

+ 19 - 15
src/xt_pages/supply/components/goodReturnPrint.vue View File

27
                 {{ getSupplyName(supplier_id) }}
27
                 {{ getSupplyName(supplier_id) }}
28
             </div>
28
             </div>
29
             <div style="margin-bottom: 1px; font-size: 18px">
29
             <div style="margin-bottom: 1px; font-size: 18px">
30
-              单据日期:
31
              单据日期:{{ getTimes(document_date) }}
30
              单据日期:{{ getTimes(document_date) }}
32
             </div>
31
             </div>
33
             <div style="margin-bottom: 1px; font-size: 18px">
32
             <div style="margin-bottom: 1px; font-size: 18px">
73
                     <span v-if="item.deposit_rate >0">{{item.deposit_rate}}</span>
72
                     <span v-if="item.deposit_rate >0">{{item.deposit_rate}}</span>
74
                   </td>
73
                   </td>
75
                   <td style="line-height: 18px">
74
                   <td style="line-height: 18px">
76
-                    <span v-if="(item.supply_count * item.price *item.deposit_rate/100) >0">{{(item.supply_count * item.price *item.deposit_rate/100).toFixed(2)}}</span>
75
+                    <span v-if="(item.supply_count * item.price*item.deposit_rate) >0">{{(item.supply_count * item.price *item.deposit_rate/100).toFixed(2)}}</span>
77
                   </td>
76
                   </td>
78
                   <td style="line-height: 18px">
77
                   <td style="line-height: 18px">
79
-                    <span v-if="discount_amount > 0">{{ discount_amount }}</span>
78
+                    <span v-if="(item.supply_count * item.price) >0">{{(item.supply_count * item.price).toFixed(2)}}</span>
80
                   </td>
79
                   </td>
80
+                 
81
                 
81
                 
82
                 </tr>
82
                 </tr>
83
                 <tr>
83
                 <tr>
84
                   <td colspan="3" style="line-height: 18px">合计</td>
84
                   <td colspan="3" style="line-height: 18px">合计</td>
85
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
85
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
86
-                  <td colspan="5" style="line-height: 18px"></td>
86
+                  <td colspan="3" style="line-height: 18px"></td>
87
+                  <td style="line-height: 18px">{{getAllPriceTwo()}}</td>
87
                 </tr>
88
                 </tr>
88
                  <tr>
89
                  <tr>
89
                   <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
90
                   <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
100
               flex-wrap: wrap;
101
               flex-wrap: wrap;
101
             "
102
             "
102
           >
103
           >
103
-            <div
104
-              style="
105
-                width: 25%;
106
-                text-align: left;
107
-                margin-bottom: 1px;
108
-                font-size: 18px;
109
-              "
110
-            >
111
-              供应商: {{ getSupplyName(supplier_id) }}
112
-            </div>
113
             <div
104
             <div
114
               style="
105
               style="
115
                 width: 25%;
106
                 width: 25%;
368
     getAllPrice() {
359
     getAllPrice() {
369
       var total_price = 0;
360
       var total_price = 0;
370
       for (let i = 0; i < this.tableList.length; i++) {
361
       for (let i = 0; i < this.tableList.length; i++) {
371
-        total_price +=(this.tableList[i].supply_price *this.tableList[i].supply_count - (this.tableList[i].supply_price * this.tableList[i].supply_count*this.tableList[i].deposit_rate/100))
362
+        total_price +=(this.tableList[i].price *this.tableList[i].supply_count - (this.tableList[i].price * this.tableList[i].supply_count*this.tableList[i].deposit_rate/100))
372
       }
363
       }
373
       this.total_price = total_price;
364
       this.total_price = total_price;
374
       if(total_price > 0){
365
       if(total_price > 0){
377
         return ""
368
         return ""
378
       }
369
       }
379
      
370
      
371
+    },
372
+   getAllPriceTwo() {
373
+      var total_price = 0;
374
+      for (let i = 0; i < this.tableList.length; i++) {
375
+        total_price +=(this.tableList[i].price *this.tableList[i].supply_count - (this.tableList[i].price * this.tableList[i].supply_count*this.tableList[i].deposit_rate/100))
376
+      }
377
+      this.total_price = total_price;
378
+      if(total_price > 0){
379
+         return total_price.toFixed(2);
380
+      }else{
381
+        return ""
382
+      }
383
+     
380
     },
384
     },
381
      smallToBIG(price) {
385
      smallToBIG(price) {
382
         let fraction = ['角', '分'];
386
         let fraction = ['角', '分'];

+ 14 - 12
src/xt_pages/supply/components/purchaseOrderPrint.vue View File

19
         <div class="print_main_content">
19
         <div class="print_main_content">
20
           <div class="order_title_panl">
20
           <div class="order_title_panl">
21
             <div style="font-size: 22px; font-weight: bold">{{ orgName }}</div>
21
             <div style="font-size: 22px; font-weight: bold">{{ orgName }}</div>
22
-            <span style="font-weight: 500; font-size: 18px">购货单</span>
22
+            <span style="font-weight: 500; font-size: 18px">采购订单</span>
23
           </div>
23
           </div>
24
           <div style="display: flex; justify-content: space-between">
24
           <div style="display: flex; justify-content: space-between">
25
             <div style="text-align: left; margin-bottom: 1px; font-size: 18px">
25
             <div style="text-align: left; margin-bottom: 1px; font-size: 18px">
70
                 <tr>
70
                 <tr>
71
                   <td colspan="3" style="line-height: 18px">合计</td>
71
                   <td colspan="3" style="line-height: 18px">合计</td>
72
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
72
                   <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
73
-                  <td colspan="2" style="line-height: 18px"></td>
73
+                  <td colspan="1" style="line-height: 18px"></td>
74
+                  <td colspan="2" style="line-height: 18px">{{getTotalPrice()}}</td>
74
                 </tr>
75
                 </tr>
75
                  <tr>
76
                  <tr>
76
                   <td colspan="6" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
77
                   <td colspan="6" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
110
               flex-wrap: wrap;
111
               flex-wrap: wrap;
111
             "
112
             "
112
           >
113
           >
113
-            <div
114
-              style="
115
-                width: 25%;
116
-                text-align: left;
117
-                margin-bottom: 1px;
118
-                font-size: 18px;
119
-              "
120
-            >
121
-              供应商:{{ getSupplyName(supplier_id) }}
122
-            </div>
123
             <div
114
             <div
124
               style="
115
               style="
125
                 width: 25%;
116
                 width: 25%;
389
         return ""
380
         return ""
390
       } 
381
       } 
391
     },
382
     },
383
+    getTotalPrice(){
384
+     var total = 0
385
+      for(let i=0;i<this.tableList.length;i++){
386
+         total +=(this.tableList[i].count*this.tableList[i].price)
387
+      }  
388
+      if(total > 0){
389
+       return total.toFixed(2)
390
+      }else{
391
+        return ""
392
+      } 
393
+    }
392
   },
394
   },
393
   created() {
395
   created() {
394
     this.orgName = this.$store.getters.xt_user.org.org_name;
396
     this.orgName = this.$store.getters.xt_user.org.org_name;