Commit dad240d6 authored by Damon's avatar Damon

fix: 物流订单操作确认

parent 5cf7656c
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="return-cell" @click="handleClick"> <view class="return-cell" @click="handleClick">
<view class="title-view"> <view class="title-view">
<text class="title-text" :style="{'color': titleColor}">{{title}}</text> <text class="title-text" :style="{'color': titleColor}">{{title}}</text>
<view class="express-view" @click.stop="$u.throttle(handleClickExpress, 500)" v-if="info.express.number"> <view class="express-view" @click.stop="$u.throttle(handleClickExpress, 500)" v-if="info.express.number" hover-class="u-hover-class">
<text>物流单号:</text> <text>物流单号:</text>
<view class="order-file-right"> <view class="order-file-right">
<text>{{info.express.number}}</text> <text>{{info.express.number}}</text>
...@@ -192,16 +192,20 @@ ...@@ -192,16 +192,20 @@
this.$emit('action', this.info) this.$emit('action', this.info)
}, },
handleOperate() { handleOperate() {
if (this.willStatus === '-1') {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定' + this.buttonText + '?', content: '确定' + this.buttonText + '?',
success: function (res) { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus) this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus)
} else if (res.cancel) { } else if (res.cancel) {
} }
} }
}) })
} else {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus)
}
}, },
handleClickExpress() { handleClickExpress() {
this.$emit('express', this.info) this.$emit('express', this.info)
......
...@@ -208,16 +208,20 @@ ...@@ -208,16 +208,20 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
if (this.buttonText === '取消申请') {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定' + this.buttonText + '?', content: '确定' + this.buttonText + '?',
success: function (res) { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.handleClickSure() this.handleClickSure()
} else if (res.cancel) { } else if (res.cancel) {
} }
} }
}) })
} else {
this.handleClickSure()
}
}, },
handleClickSure() { handleClickSure() {
this.$u.api[this.buttonOperateType](this.info.id).then(res => { this.$u.api[this.buttonOperateType](this.info.id).then(res => {
......
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 to comment