diff --git a/supplier/pages/gonghuo/detail.vue b/supplier/pages/gonghuo/detail.vue index bd801ec..a07865d 100644 --- a/supplier/pages/gonghuo/detail.vue +++ b/supplier/pages/gonghuo/detail.vue @@ -116,8 +116,11 @@ - 发货提醒 - 请填写车辆信息、司机信息 + 送货信息 + + + + 车牌号 @@ -132,8 +135,8 @@ - 取消 - 确定 + {{ is_atypism ? '取消发货' : '取消' }} + {{ is_atypism ? '继续发货' : '确定' }} @@ -198,7 +201,9 @@ driver_phone: '', canteen_voucher: [], // 食堂端凭证 supplier_voucher: [], // 供应端凭证 - button_click: false + button_click: false, + receiving_desc: '请填写车辆信息、司机信息', + is_atypism: false } }, onLoad(options){ @@ -267,6 +272,18 @@ return obj; }); this.contents = contents; + + // 校验当前收货时间是否在预计收货时间内 + if(order.state == '备货中' && order.deadline_text){ + // 获取预计收货时间23:59分时间 + let estimateTime = new Date(new Date(order.deadline_text).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1; + let actualTime = new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1; // 获取今天23:59时间 + let day_text = this.$shared.recordTime(new Date(), '-', 'date'); + if(estimateTime != actualTime){ + this.receiving_desc = `食堂方的预计收货为 ${order.deadline_text},今天是 ${day_text},请与食堂方确认好收货日期,以免造成不必要的损失!`; + this.is_atypism = true; + } + } }); }, // 上传凭证图片 @@ -510,7 +527,8 @@ color: #555555; text-align: center; margin-top: 20rpx; - margin-bottom: 18rpx; + margin-bottom: 40rpx; + padding: 0 30rpx; } .popup-images{ display: flex; @@ -547,7 +565,7 @@ } } .popup-input{ - padding: 0 60rpx; + padding: 0 30rpx; box-sizing: border-box; height: 90rpx; font-size: 28rpx;