|
@@ -328,6 +328,7 @@ module.exports = app => {
|
|
|
const needYB = ['ledger', 'revise', 'change'];
|
|
const needYB = ['ledger', 'revise', 'change'];
|
|
|
const shenpiInfo = await this.ctx.service.tenderInfo.getTenderShenpiInfo(this.ctx.tender.id);
|
|
const shenpiInfo = await this.ctx.service.tenderInfo.getTenderShenpiInfo(this.ctx.tender.id);
|
|
|
for (const code of data.shenpiList.split(',')) {
|
|
for (const code of data.shenpiList.split(',')) {
|
|
|
|
|
+ const new_sp_type = shenpiConst.sp_type[code] || shenpiConst.sp_other_type[code] || shenpiConst.cost_sp_type[code];
|
|
|
// 把当前审批状态复制到其他标段里
|
|
// 把当前审批状态复制到其他标段里
|
|
|
if (shenpiInfo[code] !== shenpi_status) {
|
|
if (shenpiInfo[code] !== shenpi_status) {
|
|
|
shenpiInfo[code] = shenpi_status;
|
|
shenpiInfo[code] = shenpi_status;
|
|
@@ -339,7 +340,7 @@ module.exports = app => {
|
|
|
throw '选择同步的流程中存在审批组,无法设置同步';
|
|
throw '选择同步的流程中存在审批组,无法设置同步';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- await transaction.delete(this.tableName, { tid: this.ctx.tender.id, sp_type, sp_status: shenpiInfo[code] });
|
|
|
|
|
|
|
+ await transaction.delete(this.tableName, { tid: this.ctx.tender.id, sp_type: new_sp_type, sp_status: shenpiInfo[code] });
|
|
|
const flows = data.flowList.split(';');
|
|
const flows = data.flowList.split(';');
|
|
|
let audit_order = 1;
|
|
let audit_order = 1;
|
|
|
for (const f of flows) {
|
|
for (const f of flows) {
|
|
@@ -351,7 +352,7 @@ module.exports = app => {
|
|
|
if (aid !== this.ctx.tender.data.user_id || needYB.indexOf(code) >= 0) {
|
|
if (aid !== this.ctx.tender.data.user_id || needYB.indexOf(code) >= 0) {
|
|
|
insertList.push({
|
|
insertList.push({
|
|
|
tid: this.ctx.tender.id,
|
|
tid: this.ctx.tender.id,
|
|
|
- sp_type, sp_status: shenpi_status,
|
|
|
|
|
|
|
+ sp_type: new_sp_type, sp_status: shenpi_status,
|
|
|
audit_id: aid,
|
|
audit_id: aid,
|
|
|
audit_type: auditTypeValid ? audit_type : auditType.key.common,
|
|
audit_type: auditTypeValid ? audit_type : auditType.key.common,
|
|
|
audit_order: audit_order,
|
|
audit_order: audit_order,
|