Browse Source

提交出入调拨等页面

caojunjie 4 years ago
parent
commit
002d552d5c

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

@@ -1682,19 +1682,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"
@@ -2023,19 +2025,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
@@ -2475,7 +2479,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"
@@ -2553,7 +2557,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>
@@ -2971,6 +2975,7 @@ export default {
       doNot:false,
       // 修改查看状态
       browseStatus: false,
+      key_id:'',
       contrOl:false,
       // 审批状态控制
       approvalStatus: false,
@@ -3863,11 +3868,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,
@@ -3876,6 +3880,7 @@ export default {
           fLabour:this.form.fLabour
         }
       }else if (kye == 1) {
+        this.key_id = kye
         this.Navigation = true
         data = {
           pageNum:1,
@@ -3886,6 +3891,7 @@ export default {
         }
       }else {
         this.Navigation = false
+        this.key_id = kye
         data = {
           pageNum:1,
           pageSize:10,
@@ -4024,6 +4030,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;
@@ -4039,21 +4046,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;
       }
@@ -4300,9 +4329,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
             }
           }
         }
@@ -4335,6 +4368,7 @@ export default {
         this.kqhouseOptions = response.data.warehouseAreas;
         this.warehouseDrList = response.data.warehousebillsfeesDr;
         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));
@@ -4654,6 +4688,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

@@ -1414,7 +1414,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>
@@ -1758,7 +1758,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>
@@ -2205,9 +2205,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
@@ -2268,7 +2268,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>
       <!-- 选择仓储费协议数据 -->
@@ -2720,6 +2720,7 @@ export default {
     return {
       // 劳务公司
       fCompanyOptIons: [],
+      Navigation:false,
       fleetOptions:[],
       activeIndex: '1',
       activeIndex2: '1',
@@ -3249,7 +3250,7 @@ export default {
       });
     },
     // 新增作业费协议
-    addAgreement(status) {
+    addAgreement(status,kye) {
       this.costStatus = status
       if (!this.form.fCorpid) {
         this.$message({ message: "请维护货权方", type: "warning", });
@@ -3263,7 +3264,7 @@ export default {
         this.dialogWhgenlegList = [];
         this.whgenlegTotal = 0;
         this.warehousingagreements = true;
-        this.getWhgenlegListt();
+        this.getWhgenlegListt(kye);
       }
     },
     // 新增仓储费协议
@@ -3287,12 +3288,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)

+ 37 - 16
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -1370,7 +1370,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>
@@ -1707,7 +1707,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>
@@ -2131,9 +2131,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
@@ -2195,7 +2195,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
@@ -2389,6 +2389,7 @@ export default {
       activeNames:['1'],
       //作业类型校验
       isrequired:2,
+      Navigation:false,
       isrequired_s:2,
       isrequired_l:2,
       contrOl:false,
@@ -2670,6 +2671,7 @@ export default {
   methods: {
     handleSelect(key, keyPath) {
       this.addAgreements(key)
+      this.getWhgenlegListt(key)
     },
     // 新增付款作业费协议
     addAgreements(kye) {
@@ -2945,7 +2947,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", });
@@ -2959,7 +2961,7 @@ export default {
       this.dialogWhgenlegList = []
       this.whgenlegTotal = 0
       this.warehousingagreements = true
-      this.getWhgenlegListt()
+      this.getWhgenlegListt(kye)
     },
     // 新增仓储费协议
     addStorages() {
@@ -2982,14 +2984,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;
       });
@@ -3336,7 +3358,6 @@ export default {
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
       this.whgenlegParams.fInwarehouseid = this.form.fInwarehouseid
       listWhgenleg(this.whgenlegParams).then((response) => {
-        console.log(response)
         this.whgenlegList = response.rows;
         this.whgenlegTotal = response.total;
       });