fix(workspace): 统一 ERP 金额更新事件 emit 命名

pull/365/head
XuZhiqiang 2026-06-19 00:07:20 +08:00
parent 019473e9bc
commit 2e397a2c64
24 changed files with 120 additions and 120 deletions

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:payment-price', 'update:paymentPrice',
]); ]);
const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); // const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalPaymentPrice = paymentPrice - (props.discountPrice || 0); const finalPaymentPrice = paymentPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:payment-price', finalPaymentPrice); emit('update:paymentPrice', finalPaymentPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:receipt-price', 'update:receiptPrice',
]); ]);
const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); // const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalReceiptPrice = receiptPrice - (props.discountPrice || 0); const finalReceiptPrice = receiptPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:receipt-price', finalReceiptPrice); emit('update:receiptPrice', finalReceiptPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); // const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); // const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); // const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); // const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); // const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); // const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:payment-price', 'update:paymentPrice',
]); ]);
const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); // const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalPaymentPrice = paymentPrice - (props.discountPrice || 0); const finalPaymentPrice = paymentPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:payment-price', finalPaymentPrice); emit('update:paymentPrice', finalPaymentPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:receipt-price', 'update:receiptPrice',
]); ]);
const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); // const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalReceiptPrice = receiptPrice - (props.discountPrice || 0); const finalReceiptPrice = receiptPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:receipt-price', finalReceiptPrice); emit('update:receiptPrice', finalReceiptPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); // const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); // const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); // const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); // const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); // const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); // const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:payment-price', 'update:paymentPrice',
]); ]);
const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); // const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalPaymentPrice = paymentPrice - (props.discountPrice || 0); const finalPaymentPrice = paymentPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:payment-price', finalPaymentPrice); emit('update:paymentPrice', finalPaymentPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:total-price', 'update:totalPrice',
'update:receipt-price', 'update:receiptPrice',
]); ]);
const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); // const tableData = ref<ErpFinanceReceiptApi.FinanceReceiptItem[]>([]); //
@ -110,8 +110,8 @@ watch(
); );
const finalReceiptPrice = receiptPrice - (props.discountPrice || 0); const finalReceiptPrice = receiptPrice - (props.discountPrice || 0);
// //
emit('update:total-price', totalPrice); emit('update:totalPrice', totalPrice);
emit('update:receipt-price', finalReceiptPrice); emit('update:receiptPrice', finalReceiptPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); // const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); // const tableData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); // const tableData = ref<ErpPurchaseReturnApi.PurchaseReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -32,8 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); // const tableData = ref<ErpSaleOrderApi.SaleOrderItem[]>([]); //
@ -113,8 +113,8 @@ watch(
: erpPriceMultiply(totalPrice, props.discountPercent / 100); : erpPriceMultiply(totalPrice, props.discountPercent / 100);
const finalTotalPrice = totalPrice - discountPrice!; const finalTotalPrice = totalPrice - discountPrice!;
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); // const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );

View File

@ -34,9 +34,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits([ const emit = defineEmits([
'update:items', 'update:items',
'update:discount-price', 'update:discountPrice',
'update:other-price', 'update:otherPrice',
'update:total-price', 'update:totalPrice',
]); ]);
const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); // const tableData = ref<ErpSaleReturnApi.SaleReturnItem[]>([]); //
@ -122,9 +122,9 @@ watch(
const finalTotalPrice = discountedPrice + (props.otherPrice || 0); const finalTotalPrice = discountedPrice + (props.otherPrice || 0);
// //
emit('update:discount-price', discountPrice); emit('update:discountPrice', discountPrice);
emit('update:other-price', props.otherPrice || 0); emit('update:otherPrice', props.otherPrice || 0);
emit('update:total-price', finalTotalPrice); emit('update:totalPrice', finalTotalPrice);
}, },
{ deep: true }, { deep: true },
); );