Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
| | |
| | | } |
| | | |
| | | /** 删除 MPS */ |
| | | export function deleteMps(ids: number[]) { |
| | | export function deleteMps(id: number) { |
| | | return requestClient.delete('/mes/pro-mps/delete', { |
| | | params: { ids: ids.join(',') }, |
| | | params: { id }, |
| | | }); |
| | | } |
| | | |
| | |
| | | 'update:paymentPrice', |
| | | ]); |
| | | |
| | | /** 输入时不补零,失焦后仍按金额格式保留两位小数 */ |
| | | const paymentPriceFormatter = ( |
| | | value: number | string | undefined, |
| | | info: { input: string; userTyping: boolean }, |
| | | ) => { |
| | | return info.userTyping ? info.input : erpPriceInputFormatter(value); |
| | | }; |
| | | |
| | | const tableData = ref<ErpFinancePaymentApi.FinancePaymentItem[]>([]); // 表格数据 |
| | | |
| | | /** 已根据该来票生成的明细,避免重复生成 */ |
| | |
| | | v-model:value="row.paymentPrice" |
| | | :precision="2" |
| | | :disabled="disabled" |
| | | :formatter="erpPriceInputFormatter" |
| | | :formatter="paymentPriceFormatter" |
| | | placeholder="请输入本次付款" |
| | | @change="handleRowChange(row)" |
| | | /> |
| | |
| | | } |
| | | |
| | | /** 删除 */ |
| | | async function handleDelete(ids: number[]) { |
| | | async function handleDelete(row: MesProMpsApi.Mps) { |
| | | const hideLoading = message.loading({ |
| | | content: $t('ui.actionMessage.deleting'), |
| | | duration: 0, |
| | | }); |
| | | try { |
| | | await deleteMps(ids); |
| | | await deleteMps(row.id!); |
| | | message.success($t('ui.actionMessage.deleteSuccess')); |
| | | handleRefresh(); |
| | | } finally { |
| | |
| | | ifShow: () => row.status === MpsStatusEnum.DRAFT, |
| | | popConfirm: { |
| | | title: $t('ui.actionMessage.deleteConfirm', [row.code]), |
| | | confirm: handleDelete.bind(null, [row.id!]), |
| | | confirm: handleDelete.bind(null, row), |
| | | }, |
| | | }, |
| | | ]" |