修复问题单退回后拼单份额无法验收
This commit is contained in:
@@ -435,6 +435,12 @@ async function submitWorkerSharingAcceptance(
|
||||
errorCode: 'work_order_sharing_share_submitted',
|
||||
})
|
||||
}
|
||||
if (result.failureReason === 'work_order_status_invalid') {
|
||||
throw createHttpError('当前拼单状态不能提交验收资料,请联系管理员', {
|
||||
statusCode: 409,
|
||||
errorCode: 'work_order_sharing_submit_status_invalid',
|
||||
})
|
||||
}
|
||||
if (!result.share) {
|
||||
throw createHttpError('未找到拼单份额', {
|
||||
statusCode: 404,
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
resolveWorkOrderShareJoinQuantity,
|
||||
resolveOpenSharingSyncReward,
|
||||
} from '../../repositories/worker-platform/index.js'
|
||||
import { resolveProblemReturnToWorkerStatus } from '../../repositories/worker-platform/work-order-issue-repo.js'
|
||||
import type { OrderItemRow, OrderRow } from '../../types/repository/rows.js'
|
||||
import {
|
||||
assertWithdrawChannelAllowedForAmount,
|
||||
@@ -1045,6 +1046,13 @@ test('拼单份额撤单只允许未验收份额并让母工单回到大厅状
|
||||
assert.equal(resolveWorkOrderShareCancellationStatus('open', 'cancelled'), null)
|
||||
})
|
||||
|
||||
test('问题单退回打手按标记前状态恢复', () => {
|
||||
assert.equal(resolveProblemReturnToWorkerStatus('pending_acceptance'), 'pending_acceptance')
|
||||
assert.equal(resolveProblemReturnToWorkerStatus('open'), 'open')
|
||||
assert.equal(resolveProblemReturnToWorkerStatus('in_progress'), 'in_progress')
|
||||
assert.equal(resolveProblemReturnToWorkerStatus(''), 'in_progress')
|
||||
})
|
||||
|
||||
test('后台更新资料时普通接单可以修改接单价格', () => {
|
||||
assert.equal(
|
||||
resolveAdminMaterialRewardAmount({
|
||||
|
||||
Reference in New Issue
Block a user