瀏覽代碼

11月14日 库存扣减更新

XMLWAN 3 年之前
父節點
當前提交
5a8e14ea2c

+ 7 - 1
src/xt_pages/supply/components/addGoodOrder.vue 查看文件

749
       tempObj["supply_expiry_date"] = "";
749
       tempObj["supply_expiry_date"] = "";
750
       tempObj["manufacturer_id"] = "";
750
       tempObj["manufacturer_id"] = "";
751
       tempObj["min_price"] = ""
751
       tempObj["min_price"] = ""
752
+      tempObj["warehouse_info_id"] = 0
753
+      tempObj["warehousing_id"] = 0
752
       this.recordInfo.tableList.push(tempObj);
754
       this.recordInfo.tableList.push(tempObj);
753
     },
755
     },
754
     handleDelete: function (index, row) {
756
     handleDelete: function (index, row) {
1021
                 orderInfo[i].project_id = orderInfo[i].project_id;
1023
                 orderInfo[i].project_id = orderInfo[i].project_id;
1022
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1024
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1023
                 orderInfo[i].order_number = orderInfo[i].order_number;
1025
                 orderInfo[i].order_number = orderInfo[i].order_number;
1026
+                orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
1027
+                orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
1024
                 orderInfo[i].supply_total_price = (
1028
                 orderInfo[i].supply_total_price = (
1025
                   orderInfo[i].count * orderInfo[i].price
1029
                   orderInfo[i].count * orderInfo[i].price
1026
                 ).toFixed(2);
1030
                 ).toFixed(2);
1103
             stockIn: this.recordInfo.tableList,
1107
             stockIn: this.recordInfo.tableList,
1104
             return_remake: this.return_remake,
1108
             return_remake: this.return_remake,
1105
           };
1109
           };
1106
-         
1110
+          console.log("param232332",params)
1107
           updateGoodOrder(
1111
           updateGoodOrder(
1108
             params,
1112
             params,
1109
             this.supplier_name,
1113
             this.supplier_name,
1498
     tempObj["supply_expiry_date"] = "";
1502
     tempObj["supply_expiry_date"] = "";
1499
     tempObj["manufacturer_id"] = "";
1503
     tempObj["manufacturer_id"] = "";
1500
     tempObj["min_price"] = ""
1504
     tempObj["min_price"] = ""
1505
+    tempObj["warehouse_info_id"] = 0
1506
+    tempObj["warehousing_id"] = 0
1501
     this.recordInfo.tableList.push(tempObj);
1507
     this.recordInfo.tableList.push(tempObj);
1502
     this.getInitOrder();
1508
     this.getInitOrder();
1503
     if (parseInt(this.$route.query.id) > 0) {
1509
     if (parseInt(this.$route.query.id) > 0) {

+ 1 - 0
src/xt_pages/supply/components/editGoodOrder.vue 查看文件

1106
             if (response.data.state == 1) {
1106
             if (response.data.state == 1) {
1107
               this.loading = false;
1107
               this.loading = false;
1108
               this.$message.success("保存成功!");
1108
               this.$message.success("保存成功!");
1109
+              this.getGoodOrderDetail()
1109
             }
1110
             }
1110
           });
1111
           });
1111
         }
1112
         }

+ 11 - 1
src/xt_pages/supply/components/editGoodReturn.vue 查看文件

1005
         if (response.data.state == 1) {
1005
         if (response.data.state == 1) {
1006
           this.loading = false;
1006
           this.loading = false;
1007
           var msg = response.data.data.msg;
1007
           var msg = response.data.data.msg;
1008
-          this.$message.success("审核成功!");
1008
+         
1009
+          if(msg == 1){
1010
+           this.$message.success("审核成功!");
1011
+          }
1012
+          if(msg == 2){
1013
+            var good_name = response.data.data.good_name
1014
+            var specification_name = response.data.data.specification_name
1015
+            var str = good_name +"*" + specification_name +"无库存,请入库"
1016
+             this.$message.error(str)
1017
+          }
1018
+          
1009
         }
1019
         }
1010
       });
1020
       });
1011
     },
1021
     },

+ 1 - 0
src/xt_pages/supply/components/editPurchaseOrder.vue 查看文件

787
               this.loading = false;
787
               this.loading = false;
788
               var warehousingInfo = response.data.data.warehousingInfo;
788
               var warehousingInfo = response.data.data.warehousingInfo;
789
               this.$message.success("保存成功!");
789
               this.$message.success("保存成功!");
790
+              this.getPurchaseOrderDetail()
790
             }
791
             }
791
           });
792
           });
792
         }
793
         }

+ 1 - 1
src/xt_pages/supply/goodOrderQuery.vue 查看文件

330
        }
330
        }
331
        if(all_price >0){
331
        if(all_price >0){
332
 
332
 
333
-         return (all_price - all_price * (paycount/100)).toFixed(2)
333
+         return (all_price - paycount).toFixed(2)
334
        }
334
        }
335
       
335
       
336
      },
336
      },

+ 13 - 1
src/xt_pages/supply/goodreturn.vue 查看文件

110
         </el-table-column>
110
         </el-table-column>
111
         <el-table-column label="优惠后金额" align="center" width="200">
111
         <el-table-column label="优惠后金额" align="center" width="200">
112
          <template slot-scope="scope">
112
          <template slot-scope="scope">
113
-          <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder) - scope.row.discount_amount}}</span> 
113
+          <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)}}</span> 
114
          </template>
114
          </template>
115
        </el-table-column>
115
        </el-table-column>
116
         <!-- <el-table-column label="已退款" align="center" width="200">
116
         <!-- <el-table-column label="已退款" align="center" width="200">
311
             buy_price += (arr[i].count * arr[i].price)
311
             buy_price += (arr[i].count * arr[i].price)
312
           }
312
           }
313
        }
313
        }
314
+
314
        return buy_price.toFixed(2)
315
        return buy_price.toFixed(2)
315
      },
316
      },
317
+     getAllBuyPriceOne(arr,discount_amount){
318
+      
319
+       var buy_price = 0
320
+       if(arr!=undefined && arr.length > 0){
321
+          for(let i=0;i<arr.length;i++){
322
+            buy_price += (parseInt(arr[i].count) * arr[i].price)
323
+          }
324
+       }
325
+        console.log("discount233232232323",discount_amount)
326
+       return (buy_price-discount_amount).toFixed(2)
327
+     },
316
      getAllCount(arr){
328
      getAllCount(arr){
317
        var count = ""
329
        var count = ""
318
         if(arr!=undefined && arr.length > 0){
330
         if(arr!=undefined && arr.length > 0){