This commit is contained in:
GaoHao 2025-04-10 17:39:48 +08:00
commit c3c9437939
2 changed files with 5 additions and 4 deletions

View File

@ -113,6 +113,7 @@ const refPayment = ref();
function handlePayment(item) {
if (item != 'all') {
state.flowIdList = [item.id]
state.allAmount = item.unPaidAmount
} else {
if( state.flowIdList.length <= 0 ){
ElMessage({ type: "error", message: "请选择付款耗材" });

View File

@ -6,7 +6,7 @@
<el-input v-model="supplierName" placeholder="请输入供应商名称" readonly></el-input>
</el-form-item>
<el-form-item label="付款金额 " prop="amount">
<el-input-number v-model="form.amount" :readonly="form.flowIdList.length > 1" placeholder="请输入付款金额"
<el-input-number v-model="form.amount" :readonly="form.flowIdList.length > 1" :max="maxAmount" placeholder="请输入付款金额"
style="width: 100%;"></el-input-number>
</el-form-item>
<el-form-item label="付款方式" prop="type">
@ -46,13 +46,13 @@ const form = reactive({
...basicForm,
});
const supplierName = ref('');
const maxAmount = ref(0);
const show = ref(false);
function open(item) {
form.flowIdList = item.flowIdList
supplierName.value = item.supplierName
if (item.flowIdList.length > 1 && item.allAmount) {
form.amount = item.allAmount
}
form.amount = item.allAmount
maxAmount.value = item.allAmount
// Object.assign(form, item);
show.value = true;
}