Commit 910042ea by 蒋勇

d

parent a484205f
......@@ -25,10 +25,10 @@ class BizOptService extends ServiceBase {
finishedCount=await this.dao.findCount({where:{business_status:'isFinished'}})
closedCount=await this.dao.findCount({where:{business_status:'isClosed'}})
}else{
waittoHandledCount=await this.dao.findCount({where:{business_status:'beforeSubmission',salesman_opcode:opath}})
handlingCount=await this.dao.findCount({where:{business_status:'beforeConfirmation',salesman_opcode:opath}})
finishedCount=await this.dao.findCount({where:{business_status:'isFinished',salesman_opcode:opath}})
closedCount=await this.dao.findCount({where:{business_status:'isClosed',salesman_opcode:opath}})
waittoHandledCount=await this.dao.findCount({where:{business_status:'beforeSubmission',salesman_opcode:opath,'facilitator_id':companyId}})
handlingCount=await this.dao.findCount({where:{business_status:'beforeConfirmation',salesman_opcode:opath,'facilitator_id':companyId}})
finishedCount=await this.dao.findCount({where:{business_status:'isFinished',salesman_opcode:opath,'facilitator_id':companyId}})
closedCount=await this.dao.findCount({where:{business_status:'isClosed',salesman_opcode:opath,'facilitator_id':companyId}})
}
//成单率
let allChance=waittoHandledCount+handlingCount+finishedCount+closedCount
......
......@@ -30,16 +30,16 @@ class DeliverybillService extends ServiceBase {
settled=await this.dao.findCount({where:{settle_status:'settled'}})
settledAmount=await this.dao.findSum('cost_price',{where:{settle_status:'settled'}})
}else{
waittoHandledCount=await this.dao.findCount({where:{delivery_status:'received',salesman_opcode:opath}})
handlingCount=await this.dao.findCount({where:{delivery_status:{[this.db.Op.notIn]:['received','success','closed']},salesman_opcode:opath}})
finishedCount=await this.dao.findCount({where:{delivery_status:'success',salesman_opcode:opath}})
closedCount=await this.dao.findCount({where:{delivery_status:'closed',salesman_opcode:opath}})
toSettle=await this.dao.findCount({where:{settle_status:'waittosettle',salesman_opcode:opath}})
toSettleAmount=await this.dao.findSum('cost_price',{where:{settle_status:'waittosettle',salesman_opcode:opath}})
settling=await this.dao.findCount({where:{settle_status:'settling',salesman_opcode:opath}})
settlingAmount=await this.dao.findSum('cost_price',{where:{settle_status:'settling',salesman_opcode:opath}})
settled=await this.dao.findCount({where:{settle_status:'settled',salesman_opcode:opath}})
settledAmount=await this.dao.findSum('cost_price',{where:{settle_status:'settled',salesman_opcode:opath}})
waittoHandledCount=await this.dao.findCount({where:{delivery_status:'received',salesman_opcode:opath,'facilitator_id':companyId}})
handlingCount=await this.dao.findCount({where:{delivery_status:{[this.db.Op.notIn]:['received','success','closed']},salesman_opcode:opath,'facilitator_id':companyId}})
finishedCount=await this.dao.findCount({where:{delivery_status:'success',salesman_opcode:opath,'facilitator_id':companyId}})
closedCount=await this.dao.findCount({where:{delivery_status:'closed',salesman_opcode:opath,'facilitator_id':companyId}})
toSettle=await this.dao.findCount({where:{settle_status:'waittosettle',salesman_opcode:opath,'facilitator_id':companyId}})
toSettleAmount=await this.dao.findSum('cost_price',{where:{settle_status:'waittosettle',salesman_opcode:opath,'facilitator_id':companyId}})
settling=await this.dao.findCount({where:{settle_status:'settling',salesman_opcode:opath,'facilitator_id':companyId}})
settlingAmount=await this.dao.findSum('cost_price',{where:{settle_status:'settling',salesman_opcode:opath,'facilitator_id':companyId}})
settled=await this.dao.findCount({where:{settle_status:'settled',salesman_opcode:opath,'facilitator_id':companyId}})
settledAmount=await this.dao.findSum('cost_price',{where:{settle_status:'settled',salesman_opcode:opath,'facilitator_id':companyId}})
}
//成单率
let allHandled=finishedCount+closedCount
......
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