Commit 83cb7c6c authored by Facius's avatar Facius

improve: 增加物流订单操作确认

parent 47fd0bc1
...@@ -192,7 +192,16 @@ ...@@ -192,7 +192,16 @@
this.$emit('action', this.info) this.$emit('action', this.info)
}, },
handleOperate() { handleOperate() {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus) uni.showModal({
title: '提示',
content: '确定' + this.buttonText + '?',
success: function (res) {
if (res.confirm) {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus)
} else if (res.cancel) {
}
}
})
}, },
handleClickExpress() { handleClickExpress() {
this.$emit('express', this.info) this.$emit('express', this.info)
......
...@@ -84,15 +84,15 @@ ...@@ -84,15 +84,15 @@
'20': '', '20': '',
'-2': '', '-2': '',
'-1': '', '-1': '',
'100': '', '100': '',
'91': '' '91': ''
} }
}, },
buttonText() { buttonText() {
return this.texts[this.info.status] return this.texts[this.info.status]
}, },
showButton() { showButton() {
return this.info.status == '1' || this.info.status == '15' return this.info.status == '1' || this.info.status == '15'
}, },
hasExpress() { hasExpress() {
return this.$u.test.isEmpty(this.info.express) ? false : true return this.$u.test.isEmpty(this.info.express) ? false : true
...@@ -208,6 +208,18 @@ ...@@ -208,6 +208,18 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
uni.showModal({
title: '提示',
content: '确定' + this.buttonText + '?',
success: function (res) {
if (res.confirm) {
this.handleClickSure()
} else if (res.cancel) {
}
}
})
},
handleClickSure() {
this.$u.api[this.buttonOperateType](this.info.id).then(res => { this.$u.api[this.buttonOperateType](this.info.id).then(res => {
var type = 'error' var type = 'error'
var message = res.message var message = res.message
......
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