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

feat: 添加对账明细组件到付款信息对话框,并更新初始化方法以支持类型参数

xieyong пре 18 часа
родитељ
комит
7fd5a63c6c

+ 28 - 2
src/views/financialManage/payableManage/components/detailDialog.vue

@@ -137,6 +137,16 @@
         </el-row>
         <headerTitle title="付款信息"></headerTitle>
         <info-table ref="feeRelatedInfoTable" dialog-type="view" v-if="form.id" :form.sync="form" @invoiceChange="init"></info-table>
+
+        <headerTitle title="对账明细" style="margin-top: 30px"></headerTitle>
+        <account-detail-table
+          ref="accountDetailTableRef"
+          :datasource.sync="datasource"
+          dialogType="view"
+          :queryDimension="form.queryDimension"
+          @totalChange="handleTotalChange"
+          @countChange="handleCountChange"
+        ></account-detail-table>
       </el-form>
     </div>
     <bpmDetail v-if="activeComp === 'bpm' && form.processInstanceId" :id="form.processInstanceId"></bpmDetail>
@@ -159,11 +169,14 @@ import infoTable from "@/views/financialManage/payableManage/components/infoTabl
 import bpmDetail from "@/views/bpm/processInstance/detail.vue";
 import { payAndReceiveEnum } from "@/enum/dict";
 
+import AccountDetailTable from '@/views/saleManage/saleOrder/accountstatement/components/accountDetailTable.vue';
+
 export default {
   mixins: [dictMixins],
   components: {
     bpmDetail,
     infoTable,
+    AccountDetailTable,
     // fileMain
   },
 
@@ -195,6 +208,7 @@ export default {
         unpaidTotalPrice: 0
       },
       accountingSubjectList: [],
+      datasource: [],
       rules: {
         accountingSubjectId: {required: true, message: '请选择', trigger: 'change'},
         receivableDate: {required: true, message: '请选择', trigger: 'change'},
@@ -212,13 +226,25 @@ export default {
   },
   methods: {
     //获取详情
-    async init(id) {
+    async init(id, type) {
+      this.dialogType = type;
       await this.getClassifyList(24, 'accountingSubjectList')
-      this.form = await getFinPayableInfoAPI(id)
+      const data = await getFinPayableInfoAPI(id)
+      this.form = {
+        ...this.form,
+        ...data
+      }
+      this.datasource = data.productList || []
       this.$nextTick(()=>{
         this.$refs.feeRelatedInfoTable.init()
       })
     },
+    handleTotalChange(total) {
+      this.form.amountTotalPrice = total;
+    },
+    handleCountChange(count) {
+      this.form.totalStatementCount = count;
+    },
     downloadFile(file) {
       getFile({objectName: file.storePath}, file.name);
     },

+ 1 - 1
src/views/financialManage/payableManage/index.vue

@@ -479,7 +479,7 @@
       handleDetail(row = {}, type) {
         this.detailDialogFlag = true;
         this.$nextTick(() => {
-          this.$refs.detailDialogRef.init(row.id);
+          this.$refs.detailDialogRef.init(row.id, type);
         });
       },
       handleInvoiceDetail(row = {}, type) {