Commit cb006e89 by 张立顺

feat 模拟请求修改

1 parent 6f037237
import { mapAbnormalFlowDeclarationApproveResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationApproveResponse";
import { mapAbnormalFlowDeclarationDetailResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationDetailResponse";
import { mapAbnormalFlowDeclarationApproveResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationApproveResponse";
import { mapAbnormalFlowDeclarationDetailResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationDetailResponse";
function delay(result, ms = 300) {
return new Promise((resolve) => {
setTimeout(() => resolve(result), ms);
......@@ -220,16 +220,16 @@ export function mockPcAbnormalFlowDeclarationDetail(data = {}) {
if (!item) {
return delayReject(new Error("报备记录不存在"));
}
return delay(mapAbnormalFlowDeclarationDetailResponse({
tradeInfo: buildTradeFields(item),
declarationInfo: {
abnormalType: item.abnormalType,
remark: item.remark,
createdBy: item.createdBy,
createdDate: item.createdDate,
voucherImageUrls: item.voucherImageUrls,
},
approvalLogs: item.approvalLogs || [],
return delay(mapAbnormalFlowDeclarationDetailResponse({
tradeInfo: buildTradeFields(item),
declarationInfo: {
abnormalType: item.abnormalType,
remark: item.remark,
createdBy: item.createdBy,
createdDate: item.createdDate,
voucherImageUrls: item.voucherImageUrls,
},
approvalLogs: item.approvalLogs || [],
}));
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!