Commit f1e268da by 蒋勇

d

parent c2b0472f
...@@ -82,6 +82,7 @@ class CtlBase { ...@@ -82,6 +82,7 @@ class CtlBase {
} }
if (req.xctx.userid) {//在请求传递数据对象注入公司id if (req.xctx.userid) {//在请求传递数据对象注入公司id
pobj.userid = req.xctx.userid; pobj.userid = req.xctx.userid;
pobj.username= req.xctx.username
} }
pobj.bizpath = req.xctx.bizpath; pobj.bizpath = req.xctx.bizpath;
} }
......
...@@ -31,6 +31,10 @@ class BizOptCtl extends CtlBase { ...@@ -31,6 +31,10 @@ class BizOptCtl extends CtlBase {
robj.business_info_phone = element.business_info.contactsPhone;//联系电话 robj.business_info_phone = element.business_info.contactsPhone;//联系电话
robj.business_status = element.business_status;//商机当前状态 robj.business_status = element.business_status;//商机当前状态
robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期 robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期
robj.servicerName = element.facilitator_name;
robj.sourceName = element.source_name;//渠道来源
rarr.push(robj); rarr.push(robj);
}); });
rs.results.rows = rarr; rs.results.rows = rarr;
......
...@@ -27,6 +27,7 @@ class DeliverybillCtl extends CtlBase { ...@@ -27,6 +27,7 @@ class DeliverybillCtl extends CtlBase {
robj.businessType = element.product_code;//产品编码 robj.businessType = element.product_code;//产品编码
robj.sourceName = element.source_name;//渠道来源 robj.sourceName = element.source_name;//渠道来源
robj.channelNumber = element.source_number;//渠道编码 robj.channelNumber = element.source_number;//渠道编码
robj.servicerName = element.facilitator_name;
robj.baseInfo = element.delivery_info;//交付单详情 robj.baseInfo = element.delivery_info;//交付单详情
robj.payStatus = element.delivery_info.payStatus;//交付状态 robj.payStatus = element.delivery_info.payStatus;//交付状态
robj.costPrice = element.cost_price;//成本 robj.costPrice = element.cost_price;//成本
...@@ -226,7 +227,9 @@ class DeliverybillCtl extends CtlBase { ...@@ -226,7 +227,9 @@ class DeliverybillCtl extends CtlBase {
} }
async settleApply(p,q,req){ async settleApply(p,q,req){
let ids=p.ids
let rtn=await this.service.settleApply(ids,req.userid,req.username)
return system.getResult({})
} }
/*根据商机编号插入交付单信息*/ /*根据商机编号插入交付单信息*/
async insertInfo(pobj,qobj,req){//队列的时候用 async insertInfo(pobj,qobj,req){//队列的时候用
......
...@@ -6,6 +6,17 @@ class DeliverybillService extends ServiceBase { ...@@ -6,6 +6,17 @@ class DeliverybillService extends ServiceBase {
constructor() { constructor() {
super("bizchance", ServiceBase.getDaoName(DeliverybillService)); super("bizchance", ServiceBase.getDaoName(DeliverybillService));
} }
async settleApply(ids,uid,uname){
var self=this
return this.db.transaction(async function (t){
//先按照ids查询出交付单的合计服务成本
//生成结算单,结算单状态为待审核
//然后按照ids更新交付单的状态为结算中,更新结算单的id到
});
}
async findAndCountAll(obj) { async findAndCountAll(obj) {
var self = this; var self = this;
const apps = await this.dao.findAndCountAll(obj); const apps = await this.dao.findAndCountAll(obj);
......
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