Commit e8f81609 by 蒋勇

d

parent f1e268da
......@@ -10,10 +10,15 @@ class DeliverybillService extends ServiceBase {
var self=this
return this.db.transaction(async function (t){
//先按照ids查询出交付单的合计服务成本
let settleAmount=await self.dao.model.findSum("cost_price",{where:{[self.db.Op.In]:ids},transaction:t})
let settlecode=await self. getBusUid("JSD")
let settleObj={
code:settlecode,
settle_amount:settleAmount,
}
//生成结算单,结算单状态为待审核
//然后按照ids更新交付单的状态为结算中,更新结算单的id到
await self.db.models.settlebill.create(settleObj,{transaction:t})
//然后按照ids更新交付单的状态为结算中,更新结算单的id到交付单表
});
}
......
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