Commit 33e1c5fc by 孙亚楠

d

parent 15abb784
......@@ -13,7 +13,8 @@ module.exports = (db, DataTypes) => {
operator_path: DataTypes.BIGINT ,defaultValue:'', comment:'业务员权限路径',
close_reason: DataTypes.STRING ,defaultValue:'', comment:'关闭原因 10 客户无意向 20 客户联系不上 30 客户暂时不需要 40 客户已购买其他家 50 其他',
close_remarks: DataTypes.INTEGER ,defaultValue:'', comment:'关闭备注',
callback_url: DataTypes.STRING ,defaultValue:'', comment:'阿里回调地址'
callback_url: DataTypes.STRING ,defaultValue:'', comment:'阿里回调地址',
clue_content:DataTypes.STRING ,defaultValue:'', comment:'线索内容',
}, {
paranoid: true,
underscored: true,
......
......@@ -34,7 +34,8 @@ class CclueService extends ServiceBase {
operator_path : this.trim(params.operator_path),
callback_url : this.trim(params.callback_url),
status:"10",
deliver_id:this.trim(params.deliver_id)
deliver_id:this.trim(params.deliver_id),
clue_content:this.trim(params.clue_content)||""
};
try{
await this.db.transaction(async t =>{
......@@ -117,7 +118,7 @@ class CclueService extends ServiceBase {
try{
let countRes = await this.dao.countClue(params);
if(countRes.count==0){
return system.getResult({count: 0, row: []});
return system.getResult({count: 0, rows: []});
}
let list =await this.dao.listClue(params);
let clueIds = [];
......@@ -135,6 +136,19 @@ class CclueService extends ServiceBase {
}else{
element.status_name = "";
}
//关闭原因 10 客户无意向 20 客户联系不上 30 客户暂时不需要 40 客户已购买其他家 50 其他
if(element.close_reason=='10'){
element.close_reason_name = "客户无意向";
}else if(element.close_reason=='20'){
element.close_reason_name = "客户联系不上";
}else if(element.close_reason=='30'){
element.close_reason_name = "客户暂时不需要";
}else if(element.close_reason=='40'){
element.close_reason_name = "客户已购买其他家";
}else{
element.close_reason_name = "其他";
}
clueIds.push(element.id);
}
await this.formatCscheme(list, clueIds);
......
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