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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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