Commit 870c3be7 by 王栋源

wdy

parents 2d1416c2 077295ad
...@@ -32,10 +32,10 @@ module.exports = (db, DataTypes) => { ...@@ -32,10 +32,10 @@ module.exports = (db, DataTypes) => {
}, },
city: DataTypes.STRING(50), // 城市 city: DataTypes.STRING(50), // 城市
province: DataTypes.STRING(50), // 省份 province: DataTypes.STRING(50), // 省份
typeCode: DataTypes.STRING(50), //类型编码', typeCode: DataTypes.STRING(50), //产品类型编码',
typeName: DataTypes.STRING(50), //类型名称', typeName: DataTypes.STRING(50), //类型产品名称',
channelTypeCode: DataTypes.STRING(50), //渠道类型编码', channelTypeCode: DataTypes.STRING(50), //渠道产品类型编码',
channelTypeName: DataTypes.STRING(50), //渠道类型名称', channelTypeName: DataTypes.STRING(255), //渠道产品类型名称',
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
...@@ -84,6 +84,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -84,6 +84,7 @@ class NeedsolutionService extends ServiceBase {
var solutionNo = await this.getBusUid("ns"); var solutionNo = await this.getBusUid("ns");
ab["solutionNo"] = solutionNo; ab["solutionNo"] = solutionNo;
ab["status"] = "dqr"; ab["status"] = "dqr";
ab.solutionContent.notes="";
ab.solutionContent = JSON.stringify(ab.solutionContent); ab.solutionContent = JSON.stringify(ab.solutionContent);
var self = this; var self = this;
return await this.db.transaction(async function (t) { return await this.db.transaction(async function (t) {
...@@ -149,17 +150,9 @@ class NeedsolutionService extends ServiceBase { ...@@ -149,17 +150,9 @@ class NeedsolutionService extends ServiceBase {
return system.getResultFail(-100,"未知用户"); return system.getResultFail(-100,"未知用户");
} }
ab["createUserId"]=user.id; ab["createUserId"]=user.id;
// followManMobile: DataTypes.STRING,//跟进人手机号(合伙人)
// followManOnlyCode: DataTypes.STRING(50),//跟进者唯一码
if(!ab.needNo){ if(!ab.needNo){
return system.getResultFail(-101,"需求号不能为空"); return system.getResultFail(-101,"需求号不能为空");
} }
// if(!ab.followManMobile){
// return system.getResultFail(-102,"跟进人手机号不能为空");
// }
// if(!ab.followManOnlyCode){
// return system.getResultFail(-103,"跟进人唯一码不能为空");
// }
//获取需求信息 //获取需求信息
var needinfo = await this.needinfoDao.model.findOne({ var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ab.needNo},raw:true where:{needNo:ab.needNo},raw:true
...@@ -317,7 +310,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -317,7 +310,7 @@ class NeedsolutionService extends ServiceBase {
solutionContent["deliveryStatusName"] = solution_status[status]; solutionContent["deliveryStatusName"] = solution_status[status];
solutionContent["updated"] = new Date(); solutionContent["updated"] = new Date();
if(ab.note){ if(ab.note){
solutionContent["notes"] = ab.note; solutionContent["notes"] = ab.note;//用户反馈信息
} }
solutionContent = JSON.stringify(solutionContent); solutionContent = JSON.stringify(solutionContent);
var reqObj={ var reqObj={
...@@ -352,7 +345,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -352,7 +345,7 @@ class NeedsolutionService extends ServiceBase {
return system.getResultFail(-103,"方案状态错误,只能废弃待确认方案"); return system.getResultFail(-103,"方案状态错误,只能废弃待确认方案");
} }
await this.dao.update({id:ns.id,status:"yzf"});//方案废弃 await this.dao.update({id:ns.id,status:"yzf"});//方案废弃
return system.getResultSuccess(); return system.getResultSuccess({channelSolutionNo:ns.channelSolutionNo});
} }
//根据需求关闭方案(关闭需求后调用) //根据需求关闭方案(关闭需求后调用)
async abolishProgrammeByNeed(pobj){ async abolishProgrammeByNeed(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