Commit 6965e60b by 王勇飞

Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax

parents d1bca6f1 7d29d02a
...@@ -409,6 +409,34 @@ class BizOptCtl extends CtlBase { ...@@ -409,6 +409,34 @@ class BizOptCtl extends CtlBase {
} }
} }
/*根据需求编号更新需求状态*/
async updatepayStatusByDemandCode(mobj, qobj, req) {
var pobj = mobj.actionBody;
if (pobj.solutionBizId && pobj.solutionBizId != 'undefined') {
try {
pobj.demand_code = pobj.solutionBizId;
if (pobj.operateType == 'PAID') {
pobj.business_status = 'isFinished';
}
var res = await this.service.findInfoByDemandCode(pobj);
if (res) {
Object.assign(res.business_info, { "payStatus": "已支付" })
await res.update({ business_info: res.business_info })
await this.service.updateStatusByDemandCode(pobj);
return system.getResult("操作成功!");
} else {
return system.getResultError("更新需求状态出错");
}
} catch (error) {
return system.getResultError(error);
}
} else {
return system.getResultError("参数错误!");
}
}
timeFormat(date) { timeFormat(date) {
let localTime = moment.utc(date).toDate(); let localTime = moment.utc(date).toDate();
localTime = moment(localTime).format("YYYY-MM-DD"); localTime = moment(localTime).format("YYYY-MM-DD");
......
...@@ -97,6 +97,13 @@ class DeliverybillDao extends Dao { ...@@ -97,6 +97,13 @@ class DeliverybillDao extends Dao {
delete qc.where.deliveryStatus; delete qc.where.deliveryStatus;
} }
if (qc.where.owner) {
filters.push({
salesman_name: qc.where.owner
});
delete qc.where.owner;
}
if (qc.where.setupStatus) { if (qc.where.setupStatus) {
if (qobj && qobj.search && qobj.search.setupStatus && qobj.search.setupStatus === system.SERVERSESTATUS.SETUP) { if (qobj && qobj.search && qobj.search.setupStatus && qobj.search.setupStatus === system.SERVERSESTATUS.SETUP) {
filters.push({ filters.push({
......
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