Browse Source

收付相抵

Qukatie 3 weeks ago
parent
commit
604a2a9a8b

+ 17 - 1
src/api/iosBasicData/finstlbills.js

@@ -210,7 +210,23 @@ export const batchConfirmReconciliation = (data) => {
 // 批量撤销对账
 export const batchRevokeReconciliation  = (data) => {
   return request({
-    url: '/api/blade-los/finstlbills/batchRevokeReconciliation ',
+    url: '/api/blade-los/finstlbills/batchRevokeReconciliation',
+    method: 'post',
+    data: data
+  })
+}
+// 批量对账
+export const confirmOffset = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/confirmOffset',
+    method: 'post',
+    data: data
+  })
+}
+// 批量撤销对账
+export const revokeOffset  = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeOffset',
     method: 'post',
     data: data
   })

+ 2 - 2
src/views/approveDataH/check.vue

@@ -172,7 +172,7 @@ export default {
                           let tag1 = this.$store.getters.tagList.filter(ele => ele.label === "审批数据")[0];
                           this.$store.commit("DEL_TAG", tag1);
                           this.$router.push({
-                            path: "/approveData/index",
+                            path: "/approveDataH/index",
                             query: { check: "refresh" }
                           });
                         }
@@ -204,7 +204,7 @@ export default {
                 let tag1 = this.$store.getters.tagList.filter(ele => ele.label === "审批数据")[0];
                 this.$store.commit("DEL_TAG", tag1);
                 this.$router.push({
-                  path: "/approveData/index",
+                  path: "/approveDataH/index",
                   query: { check: "refresh" }
                 });
               }

+ 40 - 28
src/views/iosBasicData/ComputationCenter/index.vue

@@ -3,12 +3,15 @@
     <basic-container v-show="isShow">
       <div style="margin-top: 10px">
         <el-tabs type="card" v-model="tabsValue" @tab-click="handleClick">
-          <el-tab-pane label="对账中心" name="C">
+          <el-tab-pane label="对账中心" name="CHK">
             <span slot="label">对账中心</span>
           </el-tab-pane>
-          <el-tab-pane label="付费申请" name="D">
+          <el-tab-pane label="付费申请" name="FFSQ">
             <span slot="label">付费申请</span>
           </el-tab-pane>
+          <el-tab-pane label="收付相抵" name="DCDD">
+            <span slot="label">收付相抵</span>
+          </el-tab-pane>
           <el-tab-pane label="业务单据" name="业务单据">
             <span slot="label" style="color: #4c9e44">财务单据</span>
           </el-tab-pane>
@@ -40,7 +43,9 @@
         @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 324)"
       >
         <template slot="menuLeft">
-          <el-button v-if="tabsValue == 'C' || tabsValue == 'D'" type="primary" size="small" plain @click="chooseSettlement()">选择结算 </el-button>
+          <el-button v-if="tabsValue == 'CHK' || tabsValue == 'FFSQ'|| tabsValue == 'DCDD'" type="primary" size="small" plain @click="chooseSettlement()"
+            >选择结算
+          </el-button>
           <el-button v-if="tabsValue == '业务单据'" type="primary" size="small" plain @click="addfun()">添加单据 </el-button>
           <el-button v-if="tabsValue == '业务单据'" type="danger" size="small" plain @click="handleDelete()">一键删除 </el-button>
           <span style="font-size: 24px;font-weight: 600;">
@@ -63,7 +68,7 @@
         </tempalte>
         <template slot="menu" slot-scope="{ row }">
           <el-button
-            v-if="tabsValue == 'C' || tabsValue == 'D'"
+            v-if="tabsValue == 'CHK' || tabsValue == 'FFSQ'|| tabsValue == 'DCDD'"
             type="text"
             size="small"
             :disabled="
@@ -135,7 +140,7 @@ export default {
       selectionList: [], // 多选的数据
       isShow: true,
       editSave: false, // 详情是否禁用
-      tabsValue: "C", // tabs切换
+      tabsValue: "CHK", // tabs切换
       // 动画
       loading: false,
       // 分页
@@ -453,7 +458,7 @@ export default {
         });
         this.isShow = false;
         this.$nextTick(() => {
-          this.$refs.settlementDetailsRef.generateFinStlBillsfun(arrId.join(","), this.tabsValue);
+          this.$refs.settlementDetailsRef.generateFinStlBillsfun(arrId.join(","), this.tabsValue=='CHK'?"D":"C",this.tabsValue);
         });
       });
     },
@@ -462,7 +467,7 @@ export default {
       this.isShow = false;
       // this.editSave = true
       this.$nextTick(() => {
-        this.$refs.settlementDetailsRef.generateFinStlBillsfun(row.id, this.tabsValue);
+        this.$refs.settlementDetailsRef.generateFinStlBillsfun(row.id, this.tabsValue=='CHK'?"D":"C",this.tabsValue);
       });
     },
     // 添加
@@ -478,7 +483,7 @@ export default {
     },
     // 编辑
     editfun(row) {
-      if (this.tabsValue == "C") {
+      if (this.tabsValue == "FFSQ") {
         if (this.$store.getters.payAppStatus) {
           this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
             confirmButtonText: "确定",
@@ -493,21 +498,20 @@ export default {
             }
           });
         }
-      } else if (this.tabsValue == "D") {
-        if (this.$store.getters.finOutStatus) {
-          this.$alert("销项发票页面已存在,请关闭销项发票再进行操作", "温馨提示", {
-            confirmButtonText: "确定",
-            type: "warning",
-            callback: action => {}
-          });
-        } else {
-          this.$router.push({
-            path: `/iosBasicData/fininvoicesOutput/index`,
-            query: {
-              id: row.id
-            }
-          });
-        }
+      } else if (this.tabsValue == "CHK") {
+        this.$router.push({
+          path: `/iosBasicData/finstlbills/index`,
+          query: {
+            id: row.id
+          }
+        });
+      } else if (this.tabsValue == "DCDD") {
+        this.$router.push({
+          path: `/iosBasicData/dcOffset/index`,
+          query: {
+            id: row.id
+          }
+        });
       } else {
         this.pageIds = [];
         this.data.forEach(item => {
@@ -569,7 +573,7 @@ export default {
     },
     // tabs 切换
     handleClick() {
-      if (this.tabsValue == "D") {
+      if (this.tabsValue == "FFSQ") {
         this.findObject(this.option.column, "invCorpCnName").hide = false;
         this.findObject(this.option.column, "type").hide = false;
         this.findObject(this.option.column, "businessType").hide = true;
@@ -712,19 +716,27 @@ export default {
     async onLoad(page, params = {}) {
       this.loading = true;
       let res = {};
-      if (this.tabsValue == "C") {
+      if (this.tabsValue == "CHK") {
         // 调用 付费申请数据
         res = await finstlbillsList(page.currentPage, page.pageSize, {
           ...Object.assign(params, this.query),
+          businessType: "CHK",
+          status: 3,
+          billStatus: 0
+        });
+      } else if (this.tabsValue == "FFSQ") {
+        // 调用 销项发票业务数据
+        res = await finstlbillsList(page.currentPage, page.pageSize, {
+          ...Object.assign(params, this.query),
           businessType: "FFSQ",
           status: 3,
           billStatus: 0
         });
-      } else if (this.tabsValue == "D") {
+      }else if (this.tabsValue == "DCDD") {
         // 调用 销项发票业务数据
-        res = await fininvoicesList(page.currentPage, page.pageSize, {
+        res = await finstlbillsList(page.currentPage, page.pageSize, {
           ...Object.assign(params, this.query),
-          type: "销项",
+          businessType: "DCDD",
           status: 3,
           billStatus: 0
         });

+ 14 - 5
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -1161,7 +1161,7 @@ export default {
       });
     },
     // 详情接口
-    finstlbillsDetailfun(id,type) {
+    finstlbillsDetailfun(id, type) {
       this.pageLoading = true;
       finstlbillsDetail(id)
         .then(res => {
@@ -1223,14 +1223,23 @@ export default {
         });
     },
     // 结算按钮
-    generateFinStlBillsfun(id, dc) {
+    generateFinStlBillsfun(id, dc, type) {
+      let typeName = null;
       this.pageLoading = true;
-      if (dc == "C" || dc == "D") {
-        this.settlementType = dc;
+      this.settlementType = dc;
+      if (type == "CHK") {
+        typeName = "对账中心";
+      }
+      if (type == "FFSQ") {
+        typeName = "付费申请";
+      }
+      if (type == "DCDD") {
+        typeName = "收付相抵";
       }
       generateFinStlBills({
         billId: id,
-        dc: dc
+        dc: dc,
+        type: typeName
       })
         .then(res => {
           this.form = res.data.data;

+ 81 - 33
src/views/iosBasicData/dcOffset/assembly/finstlbillsitems.vue

@@ -24,7 +24,7 @@
           v-model="row.currentStlAmountRMB"
           @change="armbChange(row)"
           :controls="false"
-          placeholder="请输入 本次签收CNY"
+          placeholder="请输入 本次金额CNY"
           size="mini"
           style="width: 100%;"
           :disabled="row.currentStlCurCode != 'CNY'"
@@ -37,7 +37,7 @@
           v-model="row.currentStlAmountUSD"
           @change="ausdChange(row)"
           :controls="false"
-          placeholder="请输入 本次签收USD"
+          placeholder="请输入 本次金额USD"
           size="mini"
           style="width: 100%;"
           :disabled="row.currentStlCurCode != 'USD'"
@@ -139,13 +139,13 @@ export default {
             overHidden: true
           },
           {
-            label: "本次签收CNY",
+            label: "本次金额CNY",
             prop: "currentStlAmountRMB",
             width: 100,
             overHidden: true
           },
           {
-            label: "本次签收USD",
+            label: "本次金额USD",
             prop: "currentStlAmountUSD",
             width: 100,
             overHidden: true
@@ -163,7 +163,7 @@ export default {
             overHidden: true
           },
           {
-            label: "对",
+            label: "对",
             prop: "isChecked",
             width: 60,
             overHidden: true,
@@ -393,46 +393,94 @@ export default {
       this.pageData = this.queryData.slice(start, end);
     },
     armbChange(row) {
-      if (Number(row.amount - row.reconciliationAmount) > 0) {
-        if (Number(row.currentStlAmountRMB) < 0) {
-          row.currentStlAmountRMB = 0;
-          return this.$message.error("本次签收金额不能输入负数");
+      if (row.dc == "C") {
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountRMB) < 0) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountRMB) > Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountRMB = 0;
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountRMB) >= 0) {
+            row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountRMB) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
-      if (Number(row.amount - row.reconciliationAmount) < 0) {
-        if (row.currentStlAmountRMB >= 0) {
-          row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能输入非负数");
+      if (row.dc == "D") {
+        if (Number(row.amount - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountRMB) < 0) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountRMB) < Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountRMB) >= 0) {
+            row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountRMB) < Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
     },
     ausdChange(row) {
-      if (Number(row.amount - row.reconciliationAmount) > 0) {
-        if (Number(row.currentStlAmountUSD) < 0) {
-          row.currentStlAmountUSD = 0;
-          return this.$message.error("本次签收金额不能输入负数");
+      if (row.dc == "C") {
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountUSD) < 0) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountUSD) > Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountUSD = 0;
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountUSD) >= 0) {
+            row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountUSD) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
-      if (Number(row.amount - row.reconciliationAmount) < 0) {
-        if (row.currentStlAmountUSD >= 0) {
-          row.currentStlAmountUSD = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能输入非负数");
+      if (row.dc == "D") {
+        if (Number(row.amount - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountUSD) < 0) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountUSD) < Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountUSD = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountUSD) >= 0) {
+            row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountUSD) < Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
     },

+ 83 - 35
src/views/iosBasicData/dcOffset/assembly/finstlbillsitems2.vue

@@ -24,10 +24,10 @@
           v-model="row.currentStlAmountRMB"
           @change="armbChange(row)"
           :controls="false"
-          placeholder="请输入 本次签收CNY"
+          placeholder="请输入 本次金额CNY"
           size="mini"
           style="width: 100%;"
-          :disabled="row.currentStlCurCode != 'CNY' || row.isSignfor == 1"
+          :disabled="row.currentStlCurCode != 'CNY' || row.isSignfor == 1||form.status == 3"
         ></el-input-number>
         <span v-else>{{ row.currentStlAmountRMB }}</span>
       </tempalte>
@@ -37,10 +37,10 @@
           v-model="row.currentStlAmountUSD"
           @change="ausdChange(row)"
           :controls="false"
-          placeholder="请输入 本次签收USD"
+          placeholder="请输入 本次金额USD"
           size="mini"
           style="width: 100%;"
-          :disabled="row.currentStlCurCode != 'USD' || row.isSignfor == 1"
+          :disabled="row.currentStlCurCode != 'USD' || row.isSignfor == 1||form.status == 3"
         ></el-input-number>
         <span v-else>{{ row.currentStlAmountUSD }}</span>
       </tempalte>
@@ -133,7 +133,7 @@ export default {
           },
           
                     {
-            label: "对",
+            label: "对",
             prop: "isChecked",
             width: 60,
             overHidden: true,
@@ -174,13 +174,13 @@ export default {
             overHidden: true
           },
           {
-            label: "本次签收CNY",
+            label: "本次金额CNY",
             prop: "currentStlAmountRMB",
             width: 100,
             overHidden: true
           },
           {
-            label: "本次签收USD",
+            label: "本次金额USD",
             prop: "currentStlAmountUSD",
             width: 100,
             overHidden: true
@@ -395,46 +395,94 @@ export default {
       this.pageData = this.tableData.slice(start, end);
     },
     armbChange(row) {
-      if (Number(row.amount - row.reconciliationAmount) > 0) {
-        if (Number(row.currentStlAmountRMB) < 0) {
-          row.currentStlAmountRMB = 0;
-          return this.$message.error("本次签收金额不能输入负数");
+      if (row.dc == "C") {
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountRMB) < 0) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountRMB) > Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountRMB = 0;
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountRMB) >= 0) {
+            row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountRMB) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
-      if (Number(row.amount - row.reconciliationAmount) < 0) {
-        if (row.currentStlAmountRMB >= 0) {
-          row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能输入非负数");
+      if (row.dc == "D") {
+        if (Number(row.amount - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountRMB) < 0) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountRMB) < Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountRMB) >= 0) {
+            row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountRMB) < Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
     },
     ausdChange(row) {
-      if (Number(row.amount - row.reconciliationAmount) > 0) {
-        if (Number(row.currentStlAmountUSD) < 0) {
-          row.currentStlAmountUSD = 0;
-          return this.$message.error("本次签收金额不能输入负数");
+      if (row.dc == "C") {
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountUSD) < 0) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountUSD) > Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountUSD = 0;
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountUSD) >= 0) {
+            row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountUSD) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
-      if (Number(row.amount - row.reconciliationAmount) < 0) {
-        if (row.currentStlAmountUSD >= 0) {
-          row.currentStlAmountUSD = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能输入非负数");
+      if (row.dc == "D") {
+        if (Number(row.amount - row.stlTtlAmount) > 0) {
+          if (Number(row.currentStlAmountUSD) < 0) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能输入负数");
+          }
+          if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = 0;
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
-        if (Number(row.currentStlAmountUSD) < Number(row.amount - row.reconciliationAmount)) {
-          row.currentStlAmountUSD = Number(row.amount - row.reconciliationAmount);
-          return this.$message.error("本次签收金额不能超过未对账金额");
+        if (Number(row.amount - row.stlTtlAmount) < 0) {
+          if (Number(row.currentStlAmountUSD) >= 0) {
+            row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能输入非负数");
+          }
+          if (Number(row.currentStlAmountUSD) < Number(row.amount - row.stlTtlAmount)) {
+            row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount);
+            return this.$message.error("本次对抵金额不能超过未对抵金额");
+          }
         }
       }
     },

+ 130 - 111
src/views/iosBasicData/dcOffset/finstlbillsDetails.vue

@@ -30,7 +30,7 @@
           v-if="form.status == 3"
           :loading="saveLoading"
           @click="finstlbillsRevokeReconciliationfun"
-          >撤销完成
+          >撤销对抵
         </el-button>
         <el-button
           size="small"
@@ -38,10 +38,10 @@
           plain
           style="margin-right: 8px"
           :disabled="!form.id || editPower"
-          v-if="form.status == 2"
+          v-if="form.id && form.status == 0"
           :loading="saveLoading"
-          @click="submit('确认完成')"
-          >确认完成
+          @click="submit('确认对抵')"
+          >确认对抵
         </el-button>
         <el-button
           size="small"
@@ -65,7 +65,7 @@
           <el-row>
             <el-row>
               <el-col :span="11">
-                <el-form-item label="对单位" prop="corpCnName">
+                <el-form-item label="对单位" prop="corpCnName">
                   <el-col :span="10">
                     <search-query
                       :datalist="corpData"
@@ -75,7 +75,7 @@
                       :filterable="true"
                       :remote="true"
                       :buttonIf="false"
-                      placeholder="请选择对单位"
+                      placeholder="请选择对单位"
                       :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
                       @corpChange="corpChange($event, 'corpCnName')"
                       @remoteMethod="corpBcorpsListfun"
@@ -92,7 +92,7 @@
                       autocomplete="off"
                       :disabled="editSave"
                       clearable
-                      placeholder="对单位"
+                      placeholder="对单位"
                     >
                     </el-input>
                   </el-col>
@@ -223,7 +223,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="3">
-                <el-form-item label="对" prop="isChecked" label-width="50px">
+                <el-form-item label="对" prop="isChecked" label-width="50px">
                   <search-query
                     :datalist="isCheckedData"
                     :selectValue="form.isChecked"
@@ -238,7 +238,7 @@
                 </el-form-item>
               </el-col>
               <!--<el-col :span="4">-->
-              <!--    <el-form-item label="对" prop="isChecked" label-width="50px">-->
+              <!--    <el-form-item label="对" prop="isChecked" label-width="50px">-->
               <!--        <search-query :datalist="allyesnoData"-->
               <!--                      :selectValue="form.isChecked"-->
               <!--                      :clearable="true"-->
@@ -505,7 +505,7 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="5">
-                  <el-form-item label="对单号" prop="checkNo">
+                  <el-form-item label="对单号" prop="checkNo">
                     <el-input
                       style="width: 100%;"
                       v-model="form.billNo"
@@ -513,13 +513,13 @@
                       autocomplete="off"
                       :disabled="true"
                       clearable
-                      placeholder="请输入对单号"
+                      placeholder="请输入对单号"
                     >
                     </el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="5">
-                  <el-form-item label="对日期" prop="billDate">
+                  <el-form-item label="对日期" prop="billDate">
                     <el-date-picker
                       v-model="form.billDate"
                       clearable
@@ -528,7 +528,7 @@
                       size="small"
                       :disabled="editSave"
                       value-format="yyyy-MM-dd HH:mm"
-                      placeholder="请选择对日期"
+                      placeholder="请选择对日期"
                     >
                     </el-date-picker>
                   </el-form-item>
@@ -742,7 +742,9 @@ import {
   finstlbillsConfirmInvoicing,
   finstlbillsRevokeInvoicing,
   batchConfirmReconciliation,
-  batchRevokeReconciliation
+  batchRevokeReconciliation,
+  confirmOffset,
+  revokeOffset
 } from "@/api/iosBasicData/finstlbills";
 import expand from "@/components/basic-container/expand.vue";
 import queryfinstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
@@ -768,10 +770,10 @@ export default {
   },
   data() {
     return {
-      amountDSubSum:0,
-      amountDSubUsdSum:0,
-      amountCSubSum:0,
-      amountCSubUsdSum:0,
+      amountDSubSum: 0,
+      amountDSubUsdSum: 0,
+      amountCSubSum: 0,
+      amountCSubUsdSum: 0,
       activeName: "1",
       retrievePopupsType: false, // 弹窗开启关闭
       retrievePopupsData: [], // 选择弹窗数据
@@ -811,7 +813,7 @@ export default {
       saveLoading: false, // 按钮动画
       // 绑定的数据
       form: {
-        billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对日期 默认 当天
+        billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对日期 默认 当天
         isApproved: "0",
         isSignfor: "0",
         isCleared: null, // 销账
@@ -821,9 +823,9 @@ export default {
         approvedDate: []
       },
       handleSelectionData: [], // 表格选择的数据
-      corpData: [], // 对单位 数据
+      corpData: [], // 对单位 数据
       allyesnoData: [], // 全部是否字典数据
-      isCheckedData: [], // 对状态字典数据
+      isCheckedData: [], // 对状态字典数据
       isClearedData: [], // 销项
       isInvoiceData: [], // 发票字典
       // 收 / 付
@@ -959,7 +961,7 @@ export default {
     finstlbillsRevokeReconciliation,
     // 下拉回调
     corpChange(value, name) {
-      // 对单位
+      // 对单位
       if (name == "corpCnName") {
         if (!value) {
           this.$set(this.form, "corpId", "");
@@ -1045,15 +1047,15 @@ export default {
     },
     // 保存
     editCustomer(type) {
-      // 对单位
+      // 对单位
       if (!this.form.corpId) {
-        this.$message.warning("请选择对单位");
+        this.$message.warning("请选择对单位");
         return;
       }
       if (!this.form.id) {
         // 是否选择从表数据
         if (this.addData.length == 0) {
-          this.$message.warning("请选择对数据");
+          this.$message.warning("请选择对数据");
           return;
         }
       }
@@ -1063,9 +1065,9 @@ export default {
       //     return;
       //   }
       // }
-      this.form.billNoFormat = "HYDZ";
-      this.form.businessTypeCode = "HYDZ";
-      this.form.businessType = "DCDD"; // 对
+      this.form.billNoFormat = "DCDD";
+      this.form.businessTypeCode = "DCDD";
+      this.form.businessType = "DCDD"; // 对
       this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
       this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1100,7 +1102,7 @@ export default {
       });
       this.saveLoading = true; // 加载动画
       this.pageLoading = true;
-      // 判断是单独点击保存还是点击确认对
+      // 判断是单独点击保存还是点击确认对
       if (type == "toAddEdit") {
         finstlbillsSubmit(this.form)
           .then(res => {
@@ -1111,11 +1113,20 @@ export default {
             this.pageLoading = false;
             this.saveLoading = false;
           });
-      } else if (type == "确认完成") {
+      } else if (type == "确认对抵") {
         finstlbillsSubmit(this.form)
           .then(res => {
-            this.form = res.data.data;
-            this.finstlbillsConfirmReconciliationfun();
+            // this.form = res.data.data;
+            // this.finstlbillsConfirmReconciliationfun();
+            confirmOffset(this.form)
+              .then(res => {
+                this.$message.success("操作成功");
+                this.finstlbillsDetailfun(this.form.id);
+              })
+              .catch(() => {
+                this.pageLoading = false;
+                this.saveLoading = false;
+              });
           })
           .catch(() => {
             this.pageLoading = false;
@@ -1151,12 +1162,12 @@ export default {
       }
     },
     submit(type) {
-      for (let item of this.tableData) {
-        if (item.isChecked != 1) {
-          return this.$message.error("明细数据未完成对!");
-        }
-      }
-      this.$confirm("确定进行确认完成操作?", {
+      // for (let item of this.tableData) {
+      //   if (item.isChecked != 1) {
+      //     return this.$message.error("明细数据未完成对!");
+      //   }
+      // }
+      this.$confirm("确定进行确认对抵操作?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
@@ -1189,6 +1200,9 @@ export default {
           } else {
             this.editPower = false;
           }
+          if (this.form.status == 3) {
+            this.editSave = true;
+          }
           // 判断是否已经提交过了
           if (this.form.billStatus == 1) {
             this.submitType = true;
@@ -1223,12 +1237,13 @@ export default {
         })
         .finally(() => {
           this.pageLoading = false;
+          this.saveLoading = false;
         });
     },
     // 重置条件
     ResetFilter() {
       this.form = {
-        billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对日期 默认 当天
+        billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对日期 默认 当天
         isApproved: "0",
         isSignfor: "0",
         isCleared: null, // 销账
@@ -1250,13 +1265,13 @@ export default {
     },
     // 检索
     retrievalfun() {
-      // 判断是否有对单位
+      // 判断是否有对单位
       if (!this.form.corpId && (this.form.businessNo || this.form.accountNo || this.form.hblno || this.form.mblno)) {
         console.log("新接口");
         this.finstlbillslistAccBillByCorpfun();
       } else {
         if (!this.form.corpId) {
-          return this.$message.warning("请填写对单位");
+          return this.$message.warning("请填写对单位");
         }
         console.log("原来的接口");
         this.finstlbillslistAccBillV1fun();
@@ -1269,7 +1284,7 @@ export default {
       let obj = {};
       obj.type = "1";
       obj.auditStatus = this.form.isApproved; // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
-      obj.corpCnName = this.form.corpId; // 对单位
+      obj.corpCnName = this.form.corpId; // 对单位
       obj.isSignfor = this.form.isSignfor; // 是否已签收(0 否 1是)
       obj.dc = this.form.dc; // 收付 D=收 C=付
       obj.curCode = this.form.curCode; // 币别
@@ -1280,7 +1295,7 @@ export default {
       obj.billNo = this.form.businessNo; // 单据编号  JOB NO
       obj.mblno = this.form.mblno; // MB/L NO
       obj.hblno = this.form.hblno; // HB/L NO
-      obj.isChecked = this.form.isChecked; // 是否对账(0 未对账 1 已对账
+      obj.isChecked = this.form.isChecked; // 是否对抵(0 未对抵 1 已对抵
       obj.queryAmount = this.form.queryAmount; // 查询金额
       obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       obj.invoiceStatus = this.form.isInvoice; // 发票状态 0 = 未开 9=已开 2 待开 3 不开
@@ -1308,58 +1323,58 @@ export default {
       // delete this.form.id;
       // let obj = JSON.parse(JSON.stringify(this.form))
       let obj = {};
-      obj.type = "1";
-      obj.auditStatus = this.form.isApproved; // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
-      obj.corpCnName = this.form.corpId; // 对账单位
-      obj.isSignfor = this.form.isSignfor; // 是否已签收(0 否 1是)
-      obj.dc = this.form.dc; // 收付 D=收 C=付
+      obj.type = "9";
       obj.curCode = this.form.curCode; // 币别
-      obj.srcType = this.form.srcType; // 业务来源
-      obj.srcCnName = this.form.srcId; // 业务员id
-      obj.isCleared = this.form.isCleared; // 是否销账(0 未销账 3 部分销账 9 销账)
+      obj.dc = this.form.dc; // 收付 D=收 C=付
       obj.accBillNo = this.form.accountNo; // 账单编号  ACCT NO
       obj.billNo = this.form.businessNo; // 单据编号  JOB NO
       obj.mblno = this.form.mblno; // MB/L NO
       obj.hblno = this.form.hblno; // HB/L NO
-      obj.isChecked = this.form.isChecked; // 是否对账(0 未对账 1 已对账)
       obj.queryAmount = this.form.queryAmount; // 查询金额
       obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
-      obj.invoiceStatus = this.form.isInvoice; // 发票状态 0 = 未开 9=已开 2 待开 3 不开
+      obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
       obj.vesselCnName = this.form.vesselCnName; // 中文船名
-      obj.invoiceNo = this.form.invoiceNo; // 发票号
-      obj.bookingNo = this.form.bookingNo; // 订舱号 BKNO
-      obj.createUserName = this.form.updateUser ? this.form.updateUser : null; // 操作员id
       obj.receivableAdvance = this.form.receivableAdvance; // 预收帐款
-      obj.threeInspectionsNo = this.form.threeInspectionsNo; // 三检单号
       obj.voyageNo = this.form.voyageNo; // 航次
-      obj.businessDateStart = this.form.businessDateStart; // 业务开始日期
-      obj.businessDateEnd = this.form.businessDateEnd; // 业务结束日期
-      obj.billDateStart = this.form.accountDateFrom; // 财务开始日期
-      obj.billDateEnd = this.form.accountDateTo; // 财务开始日期
-      obj.approveTimeStart = this.form.auditDateFrom; // 审核开始日期
-      obj.approveTimeEnd = this.form.auditDateTo; // 审核结束日期
-      obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
+      obj.auditStatus = "0";
+      obj.businessDateStart = this.form.businessDateStart; // 财务开始日期
+      obj.businessDateEnd = this.form.businessDateEnd; // 财务结束日期
+      obj.corpCnName = this.form.corpId; // 结算单位
+      obj.checkBillNo = this.form.checkNo; // CHK NO 对账单号
       finstlbillslistAccBillV1(obj).then(res => {
         res.data.data.forEach((item, index) => {
           item.accBillId = item.id;
           delete item.id;
-          item.lineNo = Number(index) + 1;
-          this.$set(item, "currentStlCurCode", item.curCode);
-          this.$set(item, "currentStlExrate", item.exrate);
+          // 账单编号
           item.accBillNo = item.billNo;
+          item.currentStlCurCode = item.curCode; // 币别
+          item.currentStlExrate = item.exrate; // 汇率
+          // quantity
+          // quantityCntrTypesDescr
+          item.lineNo = Number(index) + 1;
+          item.pType = item.businessType;
           item.billNo = item.businessBillDivideNo ? item.businessBillDivideNo : item.businessBillNo;
+          item.accDate = item.billDate;
           item.dc = item.accountDc; // 收付
           if (item.curCode == "CNY") {
+            // 发票
+            this.$set(item, "currentInvoiceAmountRMB", item.currentInvoiceAmount);
+            // 应结算金额
             this.$set(item, "amountRMB", item.amount);
-            this.$set(item, "currentInvoiceAmountRMB", Number(item.currentInvoiceAmount ? item.currentInvoiceAmount : 0));
-            this.$set(item, "unsettledAmountRMB", Number(item.unsettledAmount ? item.unsettledAmount : 0));
-            this.$set(item, "currentStlAmountRMB", Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0));
+            // 已结算金额
+            this.$set(item, "stlTtlAmountRMB", item.stlTtlAmount);
+            // 本次金额
+            this.$set(item, "currentStlAmountRMB", Number(item.appliedCurrentStlAmount ? item.appliedCurrentStlAmount : 0));
             this.$set(item, "currentStlAmountUSD", Number(0));
           } else {
+            // 发票
+            this.$set(item, "currentInvoiceAmountUSD", item.currentInvoiceAmount);
+            // 应结算金额
             this.$set(item, "amountUSD", item.amount);
-            this.$set(item, "currentInvoiceAmountUSD", Number(item.currentInvoiceAmount ? item.currentInvoiceAmount : 0));
-            this.$set(item, "unsettledAmountUSD", Number(item.unsettledAmount ? item.unsettledAmount : 0));
-            this.$set(item, "currentStlAmountUSD", Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0));
+            // 已结算金额
+            this.$set(item, "stlTtlAmountUSD", item.stlTtlAmount);
+            // 本次金额
+            this.$set(item, "currentStlAmountUSD", Number(item.appliedCurrentStlAmount ? item.appliedCurrentStlAmount : 0));
             this.$set(item, "currentStlAmountRMB", Number(0));
           }
         });
@@ -1440,9 +1455,9 @@ export default {
     },
     // 确认发票接口
     finstlbillsConfirmInvoicingfun(type) {
-      this.form.billNoFormat = "HYDZ";
-      this.form.businessTypeCode = "HYDZ";
-      this.form.businessType = "DCDD"; //对
+      this.form.billNoFormat = "DCDD";
+      this.form.businessTypeCode = "DCDD";
+      this.form.businessType = "DCDD"; //对
       this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
       this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1470,9 +1485,9 @@ export default {
     },
     // 撤销发票接口
     finstlbillsRevokeInvoicingfun() {
-      this.form.billNoFormat = "HYDZ";
-      this.form.businessTypeCode = "HYDZ";
-      this.form.businessType = "DCDD"; // 对
+      this.form.billNoFormat = "DCDD";
+      this.form.businessTypeCode = "DCDD";
+      this.form.businessType = "DCDD"; // 对
       this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
       this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1494,7 +1509,7 @@ export default {
           this.pageLoading = false;
         });
     },
-    // 对确认
+    // 对确认
     finstlbillsConfirmReconciliationfun() {
       this.pageLoading = true;
       this.saveLoading = true;
@@ -1508,7 +1523,7 @@ export default {
       this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
       this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
       (this.form.url = "/iosBasicData/finstlbills/index"), (this.form.pageStatus = "this.$store.getters.paidapplication");
-      this.form.pageLabel = "对中心(F)";
+      this.form.pageLabel = "对中心(F)";
       finstlbillsConfirmReconciliation(this.form)
         .then(res => {
           this.$message.success("操作成功");
@@ -1520,24 +1535,28 @@ export default {
           this.saveLoading = false;
         });
     },
-    // 对撤销
+    // 对撤销
     finstlbillsRevokeReconciliationfun() {
-      this.$confirm("确定进行撤销对操作?", {
+      this.$confirm("确定进行撤销对操作?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
         this.pageLoading = true;
-        this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
-        this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
-        this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
-        this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
-        this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
-        this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
-        this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
-        this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
-        this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
-        finstlbillsRevokeReconciliation(this.form)
+        let obj = {
+          ...this.form,
+          businessTypes: this.form.businessTypes ? this.form.businessTypes.join(",") : "", // 业务类型
+          feeCnName: this.form.feeCnName ? this.form.feeCnName.join(",") : "",
+          accountDateFrom: this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null, // 财务开始日期
+          accountDateTo: this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null, // 财务开始日期
+          auditDateFrom: this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null,
+          auditDateTo: this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null,
+          businessDateEnd: this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null,
+          businessDateStart: this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null,
+          billDate: this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null
+        };
+
+        revokeOffset(obj)
           .then(res => {
             this.$message.success("操作成功");
             this.finstlbillsDetailfun(res.data.data.id);
@@ -1597,17 +1616,17 @@ export default {
           return this.$message.error("请选择已签收的数据");
         }
         if (item.isChecked == 1) {
-          return this.$message.error("请选择未对的数据");
+          return this.$message.error("请选择未对的数据");
         }
       }
-      this.$confirm("是否对?", {
+      this.$confirm("是否对?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.form.billNoFormat = "HYDZ";
-        this.form.businessTypeCode = "HYDZ";
-        this.form.businessType = "DCDD"; //对
+        this.form.billNoFormat = "DCDD";
+        this.form.businessTypeCode = "DCDD";
+        this.form.businessType = "DCDD"; //对
         this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
         this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
         this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1637,17 +1656,17 @@ export default {
       }
       for (let item of this.handleSelectionData) {
         if (item.isChecked == 0) {
-          return this.$message.error("请选择已对的数据");
+          return this.$message.error("请选择已对的数据");
         }
       }
-      this.$confirm("是否撤销对?", {
+      this.$confirm("是否撤销对?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.form.billNoFormat = "HYDZ";
-        this.form.businessTypeCode = "HYDZ";
-        this.form.businessType = "DCDD"; // 对
+        this.form.billNoFormat = "DCDD";
+        this.form.businessTypeCode = "DCDD";
+        this.form.businessType = "DCDD"; // 对
         this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
         this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
         this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1748,9 +1767,9 @@ export default {
     // 请求的接口
     // 确认签收接口
     finstlbillsConfirmSignForfun() {
-      this.form.billNoFormat = "HYDZ";
-      this.form.businessTypeCode = "HYDZ";
-      this.form.businessType = "DCDD"; //对
+      this.form.billNoFormat = "DCDD";
+      this.form.businessTypeCode = "DCDD";
+      this.form.businessType = "DCDD"; //对
       this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
       this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1774,9 +1793,9 @@ export default {
     },
     // 撤销签收接口
     finstlbillsRevokeSignForfun() {
-      this.form.billNoFormat = "HYDZ";
-      this.form.businessTypeCode = "HYDZ";
-      this.form.businessType = "DCDD"; // 对
+      this.form.billNoFormat = "DCDD";
+      this.form.businessTypeCode = "DCDD";
+      this.form.businessType = "DCDD"; // 对
       this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(",") : ""; // 业务类型
       this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(",") : "";
       this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
@@ -1804,7 +1823,7 @@ export default {
       getWorkDicts("all_yes_no").then(res => {
         this.allyesnoData = res.data.data;
       });
-      // 对字典
+      // 对字典
       getWorkDicts("los_check_status").then(res => {
         this.isCheckedData = res.data.data;
       });
@@ -1851,7 +1870,7 @@ export default {
         this.srcData = res.data.data.records;
       });
     },
-    // 获取对单位数据
+    // 获取对单位数据
     corpBcorpsListfun(cnName) {
       getBcorpslistByType(1, 10, { cnName }).then(res => {
         this.corpData = res.data.data.records;

+ 13 - 6
src/views/iosBasicData/dcOffset/index.vue

@@ -65,7 +65,7 @@
                   : true
                 : true
             "
-            :disabled="row.status!=0"
+            :disabled="row.status != 0"
             @click="rowDel(row)"
             >删除
           </el-button>
@@ -587,6 +587,13 @@ export default {
     this.$store.commit("DZZXF_IN_DETAIL");
     this.dictionaryfun(); // 获取字典数据
   },
+  activated() {
+    if (this.$route.query.id) {
+      setTimeout(() => {
+        this.editFun({ id: this.$route.query.id });
+      }, 200);
+    }
+  },
   methods: {
     handleClick() {
       this.page.currentPage = 1;
@@ -806,11 +813,11 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
-      let obj = { 
-        ...Object.assign(params, this.query), 
-        businessType: "DCDD", 
-        status:this.activeName!=4?this.activeName:'',
-        billStatus:this.activeName==4?1:''
+      let obj = {
+        ...Object.assign(params, this.query),
+        businessType: "DCDD",
+        status: this.activeName != 4 ? this.activeName : "",
+        billStatus: this.activeName == 4 ? 1 : ""
       };
       this.loading = true;
       finstlbillsList(page.currentPage, page.pageSize, obj).then(res => {

+ 13 - 6
src/views/iosBasicData/finstlbills/index.vue

@@ -66,7 +66,7 @@
                   : true
                 : true
             "
-            :disabled="row.status!=0"
+            :disabled="row.status != 0"
             @click="rowDel(row)"
             >删除
           </el-button>
@@ -588,6 +588,13 @@ export default {
     this.$store.commit("DZZXF_IN_DETAIL");
     this.dictionaryfun(); // 获取字典数据
   },
+  activated() {
+    if (this.$route.query.id) {
+      setTimeout(() => {
+        this.editFun({ id: this.$route.query.id });
+      }, 200);
+    }
+  },
   methods: {
     handleClick() {
       this.page.currentPage = 1;
@@ -807,11 +814,11 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
-      let obj = { 
-        ...Object.assign(params, this.query), 
-        businessType: "CHK", 
-        status:this.activeName!=4?this.activeName:'',
-        billStatus:this.activeName==4?1:''
+      let obj = {
+        ...Object.assign(params, this.query),
+        businessType: "CHK",
+        status: this.activeName != 4 ? this.activeName : "",
+        billStatus: this.activeName == 4 ? 1 : ""
       };
       this.loading = true;
       finstlbillsList(page.currentPage, page.pageSize, obj).then(res => {