|
@@ -262,24 +262,32 @@
|
|
// 确认收货
|
|
// 确认收货
|
|
async toConfirm(item) {
|
|
async toConfirm(item) {
|
|
const that = this;
|
|
const that = this;
|
|
- item.transport.customer_receive = true;
|
|
|
|
- const arr = await that.$api(`/afterSale/${item.id}`, 'POST', {
|
|
|
|
- transport: item.transport
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '是否确认收货?',
|
|
|
|
+ success: async function(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ item.transport.customer_receive = true;
|
|
|
|
+ const arr = await that.$api(`/afterSale/${item.id}`, 'POST', {
|
|
|
|
+ transport: item.transport
|
|
|
|
+ });
|
|
|
|
+ if (arr.errcode == '0') {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `确认收货成功`,
|
|
|
|
+ icon: 'success',
|
|
|
|
+ });
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ detail: 1
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: arr.errmsg,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
- if (arr.errcode == '0') {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: `确认收货成功`,
|
|
|
|
- icon: 'success',
|
|
|
|
- });
|
|
|
|
- uni.navigateBack({
|
|
|
|
- detail: 1
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: arr.errmsg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
// 查看物流
|
|
// 查看物流
|
|
toLogi(e) {
|
|
toLogi(e) {
|