Commit 4f2e2db3 by 张立顺

fix bug

1 parent cd550b02
...@@ -124,7 +124,7 @@ export function prepareSubmitPayload(orderObj, context = {}) { ...@@ -124,7 +124,7 @@ export function prepareSubmitPayload(orderObj, context = {}) {
orderCreateType: context.orderCreateType orderCreateType: context.orderCreateType
}) })
if ( if (
['createWithPay', 'supplementOrder'].includes(apiName) && ['createWithPay', 'supplementOrder', 'correctionOrder'].includes(apiName) &&
submitObj.customer submitObj.customer
) { ) {
submitObj.customer = reconcileBoutiqueCustomerDailyFields( submitObj.customer = reconcileBoutiqueCustomerDailyFields(
......
...@@ -236,4 +236,28 @@ describe('submitPayload.helpers', () => { ...@@ -236,4 +236,28 @@ describe('submitPayload.helpers', () => {
'2026-08-04 00:00:00' '2026-08-04 00:00:00'
) )
}) })
it('IT-WO-SUB-019: correction order submits the same delivery datetime format as a new order', () => {
const { apiName, submitObj } = prepareSubmitPayload(
{
...baseOrder,
customer: {
...baseOrder.customer,
salesType: 3,
actualDeliveryDate: 1788105600000
}
},
{
save: false,
isErrorOrder: true,
merchantBrands: [{ brandName: '宝马' }]
}
)
assert.equal(apiName, 'correctionOrder')
assert.equal(
submitObj.customer.actualDeliveryDate,
'2026-08-31 00:00:00'
)
})
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!