终版 计划收款信息 调整成可添加修改

This commit is contained in:
浅念
2025-11-10 15:54:59 +08:00
parent 6e2cd44f55
commit 963a95732b
3 changed files with 72 additions and 50 deletions
+31 -18
View File
@@ -753,13 +753,12 @@
<ElRow :gutter="12"> <ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6"> <ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="汇款人" label-width="55px"> <ElFormItem label="汇款人" label-width="55px">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" disabled /> <ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" />
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4"> <ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="汇款国" label-width="55px"> <ElFormItem label="汇款国" label-width="55px">
<el-select <el-select
disabled
v-model="payment.remit_country_id" v-model="payment.remit_country_id"
filterable filterable
placeholder="请选择汇款国" placeholder="请选择汇款国"
@@ -782,7 +781,6 @@
<ElCol :sm="12" :md="12" :lg="4" :xl="4"> <ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="日期" label-width="55px"> <ElFormItem label="日期" label-width="55px">
<ElDatePicker <ElDatePicker
disabled
v-model="payment.remit_date" v-model="payment.remit_date"
type="date" type="date"
format="YYYY-MM-DD" format="YYYY-MM-DD"
@@ -795,13 +793,13 @@
<ElCol :sm="12" :md="12" :lg="5" :xl="5"> <ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="账户" label-width="55px"> <ElFormItem label="账户" label-width="55px">
<ElSelect <ElSelect
disabled v-model="payment.account_id"
v-model="payment.account_name_snapshot" filterable
placeholder="请选择账户" placeholder="请选择账户"
@change=" @change="
(val) => (val) =>
(payment.account_id = (payment.account_name_snapshot =
(accountOptions || []).find((x: any) => x.short_desc === val)?.id || '') (accountOptions || []).find((x: any) => x.id === val)?.short_desc || '')
" "
> >
<ElOption <ElOption
@@ -811,15 +809,14 @@
:value="item.id" :value="item.id"
/> />
</ElSelect> </ElSelect>
<ElInput v-model="payment.account_id" type="hidden" /> <ElInput v-model="payment.account_name_snapshot" type="hidden" />
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5"> <ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="金额" label-width="55px"> <ElFormItem label="金额" label-width="55px">
<ElInput disabled v-model="payment.amount" placeholder="请输入金额"> <ElInput v-model="payment.amount" placeholder="请输入金额">
<template #suffix> <template #suffix>
<ElSelect <ElSelect
disabled
v-model="payment.currency_code" v-model="payment.currency_code"
style="width: 64px" style="width: 64px"
@change=" @change="
@@ -842,12 +839,27 @@
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
</ElRow> </ElRow>
<!-- <ElRow :gutter="12"> <ElRow :gutter="12">
<ElCol :span="24" style="text-align: right;"> <ElCol :span="24" style="text-align: right">
<ElButton type="danger" size="small" @click="removePaymentItem(idx)" :disabled="paymentItems.length === 1">删除</ElButton> <ElButton type="success" size="small" @click="copyPaymentItem(idx)"
<ElButton type="primary" size="small" @click="addPaymentItem" v-if="idx === paymentItems.length - 1">添加收款信息</ElButton> >复制</ElButton
>
<ElButton
type="primary"
size="small"
@click="addPaymentItem"
v-if="idx === paymentItems.length - 1"
>添加</ElButton
>
<ElButton
type="danger"
size="small"
@click="removePaymentItem(idx)"
:disabled="paymentItems.length === 1"
>删除</ElButton
>
</ElCol> </ElCol>
</ElRow> --> </ElRow>
</ElForm> </ElForm>
</div> </div>
</div> </div>
@@ -1154,9 +1166,10 @@
// copyRow, // copyRow,
// addRowAfter, // addRowAfter,
// removeRow, // removeRow,
// // 收款项方法 // 收款项方法
// addPaymentItem, addPaymentItem,
// removePaymentItem, removePaymentItem,
copyPaymentItem,
// 客户选择方法 // 客户选择方法
openCustomerDialog, openCustomerDialog,
getCustomerList, getCustomerList,
+28 -22
View File
@@ -893,13 +893,12 @@
<ElRow :gutter="12"> <ElRow :gutter="12">
<ElCol :span="4"> <ElCol :span="4">
<ElFormItem label="汇款人"> <ElFormItem label="汇款人">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" disabled /> <ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" />
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6"> <ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="汇款国"> <ElFormItem label="汇款国">
<el-select <el-select
disabled
v-model="payment.remit_country_id" v-model="payment.remit_country_id"
filterable filterable
placeholder="请选择汇款国" placeholder="请选择汇款国"
@@ -927,7 +926,6 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="请选择日期" placeholder="请选择日期"
disabled
style="width: 100%" style="width: 100%"
/> />
</ElFormItem> </ElFormItem>
@@ -935,13 +933,13 @@
<ElCol :sm="12" :md="12" :lg="5" :xl="5"> <ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="账户"> <ElFormItem label="账户">
<ElSelect <ElSelect
disabled v-model="payment.account_id"
v-model="payment.account_name_snapshot" filterable
placeholder="请选择账户" placeholder="请选择账户"
@change=" @change="
(val) => (val) =>
(payment.account_id = (payment.account_name_snapshot =
(accountOptions || []).find((x: any) => x.short_desc === val)?.id || '') (accountOptions || []).find((x: any) => x.id === val)?.short_desc || '')
" "
> >
<ElOption <ElOption
@@ -951,17 +949,16 @@
:value="item.id" :value="item.id"
/> />
</ElSelect> </ElSelect>
<ElInput v-model="payment.account_id" type="hidden" /> <ElInput v-model="payment.account_name_snapshot" type="hidden" />
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5"> <ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="金额"> <ElFormItem label="金额">
<ElInput disabled v-model="payment.amount" placeholder="请输入金额"> <ElInput v-model="payment.amount" placeholder="请输入金额">
<template #suffix> <template #suffix>
<ElSelect <ElSelect
v-model="payment.currency_code" v-model="payment.currency_code"
style="width: 64px" style="width: 64px"
disabled
@change=" @change="
(val) => { (val) => {
const found = (currencyOptions || []).find((x: any) => x.currency_code === val) const found = (currencyOptions || []).find((x: any) => x.currency_code === val)
@@ -982,12 +979,27 @@
</ElFormItem> </ElFormItem>
</ElCol> </ElCol>
</ElRow> </ElRow>
<!-- <ElRow :gutter="12"> <ElRow :gutter="12">
<ElCol :span="24" style="text-align: right;"> <ElCol :span="24" style="text-align: right">
<ElButton type="danger" size="small" @click="removePaymentItem(idx)" :disabled="paymentItems.length === 1">删除</ElButton> <ElButton type="success" size="small" @click="copyPaymentItem(idx)"
<ElButton type="primary" size="small" @click="addPaymentItem" v-if="idx === paymentItems.length - 1">添加收款信息</ElButton> >复制</ElButton
>
<ElButton
type="primary"
size="small"
@click="addPaymentItem"
v-if="idx === paymentItems.length - 1"
>添加</ElButton
>
<ElButton
type="danger"
size="small"
@click="removePaymentItem(idx)"
:disabled="paymentItems.length === 1"
>删除</ElButton
>
</ElCol> </ElCol>
</ElRow> --> </ElRow>
</ElForm> </ElForm>
</div> </div>
</div> </div>
@@ -1265,11 +1277,9 @@
ncolorOptions, ncolorOptions,
transportOptions, transportOptions,
trade_termsOptions, trade_termsOptions,
// 上传相关 // 上传相关
actionImageUplode, actionImageUplode,
uploadHeaders, uploadHeaders,
// 方法 // 方法
initializeForm, initializeForm,
populateFromDetail, populateFromDetail,
@@ -1279,29 +1289,25 @@
wrapMoney, wrapMoney,
calcProfit, calcProfit,
handleUserEdit, handleUserEdit,
// 合同文件方法 // 合同文件方法
isImageFile, isImageFile,
beforeContractUpload, beforeContractUpload,
handleContractUpload, handleContractUpload,
removeContractFile, removeContractFile,
// 订单项方法 // 订单项方法
copyRow, copyRow,
addRowAfter, addRowAfter,
removeRow, removeRow,
// 收款项方法 // 收款项方法
addPaymentItem, addPaymentItem,
removePaymentItem, removePaymentItem,
copyPaymentItem,
// 客户选择方法 // 客户选择方法
openCustomerDialog, openCustomerDialog,
getCustomerList, getCustomerList,
handleCustomerSizeChange, handleCustomerSizeChange,
handleCustomerCurrentChange, handleCustomerCurrentChange,
chooseCustomer, chooseCustomer,
// 车辆选择方法 // 车辆选择方法
openVehicleDialog, openVehicleDialog,
getVehicleList, getVehicleList,
+13 -10
View File
@@ -399,22 +399,25 @@
const handleView1 = async (row: any) => { const handleView1 = async (row: any) => {
const res = await CrmService.checkStock({ id: row.object_id }) const res = await CrmService.checkStock({ id: row.object_id })
// 处理合同文件 // 处理合同文件
if (res?.contract) { const file_list = res?.file_list
contractFiles.value = processFiles(res.contract, '合同') if (file_list?.contract) {
contractFiles.value = processFiles(file_list.contract, '合同')
} else {
contractFiles.value = []
} }
// 处理PI文件 // 处理PI文件
if (res?.pi_doc) { if (file_list?.pi_doc) {
piFiles.value = processFiles(res.pi_doc, 'PI') piFiles.value = processFiles(file_list.pi_doc, 'PI')
} else {
piFiles.value = []
} }
// 处理水单文件 // 处理水单文件
if (res?.transaction_slip) { if (file_list?.transaction_slip) {
waterBillFiles.value = processFiles(res.transaction_slip, '水单') waterBillFiles.value = processFiles(file_list.transaction_slip, '水单')
} else {
waterBillFiles.value = []
} }
if (res) { if (res) {
// 获取订单详情成功 // 获取订单详情成功
const orderData: OrderData = res const orderData: OrderData = res