| | |
| | | </el-descriptions-item v-if="isViewMode"> |
| | | <el-descriptions-item label="关联账单类型"> |
| | | <span v-if="detail.incomeExpenseFlag == 0"> |
| | | 供应商 |
| | | 客户 |
| | | </span> |
| | | <span v-if="detail.incomeExpenseFlag == 1"> |
| | | 客户 |
| | | 供应商 |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="" :span="1"></el-descriptions-item> |
| | |
| | | import { addFundFlowClaimDetailClaim } from "@/api/cwgl/fundFlow"; |
| | | import { delFundFlowClaimDetail, } from "@/api/cwgl/fundFlowClaimDetail"; |
| | | import { listFundFlowClaimDetail } from "@/api/cwgl/fundFlowClaimDetail"; |
| | | import { getFundFlow, } from "@/api/cwgl/fundFlow"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const { sys_income_expenses } = proxy.useDict('sys_income_expenses'); |
| | |
| | | // 取出第一条明细的关联企业类型 |
| | | const firstCompanyType = detail.value.claimDetails[0].relatedCompanyType; |
| | | |
| | | if (firstCompanyType === '客户') { |
| | | billType.value = 'RECEIVABLE'; |
| | | } else if (firstCompanyType === '供应商') { |
| | | billType.value = 'PAYABLE'; |
| | | } |
| | | // 如果有ID,则请求后端明细数据 |
| | | |
| | | // 确保已有的数据行不会变成编辑模式 |
| | | getList() |
| | | } |
| | |
| | | // 修改新增行逻辑 |
| | | const handleAddRow = () => { |
| | | |
| | | const defaultCompanyType = detail.value.incomeExpenseFlag == '0' ? '客户' : '供应商'; |
| | | const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '客户' : '供应商'; |
| | | |
| | | // 获取当前时间的 YYYY-MM-DD HH:mm:ss 格式 |
| | | const now = new Date(); |
| | |
| | | addFundFlowClaimDetailClaim(row, detail.value.id).then((response) => { |
| | | if (response.code == 200) { |
| | | proxy.$modal.msgSuccess("保存成功"); |
| | | getList(); // 使用统一的 getList 方法 |
| | | getFundFlow(detail.value.id).then((res) => { |
| | | if (res.code == 200) { |
| | | detail.value = res.data; |
| | | getList(); // 使用统一的 getList 方法 |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | }; |
| | |
| | | |
| | | // 回填弹窗选中的数据 |
| | | const receivablForm = (data: any) => { |
| | | const defaultCompanyType = billType.value === 'RECEIVABLE' ? '客户' : '供应商'; |
| | | const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '客户' : '供应商'; |
| | | |
| | | if (currentRowIndex.value !== null && data) { |
| | | const row = detail.value.claimDetails[currentRowIndex.value]; |
| | |
| | | }; |
| | | |
| | | const accountsForm = (data: any) => { |
| | | const defaultCompanyType = billType.value === 'RECEIVABLE' ? '客户' : '供应商'; |
| | | |
| | | const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '客户' : '供应商'; |
| | | if (currentRowIndex.value !== null && data) { |
| | | const row = detail.value.claimDetails[currentRowIndex.value]; |
| | | row.billNo = data.systemNo |