Browse Source

[新增] 供应商供货发货时判断当前时间和预计收货时间,不同时提示

master
邓平艺 5 years ago
parent
commit
7381a33a2f
  1. 32
      supplier/pages/gonghuo/detail.vue

32
supplier/pages/gonghuo/detail.vue

@ -116,8 +116,11 @@
<u-popup v-model="is_show_receiving" mode="center" border-radius="20">
<view class="popup-box">
<view class="content">
<view class="popup-title">发货提醒</view>
<view class="popup-desc">请填写车辆信息司机信息</view>
<view class="popup-title">送货信息</view>
<view class="popup-desc">
<u-alert-tips :type="is_atypism ? 'error' : 'warning'" :title="receiving_desc"></u-alert-tips>
</view>
<!-- <view class="popup-desc" :style="{color: is_atypism ? '#ff0000' : '#555555'}">{{ receiving_desc }}</view> -->
<view class="lf-row-between popup-input">
<view>车牌号</view>
<input placeholder="请输入车牌号" v-model="l_p_num" />
@ -132,8 +135,8 @@
</view>
</view>
<view class="foot-btn">
<u-button class="popup-btn" @click="is_show_receiving = false">取消</u-button>
<u-button class="popup-btn" @click="confirmDeliver">确定</u-button>
<u-button class="popup-btn" @click="is_show_receiving = false">{{ is_atypism ? '取消发货' : '取消' }}</u-button>
<u-button class="popup-btn" @click="confirmDeliver">{{ is_atypism ? '继续发货' : '确定' }}</u-button>
</view>
</view>
</u-popup>
@ -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;

Loading…
Cancel
Save