Commit 214712b2 by 王勇飞

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

parents 6b6a2444 c91128c2
...@@ -40,7 +40,7 @@ class DeliverybillDao extends Dao { ...@@ -40,7 +40,7 @@ class DeliverybillDao extends Dao {
}) })
// 根据 页面 过滤 交付状态 // 根据 页面 过滤 交付状态
switch (qobj.bizpath) { switch (qobj.bizpath) {
case "/configManageMent/deliveryRecord": // 交付单记录 case "/deliveryManage/deliveryRecord": // 交付单记录
filters.push({ filters.push({
delivery_status: { delivery_status: {
$in: [ $in: [
...@@ -49,7 +49,7 @@ class DeliverybillDao extends Dao { ...@@ -49,7 +49,7 @@ class DeliverybillDao extends Dao {
} }
}); });
break break
case "/configManageMent/deliveryManage": //交付单处理 case "/deliveryManage/deliveryDealWith": //交付单处理
filters.push({ filters.push({
delivery_status: { delivery_status: {
$in: [ $in: [
...@@ -98,9 +98,25 @@ class DeliverybillDao extends Dao { ...@@ -98,9 +98,25 @@ class DeliverybillDao extends Dao {
} }
if (qc.where.setupStatus) { if (qc.where.setupStatus) {
filters.push({ if (qobj && qobj.search && qobj.search.setupStatus && qobj.search.setupStatus === system.SERVERSESTATUS.SETUP) {
v_setup_status: qc.where.setupStatus filters.push({
}); v_setup_status: qc.where.setupStatus
});
} else {
filters.push({
$or: [
{
v_setup_status: qc.where.setupStatus
},
{
v_setup_status: {
$eq: null
}
}
]
});
}
delete qc.where.setupStatus; delete qc.where.setupStatus;
} }
......
...@@ -62,6 +62,9 @@ class DeliverybillService extends ServiceBase { ...@@ -62,6 +62,9 @@ class DeliverybillService extends ServiceBase {
if (deliverData.delivery_status !== system.SERVERSESTATUS.INSERVICE) { if (deliverData.delivery_status !== system.SERVERSESTATUS.INSERVICE) {
throw new Error("该状态下不可建账"); throw new Error("该状态下不可建账");
} }
if (deliverData.delivery_info.setupStatus && deliverData.delivery_info.setupStatus === system.SERVERSESTATUS.SETUP) {
throw new Error("已建账");
}
await this.dao.updateByWhere({ await this.dao.updateByWhere({
delivery_info: { delivery_info: {
...delivery_info, ...delivery_info,
......
...@@ -415,7 +415,7 @@ System.SERVERSESTATUS = { ...@@ -415,7 +415,7 @@ System.SERVERSESTATUS = {
INSERVICE: "inservice",//服务中 INSERVICE: "inservice",//服务中
CLOSED: "closed",//已关闭 、已终止 CLOSED: "closed",//已关闭 、已终止
NOTSETUP: "notsetup",//未建账 NOTSETUP: "notsetup",//未建账
SETUP: "setup"//建账 SETUP: "setup"//建账
} }
/* /*
......
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