瀏覽代碼

修改收款信息计价单位 字段

lichao 3 年之前
父節點
當前提交
39ea53bff9
共有 1 個文件被更改,包括 119 次插入54 次删除
  1. 119 54
      src/views/Warehousing/outStock/AddOrUpdate.vue

+ 119 - 54
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -1250,7 +1250,7 @@
               type="primary"
               size="small"
               v-if="browseStatus"
-              @click="feeChange"
+              @click="feeChange('D')"
             >
               费用变更
             </el-button>
@@ -1282,7 +1282,7 @@
                   filterable
                   clearable
                   placeholder="客户名称"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
               >
                 <el-option
                     v-for="(item, index) in fMblnoOptions"
@@ -1306,7 +1306,7 @@
                   clearable
                   filterable
                   placeholder="费用名称"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
               >
                 <el-option
                     v-for="(item, index) in fDNameOptions"
@@ -1341,7 +1341,7 @@
             </template>
           </el-table-column>
           <el-table-column
-              prop="fBillingway"
+              prop="fFeeunitid"
               header-align="center"
               align="center"
               width="180px"
@@ -1349,10 +1349,10 @@
           >
             <template slot-scope="scope">
               <el-select
-                  v-model="scope.row.fBillingway"
+                  v-model="scope.row.fFeeunitid"
                   placeholder="请选择计价单位"
                   clearable
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   @change="changeFeeUnit(scope.row)"
               >
                 <el-option
@@ -1376,7 +1376,7 @@
                   oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                   v-model="scope.row.fQty"
                   placeholder="数量"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   @change="changeContractAmt(scope.row)"
                   show-word-limit
               />
@@ -1394,7 +1394,7 @@
                   oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                   v-model="scope.row.fUnitprice"
                   placeholder="单价"
-                  :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
+                  :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
                   @change="changeContractAmt(scope.row)"
                   show-word-limit
               />
@@ -1409,7 +1409,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                  :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
+                  :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
                   oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                   v-model="scope.row.fAmount"
                   placeholder="金额"
@@ -1428,7 +1428,7 @@
               <el-select
                   v-model="scope.row.fStltypeid"
                   placeholder="请选择结算表票结、月结"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
               >
                 <el-option
                     v-for="(item, index) in fStltypeOptions"
@@ -1449,7 +1449,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fCurrency"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="币别"
                   show-word-limit
               />
@@ -1465,7 +1465,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fExrate"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="汇率"
                   show-word-limit
               />
@@ -1481,7 +1481,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fTaxrate"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="税率"
                   show-word-limit
               />
@@ -1497,7 +1497,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fMblno"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="提单号"
                   show-word-limit
               />
@@ -1513,7 +1513,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fProductName"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="品名"
                   show-word-limit
               />
@@ -1529,7 +1529,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.fMarks"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="品牌"
                   show-word-limit
               />
@@ -1570,7 +1570,7 @@
               :disabled="browseStatus"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fMblno" :disabled="browseStatus" placeholder="请输入业务单号"></el-input>
+              <el-input v-model="scope.row.fMblno" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入业务单号"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1581,7 +1581,7 @@
               label="唛头"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fMarks" :disabled="browseStatus" placeholder="请输入唛头"></el-input>
+              <el-input v-model="scope.row.fMarks" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入唛头"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1594,7 +1594,7 @@
             <template slot-scope="scope">
               <el-date-picker
                   style="width: 100%;"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   v-model="scope.row.fBsdate"
                   type="date"
                   placeholder="选择日期">
@@ -1612,7 +1612,7 @@
               <el-select
                   v-model="scope.row.fBillingway"
                   placeholder="请选择计费单位"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   clearable
               >
                 <el-option
@@ -1632,7 +1632,7 @@
               label="计费数量"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fBillingQty" :disabled="browseStatus" placeholder="请输入计费数量"></el-input>
+              <el-input v-model="scope.row.fBillingQty" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入计费数量"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1645,7 +1645,7 @@
             <template slot-scope="scope">
               <el-date-picker
                   style="width: 100%;"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   v-model="scope.row.fChargedate"
                   type="date"
                   placeholder="选择日期">
@@ -1662,7 +1662,7 @@
             <template slot-scope="scope">
               <el-date-picker
                   style="width: 100%;"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   v-model="scope.row.fBillingDeadline"
                   type="date"
                   placeholder="选择日期">
@@ -1677,7 +1677,7 @@
               label="计费天数"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fBillingDays" :disabled="browseStatus" placeholder="请输入计费天数"></el-input>
+              <el-input v-model="scope.row.fBillingDays" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入计费天数"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1688,7 +1688,7 @@
               label="库存天数"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fInventoryDays" :disabled="browseStatus" placeholder="请输入库存天数"></el-input>
+              <el-input v-model="scope.row.fInventoryDays" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入库存天数"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1699,7 +1699,7 @@
               label="计费金额"
           >
             <template slot-scope="scope">
-              <el-input v-model="scope.row.fAmt" :disabled="browseStatus" placeholder="请输入计费金额"
+              <el-input v-model="scope.row.fAmt" :disabled="browseStatus || scope.row.fBillstatus == 6" placeholder="请输入计费金额"
                         @change="calculationFAmt(scope.row)"></el-input>
             </template>
           </el-table-column>
@@ -1713,7 +1713,7 @@
             <template slot-scope="scope">
               <el-input
                   v-model="scope.row.remark"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
                   placeholder="备注"
                   show-word-limit
               />
@@ -1729,10 +1729,20 @@
               <el-button
                   @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
                   size="small"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || scope.row.fBillstatus == 6"
               >移除
               </el-button
               >
+              <el-button
+                size="small"
+                @click="listCheck(scope.row)"
+                v-if="scope.row.fBillstatus < 6"
+              >请核</el-button>
+              <el-button
+                size="small"
+                @click="revokeListCheck(scope.row)"
+                v-if="scope.row.fBillstatus == 6"
+              >撤销请核</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -1788,7 +1798,7 @@
               type="primary"
               size="small"
               v-if="browseStatus"
-              @click="feeChange"
+              @click="feeChange('C')"
             >
               费用变更
             </el-button>
@@ -2119,23 +2129,21 @@
             <template slot-scope="scope">
               <!-- <el-button size="small">审核费用</el-button> -->
               <el-button
-                @click.native.prevent="checkRow(scope.$index, warehouseCrList)"
-                size="small"
-                v-if="scope.row.fBillstatus < 6"
-              >请核
-              </el-button>
-              <el-button
-                @click.native.prevent="revokeRow(scope.$index, warehouseCrList)"
-                size="small"
-                v-if="scope.row.fBillstatus === 6"
-              >撤销
-              </el-button>
-              <el-button
                   @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
                   size="small"
                   :disabled="browseStatus || scope.row.fBillstatus === 6"
               >移除
               </el-button>
+              <el-button
+                size="small"
+                @click="listCheck(scope.row)"
+                v-if="scope.row.fBillstatus < 6"
+              >请核</el-button>
+              <el-button
+                size="small"
+                @click="revokeListCheck(scope.row)"
+                v-if="scope.row.fBillstatus == 6"
+              >撤销请核</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -3327,14 +3335,14 @@
             style="display: flex; justify-content: space-between; font-size: 12px"
         >
           <div>库管:{{ form.fContacts }}</div>
-          <div style="width: 100px">叉车:</div>
+          <div style="width: 130px;margin-right: 20px">叉车:</div>
         </div>
         <div
             style="display: flex; justify-content: space-between; font-size: 12px"
         >
           <div>制单人:{{ form.createBy }}</div>
-          <div style="width: 100px">初审核人:</div>
-          <div style="width: 100px">复式审核人:</div>
+          <div style="width: 100px">初审核人:{{ firstReviewer }}</div>
+          <div style="width: 130px;margin-right: 20px">复式审核人:{{ secondReviewer }}</div>
         </div>
       </div>
 
@@ -3547,14 +3555,14 @@
             style="display: flex; justify-content: space-between; font-size: 12px;margin-bottom: 20px"
         >
           <div>库管:{{ form.fContacts }}</div>
-          <div style="width: 100px;margin-right: 15px">叉车:</div>
+          <div style="width: 130px;margin-right: 20px">叉车:</div>
         </div>
         <div
             style="display: flex; justify-content: space-between; font-size: 12px"
         >
           <div>制单人:{{ form.createBy }}</div>
-          <div style="width: 100px">初审核人:</div>
-          <div style="width: 100px;margin-right: 15px">复式审核人:</div>
+          <div style="width: 100px">初审核人:{{ firstReviewer }}</div>
+          <div style="width: 130px;margin-right: 20px">复式审核人:{{ secondReviewer }}</div>
         </div>
       </div>
 
@@ -3675,7 +3683,7 @@
           :total="whgenlegTotal"
           :page.sync="pageNum"
           :limit.sync="pageSize"
-          @pagination="getWhgenlegList"
+          @pagination="getWhgenlegList(key_id)"
       />
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="zhgenlegData">导 入</el-button>
@@ -3777,7 +3785,10 @@ import {
   ordersRevoke,
   checkCode,
   deliveryCalculation,
-  matchWarehouse
+  matchWarehouse,
+  queryReviewer,
+  feesCheck,
+  revokefeeCheck
 } from "@/api/warehouseBusiness/warehouseOutStock";
 import {operationAgreement} from "@/api/agreement/agreement";
 import {listCorps} from "@/api/basicdata/corps";
@@ -4302,6 +4313,10 @@ export default {
       // Cr打印弹窗是否开启
       print_Cr: false,
       zcList: [],
+      // 初级审核人
+      firstReviewer: '',
+      // 复级审核人
+      secondReviewer: '',
     };
   },
   computed: {
@@ -5472,6 +5487,15 @@ export default {
     getForm() {
       getWarehousebills(this.chiId).then((response) => {
         this.form = response.data.warehousebills;
+        // queryReviewer(this.form.fId).then(res => {
+        //   if (!res.data) {
+        //     this.firstReviewer = '';
+        //     this.secondReviewer = '';
+        //   } else {
+        //     this.firstReviewer = res.data[1];
+        //     this.secondReviewer = res.data[0];
+        //   }
+        // })
         if (this.form.fBillstatus > 3) {
           this.approvalStatus = false;
           this.browseStatus = true;
@@ -5938,7 +5962,6 @@ export default {
               formData.append("warehouseBills", JSON.stringify(this.form));
               this.detailList.forEach(item => {
                 if (item.srcId !== null) {
-                  console.log('第二个')
                   // item.fStorageFeeDeadline = item.fBsdate
                 }
               })
@@ -6262,6 +6285,8 @@ export default {
           type: "warning",
         });
       } else {
+        this.pageNum = 1;
+        this.pageSize = 10;
         this.dialogWhgenlegList = [];
         this.whgenlegTotal = 0;
         this.warehousingagreements = true;
@@ -6270,6 +6295,7 @@ export default {
     },
     // 查询作业费信息
     getWhgenlegList(key) {
+      console.log(key)
       let data = {};
       if (key == 2) {
         this.key_id = key;
@@ -6695,7 +6721,7 @@ export default {
           let fAmount = 0;
           fAmount = e.fPrice * qty;
           if (this.key_id == 3) {
-            console.log(e)
+            console.log('乖乖齐齐')
             this.warehouseDrList.push({
               fQty: qty,
               fCorpid: e.fCorpid,
@@ -6715,6 +6741,7 @@ export default {
               remark: e.remark,
             });
           } else {
+            console.log('奇奇怪怪')
             this.warehouseCrList.push({
               fQty: qty,
               fCorpid: e.fCorpid,
@@ -7110,11 +7137,23 @@ export default {
             this.cancel();
           });
     },
-    feeChange() {
+    feeChange(fDC) {
+      let data = {
+        form: {},
+        warehousebillsfeesCr: [],
+        warehousebillsfeesDr: [],
+        billType: 'outStock',
+        fDc: fDC
+      }
+      data.form = this.form
+      if (fDC == 'C') {
+        data.warehousebillsfeesCr = this.warehouseCrList
+      } else {
+        data.warehousebillsfeesDr = this.warehouseDrList
+      }
       this.$router.push({
         path: "/business/costModify",
-        // query: { id: this.form.id},
-        query: { id: 1},
+        query: { data: data},
       });
     },
     // 付款信息请核
@@ -7204,6 +7243,32 @@ export default {
         this.msgSuccess("撤销成功");
       })
     },
+    // 费用明细请核
+    listCheck(row) {
+      feesCheck(row.fId).then(res => {
+        this.$message.success('请核成功')
+        if (res.data.fDc == 'D') {
+          let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseDrList.splice(index, 1, res.data)
+        } else {
+          let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseCrList.splice(index, 1, res.data)
+        }
+      })
+    },
+    // 费用明细撤销请核
+    revokeListCheck(row) {
+      revokefeeCheck(row.fId).then(res => {
+        this.$message.success('操作成功')
+        if (res.data.fDc == 'D') {
+          let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseDrList.splice(index, 1, res.data)
+        } else {
+          let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
+          this.warehouseCrList.splice(index, 1, res.data)
+        }
+      })
+    },
   },
   watch: {
     // 监听 addOrUpdateVisible 改变