|
@@ -117,28 +117,41 @@ export default {
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- let cartIds = []
|
|
|
- app.cartList.forEach(function (cart) {
|
|
|
- cartIds.push(cart.cartId)
|
|
|
+ this.$confirm('是否挂单?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
})
|
|
|
- const param = {
|
|
|
- hangNo: hangNo,
|
|
|
- userId: app.memberInfo ? app.memberInfo : '',
|
|
|
- cartIds: cartIds.join(','),
|
|
|
- }
|
|
|
- doHangUp(param)
|
|
|
- .then((response) => {
|
|
|
- if (response) {
|
|
|
- Message({
|
|
|
- message: '挂单成功',
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
- app.getHangUpList()
|
|
|
- app.$emit('doHangUp')
|
|
|
+ .then(() => {
|
|
|
+ let cartIds = []
|
|
|
+ app.cartList.forEach(function (cart) {
|
|
|
+ cartIds.push(cart.cartId)
|
|
|
+ })
|
|
|
+ const param = {
|
|
|
+ hangNo: hangNo,
|
|
|
+ userId: app.memberInfo ? app.memberInfo : '',
|
|
|
+ cartIds: cartIds.join(','),
|
|
|
}
|
|
|
+ doHangUp(param)
|
|
|
+ .then((response) => {
|
|
|
+ if (response) {
|
|
|
+ Message({
|
|
|
+ message: '挂单成功',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ app.getHangUpList()
|
|
|
+ app.$emit('doHangUp')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // empty
|
|
|
+ })
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- // empty
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消挂单',
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
// 获取挂单列表
|