Commit 9015702a by Sxy

fix: 套餐 截止时间

parent bb724402
...@@ -116,13 +116,17 @@ class CompanycaseService extends ServiceBase { ...@@ -116,13 +116,17 @@ class CompanycaseService extends ServiceBase {
(system.SERVICECODE.AGENTCASE1 === deliverData.product_code && (system.SERVICECODE.AGENTCASE1 === deliverData.product_code &&
deliverData.delivery_status === system.SERVERSESTATUS.RECEIVED) deliverData.delivery_status === system.SERVERSESTATUS.RECEIVED)
) { ) {
if (!pobj.startTime || !pobj.endTime) { if (!pobj.startTime) {
throw new Error("请传入 服务的起止时间") throw new Error("请传入 服务的起止时间")
} else { } else {
const delivery_info = { const delivery_info = {
...deliverData.delivery_info, ...deliverData.delivery_info,// Moment(time).startOf("month").format("YYYY-MM-DD HH:mm:ss"),
startTime: system.SERVICECODE.REGADDRCASE1 === deliverData.product_code ? moment(pobj.startTime).format('YYYY-MM-DD') : moment(pobj.startTime).format('YYYY-MM'), startTime: system.SERVICECODE.REGADDRCASE1 === deliverData.product_code
endTime: system.SERVICECODE.REGADDRCASE1 === deliverData.product_code ? moment(pobj.endTime).format('YYYY-MM-DD') : moment(pobj.endTime).format('YYYY-MM') ? moment(pobj.startTime).startOf("day").format('YYYY-MM-DD HH:mm:ss')
: moment(pobj.startTime).startOf("month").format('YYYY-MM-DD HH:mm:ss'),
endTime: system.SERVICECODE.REGADDRCASE1 === deliverData.product_code
? moment(pobj.startTime).add(11, 'month').endOf("day").format('YYYY-MM-DD HH:mm:ss')
: moment(pobj.startTime).add(11, 'month').endOf("month").format('YYYY-MM-DD HH:mm:ss'),
} }
updateData = { updateData = {
delivery_status: status, delivery_status: status,
......
...@@ -69,7 +69,7 @@ class GongshangClient extends BaseClient { ...@@ -69,7 +69,7 @@ class GongshangClient extends BaseClient {
case system.SERVERSESTATUS.ENGRAVING: // 刻章环节 case system.SERVERSESTATUS.ENGRAVING: // 刻章环节
status = this.CIRCUITSTATUS.ENGRAVING; status = this.CIRCUITSTATUS.ENGRAVING;
break break
case system.SERVERSESTATUS.SUCCESS: // 服务中 case system.SERVERSESTATUS.SUCCESS:
return "SUCCESS" return "SUCCESS"
default: default:
throw new Error("此状态手动不能更改"); throw new Error("此状态手动不能更改");
...@@ -139,7 +139,7 @@ class GongshangClient extends BaseClient { ...@@ -139,7 +139,7 @@ class GongshangClient extends BaseClient {
status = this.CIRCUITSTATUS.SUCCESS; status = this.CIRCUITSTATUS.SUCCESS;
break break
case system.SERVERSESTATUS.SERVICEING: // 服务中 case system.SERVERSESTATUS.SERVICEING: // 服务中
status = system.SERVERSESTATUS.SUCCESS; status = this.CIRCUITSTATUS.SUCCESS;
break break
default: default:
throw new Error("此状态手动不能更改"); throw new Error("此状态手动不能更改");
......
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