| | |
| | | break |
| | | case 'confirm': { |
| | | await this.$message.confirm('是否确定收货') |
| | | // 发送请求 |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: this.id, |
| | | |
| | | var tryCallWx = false |
| | | // #ifdef MP |
| | | let tmp = this |
| | | if (wx.openBusinessView&&false) { |
| | | tryCallWx = true |
| | | wx.openBusinessView({ |
| | | businessType: 'weappOrderConfirm', |
| | | extraData: { |
| | | merchant_id: '1230000109', |
| | | merchant_trade_no: '1234323JKHDFE1243252', |
| | | transaction_id: '420123123123123123123' |
| | | }, |
| | | success() { |
| | | //dosomething |
| | | // 发送请求 |
| | | tmp.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: tmp.id, |
| | | } |
| | | }) |
| | | tmp.$message.hideLoading() |
| | | if (code === 0) { |
| | | tmp.getDetail() |
| | | } |
| | | }, |
| | | fail(e) { |
| | | //dosomething |
| | | console.log('error fail', e) |
| | | tmp.$message.showToast('收货失败') |
| | | }, |
| | | complete() { |
| | | //dosomething |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // #endif |
| | | |
| | | if (!tryCallWx) { |
| | | |
| | | // 发送请求 |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: this.id, |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.getDetail() |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.getDetail() |
| | | } |
| | | |
| | | } |
| | |
| | | </view> |
| | | <!-- ||dto.status=='COMPLETED' --> |
| | | <!-- 在外面申请了,里面不允许了 --> |
| | | <!-- <view class="button button-1" @click="buttonClick('sales')" v-if=" dto.status === 'RECEIVE'"> 申请售后 |
| | | <!-- <view class="button button-1" @click="buttonClick('sales')" v-if=" dto.status === 'RECEIVE'"> 申请售后 |
| | | </view> --> |
| | | </view> |
| | | <view v-if="showSales"> |
| | |
| | | break |
| | | case 'confirm': { |
| | | await this.$message.confirm('是否确定收货') |
| | | // 发送请求 |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: item.id, |
| | | var tryCallWx = false |
| | | // #ifdef MP |
| | | let tmp = this |
| | | if (wx.openBusinessView&&false) { |
| | | tryCallWx = true |
| | | wx.openBusinessView({ |
| | | businessType: 'weappOrderConfirm', |
| | | extraData: { |
| | | merchant_id: '1230000109', |
| | | merchant_trade_no: '1234323JKHDFE1243252', |
| | | transaction_id: '420123123123123123123' |
| | | }, |
| | | success() { |
| | | //dosomething |
| | | // 发送请求 |
| | | tmp.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: item.id, |
| | | } |
| | | }) |
| | | tmp.$message.hideLoading() |
| | | if (code === 0) { |
| | | tmp.refreshList() |
| | | } |
| | | }, |
| | | fail(e) { |
| | | //dosomething |
| | | console.log('error fail', e) |
| | | tmp.$message.showToast('收货失败') |
| | | }, |
| | | complete() { |
| | | //dosomething |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // #endif |
| | | |
| | | if (!tryCallWx) { |
| | | // 发送请求 |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/customer/order/receive/confirm', { |
| | | params: { |
| | | id: item.id, |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | |
| | | } |