|
@@ -285,6 +285,9 @@ module.exports = app => {
|
|
|
// 无下一审核人表示,审核结束
|
|
|
|
|
|
const advanceInfo = await this.ctx.service.advance.getDataById(advanceId);
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + advanceInfo.tid + '/advance/' + advanceInfo.id + '/detail'
|
|
|
+ );
|
|
|
if (nextAudit) {
|
|
|
// 流程至下一审批人
|
|
|
await transaction.update(this.tableName, { id: nextAudit.id, status: auditConst.status.checking, create_time: time });
|
|
@@ -295,9 +298,7 @@ module.exports = app => {
|
|
|
status: auditConst.status.checking,
|
|
|
});
|
|
|
// 微信模板通知
|
|
|
- const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
- this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + advanceInfo.tid + '/advance/' + advanceInfo.id + '/detail'
|
|
|
- );
|
|
|
+
|
|
|
const wechatData = {
|
|
|
wap_url: shenpiUrl,
|
|
|
qi: advanceConst.typeCol[advanceInfo.type].name + '第' + advanceInfo.order + '期',
|
|
@@ -317,10 +318,12 @@ module.exports = app => {
|
|
|
// 微信模板通知
|
|
|
const users = this._.uniq(this._.concat(this._.map(auditors, 'audit_id'), advanceInfo.uid));
|
|
|
const wechatData = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
qi: advanceConst.typeCol[advanceInfo.type].name + '第' + advanceInfo.order + '期',
|
|
|
status: wxConst.status.success,
|
|
|
tips: wxConst.tips.success,
|
|
|
tp: parseFloat(advanceInfo.cur_amount),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.YFK, smsTypeConst.judge.result.toString(), wxConst.template.advance, wechatData);
|
|
|
}
|
|
@@ -369,11 +372,16 @@ module.exports = app => {
|
|
|
// 微信模板通知
|
|
|
const advanceInfo = await this.ctx.service.advance.getDataById(advanceId);
|
|
|
const users = this._.uniq(this._.concat(this._.map(auditors, 'audit_id'), advanceInfo.uid));
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + advanceInfo.tid + '/advance/' + advanceInfo.id + '/detail'
|
|
|
+ );
|
|
|
const wechatData = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
qi: advanceConst.typeCol[advanceInfo.type].name + '第' + advanceInfo.order + '期',
|
|
|
status: wxConst.status.back,
|
|
|
tips: wxConst.tips.back,
|
|
|
tp: parseFloat(advanceInfo.cur_amount),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.YFK, smsTypeConst.judge.result.toString(), wxConst.template.advance, wechatData);
|
|
|
// 拷贝新一次审核流程列表
|