|
@@ -51,12 +51,18 @@
|
|
|
<u-button style="margin-bottom: 20rpx;" type="success"
|
|
|
@click="humidityRecording('print')">打印温湿度记录</u-button>
|
|
|
</view>
|
|
|
- <u-modal :show="show" confirmText="停止" showCancelButton :buttonReverse="true" @cancel="cancel"
|
|
|
- @confirm="confirm">
|
|
|
- <view class="slot-content">
|
|
|
- <view>{{stoprecording}}</view>
|
|
|
- </view>
|
|
|
- </u-modal>
|
|
|
+ <view class="card_stop">
|
|
|
+ <u-modal :show="show" confirmText="停止" showCancelButton :buttonReverse="true" @cancel="cancel"
|
|
|
+ @confirm="confirm">
|
|
|
+ <view class="slot-content" style="width: 100%;">
|
|
|
+ <view>{{stoprecording}}</view>
|
|
|
+ <view style="width: 100%;">
|
|
|
+ <view style="padding: 10px 0px;font-size: 30rpx;color: #ff9900;">选择停止时间:</view>
|
|
|
+ <uni-datetime-picker v-model="stopTime" type="datetime" @change="changeStopTime" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+ </view>
|
|
|
<u-popup :show="shareShow" mode="center" round="5" closeable @close="shareShow = false">
|
|
|
<view style="padding: 0rpx 30rpx 30rpx 30rpx;margin-top: 50rpx; width: 400rpx;">
|
|
|
<u-button style="margin: 20rpx 0rpx;" type="success" text="发送邮箱" @click="sendingMailbox"></u-button>
|
|
@@ -180,6 +186,7 @@
|
|
|
waybillData: [],
|
|
|
shareShow: false,
|
|
|
stoprecording: '打印前需停止记录,是否继续?',
|
|
|
+ stopTime: this.getDateTime(new Date()),
|
|
|
humitureType: '',
|
|
|
checkboxValue: [],
|
|
|
emailShow: false,
|
|
@@ -348,31 +355,41 @@
|
|
|
cancel() {
|
|
|
this.show = false
|
|
|
},
|
|
|
+ // 确定停止记录
|
|
|
confirm() {
|
|
|
- this.$api.post('/api/waybill/stop-record', {
|
|
|
- waybillNo: this.waybillData.waybillNo,
|
|
|
- startTime: this.getDateTime(new Date()),
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- if (this.humitureType == 'send') {
|
|
|
- this.show = false
|
|
|
- this.shareShow = true
|
|
|
- } else {
|
|
|
- if (this.waybillData.id) {
|
|
|
- this.$cache.setCache('commodity', JSON.stringify(this.waybillData))
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/order/quantum?waybillNo=' + this.waybillData.waybillNo +
|
|
|
- '&printType=record'
|
|
|
- });
|
|
|
+ if (this.stopTime) {
|
|
|
+ this.$api.post('/api/waybill/stop-record', {
|
|
|
+ waybillNo: this.waybillData.waybillNo,
|
|
|
+ startTime: this.stopTime,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (this.humitureType == 'send') {
|
|
|
+ this.show = false
|
|
|
+ this.shareShow = true
|
|
|
} else {
|
|
|
- uni.$u.toast('暂无运单详情数据,无法打印!')
|
|
|
+ if (this.waybillData.id) {
|
|
|
+ this.$cache.setCache('commodity', JSON.stringify(this.waybillData))
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/order/quantum?waybillNo=' + this.waybillData
|
|
|
+ .waybillNo +
|
|
|
+ '&printType=record'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.$u.toast('暂无运单详情数据,无法打印!')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- this.show = false
|
|
|
- }).catch(() => {
|
|
|
- this.show = false
|
|
|
- })
|
|
|
+ this.show = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.show = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.$u.toast('请选择停止时间')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 选择停止时间
|
|
|
+ changeStopTime(time) {
|
|
|
+ this.stopTime = time
|
|
|
},
|
|
|
// 折叠面板
|
|
|
foldingPanel(value) {
|
|
@@ -591,4 +608,8 @@
|
|
|
padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
|
|
|
padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
|
|
|
}
|
|
|
+
|
|
|
+ .card_stop ::v-deep .u-modal__button-group {
|
|
|
+ border-top: 1px solid #e5e5e5;
|
|
|
+ }
|
|
|
</style>
|