Browse Source

入库key值优化

tong 4 năm trước cách đây
mục cha
commit
c4fe266d9d

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

@@ -328,8 +328,8 @@
                 placeholder="请选择仓库"
               >
                 <el-option
-                  v-for="dict in warehouseOptions"
-                  :key="dict.fId"
+                  v-for="(dict,index) in warehouseOptions"
+                  :key="index.fId"
                   :label="dict.fName"
                   :value="dict.fId"
                 ></el-option>
@@ -357,8 +357,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fIfdamageOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fIfdamageOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -374,8 +374,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fIfweighOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fIfweighOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -394,8 +394,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fIfpledgeOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fIfpledgeOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -420,8 +420,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fFeetunitOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fFeetunitOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -502,8 +502,8 @@
                 placeholder="请选择经营单位"
               >
                 <el-option
-                  v-for="dict in fSbuOptions"
-                  :key="dict.fId"
+                  v-for="(dict,index) in fSbuOptions"
+                  :key="index.fId"
                   :label="dict.fName"
                   :value="dict.fId"
                 ></el-option>
@@ -530,8 +530,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fTrademodeidOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fTrademodeidOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -560,8 +560,8 @@
                 remote
               >
                 <el-option
-                  v-for="dict in deptOptions"
-                  :key="dict.deptId"
+                  v-for="(dict,index) in deptOptions"
+                  :key="index.deptId"
                   :label="dict.deptName"
                   :value="dict.deptId"
                 ></el-option>
@@ -812,8 +812,8 @@
               placeholder="请选择库区"
             >
               <el-option
-                v-for="dict in kqhouseOptions"
-                :key="dict.fId"
+                v-for="(dict,index) in kqhouseOptions"
+                :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
               ></el-option>
@@ -1022,8 +1022,8 @@
               placeholder="客户名称"
             >
               <el-option
-                v-for="dict in KHblnoOptions"
-                :key="dict.fId"
+                v-for="(dict,index) in KHblnoOptions"
+                :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
               ></el-option>
@@ -1046,8 +1046,8 @@
               placeholder="费用名称"
             >
               <el-option
-                v-for="dict in fWbuOptions"
-                :key="dict.fId"
+                v-for="(dict,index) in fWbuOptions"
+                :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
               ></el-option>
@@ -1055,21 +1055,21 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fFeeUnitid"
+          prop="fFeeunitid"
           header-align="center"
           align="center"
-          width="150px"
+          width="180px"
           label="计价单位"
         >
           <template slot-scope="scope">
             <el-select
-              v-model="scope.row.fFeeUnitid"
+              v-model="scope.row.fFeeunitid"
               placeholder="请选择计费单位"
               clearable
             >
               <el-option
-                v-for="dict in jFeetunitOptions"
-                :key="dict.dictValue"
+                v-for="(dict,index) in jFeetunitOptions"
+                :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
               />
@@ -1263,8 +1263,8 @@
               placeholder="费用名称"
             >
               <el-option
-                v-for="dict in fWbuOptions"
-                :key="dict.fId"
+                v-for="(dict,index) in fWbuOptions"
+                :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
               ></el-option>
@@ -1285,8 +1285,8 @@
               clearable
             >
               <el-option
-                v-for="dict in jFeetunitOptions"
-                :key="dict.dictValue"
+                v-for="(dict,index) in jFeetunitOptions"
+                :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
               />
@@ -2164,6 +2164,7 @@ export default {
       this.reset();
       const fId = row.fId || this.ids;
       getWarehousebills(fId).then((response) => {
+        console.log(response)
         this.form = response.data.warehousebills;
         this.fMblnoOptions = response.data.corps;
         this.KHblnoOptions = response.data.corps;

+ 28 - 136
src/views/warehouseBusiness/outStock/index.vue

@@ -265,8 +265,8 @@
                 style="width: 250px"
               >
                 <el-option
-                  v-for="dict in fStltypeOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fStltypeOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 />
@@ -655,7 +655,7 @@
         >
           <template slot-scope="scope">
             <el-select
-              v-model="scope.row.fGoodsids"
+              v-model="scope.row.fGoodsid"
               filterable
               remote
               :remote-method="goodsRemoteMethod"
@@ -998,8 +998,8 @@
               placeholder="客户名称"
             >
               <el-option
-                v-for="dict in KHblnoOptions"
-                :key="dict.fId"
+                v-for="(dict,index) in KHblnoOptions"
+                :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
               ></el-option>
@@ -1007,20 +1007,15 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="ffeeid"
+          prop="fFeeid"
           header-align="center"
           align="center"
           width="180px"
           label="费用名称"
         >
           <template slot-scope="scope">
-            <!-- <el-input
-              v-model="scope.row.fFeeid"
-              placeholder="费用名称"
-              show-word-limit
-            /> -->
             <el-select
-              v-model="scope.row.fCorpid"
+              v-model="scope.row.fFeeid"
               filterable
               remote
               :remote-method="fWRemoteMethod"
@@ -1039,7 +1034,7 @@
           prop="ffeeUnitid"
           header-align="center"
           align="center"
-          width="150px"
+          width="180px"
           label="计价单位"
         >
           <template slot-scope="scope">
@@ -1240,7 +1235,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="ffeeid"
+          prop="fFeeid"
           header-align="center"
           align="center"
           width="180px"
@@ -1253,7 +1248,7 @@
               show-word-limit
             /> -->
             <el-select
-              v-model="scope.row.fCorpid"
+              v-model="scope.row.fFeeid"
               filterable
               remote
               :remote-method="fWRemoteMethod"
@@ -1985,9 +1980,9 @@
           fWarehouseid: [
             { required: true, message: "请选择仓库", trigger: "blur" },
           ],
-          fBscorpno: [
-            { required: true, message: "请输入存货编号", trigger: "blur" },
-          ],
+          // fBscorpno: [
+          //   { required: true, message: "请输入存货编号", trigger: "blur" },
+          // ],
           fbillingway: [
             {
               required: true,
@@ -2289,6 +2284,7 @@
         this.reset();
         const fId = row.fId || this.ids;
         getWarehousebills(fId).then((response) => {
+          console.log(response)
           this.form = response.data.warehousebills;
           // this.fMblnoOptions = []
           this.fMblnoOptions = response.data.corps;
@@ -2297,131 +2293,21 @@
           this.relevantAttachments = response.data.enclosures;
           this.warehouseDrList = response.data.warehousebillsfeesDr;
           this.warehouseCrList = response.data.warehousebillsfeesCr;
+          this.fWbuOptions = response.data.feesList;
           this.warehouseOptions = response.data.warehouse;
+          this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+          this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
           this.userOptions = response.data.sysUser;
           this.goodsOptions = response.data.goodsList;
+          this.goodsOptions = response.data.goodsList
+         this.kqhouseOptions = response.data.warehouseAreas
+         this.relevantAttachments = response.data.enclosures
           this.$set(
           this.form,
           "fBsdate",
           Date.parse(response.data.warehousebills.fBsdate)
         );
-          // this.$set(this.form, "fCorpid", response.data.corps[0].fName);
-          // this.$set(this.form, "fStltypeid", response.data.corps[0].fName);
-          // this.$set(this.form, "fCorpid", response.data.warehousebills.fcorpid);
-          // this.$set(
-          //   this.form,
-          //   "fWarehouseid",
-          //   response.data.warehousebills.fwarehouseid
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fContacts",
-          //   response.data.warehousebills.fcontacts
-          // );
-          // this.$set(this.form, "fTel", response.data.warehousebills.ftel);
-          // this.$set(this.form, "fMblno", response.data.warehousebills.fmblno);
-          // this.$set(
-          //   this.form,
-          //   "fBsdate",
-          //   Date.parse(response.data.warehousebills.fbsdate)
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fStorekeeper",
-          //   response.data.warehousebills.fstorekeeper
-          // );
-          // this.$set(this.form, "createBy", response.data.warehousebills.createBy);
-          // this.$set(this.form, "fDeptid", response.data.warehousebills.fdeptid);
-          // this.$set(
-          //   this.form,
-          //   "fDilldate",
-          //   Date.parse(response.data.warehousebills.fbilldate)
-          // );
-          // this.$set(this.form, "fVslvoy", response.data.warehousebills.fvslvoy);
-          // this.$set(
-          //   this.form,
-          //   "fEta",
-          //   Date.parse(response.data.warehousebills.feta)
-          // );
-          // this.$set(
-          //   this.form,
-          //   "createTime",
-          //   Date.parse(response.data.warehousebills.createTime)
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fTrademodeid",
-          //   response.data.warehousebills.ftrademodeid + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fBillingway",
-          //   response.data.warehousebills.fbillingway + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fFeetunit",
-          //   response.data.warehousebills.ffeetunit + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fBscorpno",
-          //   response.data.warehousebills.fbscorpno
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fCustomno",
-          //   response.data.warehousebills.fcustomno
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fStltypeid",
-          //   response.data.warehousebills.fstltypeid + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fIfweigh",
-          //   response.data.warehousebills.fifweigh + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fIfdamage",
-          //   response.data.warehousebills.fifdamage + ""
-          // );
-          // this.$set(this.form, "fSbu", response.data.warehousebills.fsbu);
-          // this.$set(
-          //   this.form,
-          //   "fIfpledge",
-          //   response.data.warehousebills.fifpledge + ""
-          // );
-          // this.$set(
-          //   this.form,
-          //   "fBankcorpid",
-          //   response.data.warehousebills.fbankcorpid
-          // );
-          // this.$set(this.form, "remark", response.data.warehousebills.remark);
-          // this.deptOptions = [];
-          // this.deptOptions.push(response.data.dept);
-          // this.fMblnoOptions = [];
-          // this.fMblnoOptions.push(response.data.fCorps);
-          // if (response.data.fSbu !== null) {
-          //   this.fSbuOptions = [];
-          //   this.fSbuOptions.push(response.data.fSbu);
-          // }
-          // if (response.data.warehouse !== null) {
-          //   this.warehouseOptions = [];
-          //   this.warehouseOptions.push(response.data.warehouse);
-          // }
-          // if (
-          //   typeof response.data.warehouseBillsItem !== "undefined" &&
-          //   response.data.warehouseBillsItem !== null
-          // ) {
-          //   this.dataList = response.data.warehouseBillsItem;
-          //   if (response.data.goodsList !== null) {
-          //     this.goodsOptions = [];
-          //     this.goodsOptions = response.data.goodsList;
-          //   }
-          // }
+        
           this.open = true;
           this.title = "修改出库)";
         });
@@ -2484,6 +2370,12 @@
           this.$message.error('请添加付款信息!')
           return false
         }
+        for (let list in this.dataList) {
+          if (!this.dataList[list].fWarehouselocid) {
+            this.$message.error('请输入库区!')
+            return false
+          }
+        }
         for (let list in this.relevantAttachments) {
             if (this.relevantAttachments[list].fName ===  null) {
           this.$message.error('请输入附件名称!')
@@ -2498,7 +2390,7 @@
         
          }
           for (let list in this.warehouseCrList) {
-            if (!this.warehouseDrList[list].fCorpid) {
+            if (!this.warehouseCrList[list].fCorpid) {
           this.$message.error('请选择客户名称')
           return false
         }