Commit cc627f15 by LJM

js

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