Bladeren bron

11月14日 库存扣减更新

XMLWAN 3 jaren geleden
bovenliggende
commit
e6ae8d124b

+ 16 - 13
src/xt_pages/supply/components/addGoodOrder.vue Bestand weergeven

@@ -1052,7 +1052,7 @@ export default {
1052 1052
             stockIn: this.recordInfo.tableList,
1053 1053
             return_remake: this.return_remark,
1054 1054
           };
1055
-          // return
1055
+        
1056 1056
           addGoodOrder( params,this.supplier_name,start,this.arrearage,this.payment, warehousing_id,this.number,this.rate_of_concession,this.discount_amount).then((response) => {
1057 1057
             if (response.data.state == 1) {
1058 1058
               this.loading = false;
@@ -1186,18 +1186,21 @@ export default {
1186 1186
           ).then((response) => {
1187 1187
             if (response.data.state == 1) {
1188 1188
               var orderInfo =  response.data.data.list
1189
-              // for (let i = 0; i < orderInfo.length; i++) {
1190
-              //   orderInfo[i].id = orderInfo[i].id
1191
-              //   orderInfo[i].supply_count = orderInfo[i].count;
1192
-              //   orderInfo[i].supply_price = orderInfo[i].price;
1193
-              //   orderInfo[i].supply_remake = orderInfo[i].remark;
1194
-              //   orderInfo[i].type = orderInfo[i].is_source;
1195
-              //   orderInfo[i].project_id = orderInfo[i].project_id;
1196
-              //   orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1197
-              //   orderInfo[i].order_number = orderInfo[i].order_number;
1198
-              //   orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
1199
-              //   orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
1200
-              // }
1189
+              for (let i = 0; i < orderInfo.length; i++) {
1190
+                orderInfo[i].id = orderInfo[i].id
1191
+                orderInfo[i].supply_count = orderInfo[i].count;
1192
+                orderInfo[i].supply_price = orderInfo[i].price;
1193
+                orderInfo[i].supply_remake = orderInfo[i].remark;
1194
+                orderInfo[i].type = orderInfo[i].is_source;
1195
+                orderInfo[i].project_id = orderInfo[i].project_id;
1196
+                orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1197
+                orderInfo[i].order_number = orderInfo[i].order_number;
1198
+                orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
1199
+                orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
1200
+                orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2);
1201
+                orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date);
1202
+                orderInfo[i].supply_product_date = this.getTimes( orderInfo[i].supply_product_date);
1203
+              }
1201 1204
               this.recordInfo.tableList = orderInfo
1202 1205
               this.loading = false;
1203 1206
               this.$message.success("保存成功!");

+ 22 - 0
src/xt_pages/supply/components/addGoodReturn.vue Bestand weergeven

@@ -1187,6 +1187,28 @@ export default {
1187 1187
           updateGoodReturn(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name,this.number).then(response=>{
1188 1188
             if(response.data.state == 1){
1189 1189
                var msg = response.data.msg
1190
+               var orderInfo = response.data.data.list
1191
+               for(let i=0;i< orderInfo.length;i++){
1192
+                  orderInfo[i].id = orderInfo[i].id
1193
+                  orderInfo[i].name = orderInfo[i].name
1194
+                  orderInfo[i].id = orderInfo[i].id
1195
+                  orderInfo[i].supply_count =  orderInfo[i].supply_count
1196
+                  orderInfo[i].supply_price =  orderInfo[i].price
1197
+                  orderInfo[i].supply_remake =  orderInfo[i].remark
1198
+                  orderInfo[i].type =  orderInfo[i].is_source
1199
+                  orderInfo[i].project_id =  orderInfo[i].project_id
1200
+                  orderInfo[i].supply_unit =  orderInfo[i].supply_unit
1201
+                  orderInfo[i].order_number =  orderInfo[i].order_number
1202
+                  orderInfo[i].good_number = orderInfo[i].good_number
1203
+                  orderInfo[i].supply_total_price = (orderInfo[i].supply_count * orderInfo[i].price).toFixed(2)
1204
+                  orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
1205
+                  orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
1206
+                  orderInfo[i].deposit_rate = orderInfo[i].deposit_rate
1207
+                  orderInfo[i].count = orderInfo[i].count
1208
+                  orderInfo[i].supply_total = orderInfo[i].supply_total
1209
+                  orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
1210
+                }
1211
+               this.recordInfo.tableList = orderInfo
1190 1212
                this.loading = false
1191 1213
                this.$message.success("保存成功!")
1192 1214
             }

+ 12 - 12
src/xt_pages/supply/components/addPurchaseOrder.vue Bestand weergeven

@@ -902,18 +902,18 @@ export default {
902 902
               this.loading = false;
903 903
               var warehousingInfo = response.data.data.warehousingInfo;
904 904
               var orderInfo =  response.data.data.orderInfo
905
-              // for (let i = 0; i < orderInfo.length; i++) {
906
-              //   orderInfo[i].id = orderInfo[i].id
907
-              //   orderInfo[i].name = orderInfo[i].name
908
-              //   orderInfo[i].supply_count = orderInfo[i].count;
909
-              //   orderInfo[i].supply_price = orderInfo[i].price;
910
-              //   orderInfo[i].supply_remake = orderInfo[i].remark;
911
-              //   orderInfo[i].type = orderInfo[i].is_source;
912
-              //   orderInfo[i].project_id = orderInfo[i].project_id;
913
-              //   orderInfo[i].supply_unit = orderInfo[i].supply_unit;
914
-              //   orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
915
-              //   orderInfo[i].supply_total = orderInfo[i].supply_total
916
-              // }
905
+              for (let i = 0; i < orderInfo.length; i++) {
906
+                orderInfo[i].id = orderInfo[i].id
907
+                orderInfo[i].name = orderInfo[i].name
908
+                orderInfo[i].supply_count = orderInfo[i].count;
909
+                orderInfo[i].supply_price = orderInfo[i].price;
910
+                orderInfo[i].supply_remake = orderInfo[i].remark;
911
+                orderInfo[i].type = orderInfo[i].is_source;
912
+                orderInfo[i].project_id = orderInfo[i].project_id;
913
+                orderInfo[i].supply_unit = orderInfo[i].supply_unit;
914
+                orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
915
+                orderInfo[i].supply_total = orderInfo[i].supply_total
916
+              }
917 917
               this.recordInfo.tableList = orderInfo;
918 918
             
919 919
               this.$message.success("保存成功!");

+ 15 - 13
src/xt_pages/supply/components/purchaseOrderPrint.vue Bestand weergeven

@@ -19,7 +19,7 @@
19 19
         <div class="print_main_content">
20 20
           <div class="order_title_panl">
21 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 23
           </div>
24 24
           <div style="display: flex; justify-content: space-between">
25 25
             <div style="text-align: left; margin-bottom: 1px; font-size: 18px">
@@ -70,10 +70,11 @@
70 70
                 <tr>
71 71
                   <td colspan="3" style="line-height: 18px">合计</td>
72 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 75
                 </tr>
75 76
                  <tr>
76
-                  <td colspan="6" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
77
+                  <td colspan="6" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
77 78
                  </tr>
78 79
               </tbody>
79 80
             </table>
@@ -110,16 +111,6 @@
110 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 114
             <div
124 115
               style="
125 116
                 width: 25%;
@@ -389,6 +380,17 @@ export default {
389 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 395
   created() {
394 396
     this.orgName = this.$store.getters.xt_user.org.org_name;