tong 4 年之前
父节点
当前提交
ceb968825e

+ 10 - 1
src/api/warehouseBusiness/warehouseInStock.js

@@ -17,7 +17,7 @@ export function getWarehousebills(fId) {
   })
 }
 
-// 新增仓库主(出入库)
+// 新增仓库主(出入库保存)
 export function addWarehousebills(data) {
   return request({
     url: '/warehouseBusiness/inStock/add',
@@ -25,6 +25,15 @@ export function addWarehousebills(data) {
     data: data
   })
 }
+// 新增仓库主(出入库提交)
+export function addWarehouse(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/warehouseSubmission',
+    method: 'post',
+    data: data
+  })
+}
+
 
 // 撤销入库
 export function updateCredit(data) {

+ 11 - 4
src/views/warehouseBusiness/agreement/index.vue

@@ -424,7 +424,14 @@ export default {
       loading: true,
       loading_s: false,
       browseStatus: false,
-      jFeetunitOptions:[],
+      // 计价单位
+      jFeetunitOptions: [
+        { dictLabel: "件数", dictValue: "1" },
+        { dictLabel: "毛重", dictValue: "2" },
+        { dictLabel: "净重", dictValue: "3" },
+        { dictLabel: "尺码", dictValue: "4" },
+        { dictLabel: "固定", dictValue: "5" },
+      ],
       goodsOptions:[],
       fTypeidOptions: [],
       // 选中数组
@@ -506,9 +513,9 @@ export default {
     this.getDicts("data_goods_category").then(response => {
       this.fTypeidOptions = response.data;
     });
-    this.getDicts("data_unitfees").then(response => {
-      this.jFeetunitOptions = response.data;
-    });
+    // this.getDicts("data_unitfees").then(response => {
+    //   this.jFeetunitOptions = response.data;
+    // });
   },
   methods: {
     // 仓储费状态修改

+ 32 - 27
src/views/warehouseBusiness/inStock/index.vue

@@ -463,7 +463,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-row>
           <el-col :span="8">
             <el-form-item label="计划件数" prop="fPlanqty">
@@ -471,7 +470,7 @@
                 v-model="form.fPlanqty"
                 style="width: 80%"
                 laceholder="计划件数"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/\D/g,"")' 
                 :disabled="browseStatus"
               />
             </el-form-item>
@@ -787,21 +786,12 @@
             >新行
           </el-button>
           <el-button
-            :disabled="dataListSelection.length <= 0"
-            @click.prevent="creditClick"
-            >入库确认
-          </el-button>
-          <el-button
-            :disabled="dataWithdrawList.length <= 0"
-            @click.prevent="withdrawClick"
-            >撤回入库</el-button
-          >
-          <el-button
             :disabled="browseStatus"
             type="primary"
             @click="submitForm(2)"
             >保 存</el-button
           >
+          
         </div>
         <div>
           <el-button
@@ -814,19 +804,29 @@
             >作业单
           </el-button>
           <el-button @click="discharge">卸货 </el-button>
+          <el-button
+            :disabled="dataListSelection.length <= 0"
+            @click.prevent="creditClick"
+            >入库确认
+          </el-button>
+          <el-button
+            :disabled="dataWithdrawList.length <= 0"
+            @click.prevent="withdrawClick"
+            >撤回入库</el-button
+          >
           <el-button type="success" prop="打印" @click="showEditDialog_ss"
             >收货单
           </el-button>
           <el-button type="warning" prop="打印" @click="showEditDialog_s"
             >入库单
           </el-button>
-
+<!-- 
           <el-button
             :disabled="browseStatus"
             type="primary"
             @click="submitForm(2)"
             >保 存</el-button
-          >
+          > -->
           <el-button
             :disabled="browseStatus"
             style="background-color: #008000; color: #fff"
@@ -2500,6 +2500,7 @@ import {
   getWarehousebills,
   delWarehousebills,
   addWarehousebills,
+  addWarehouse,
   updateWarehousebills,
   exportWarehousebills,
 } from "@/api/warehouseBusiness/warehouseInStock";
@@ -2733,7 +2734,6 @@ export default {
         fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
         fChargedate: [{ required: true, message: " ", trigger: "blur" }],
         fMarks: [{ required: true, message: " ", trigger: "blur" }],
-        fBillingway: [{ required: true, message: " ", trigger: "blur" }],
         fBsdate: [{ required: true, message: " ", trigger: "blur" }],
         fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
         fSbu: [{ required: true, message: " ", trigger: "blur" }],
@@ -3101,6 +3101,7 @@ export default {
         fAmount: null,
         fCurrency: "RMB",
         fExrate: "1",
+        fTaxrate: this.fTaxrate,
         fCxrate: null,
         fRate: null,
         remarks: null,
@@ -3116,6 +3117,7 @@ export default {
         fAmount: null,
         fCurrency: "RMB",
         fExrate: "1",
+        fTaxrate: this.fTaxrate,
         fCxrate: null,
         fRate: null,
         remarks: null
@@ -3476,6 +3478,7 @@ export default {
       const fId = row.fId || this.ids;
       this.dataList = [];
       getWarehousebills(fId).then((response) => {
+        console.log(response)
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           if(this.form.fBillstatus > 2) {
@@ -4086,6 +4089,7 @@ export default {
           }
         let formDatae = new window.FormData();
         // 附件数据
+        this.form.fBillingway = this.form.fFeetunit;
         formDatae.append("tWarehouseBills", JSON.stringify(this.form));
         console.log(this.form);
         // 库存明细
@@ -4185,14 +4189,14 @@ export default {
           if (!this.form.fId) {
             this.form.fId = this.fid;
           }
-        
-
         let formData = new window.FormData();
         // 附件数据
+        this.form.fBillingway = this.form.fFeetunit;
         formData.append("tWarehouseBills", JSON.stringify(this.form));
         console.log(this.form);
         // 库存明细
         formData.append("tWarehousebillsitems", JSON.stringify(this.dataList));
+        console.log(this.dataList)
         // 附件数据
         formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
         // 费用明细付款
@@ -4205,17 +4209,18 @@ export default {
           "tWarehousebillsfeesDr",
           JSON.stringify(this.warehouseDrList)
         );
-        addWarehousebills(formData).then((response) => {
+        addWarehouse(formData).then((response) => {
+          console.log(response)
           this.msgSuccess("提交成功");
-          this.dataList = response.data.warehousebillsitems;
-          for (let list in this.dataList) {
-            this.$set(
-              this.dataList[list],
-              "fBsdate",
-              Date.parse(this.dataList[list].fBsdate)
-            );
-          }
-          this.fid = response.data.warehouseBills.fId;
+          // this.dataList = response.data.warehousebillsitems;
+          // for (let list in this.dataList) {
+          //   this.$set(
+          //     this.dataList[list],
+          //     "fBsdate",
+          //     Date.parse(this.dataList[list].fBsdate)
+          //   );
+          // }
+          // this.fid = response.data.warehouseBills.fId;
           this.open = false;
           this.getList();
         });