Browse Source

修改禅道问题

qukaidi 4 years ago
parent
commit
5672290923
2 changed files with 87 additions and 50 deletions
  1. 71 44
      src/views/Warehousing/inStock/AddOrUpdate.vue
  2. 16 6
      src/views/Warehousing/inStock/index.vue

+ 71 - 44
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -272,16 +272,16 @@
       </el-row>
       <el-row>
         <el-col :span="8">
-          <el-form-item label="计费单位" prop="fFeetunit">
+          <el-form-item label="计费单位" prop="fFeetUnit">
             <el-select
-              v-model="form.fFeetunit"
+              v-model="form.fFeetUnit"
               placeholder="请选择计费单位"
               clearable
               :disabled="browseStatus || formBrowseStatus"
               style="width: 80%"
             >
               <el-option
-                v-for="(item, index) in fFeetunitOptions"
+                v-for="(item, index) in fFeetUnitOptions"
                 :key="index.dictValue"
                 :label="item.dictLabel"
                 :value="item.dictValue"
@@ -1262,7 +1262,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="fFeeunitid"
+            prop="fFeeUnitid"
             header-align="center"
             align="center"
             width="180px"
@@ -1270,14 +1270,14 @@
           >
             <template slot-scope="scope">
               <el-select
-                v-model="scope.row.fFeeunitid"
+                v-model="scope.row.fFeeUnitid"
                 placeholder="请选择计价单位"
                 clearable
                 :disabled="browseStatus"
                 @change="changeFeeUnit(scope.row)"
               >
                 <el-option
-                  v-for="(item, index) in fFeetunitOptions"
+                  v-for="(item, index) in fFeetUnitOptions"
                   :key="index.dictValue"
                   :label="item.dictLabel"
                   :value="item.dictValue"
@@ -1627,7 +1627,7 @@
           </el-table-column>
 
           <el-table-column
-            prop="fFeeunitid"
+            prop="fFeeUnitid"
             header-align="center"
             align="center"
             width="180px"
@@ -1635,7 +1635,7 @@
           >
             <template slot-scope="scope">
               <el-select
-                v-model="scope.row.fFeeunitid"
+                v-model="scope.row.fFeeUnitid"
                 filterable
                 remote
                 :disabled="browseStatus"
@@ -1644,7 +1644,7 @@
                 @change="changeFeeUnit(scope.row)"
               >
                 <el-option
-                  v-for="(item, index) in fFeetunitOptions"
+                  v-for="(item, index) in fFeetUnitOptions"
                   :key="index.dictValue"
                   :label="item.dictLabel"
                   :value="item.dictValue"
@@ -2012,7 +2012,6 @@
                 <el-select
                   placeholder="请选择箱型"
                   v-model="importList.fCntrtype"
-                  size="mini"
                 >
                   <el-option
                     v-for="(item, index) in cntrList"
@@ -2884,7 +2883,7 @@
           label="费用名称"
         />
         <el-table-column
-          prop="fFeeunitid"
+          prop="fFeeUnitid"
           header-align="center"
           align="center"
           width="180px"
@@ -2892,14 +2891,14 @@
         >
           <template slot-scope="scope">
             <el-select
-              v-model="scope.row.fFeeunitid"
+              v-model="scope.row.fFeeUnitid"
               placeholder="请选择计价单位"
               @change="changeFeeUnit(scope.row)"
               disabled
               clearable
             >
               <el-option
-                v-for="(dict, index) in fFeetunitOptions"
+                v-for="(dict, index) in fFeetUnitOptions"
                 :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
@@ -3053,7 +3052,7 @@ export default {
         fMblno: [{ required: true, message: " ", trigger: "blur" }],
         fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
         fCorpid: [{ required: true, message: " ", trigger: "blur" }],
-        fFeetunit: [{ required: true, message: " ", trigger: "blur" }],
+        fFeetUnit: [{ required: true, message: " ", trigger: "blur" }],
         fPlanqty: [{ required: true, message: " ", trigger: "blur" }],
         fPlangrossweight: [{ required: true, message: " ", trigger: "blur" }],
         fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
@@ -3088,7 +3087,7 @@ export default {
       businessTypeOption: [],
       fCompanyOptIons: [],
       fleetOptions: [],
-      fFeetunitOptions: [],
+      fFeetUnitOptions: [],
       current: "",
       before: "",
       contrOl: false,
@@ -3161,7 +3160,7 @@ export default {
       localStorage.setItem("businessTypeList", JSON.stringify(response.data));
     });
     this.getDicts("data_unitfees").then((response) => {
-      this.fFeetunitOptions = response.data;
+      this.fFeetUnitOptions = response.data;
     });
     this.getDicts("data_trademodes").then((response) => {
       this.fTrademodeidOptions = response.data;
@@ -3308,8 +3307,11 @@ export default {
             });
           });
           arr = [...new Set(arr)];
-          this.form.fCntval = arr.join("/");
+          this.form.fCntval = arr.join(",");
         }
+        this.form.fNetweight = this.fNetweight;
+        this.form.fPlanvolumn = this.fPlanvolumn;
+        this.form.fGrossweight = this.fGrossweight;
         let formData = new window.FormData();
         formData.append("warehouseBills", JSON.stringify(this.form));
         formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
@@ -3365,8 +3367,11 @@ export default {
           });
         });
         arr = [...new Set(arr)];
-        this.form.fCntval = arr.join("/");
+        this.form.fCntval = arr.join(",");
       }
+      this.form.fNetweight = this.fNetweight;
+      this.form.fPlanvolumn = this.fPlanvolumn;
+      this.form.fGrossweight = this.fGrossweight;
       let formData = new window.FormData();
       formData.append("warehouseBills", JSON.stringify(this.form));
       formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
@@ -3421,8 +3426,11 @@ export default {
           });
         });
         arr = [...new Set(arr)];
-        this.form.fCntval = arr.join("/");
+        this.form.fCntval = arr.join(",");
       }
+      this.form.fNetweight = this.fNetweight;
+      this.form.fPlanvolumn = this.fPlanvolumn;
+      this.form.fGrossweight = this.fGrossweight;
       // 撤回入库
       let formData = new window.FormData();
       formData.append("warehouseBills", JSON.stringify(this.form));
@@ -3482,6 +3490,7 @@ export default {
         this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
         this.$set(this.form, "createTime", Date.parse(this.form.createTime));
         this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
+        this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
         if (this.form.fTrademodeid) {
           this.$set(
             this.form,
@@ -3500,7 +3509,7 @@ export default {
           }
           response.data.warehousebillsfeesCr.map((e) => {
             if (e.fFeeunitid) {
-              e.fFeeunitid = e.fFeeunitid.toString();
+              e.fFeeUnitid = e.fFeeunitid.toString();
             }
             if (e.fStltypeid || e.fStltypeid == 0) {
               e.fStltypeid = e.fStltypeid.toString();
@@ -3509,7 +3518,7 @@ export default {
           this.warehouseCrList = response.data.warehousebillsfeesCr;
           response.data.warehousebillsfeesDr.map((e) => {
             if (e.fFeeunitid) {
-              e.fFeeunitid = e.fFeeunitid.toString();
+              e.fFeeUnitid = e.fFeeunitid.toString();
             }
             if (e.fStltypeid || e.fStltypeid == 0) {
               e.fStltypeid = e.fStltypeid.toString();
@@ -3524,6 +3533,10 @@ export default {
           this.$set(this.form, "fMblno", null);
           this.$set(this.form, "fMarks", null);
           this.$set(this.form, "fProductName", null);
+          this.$set(this.form, "fNetweight", null);
+          this.$set(this.form, "fPlanvolumn", null);
+          this.$set(this.form, "fGrossweight", null);
+          this.$set(this.form, "fBusinessType", null);
         }
       });
     },
@@ -3552,7 +3565,7 @@ export default {
                 return false;
               }
             }
-            if (!this.warehouseDrList[item].fFeeunitid) {
+            if (!this.warehouseDrList[item].fFeeUnitid) {
               if (item === "fBusinessType") {
               } else {
                 this.$message.error(
@@ -3582,7 +3595,7 @@ export default {
               }
             }
 
-            if (!this.warehouseCrList[item].fFeeunitid) {
+            if (!this.warehouseCrList[item].fFeeUnitid) {
               if (item === "fBusinessType") {
               } else {
                 this.$message.error(
@@ -3592,9 +3605,11 @@ export default {
               }
             }
           }
-          let formData = new window.FormData();
           // 附件数据
-          this.form.fBillingway = this.form.fFeetunit;
+          this.form.fBillingway = this.form.fFeetUnit;
+          this.form.fNetweight = this.fNetweight;
+          this.form.fPlanvolumn = this.fPlanvolumn;
+          this.form.fGrossweight = this.fGrossweight;
           if (this.CntrTable.length > 0) {
             let arr = [];
             this.CntrTable.map((e) => {
@@ -3605,8 +3620,9 @@ export default {
               });
             });
             arr = [...new Set(arr)];
-            this.form.fCntval = arr.join("/");
+            this.form.fCntval = arr.join(",");
           }
+          let formData = new window.FormData();
           formData.append("tWarehouseBills", JSON.stringify(this.form));
           // 库存明细
           formData.append(
@@ -3644,9 +3660,13 @@ export default {
     saveForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          this.form.fBillingway = this.form.fFeetUnit;
+          this.form.fNetweight = this.fNetweight;
+          this.form.fPlanvolumn = this.fPlanvolumn;
+          this.form.fGrossweight = this.fGrossweight;
           let formData = new window.FormData();
           // 附件数据
-          this.form.fBillingway = this.form.fFeetunit;
+          this.form.fQty = this.fQty;
           if (this.CntrTable.length > 0) {
             let arr = [];
             this.CntrTable.map((e) => {
@@ -3657,7 +3677,7 @@ export default {
               });
             });
             arr = [...new Set(arr)];
-            this.form.fCntval = arr.join("/");
+            this.form.fCntval = arr.join(",");
           }
           formData.append("tWarehouseBills", JSON.stringify(this.form));
           // 库存明细
@@ -3963,8 +3983,8 @@ export default {
       }
       operationAgreement(data).then((response) => {
         response.rows.map((e) => {
-          if (e.fFeeunitid) {
-            e.fFeeunitid = e.fFeeunitid.toString();
+          if (e.fFeeUnitid) {
+            e.fFeeUnitid = e.fFeeUnitid.toString();
           }
         });
         this.tasklegList = response.rows;
@@ -4122,7 +4142,10 @@ export default {
       this.reset();
       this.fixdetaiNum = null;
       this.fixdetaiNum = index;
+      console.log(row)
       row.fBsdate = new Date(row.fBsdate).getTime();
+      row.fBusinessType = row.fBusinessType.toString();
+      row.fCntrtype = Number(row.fCntrtype);
       this.importList = row;
       this.weightList = true;
     },
@@ -4158,7 +4181,7 @@ export default {
             this.warehouseDrList.push({
               fCorpid: null,
               fFeeid: null,
-              fFeeunitid: "",
+              fFeeUnitid: "",
               fQty: null,
               fUnitprice: null,
               fAmount: null,
@@ -4193,7 +4216,7 @@ export default {
             this.warehouseCrList.push({
               fCorpid: null,
               fFeeid: null,
-              fFeeunitid: "",
+              fFeeUnitid: "",
               fQty: null,
               fUnitprice: null,
               fAmount: null,
@@ -4228,13 +4251,13 @@ export default {
       } else {
         this.dialogWhgenlegList.map((e) => {
           let qty = 1;
-          if (e.fFeeunitid == 1) {
+          if (e.fFeeUnitid == 1) {
             qty = this.fQty;
-          } else if (e.fFeeunitid == 2) {
+          } else if (e.fFeeUnitid == 2) {
             qty = (this.fGrossweight / 1000).toFixed(2);
-          } else if (e.fFeeunitid == 3) {
+          } else if (e.fFeeUnitid == 3) {
             qty = (this.fNetweight / 1000).toFixed(2);
-          } else if (e.fFeeunitid == 7) {
+          } else if (e.fFeeUnitid == 7) {
             qty = this.fCntqty;
           }
           let fAmount = 0;
@@ -4245,7 +4268,7 @@ export default {
               fQty: qty,
               fCorpid: e.fCorpid,
               fFeeid: e.feeFId,
-              fFeeunitid: e.fFeeunitid,
+              fFeeUnitid: e.fFeeUnitid,
               fUnitprice: e.fPrice,
               fCurrency: "RMB",
               fExrate: 1,
@@ -4262,7 +4285,7 @@ export default {
               fQty: qty,
               fCorpid: e.fCorpid,
               fFeeid: e.feeId,
-              fFeeunitid: e.fFeeunitid,
+              fFeeUnitid: e.fFeeUnitid,
               fUnitprice: e.fPrice,
               fCurrency: "RMB",
               fExrate: 1,
@@ -4357,16 +4380,16 @@ export default {
     },
     // 变更计价单位
     changeFeeUnit(row) {
-      if (!row.fFeeunitid) {
+      if (!row.fFeeUnitid) {
         return false;
       }
-      if (row.fFeeunitid === "2") {
+      if (row.fFeeUnitid === "2") {
         this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
-      } else if (row.fFeeunitid === "1") {
+      } else if (row.fFeeUnitid === "1") {
         this.$set(row, "fQty", this.fQty.toFixed(2));
-      } else if (row.fFeeunitid === "3") {
+      } else if (row.fFeeUnitid === "3") {
         this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
-      } else if (row.fFeeunitid === "7") {
+      } else if (row.fFeeUnitid === "7") {
         this.$set(row, "fQty", this.fCntqty);
       } else {
         this.$set(row, "fQty", 0);
@@ -4392,8 +4415,12 @@ export default {
             });
           });
           arr = [...new Set(arr)];
-          this.form.fCntval = arr.join("/");
+          this.form.fCntval = arr.join(",");
         }
+        this.form.fBillingway = this.form.fFeetUnit;
+        this.form.fNetweight = this.fNetweight;
+        this.form.fPlanvolumn = this.fPlanvolumn;
+        this.form.fGrossweight = this.fGrossweight;
         let formData = new window.FormData();
         formData.append("warehouseBills", JSON.stringify(this.form));
         formData.append(

+ 16 - 6
src/views/Warehousing/inStock/index.vue

@@ -494,7 +494,10 @@
 
 <script>
 import AddOrUpdate from "./AddOrUpdate.vue";
-import { listWarehousebills,delinStock_s } from "@/api/warehouseBusiness/warehouseInStock";
+import {
+  listWarehousebills,
+  delinStock_s,
+} from "@/api/warehouseBusiness/warehouseInStock";
 import { listCorps } from "@/api/basicdata/corps";
 import { listWarehousesss } from "@/api/basicdata/warehouse";
 import { listGoods } from "@/api/basicdata/goods";
@@ -619,41 +622,48 @@ export default {
         },
         {
           surface: "13",
+          label: "fCntval",
+          name: "箱型箱量",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "14",
           label: "fTruckno",
           name: "车号",
           checked: 0,
           width: 100,
         },
         {
-          surface: "14",
+          surface: "15",
           label: "fDriverName",
           name: "司机名称",
           checked: 0,
           width: 100,
         },
         {
-          surface: "15",
+          surface: "16",
           label: "fDriverTel",
           name: "司机电话",
           checked: 0,
           width: 100,
         },
         {
-          surface: "16",
+          surface: "17",
           label: "fDriverIdCar",
           name: "司机身份证",
           checked: 0,
           width: 100,
         },
         {
-          surface: "17",
+          surface: "18",
           label: "fBusinessType",
           name: "业务类别",
           checked: 0,
           width: 100,
         },
         {
-          surface: "18",
+          surface: "19",
           label: "fBillstatus",
           name: "费用状态",
           checked: 0,