Commit cc627f15 by LJM

js

parent 3e453f93
Showing with 26 additions and 18 deletions
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<view class="btn-box"> <view class="btn-box">
<template v-if="andReceipt.car_confirm_time"> <template v-if="andReceipt.car_confirm_time">
<view class="btn row rowCenter verCenter curr">查车确认 (关务)</view> <view class="btn row rowCenter verCenter curr">查车确认 (关务)</view>
<view class="is row rowCenter verCenter"> <view class="is row rowCenter verCenter" v-if="andReceipt.car_confirm_name">
<text class="time">{{ andReceipt.car_confirm_time }}</text> <text class="time">{{ andReceipt.car_confirm_time }}</text>
<text class="author">{{ andReceipt.car_confirm_name }}</text> <text class="author">{{ andReceipt.car_confirm_name }}</text>
<text class="status">已确认</text> <text class="status">已确认</text>
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
format: true format: true
}); });
return { return {
isClick: true,
date: currentDate, date: currentDate,
andReceipt: {}, andReceipt: {},
timer: '' timer: ''
...@@ -148,23 +149,30 @@ export default { ...@@ -148,23 +149,30 @@ export default {
return false; return false;
} }
} }
this.request(API.signTodayCustomsDeclarationAndReceipt, 'POST', { type: type, datetime: this.date }, false).then(res => { if (this.isClick) {
if (res.err_code === 0) { this.request(API.signTodayCustomsDeclarationAndReceipt, 'POST', { type: type, datetime: this.date }, true).then(res => {
uni.showToast({ this.isClick = false;
title: '操作成功', if (res.err_code === 0) {
duration: 2000 uni.showToast({
}); title: '操作成功',
setTimeout(() => { duration: 2000
this.getTodayCustomsDeclarationAndReceipt(); });
}, 2000); setTimeout(() => {
} else { this.getTodayCustomsDeclarationAndReceipt();
uni.showModal({ }, 2000);
title: '提示', setTimeout(() => {
content: res.err_msg, this.isClick = true;
showCancel: false }, 2500);
}); } else {
} this.isClick = true;
}); uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
}
} }
} }
}; };
......
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 sign in to comment