From 6373c12e97dc5d52ad87271d1adb6743b0052607 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 26 八月 2026 17:18:47 +0800
Subject: [PATCH] feat(erp): 采购来票选单过滤已开完票订单并修正未开票金额口径
---
src/views/erp/purchase/invoice/modules/purchase-order-select.vue | 3 ++-
src/views/erp/purchase/invoice/modules/form.vue | 8 ++++----
src/views/erp/purchase/invoice/data.ts | 16 ++++++++--------
src/api/erp/purchase/order/index.ts | 1 +
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/api/erp/purchase/order/index.ts b/src/api/erp/purchase/order/index.ts
index 4508346..798d3b9 100644
--- a/src/api/erp/purchase/order/index.ts
+++ b/src/api/erp/purchase/order/index.ts
@@ -14,6 +14,7 @@
totalPrice?: number; // 鍚堣閲戦锛屽崟浣嶏細鍏�
totalProductPrice?: number; // 浜у搧閲戦锛屽崟浣嶏細鍏�
totalTaxPrice?: number; // 鍚堣绋庨锛屽崟浣嶏細鍏�
+ remainInvoicePrice?: number; // 鍓╀綑鍙紑绁ㄩ噾棰濓紙璁㈠崟鎬婚噾棰�-宸叉潵绁ㄩ噾棰濓級锛屽崟浣嶏細鍏�
discountPercent?: number; // 浼樻儬鐜囷紝鐧惧垎姣�
discountPrice?: number; // 浼樻儬閲戦锛屽崟浣嶏細鍏�
depositPrice?: number; // 瀹氶噾閲戦锛屽崟浣嶏細鍏�
diff --git a/src/views/erp/purchase/invoice/data.ts b/src/views/erp/purchase/invoice/data.ts
index 018c084..c315066 100644
--- a/src/views/erp/purchase/invoice/data.ts
+++ b/src/views/erp/purchase/invoice/data.ts
@@ -15,7 +15,7 @@
/** 鏂板/淇敼鐨勮〃鍗� */
export function useFormSchema(
- orderTotalTaxPrice?: Ref<number | undefined>,
+ orderRemainInvoicePrice?: Ref<number | undefined>,
): VbenFormSchema[] {
return [
{
@@ -48,12 +48,12 @@
placeholder: '璇烽�夋嫨閲囪喘璁㈠崟',
onChange: (
order:
- | { supplierName?: string; totalTaxPrice?: number }
+ | { supplierName?: string; remainInvoicePrice?: number }
| undefined,
) => {
form.setFieldValue('supplierName', order?.supplierName);
- if (orderTotalTaxPrice) {
- orderTotalTaxPrice.value = order?.totalTaxPrice;
+ if (orderRemainInvoicePrice) {
+ orderRemainInvoicePrice.value = order?.remainInvoicePrice;
}
},
}),
@@ -91,8 +91,8 @@
component: 'InputNumber',
rules: 'required',
description: () =>
- orderTotalTaxPrice?.value != null
- ? `閲囪喘璁㈠崟鏈紑绁ㄩ噾棰濓細${Number(orderTotalTaxPrice.value).toFixed(2)} 鍏僠
+ orderRemainInvoicePrice?.value != null
+ ? `閲囪喘璁㈠崟鏈紑绁ㄩ噾棰濓細${Number(orderRemainInvoicePrice.value).toFixed(2)} 鍏僠
: '',
componentProps: {
class: '!w-full',
@@ -106,11 +106,11 @@
class: '!w-full',
placeholder: '璇疯緭鍏ユ潵绁ㄩ噾棰�',
min: 0,
- max: orderTotalTaxPrice?.value ?? undefined,
+ max: orderRemainInvoicePrice?.value ?? undefined,
precision: 2,
}),
rules: () => {
- const max = orderTotalTaxPrice?.value;
+ const max = orderRemainInvoicePrice?.value;
if (max != null) {
return z
.number({ message: '璇疯緭鍏ユ潵绁ㄩ噾棰�' })
diff --git a/src/views/erp/purchase/invoice/modules/form.vue b/src/views/erp/purchase/invoice/modules/form.vue
index 85374fb..fd27f98 100644
--- a/src/views/erp/purchase/invoice/modules/form.vue
+++ b/src/views/erp/purchase/invoice/modules/form.vue
@@ -24,7 +24,7 @@
const formData = ref<ErpPurchaseInvoiceApi.PurchaseInvoice>();
const formType = ref<FormType>('create');
const ocrSupplierName = ref('');
-const orderTotalTaxPrice = ref<number>(); // 鎵�閫夐噰璐鍗曞悎璁$◣棰濓紙鏈紑绁ㄩ噾棰濓紝鐢ㄤ簬鎻愮ず涓庢牎楠岋級
+const orderRemainInvoicePrice = ref<number>(); // 鎵�閫夐噰璐鍗曞墿浣欏彲寮�绁ㄩ噾棰濓紙鏈紑绁ㄩ噾棰濓紝鐢ㄤ簬鎻愮ず涓庢牎楠岋級
const getTitle = computed(() => {
if (formType.value === 'create') {
@@ -45,7 +45,7 @@
},
wrapperClass: 'grid-cols-2',
layout: 'horizontal',
- schema: useFormSchema(orderTotalTaxPrice),
+ schema: useFormSchema(orderRemainInvoicePrice),
showDefaultActions: false,
});
@@ -75,7 +75,7 @@
if (!isOpen) {
formData.value = undefined;
ocrSupplierName.value = '';
- orderTotalTaxPrice.value = undefined;
+ orderRemainInvoicePrice.value = undefined;
return;
}
const data = modalApi.getData<{
@@ -85,7 +85,7 @@
}>();
formType.value = data.formType;
formApi.setDisabled(formType.value === 'detail');
- formApi.updateSchema(useFormSchema(orderTotalTaxPrice));
+ formApi.updateSchema(useFormSchema(orderRemainInvoicePrice));
await formApi.resetForm();
// OCR 璇嗗埆鏁版嵁棰勫~锛堟柊寤哄満鏅紝缂栬緫/璇︽儏涓嶅鐞嗭級
const ocr = data?.ocrData;
diff --git a/src/views/erp/purchase/invoice/modules/purchase-order-select.vue b/src/views/erp/purchase/invoice/modules/purchase-order-select.vue
index ddfc9e5..59e969b 100644
--- a/src/views/erp/purchase/invoice/modules/purchase-order-select.vue
+++ b/src/views/erp/purchase/invoice/modules/purchase-order-select.vue
@@ -92,7 +92,7 @@
minWidth: 120,
},
{
- field: 'totalTaxPrice',
+ field: 'remainInvoicePrice',
title: '鏈紑绁ㄩ噾棰�',
formatter: 'formatAmount2',
minWidth: 120,
@@ -116,6 +116,7 @@
pageNo: page.currentPage,
pageSize: page.pageSize,
status: 20, // 浠呭睍绀哄凡瀹℃牳閫氳繃鐨勯噰璐鍗�
+ remainPriceEnable: true, // 浠呭睍绀哄墿浣欏彲寮�绁ㄩ噾棰濆ぇ浜� 0 鐨勮鍗曪紙閲戦宸插紑瀹岀殑涓嶅睍绀猴級
...formValues,
});
},
--
Gitblit v1.9.3