liujt 1 неделя назад
Родитель
Сommit
543672fdb6

+ 9 - 0
src/api/financialManage/prepayment/index.js

@@ -44,3 +44,12 @@ export async function deletePrepayment(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 撤销
+export async function withdrawPrepayment(data) {
+  const res = await request.post(`/eom/finprepay/withdraw?id=${data.id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 6 - 2
src/views/financialManage/advanceReceipt/components/addDialog.vue

@@ -242,7 +242,7 @@
       @changeParent="changeOrder"
     ></saleOrderListDialog>
     <!-- 收款条件 -->
-    <receiveTermsDialog ref="receiveTermsDialogRef" @changeParent="changeReceiveTerms"></receiveTermsDialog>
+    <receiveTermsDialog ref="receiveTermsDialogRef" conditionType="rules" @changeParent="changeReceiveTerms"></receiveTermsDialog>
     <bpmDetail
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
@@ -341,6 +341,7 @@
           advanceTotalPrice: '',
           accountingSubjectId: '1779719367139792005',
           accountingSubjectCode: '2203',
+          accountingSubjectName: '预收账款',
           contactName: '',
           contactId: '',
           sourceType: 3,
@@ -434,14 +435,16 @@
           });
           this.form.accountingSubjectId = '1779719367139792005';
           this.form.accountingSubjectCode = '2203';
+          this.form.accountingSubjectName = '预收账款';
         }
         this.$nextTick(() => {
           this.$refs.form && this.$refs.form.clearValidate();
         });
       },
       changeSubjectInfo(val) {
-        const { code } = this.$refs.treeSelect.getNodeByValue(val);
+        const { code, name } = this.$refs.treeSelect.getNodeByValue(val);
         this.form.accountingSubjectCode = code;
+        this.form.accountingSubjectName = name;
       },
       //获取分类管理中的数据
       async getClassifyList(id, listName) {
@@ -500,6 +503,7 @@
           advanceTotalPrice: '',
           accountingSubjectId: '1779719367139792005',
           accountingSubjectCode: '2203',
+          accountingSubjectName: '预收账款',
           contactName: '',
           contactId: '',
           sourceType: 3,

+ 8 - 4
src/views/financialManage/advanceReceipt/components/receiveTermsDialog.vue

@@ -81,6 +81,10 @@
             type: Boolean,
             default: false
         },
+        conditionType: {
+            type: String,
+            default: ''
+        },
     },
     data() {
       return {
@@ -140,14 +144,14 @@
                 },
                 {
                     prop: 'name',
-                    label: '收款条件名称',
+                    label: this.conditionType === 'rules' ? '收款日计算日期' : '付款日条件名称',
                     align: 'center',
                     showOverflowTooltip: true,
                     minWidth: 160
                 },
                 {
                     prop: 'dateType',
-                    label: '收款日计算日期',
+                    label: this.conditionType === 'rules' ? '收款日计算日期' : '付款日计算日期',
                     align: 'center',
                     showOverflowTooltip: true,
                     minWidth: 160,
@@ -167,7 +171,7 @@
                 },
                 {
                     prop: 'determinationMethod',
-                    label: '收款日确认方式',
+                    label: this.conditionType === 'rules' ? '收款日确认方式' : '付款日确认方式',
                     align: 'center',
                     showOverflowTooltip: true,
                     minWidth: 140,
@@ -231,7 +235,7 @@
         const res = await receiveTermsPageList({
           pageNum: page,
           size: limit,
-          conditionConfigurationType: 'rules',
+          conditionConfigurationType: this.conditionType,
           ruleState: 1,
           ...where
         });

+ 55 - 0
src/views/financialManage/advanceReceipt/index.vue

@@ -20,6 +20,7 @@
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
             <el-button
+              v-if="$hasPermission('eom:finadvance:save')"
               size="small"
               type="primary"
               icon="el-icon-plus"
@@ -243,6 +244,60 @@
               return reviewStatus[_row.approvalStatus];
             }
           },
+          {
+            prop: 'accountingSubjectName',
+            label: '会计科目',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'sourceType',
+            label: '来源类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              if (cellValue === 2) return '合同';
+              if (cellValue === 3) return '销售订单';
+              return '';
+            }
+          },
+          {
+            prop: 'sourceCode',
+            label: '来源编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'fundTypeName',
+            label: '款项类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'collectionConditionName',
+            label: '收款条件',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
           {
             columnKey: 'action',
             label: '操作',

+ 279 - 27
src/views/financialManage/prepayment/components/addDialog.vue

@@ -9,11 +9,24 @@
     :title="isDetail ? '预付款详情' : (isUpdate ? '修改预付款' : '新增预付款')"
     @update:visible="updateVisible"
   >
+    <div class="switch_left" v-if="isDetail">
+      <ul>
+        <li
+          v-for="item in tabOptions"
+          :key="item.key"
+          :class="{ active: activeComp == item.key }"
+          @click="activeComp = item.key"
+        >
+          {{ item.name }}
+        </li>
+      </ul>
+    </div>
     <el-form
       ref="form"
       :model="form"
       :rules="rules"
       label-width="120px"
+      v-show="activeComp == 'main'"
     >
       <!-- 基本信息 -->
       <headerTitle title="基本信息" size="16px"></headerTitle>
@@ -63,20 +76,14 @@
       <el-row :gutter="20">
         <el-col :span="8">
           <el-form-item label="供应商名称:" prop="contactName">
-            <el-select
+            <el-input
+              clearable
               v-model="form.contactName"
+              @click.native="$refs.parentRef.open()"
               placeholder="请选择"
-              style="width: 100%"
+              readonly
               :disabled="isDetail"
-              filterable
-            >
-              <el-option
-                v-for="item in supplierOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
+            />
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -94,7 +101,7 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="来源编码:" prop="sourceCode">
-            <el-select
+            <!-- <el-select
               v-model="form.sourceCode"
               placeholder="请选择"
               style="width: 100%"
@@ -107,7 +114,15 @@
                 :label="item.label"
                 :value="item.value"
               />
-            </el-select>
+            </el-select> -->
+            <el-input
+              clearable
+              v-model="form.sourceCode"
+              @click.native="openSource"
+              placeholder="请选择"
+              :disabled="isDetail"
+              readonly
+            />
           </el-form-item>
         </el-col>
       </el-row>
@@ -126,7 +141,7 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="付款条件:" prop="paymentConditionName">
-            <el-select
+            <!-- <el-select
               v-model="form.paymentConditionName"
               placeholder="请选择"
               style="width: 100%"
@@ -138,7 +153,15 @@
                 :label="item.label"
                 :value="item.value"
               />
-            </el-select>
+            </el-select> -->
+            <el-input
+              clearable
+              v-model="form.paymentConditionName"
+              @click.native="openReceiveTerms"
+              placeholder="请选择"
+              :disabled="isDetail"
+              readonly
+            />
           </el-form-item>
         </el-col>
       </el-row>
@@ -155,7 +178,7 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="附件:" prop="files">
-            <fileMain v-model="form.files" :disabled="isDetail"></fileMain>
+            <fileMain v-model="form.files" :type="isDetail ? 'view' : 'add'"></fileMain>
           </el-form-item>
         </el-col>
       </el-row>
@@ -169,6 +192,28 @@
         :isSelected="false"
         cacheKeyUrl="eos-prepayment-inventoryTableDetails"
       ></inventoryTableDetails>
+
+      <!-- 付款信息 -->
+       <div style="margin-top: 20px" v-if="isDetail">
+        <headerTitle title="付款信息"></headerTitle>
+        <div style="margin: 10px 0; font-size: 14px; color: #606266;">
+          <span>预付金额:{{ form.amount || 0 }} 元</span>
+          <span style="margin-left: 20px;">已付金额:{{ paidAmount }} 元</span>
+          <span style="margin-left: 20px;">未付金额:{{ unpaidAmount }} 元</span>
+        </div>
+
+        <ele-pro-table
+          ref="table"
+          :needPage="false"
+          :columns="columns"
+          :datasource="form.detailList"
+          :toolkit="[]"
+        >
+          <template v-slot:files="{ row: r }">
+            <fileMain v-model="r.files" type="view" :limit="1"></fileMain>
+          </template>
+        </ele-pro-table>
+       </div>
     </el-form>
 
     <template v-slot:footer>
@@ -176,12 +221,53 @@
         <el-button @click="updateVisible(false)">关闭</el-button>
       </template>
       <template v-else>
-        <el-button type="primary" :loading="loading" @click="save">
-          确定
+        <el-button type="primary" :loading="loading" @click="save(0)">
+          保存
+        </el-button>
+        <el-button type="primary" :loading="loading" @click="save(1)">
+          提交
         </el-button>
         <el-button @click="updateVisible(false)">取消</el-button>
       </template>
     </template>
+    <contractListDialog
+      ref="selectContractRef"
+      @changeParent="changeContract"
+      :isChange="true"
+      :type="2"
+      :contactData="{
+        id: form.contactId
+      }"
+    ></contractListDialog>
+    <!-- 采购订单   -->
+    <orderListDialog
+      ref="orderListDialogRef"
+      :isMy="true"
+      :contactData="{
+        id: form.contactId
+      }"
+      @changeParent="changeOrder"
+    ></orderListDialog>
+    <!-- 供应商 -->
+    <parentList
+      ref="parentRef"
+      @changeParent="changeParent"
+      :classType="2"
+    ></parentList>
+    <!-- 付款条件 -->
+    <receiveTermsDialog ref="receiveTermsDialogRef" conditionType="terms" @changeParent="changeReceiveTerms"></receiveTermsDialog>
+    <bpmDetail
+      v-if="activeComp === 'bpm' && form.processInstanceId"
+      :id="form.processInstanceId"
+    ></bpmDetail>
+
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </ele-modal>
 </template>
 
@@ -189,25 +275,45 @@
   import headerTitle from '@/components/header-title';
   import inventoryTableDetails from '@/BIZComponents/inventoryTableDetails.vue';
   import fileMain from '@/components/addDoc/index.vue';
-  import { addPrepayment, updatePrepayment } from '@/api/financialManage/prepayment';
+  import { addPrepayment, updatePrepayment, getPrepaymentInfo } from '@/api/financialManage/prepayment';
   import { getTreeByPid } from '@/api/classifyManage';
+  import parentList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
+  import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
+  import orderListDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/orderListDialog.vue';
+  import { getByIdCondition } from '@/api/purchasingManage/purchaseOrder';
+  import receiveTermsDialog from '@/views/financialManage/advanceReceipt/components/receiveTermsDialog.vue';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
   export default {
     components: {
       headerTitle,
       inventoryTableDetails,
-      fileMain
+      fileMain,
+      parentList,
+      contractListDialog,
+      orderListDialog,
+      receiveTermsDialog,
+      bpmDetail,
+      processSubmitDialog
     },
     data() {
       return {
+        activeComp: 'main',
         visible: false,
         loading: false,
         isUpdate: false,
         isDetail: false,
+        processSubmitDialogFlag: false,
         supplierOptions: [],
         sourceCodeOptions: [],
         paymentTermsOptions: [],
         accountingSubjectList: [],
+        businessId: '',
+        tabOptions: [
+          { key: 'main', name: '预付款项' },
+          { key: 'bpm', name: '流程详情' }
+        ],
         form: {
           id: null,
           code: '',
@@ -215,6 +321,7 @@
           prepayTotalPrice: '',
           accountingSubjectId: '1779719367139791007',
           accountingSubjectCode: '1123',
+          accountingSubjectName: '预付账款',
           contactName: '',
           contactId: '',
           sourceType: 3,
@@ -234,7 +341,47 @@
           sourceType: [{ required: true, message: '请选择来源类型', trigger: 'change' }],
           sourceCode: [{ required: true, message: '请选择来源编码', trigger: 'change' }],
           fundType: [{ required: true, message: '请选择款项类型', trigger: 'change' }]
-        }
+        },
+        columns: [
+          {
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            prop: 'paidDate',
+            label: '付款时间',
+            align: 'center',
+            minWidth: 160
+          },
+          {
+            prop: 'paidTotalPrice',
+            label: '已付金额',
+            align: 'center',
+            minWidth: 140
+          },
+          {
+            prop: 'paymentTypeName',
+            label: '支付类型',
+            align: 'center',
+            minWidth: 140
+          },
+          {
+            prop: 'files',
+            label: '附件',
+            align: 'center',
+            minWidth: 120,
+            slot: 'files'
+          },
+          {
+            prop: 'remark',
+            label: '备注',
+            align: 'center',
+            minWidth: 140
+          }
+        ]
       };
     },
     methods: {
@@ -253,10 +400,11 @@
         this.isUpdate = type === 'edit';
         this.isDetail = type === 'detail';
         if ((this.isUpdate || this.isDetail) && row) {
-          this.form = { ...row };
+          this.form = await getPrepaymentInfo(row.id);
+          this.businessId = row.id;
           this.$nextTick(() => {
             this.$refs.inventoryTableDetailsRef &&
-              this.$refs.inventoryTableDetailsRef.putTableValue(row.productList || []);
+              this.$refs.inventoryTableDetailsRef.putTableValue(this.form || []);
           });
         } else {
           this.resetForm();
@@ -265,14 +413,65 @@
             this.$refs.inventoryTableDetailsRef &&
               this.$refs.inventoryTableDetailsRef.putTableValue([]);
           });
-          this.form.accountingSubjectId = '1779719367139792005';
-          this.form.accountingSubjectCode = '2203';
+          this.form.accountingSubjectId = '1779719367139791007';
+          this.form.accountingSubjectCode = '1123';
+          this.form.accountingSubjectName = '预付账款';
         }
         this.$nextTick(() => {
           this.$refs.form && this.$refs.form.clearValidate();
         });
       },
 
+      openReceiveTerms() {
+        this.$refs.receiveTermsDialogRef.open();
+      },
+
+      changeReceiveTerms(row, index) {
+        console.log('changeReceiveTerms~~~', row)
+        this.form.paymentConditionId = row.id;
+        this.form.paymentConditionName = row.name;
+        console.log('changeReceiveTerms!!!', this.form)
+        this.$forceUpdate()
+      },
+
+      async changeContract(row) {
+        console.log(row, 'dadas');
+        this.form.sourceCode = row.contractNumber;
+        this.form.sourceId = row.id;
+        const { productList, receiptPaymentList, contractVO } = await getDetail(
+          row.id
+        );
+
+        this.$refs.inventoryTableDetailsRef.putTableValue({ productList });
+        this.form.prepayTotalPrice = contractVO.discountTotalPrice;
+      },
+
+      async changeOrder(row) {
+        this.form.sourceCode = row.orderNo;
+        this.form.sourceId = row.id;
+        const { productList, receiptPaymentList, payAmount } =
+          await getByIdCondition(row.id, 2);
+
+        this.$refs.inventoryTableDetailsRef.putTableValue({ productList });
+        this.form.prepayTotalPrice = payAmount;
+      },
+
+      openSource() {
+        if (!this.form.contactName) {
+          this.$message.error('请选择供应商');
+          return;
+        }
+        if (!this.form.sourceType) {
+          this.$message.error('请选择来源类型');
+          return;
+        }
+        if (this.form.sourceType == 3) {
+          this.$refs.orderListDialogRef.open()
+        } else {
+          this.$refs.selectContractRef.open();
+        }
+      },
+
       //获取分类管理中的数据
       async getClassifyList(id, listName) {
         let res = await getTreeByPid(id);
@@ -280,8 +479,14 @@
       },
 
       changeSubjectInfo(val) {
-        const { code } = this.$refs.treeSelect.getNodeByValue(val);
+        const { code, name } = this.$refs.treeSelect.getNodeByValue(val);
         this.form.accountingSubjectCode = code;
+        this.form.accountingSubjectName = name;
+      },
+
+      async changeParent(obj) {
+        this.form.contactName = obj.name;
+        this.form.contactId = obj.id;
       },
 
       resetForm() {
@@ -292,6 +497,7 @@
           prepayTotalPrice: '',
           accountingSubjectId: '1779719367139791007',
           accountingSubjectCode: '1123',
+          accountingSubjectName: '预付账款',
           contactName: '',
           contactId: '',
           sourceType: 3,
@@ -305,7 +511,7 @@
         };
       },
 
-      save() {
+      save(type) {
         this.$refs.form.validate((valid) => {
           if (!valid) return;
           this.loading = true;
@@ -320,6 +526,11 @@
             .then(() => {
               this.loading = false;
               this.$message.success(this.isUpdate ? '修改成功' : '新增成功');
+              console.log('sub', type)
+              if(type == 1) {
+                console.log('提交', res)
+                this.sub(res);
+              } 
               this.updateVisible(false);
               this.$emit('done');
             })
@@ -329,6 +540,47 @@
         });
       },
 
+      async sub(res) {
+        const data = await getPrepaymentInfo(
+          this.businessId || res
+        );
+        this.processSubmitDialogFlag = true;
+        let key = 'fin_prepay_approve';
+        this.$nextTick(() => {
+          let params = {
+            businessId: data.id,
+            businessKey: key,
+            formCreateUserId: data.createUserId,
+            variables: {
+              businessCode: data.code,
+              businessName: data.contactName,
+              fundType: data.fundTypeName,
+              sourceType: data.sourceType,
+              businessType: '预付款项'
+            }
+          };
+
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+
+        // submit({
+        //   businessId: this.businessId || res,
+        //   receiveType: this.form.receiveType,
+        //   sourceType,
+        //   variables: {
+        //     storemanIds
+        //   }
+        // }).then((res) => {
+        //   this.cancel();
+        //   this.$emit('done');
+        // });
+      },
+
+      reload() {
+        this.updateVisible(false);
+        this.$emit('done');
+      },
+
       updateVisible(value) {
         this.visible = value;
         if (!value) {

+ 149 - 37
src/views/financialManage/prepayment/index.vue

@@ -20,6 +20,7 @@
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
             <el-button
+              v-if="$hasPermission('eom:finprepay:save')"
               size="small"
               type="primary"
               icon="el-icon-plus"
@@ -30,17 +31,17 @@
             </el-button>
           </template>
 
+          <template v-slot:code="{ row }">
+            <el-link type="primary" :underline="false" @click="openDetail(row)">
+              {{ row.code }}
+            </el-link>
+          </template>
+
           <!-- 操作列 -->
           <template v-slot:action="{ row }">
-            <el-link
-              type="primary"
-              :underline="false"
-              @click="openDetail(row)"
-            >
-              详情
-            </el-link>
-            <template v-if="row.status === 0">
+            <template v-if="row.approvalStatus === 0">
               <el-link
+                v-if="$hasPermission('eom:finprepay:update')"
                 type="primary"
                 :underline="false"
                 @click="openEdit('edit', row)"
@@ -48,6 +49,7 @@
                 修改
               </el-link>
               <el-link
+                v-if="$hasPermission('eom:finprepay:submit')"
                 type="primary"
                 :underline="false"
                 @click="handleSubmit(row)"
@@ -55,6 +57,7 @@
                 提交
               </el-link>
               <el-popconfirm
+                v-if="$hasPermission('eom:finprepay:delete')"
                 class="ele-action"
                 title="确定要删除此信息吗?"
                 @confirm="remove([row.id])"
@@ -64,15 +67,9 @@
                 </template>
               </el-popconfirm>
             </template>
-            <template v-else-if="row.status === 1">
-              <el-link
-                type="primary"
-                :underline="false"
-                @click="handlePay(row)"
-              >
-                付款
-              </el-link>
+            <template v-else-if="row.approvalStatus === 1">
               <el-link
+                v-if="$hasPermission('eom:finprepay:withdraw')"
                 type="warning"
                 :underline="false"
                 @click="handleRevoke(row)"
@@ -80,7 +77,7 @@
                 撤销
               </el-link>
             </template>
-            <template v-else-if="row.status === 2">
+            <template v-else-if="row.approvalStatus === 2">
               <el-link
                 type="primary"
                 :underline="false"
@@ -89,6 +86,7 @@
                 付款
               </el-link>
               <el-link
+                v-if="$hasPermission('eom:finprepay:complete')"
                 type="success"
                 :underline="false"
                 @click="handleComplete(row)"
@@ -107,6 +105,14 @@
     <add-dialog ref="addDialogRef" @done="reload"></add-dialog>
     <pay-dialog ref="payDialogRef" @done="reload"></pay-dialog>
     <detail-dialog ref="detailDialogRef"></detail-dialog>
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      isCloseRefresh="false"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </div>
 </template>
 
@@ -116,11 +122,14 @@
   import payDialog from './components/payDialog.vue';
   import detailDialog from './components/detailDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
-  import { paymentType } from '@/enum/dict';
+  import { paymentType, reviewStatus } from '@/enum/dict';
   import {
     prepaymentPageList,
-    deletePrepayment
+    deletePrepayment,
+    getPrepaymentInfo,
+    withdrawPrepayment
   } from '@/api/financialManage/prepayment';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
   export default {
     mixins: [tabMixins],
@@ -128,12 +137,14 @@
       searchForm,
       addDialog,
       payDialog,
-      detailDialog
+      detailDialog,
+      processSubmitDialog
     },
     data() {
       return {
         selection: [],
         loading: false,
+        processSubmitDialogFlag: false,
         columns: [
           {
             width: 45,
@@ -155,32 +166,33 @@
             label: '预付款项编码',
             align: 'center',
             sortable: true,
+            slot: 'code',
             showOverflowTooltip: true,
             minWidth: 180
           },
           {
-            prop: 'supplierName',
+            prop: 'contactName',
             label: '供应商名称',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 160
           },
           {
-            prop: 'paymentDate',
+            prop: 'prepayDate',
             label: '预付日期',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 120
           },
           {
-            prop: 'amount',
+            prop: 'prepayTotalPrice',
             label: '预付金额',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 120
           },
           {
-            prop: 'confirmedAmount',
+            prop: 'confirmedTotalPrice',
             label: '预付款确付金额',
             align: 'center',
             showOverflowTooltip: true,
@@ -201,21 +213,21 @@
             minWidth: 140
           },
           {
-            prop: 'unpaidAmount',
+            prop: 'unpaidAdvanceAmount',
             label: '预付款未付金额',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 140
           },
           {
-            prop: 'transferToPayableAmount',
+            prop: 'unpaidToPayableAmount',
             label: '未付转应付金额',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 140
           },
           {
-            prop: 'status',
+            prop: 'paymentStatus',
             label: '付款状态',
             align: 'center',
             showOverflowTooltip: true,
@@ -224,6 +236,83 @@
               return paymentType.find(item => item.value == cellValue)?.label || '';
             }
           },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              if (cellValue === 0) return '未完结';
+              if (cellValue === 1) return '已完结';
+              if (cellValue === 2) return '已完结转应收';
+              return '';
+            }
+          },
+          {
+            prop: 'approvalStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.approvalStatus];
+            }
+          },
+          {
+            prop: 'accountingSubjectName',
+            label: '会计科目',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'sourceTyp',
+            label: '来源类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              if (cellValue === 2) return '合同';
+              if (cellValue === 3) return '采购订单';
+              return '';
+            }
+          },
+          {
+            prop: 'sourceCode',
+            label: '来源编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'fundTypeName',
+            label: '款项类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'paymentConditionName',
+            label: '付款条件',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
           {
             columnKey: 'action',
             label: '操作',
@@ -260,7 +349,7 @@
 
       // 查看详情
       openDetail(row) {
-        this.$refs.detailDialogRef.open(row);
+        this.$refs.addDialogRef.open('detail', row);
       },
 
       // 删除
@@ -272,12 +361,31 @@
       },
 
       // 提交
-      handleSubmit() {
-        this.$confirm('确定要提交该预付款吗?', '提示', { type: 'warning' }).then(() => {
-          // TODO: 调用提交接口
-          this.$message.success('提交成功');
-          this.reload();
+      async handleSubmit(res) {
+        // this.$confirm('确定要提交该预付款吗?', '提示', { type: 'warning' }).then(() => {
+        //   // TODO: 调用提交接口
+        //   this.$message.success('提交成功');
+        //   this.reload();
+        // });
+        const data = await getPrepaymentInfo(res.id);
+
+        this.processSubmitDialogFlag = true;
+        let key = 'fin_prepay_approve';
+        this.$nextTick(() => {
+          let params = {
+            businessId: data.id,
+            businessKey: key,
+            formCreateUserId: data.createUserId,
+            variables: {
+              businessCode: data.code,
+              fundType: data.fundTypeName,
+              sourceType: data.sourceType,
+              businessType: '预付款项'
+            }
+          };
+          this.$refs.processSubmitDialogRef.init(params);
         });
+      
       },
 
       // 付款
@@ -286,12 +394,16 @@
       },
 
       // 撤销
-      handleRevoke() {
+      handleRevoke(row) {
         this.$confirm('确定要撤销该预付款吗?', '提示', { type: 'warning' }).then(() => {
           // TODO: 调用撤销接口
-          this.$message.success('撤销成功');
-          this.reload();
-        });
+          withdrawPrepayment({
+            id: row.id
+          }).then(() => {
+            this.$message.success('撤销成功');
+            this.reload();
+          });
+        })
       },
 
       // 完结

+ 1 - 0
src/views/saleManage/saleOrder/invoice/index.vue

@@ -580,6 +580,7 @@
       exportParams() {
         const temp = JSON.parse(JSON.stringify(this.params));
         delete temp.size;
+        delete temp.pageNum;
         return {
           ...temp,
           sendRecordIds: this.selection.map(item => item.id)