|
|
|
@ -54,7 +54,8 @@ |
|
|
|
|
<view class="mask" @click="changeMenu(index)"> |
|
|
|
|
</view> |
|
|
|
|
<view class="menulist"> |
|
|
|
|
<view class="" v-if="item.order_status == OrderStatusEnum.COMPLETED.value &&item.pay_status == PayStatusEnum.SUCCESS.value" |
|
|
|
|
<view class="" |
|
|
|
|
v-if="item.order_status == OrderStatusEnum.COMPLETED.value &&item.pay_status == PayStatusEnum.SUCCESS.value" |
|
|
|
|
@click="onInvoicing(item.order_id,item)"> |
|
|
|
|
申请开票 |
|
|
|
|
</view> |
|
|
|
@ -273,9 +274,14 @@ |
|
|
|
|
app.getOrderList(1) |
|
|
|
|
}, |
|
|
|
|
changeMenu(index) { |
|
|
|
|
this.list.forEach((item, ind) => { |
|
|
|
|
item.menushow = !item.menushow; |
|
|
|
|
}); |
|
|
|
|
let that = this; |
|
|
|
|
this.list.map((item, inx) => { |
|
|
|
|
if (index == inx) { |
|
|
|
|
item.menushow = item.menushow == true ? false : true |
|
|
|
|
} else { |
|
|
|
|
item.menushow = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
toggleImage() { |
|
|
|
|
this.isToggle = !this.isToggle |
|
|
|
@ -307,7 +313,7 @@ |
|
|
|
|
}); |
|
|
|
|
if (status == 200) { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.list = this.arrayUnique(this.list.concat(data.list.data),'order_id') |
|
|
|
|
this.list = this.arrayUnique(this.list.concat(data.list.data), 'order_id') |
|
|
|
|
this.total = data.list.total |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -334,7 +340,7 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onCopyLink(str){ |
|
|
|
|
onCopyLink(str) { |
|
|
|
|
uni.setClipboardData({ |
|
|
|
|
data: str, // 这里是个坑接受字符串类型 value转化为字符串 |
|
|
|
|
success: function() { |
|
|
|
@ -360,9 +366,11 @@ |
|
|
|
|
// 显示成功信息 |
|
|
|
|
app.$toast(result.message) |
|
|
|
|
// 刷新订单列表 |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
setTimeout(() => { |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
}, 1500) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -382,10 +390,11 @@ |
|
|
|
|
.then(result => { |
|
|
|
|
// 显示成功信息 |
|
|
|
|
app.$toast(result.message) |
|
|
|
|
// 刷新订单列表 |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
setTimeout(() => { |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
}, 1500) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -411,9 +420,11 @@ |
|
|
|
|
// 显示成功信息 |
|
|
|
|
app.$success(result.message) |
|
|
|
|
// 刷新订单列表 |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
setTimeout(() => { |
|
|
|
|
app.list = [] |
|
|
|
|
app.pageNum = 1 |
|
|
|
|
app.getOrderList() |
|
|
|
|
}, 1500) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -461,15 +472,15 @@ |
|
|
|
|
return new RegExp(mix.split('').join('\\w*')).test(str) |
|
|
|
|
}, |
|
|
|
|
//数组对象去重 |
|
|
|
|
arrayUnique(arr, name) { |
|
|
|
|
var hash = {}; |
|
|
|
|
return arr.reduce(function (item, next) { |
|
|
|
|
hash[next[name]] |
|
|
|
|
? "" |
|
|
|
|
: (hash[next[name]] = true && item.push(next)); |
|
|
|
|
return item; |
|
|
|
|
}, []); |
|
|
|
|
}, |
|
|
|
|
arrayUnique(arr, name) { |
|
|
|
|
var hash = {}; |
|
|
|
|
return arr.reduce(function(item, next) { |
|
|
|
|
hash[next[name]] ? |
|
|
|
|
"" : |
|
|
|
|
(hash[next[name]] = true && item.push(next)); |
|
|
|
|
return item; |
|
|
|
|
}, []); |
|
|
|
|
}, |
|
|
|
|
// 点击去物流 |
|
|
|
|
onLogistics(orderId, item) { |
|
|
|
|
if (item.delivery) { |
|
|
|
|