Преглед изворни кода

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

wengyuwen пре 4 година
родитељ
комит
944856788b

+ 2 - 3
src/views/reportManagement/whgenleg/index.vue

@@ -3,11 +3,10 @@
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="仓库" prop="fwarehouseid">
         <treeselect style="width:160px"
-                    v-model="queryParams.fWarehouselocid"
+                    v-model="queryParams.fWarehouseLocationid"
                     :options="fWarehouseidOption"
                     @select="treeseLect"
                     :show-count="true"
-                    :disable-branch-nodes="true"
                     placeholder="请选择归属库区" />
       </el-form-item>
       <el-form-item label="货物名称" prop="fgoodsid">
@@ -335,7 +334,7 @@ export default {
   },
   methods: {
     treeseLect(tree){
-      this.queryParams.fWarehouselocid = tree.id
+      this.queryParams.fWarehouseLocationid = tree.id
     },
     getTreeselect() {
       treeselect().then(response => {

+ 80 - 45
src/views/warehouseBusiness/inStock/index.vue

@@ -1693,19 +1693,21 @@
               width="180px"
               label="作业类型"
             >
-              <el-select
-                style="width: 80%"
-                v-model="warehouseDrList.fBusinessType"
-                filterable
-                disabled
-              >
-                <el-option
-                  v-for="(dict) in businessTypeOption"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                ></el-option>
-              </el-select>
+              <template slot-scope="scope">
+                <el-select
+                  style="width: 80%"
+                  v-model="scope.row.fBusinessType"
+                  filterable
+                  disabled
+                >
+                  <el-option
+                    v-for="(dict) in businessTypeOption"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  ></el-option>
+                </el-select>
+              </template>
             </el-table-column>
             <el-table-column
               prop="fFeeUnitid"
@@ -2034,19 +2036,21 @@
               width="180px"
               label="作业类型"
             >
-              <el-select
-                style="width: 80%"
-                v-model="warehouseDrList.fBusinessType"
-                filterable
-                disabled
-              >
-                <el-option
-                  v-for="(dict) in businessTypeOption"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                ></el-option>
-              </el-select>
+              <template slot-scope="scope">
+                <el-select
+                  style="width: 80%"
+                  v-model="scope.row.fBusinessType"
+                  filterable
+                  disabled
+                >
+                  <el-option
+                    v-for="(dict) in businessTypeOption"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  ></el-option>
+                </el-select>
+              </template>
             </el-table-column>
 
             <el-table-column
@@ -2486,7 +2490,7 @@
       </el-dialog>
       <!-- 选择作业费协议数据 -->
       <el-dialog
-        title="作业费协1议"
+        title="作业费协议"
         :close-on-click-modal="false"
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
@@ -2564,7 +2568,7 @@
           @pagination="getWhgenlegList"
         />
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="zhgenlegData">导入</el-button>
+          <el-button type="primary" @click="zhgenlegData">导 入</el-button>
           <el-button @click="warehousingagreements = false ; Navigation = false">取 消</el-button>
         </div>
       </el-dialog>
@@ -2999,6 +3003,7 @@ export default {
       doNot:false,
       // 修改查看状态
       browseStatus: false,
+      key_id:'',
       contrOl:false,
       // 审批状态控制
       approvalStatus: false,
@@ -3903,11 +3908,10 @@ export default {
     },
     // 查询作业费信息
     getWhgenlegList(kye) {
-      // this.queryParams.fCorpid = this.form.fCorpid;
-      // this.queryParams.fLineno = this.form.fCorpid;
       let data = {}
       let fTaskType = kye
       if (kye == 2){
+        this.key_id = kye
         this.Navigation = true
         data = {
           pageNum:1,
@@ -3916,6 +3920,7 @@ export default {
           fLabour:this.form.fLabour
         }
       }else if (kye == 1) {
+        this.key_id = kye
         this.Navigation = true
         data = {
           pageNum:1,
@@ -3926,6 +3931,7 @@ export default {
         }
       }else {
         this.Navigation = false
+        this.key_id = kye
         data = {
           pageNum:1,
           pageSize:10,
@@ -4064,6 +4070,7 @@ export default {
         for (let zhgen in this.dialogWhgenlegList) {
           let feeId = this.dialogWhgenlegList[zhgen].feeFId;
           getFees(feeId).then((response) => {
+            console.log(response)
             this.fWbuOptions.push(response.data);
           });
           let qty = 1;
@@ -4079,21 +4086,43 @@ export default {
           // qty=(qty/1000).toFixed(2);
           let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
 
-          this.warehouseCrList.push({
-            fQty: qty,
-            fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
-            fFeeid: feeId,
-            fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
-            fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
-            fCurrency: 'RMB',
-            fExrate: 1,
-            fAmount: fAmount,
-            fTaxrate: this.fTaxrate,
-            fMblno:this.form.fMblno,
-            fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks,
-            fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
-          })
+
+          if(this.key_id == 3){
+            console.log("111")
+            this.warehouseDrList.push({
+              fQty: qty,
+              fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
+              fFeeid: feeId,
+              fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
+              fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
+              fCurrency: 'RMB',
+              fExrate: 1,
+              fAmount: fAmount,
+              fTaxrate: this.fTaxrate,
+              fMblno:this.form.fMblno,
+              fProductName:this.form.fProductName,
+              fMarks:this.form.fMarks,
+              fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
+            })
+          }else{
+            this.warehouseCrList.push({
+              fQty: qty,
+              fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
+              fFeeid: feeId,
+              fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
+              fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
+              fCurrency: 'RMB',
+              fExrate: 1,
+              fAmount: fAmount,
+              fTaxrate: this.fTaxrate,
+              fMblno:this.form.fMblno,
+              fProductName:this.form.fProductName,
+              fMarks:this.form.fMarks,
+              fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
+            })
+
+          }
+
         }
         this.warehousingagreements = false;
       }
@@ -4339,9 +4368,13 @@ export default {
             if (this.dataList[list].fBillstatus > 10) {
               this.formBrowseStatus = true;
               this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+            }else{
+              this.formBrowseStatus = false;
             }
             if(this.dataList[list].fBillstatus === 40){
               this.contrOl = true
+            }else{
+              this.contrOl = false
             }
           }
         }
@@ -4376,6 +4409,7 @@ export default {
         console.log(this.businessTypeOption)
         console.log(this.warehouseDrList)
         for (let dr in this.warehouseDrList) {
+          this.$forceUpdate()
           this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + "");
           this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
           this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
@@ -4696,6 +4730,7 @@ export default {
         this.fid = response.data;
         this.formBrowseStatus = false;
         this.msgSuccess("撤销入账成功");
+        this.contrOl = false
         for (let li in this.dataWithdrawList) {
           for (let i in this.dataList) {
             if (this.dataWithdrawList[li].fId === this.dataList[i].fId) {

+ 36 - 14
src/views/warehouseBusiness/outStock/index.vue

@@ -1424,7 +1424,7 @@
               <!--          <el-button type="warning" @click.prevent="addStorages('Dr')">仓储费协议</el-button >-->
               <el-button type="danger"
                          :disabled="browseStatus"
-                         @click.prevent="addAgreement('Dr')"
+                         @click.prevent="addAgreement('Dr',3)"
               >作业费协议</el-button
               >
             </div>
@@ -1768,7 +1768,7 @@
               <!--          <el-button type="warning" @click.prevent="addStorages('Cr')">仓储费协议</el-button>-->
               <el-button type="danger"
                          :disabled="browseStatus"
-                         @click.prevent="addAgreement('Cr')"
+                         @click.prevent="addAgreement('Cr',1)"
               >作业费协议</el-button
               >
             </div>
@@ -2215,9 +2215,9 @@
         :visible.sync="warehousingagreements"
         width="70%"
       >
-        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
-          <el-menu-item index="1">作业费</el-menu-item>
-          <el-menu-item index="2">劳务费</el-menu-item>
+        <el-menu :default-active="activeIndex"  v-if="Navigation === true" class="el-menu-demo" mode="horizontal" @select="handleSelect">
+          <el-menu-item index="1">车队作业费</el-menu-item>
+          <el-menu-item index="2">劳务作业费</el-menu-item>
         </el-menu>
 
         <el-table
@@ -2278,7 +2278,7 @@
         />
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
-          <el-button @click="warehousingagreements = false">取 消</el-button>
+          <el-button @click="warehousingagreements = false ; Navigation = false">取 消</el-button>
         </div>
       </el-dialog>
       <!-- 选择仓储费协议数据 -->
@@ -2746,6 +2746,7 @@ export default {
     return {
       // 劳务公司
       fCompanyOptIons: [],
+      Navigation:false,
       fleetOptions:[],
       activeIndex: '1',
       activeIndex2: '1',
@@ -3277,7 +3278,7 @@ export default {
       });
     },
     // 新增作业费协议
-    addAgreement(status) {
+    addAgreement(status,kye) {
       this.costStatus = status
       if (!this.form.fCorpid) {
         this.$message({ message: "请维护货权方", type: "warning", });
@@ -3291,7 +3292,7 @@ export default {
         this.dialogWhgenlegList = [];
         this.whgenlegTotal = 0;
         this.warehousingagreements = true;
-        this.getWhgenlegListt();
+        this.getWhgenlegListt(kye);
       }
     },
     // 新增仓储费协议
@@ -3315,12 +3316,33 @@ export default {
       });
     },
     // 查询作业费信息
-    getWhgenlegListt() {
-      let data = {
-        pageNum:1,
-        pageSize:10,
-        fLineno:this.form.fCorpid,
-        fFeeid:this.dataList[0].fGoodsid
+    getWhgenlegListt(kye) {
+      console.log(kye)
+      let data = {}
+      let fTaskType = kye
+      if (kye == 2){
+        this.Navigation = true
+        data = {
+          pageNum:1,
+          pageSize:10,
+          fTaskType:Number(fTaskType),
+          fLabour:this.form.fLabour
+        }
+      }else if (kye == 1) {
+        this.Navigation = true
+        data = {
+          pageNum:1,
+          pageSize:10,
+          fTaskType:Number(fTaskType),
+          fFleet:this.form.fFleet
+        }
+      }else {
+        this.Navigation = false
+        data = {
+          pageNum:1,
+          pageSize:10,
+          fCorpid:this.form.fCorpid
+        }
       }
       operationAgreement(data).then((response) => {
         console.log(response)

+ 38 - 17
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -1380,7 +1380,7 @@
               <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
               <el-button type="danger"
                          :disabled="browseStatus"
-                         @click.prevent="addAgreement('Dr')"
+                         @click.prevent="addAgreement('Dr',3)"
                 >作业费协议</el-button
               >
             </div>
@@ -1717,7 +1717,7 @@
               <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
               <el-button type="danger"
                          :disabled="browseStatus"
-                         @click.prevent="addAgreement('Cr')"
+                         @click.prevent="addAgreement('Cr',1)"
               >作业费协议</el-button>
             </div>
           </div>
@@ -2141,9 +2141,9 @@
         width="70%"
 
       >
-        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
-          <el-menu-item index="1">作业费</el-menu-item>
-          <el-menu-item index="2">劳务费</el-menu-item>
+        <el-menu :default-active="activeIndex"  v-if="Navigation === true" class="el-menu-demo" mode="horizontal" @select="handleSelect">
+          <el-menu-item index="1">车队作业费</el-menu-item>
+          <el-menu-item index="2">劳务作业费</el-menu-item>
         </el-menu>
 
         <el-table
@@ -2205,7 +2205,7 @@
         />
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
-          <el-button @click="warehousingagreements = false">取 消</el-button>
+          <el-button @click="warehousingagreements = false;Navigation = false">取 消</el-button>
         </div>
       </el-dialog>
       <el-dialog
@@ -2415,6 +2415,7 @@ export default {
       activeNames:['1'],
       //作业类型校验
       isrequired:2,
+      Navigation:false,
       isrequired_s:2,
       isrequired_l:2,
       contrOl:false,
@@ -2697,6 +2698,7 @@ export default {
   methods: {
     handleSelect(key, keyPath) {
       this.addAgreements(key)
+      this.getWhgenlegListt(key)
     },
     // 新增付款作业费协议
     addAgreements(kye) {
@@ -2972,7 +2974,7 @@ export default {
       });
     },
     // 新增作业费协议
-    addAgreement(status) {
+    addAgreement(status,kye) {
       this.costStatus = status
       if (this.dataList.length === 0 || !this.dataList[0].fGoodsid) {
         this.$message({ message: "请维护库存明细,或第一行品名", type: "warning", });
@@ -2986,7 +2988,7 @@ export default {
       this.dialogWhgenlegList = []
       this.whgenlegTotal = 0
       this.warehousingagreements = true
-      this.getWhgenlegListt()
+      this.getWhgenlegListt(kye)
     },
     // 新增仓储费协议
     addStorages() {
@@ -3009,14 +3011,34 @@ export default {
       });
     },
     // 查询作业费信息
-    getWhgenlegListt() {
-      let data = {
-        pageNum:1,
-        pageSize:10,
-        fLineno:this.form.fCorpid,
-        fFeeid:this.dataList[0].fGoodsid
+    getWhgenlegListt(kye) {
+      let daTa = []
+      let fTaskType = kye
+      if (kye == 2){
+        this.Navigation = true
+        daTa = {
+          pageNum:1,
+          pageSize:10,
+          fTaskType:Number(fTaskType),
+          fLabour:this.form.fLabour
+        }
+      }else if (kye == 1) {
+        this.Navigation = true
+        daTa = {
+          pageNum:1,
+          pageSize:10,
+          fTaskType:Number(fTaskType),
+          fFleet:this.form.fFleet
+        }
+      }else {
+        this.Navigation = false
+        daTa = {
+          pageNum:1,
+          pageSize:10,
+          fCorpid:this.form.fCorpid
+        }
       }
-      operationAgreement(data).then((response) => {
+      operationAgreement(daTa).then((response) => {
         this.tasklegList = response.rows;
         this.whgenlegTotal = response.total;
       });
@@ -3370,9 +3392,8 @@ export default {
       this.whgenlegParams.fMblno = this.form.fMblno;
       this.whgenlegParams.fCorpid = this.form.fCorpid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
-      this.whgenlegParams.fInwarehouseid = this.form.fInwarehouseid
+      this.whgenlegParams.fWarehouseid = this.form.fInwarehouseid
       listWhgenleg(this.whgenlegParams).then((response) => {
-        console.log(response)
         this.whgenlegList = response.rows;
         this.whgenlegTotal = response.total;
       });