| | |
| | | ErpPurchaseReturnApi.PurchaseReturn & { |
| | | accountId?: number; |
| | | discountPercent?: number; |
| | | fileUrl?: string; |
| | | order?: ErpPurchaseOrderApi.PurchaseOrder; |
| | | orderId?: number; |
| | | orderNo?: string; |
| | |
| | | accountId: undefined, |
| | | returnTime: undefined, |
| | | remark: undefined, |
| | | fileUrl: undefined, |
| | | discountPercent: 0, |
| | | supplierId: undefined, |
| | | discountPrice: 0, |
| | |
| | | accountId: order.accountId!, |
| | | remark: order.remark!, |
| | | discountPercent: order.discountPercent!, |
| | | fileUrl: order.fileUrl!, |
| | | }; |
| | | // 将订单项设置到退货单项 |
| | | order.items!.forEach((item: any) => { |
| | |
| | | modalApi.lock(); |
| | | try { |
| | | formData.value = await getPurchaseReturn(data.id); |
| | | if (formData.value?.attachmentList?.length) { |
| | | const blobIds = formData.value.attachmentList.map((item) => ({ |
| | | uid: String(item.id), |
| | | name: item.name || '', |
| | | url: item.url || '', |
| | | status: 'done', |
| | | id: item.id, |
| | | })); |
| | | formApi.setFieldValue('blobIds', blobIds); |
| | | } |
| | | // 设置到 values |
| | | await formApi.setValues(formData.value, false); |
| | | } finally { |