Commit b581d7d1 by Sxy

feat: 支持商机 状态重复推

parent ec3ba444
...@@ -176,6 +176,18 @@ class BizOptCtl extends CtlBase { ...@@ -176,6 +176,18 @@ class BizOptCtl extends CtlBase {
var pobj = mobj.d; var pobj = mobj.d;
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.currentStatus && pobj.currentStatus != 'undefined') { if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.currentStatus && pobj.currentStatus != 'undefined') {
try { try {
const businessData = await this.service.findOne({ demand_code: pobj.businessMode });
if (businessData) {
if (["isFinished", "isClosed"].includes(businessData.business_status) && ["followingUp", "beforeConfirmation", "isFinished", "isClosed"].includes(pobj.currentStatus)) {
return system.getResult("重复操作");
}
if (["beforeConfirmation"].includes(businessData.business_status) && ["followingUp"].includes(pobj.currentStatus)) {
return system.getResult("重复操作");
}
if (["followingUp"].includes(businessData.business_status) && ["followingUp"].includes(pobj.currentStatus)) {
return system.getResult("重复操作");
}
}
await this.service.updateStatusByDemandCode(pobj); await this.service.updateStatusByDemandCode(pobj);
await this.schemeService.updateStatusByDemandCode(pobj);//同时更新方案的状态 await this.schemeService.updateStatusByDemandCode(pobj);//同时更新方案的状态
var res = await this.service.findInfoByDemandCode(pobj); var res = await this.service.findInfoByDemandCode(pobj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment