|
@@ -154,6 +154,7 @@ const seeDetail = new Vue({
|
|
|
},
|
|
|
// 按钮操作
|
|
|
handeleDropdown (type, shopOrderId) {
|
|
|
+ const _self = this;
|
|
|
switch (type) {
|
|
|
case 1:// 发货
|
|
|
window.location.href = '/supplier/order/delivery.html?shopOrderId=' + shopOrderId;
|
|
@@ -179,8 +180,33 @@ const seeDetail = new Vue({
|
|
|
case 8:// 分享订单
|
|
|
this.handleOrderShareCode(shopOrderId)
|
|
|
break
|
|
|
+ case 9:// 取消订单
|
|
|
+ this.$confirm('确定取消该订单吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ _self.handleCancelOrder(shopOrderId)
|
|
|
+ }).catch(() => {
|
|
|
+ console.log('取消删除')
|
|
|
+ });
|
|
|
+ break
|
|
|
}
|
|
|
},
|
|
|
+ // 取消订单
|
|
|
+ handleCancelOrder(shopOrderId){
|
|
|
+ const _self = this;
|
|
|
+ SupplierApi.cancelOrder({ shopOrderId:shopOrderId },function (response) {
|
|
|
+ if(response.code===0){
|
|
|
+ _self.$message.success('订单已取消');
|
|
|
+ setTimeout(()=>{
|
|
|
+ window.location.href = '/supplier/order/list.html?state=0'
|
|
|
+ },2000)
|
|
|
+ }else{
|
|
|
+ _self.$message.error(response.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取订单分享码
|
|
|
handleOrderShareCode(shopOrderId){
|
|
|
const _self = this;
|