...
|
...
|
@@ -287,46 +287,48 @@ export default { |
|
|
this.showSizeSelectSheet = true;
|
|
|
},
|
|
|
async onSelectTradeProduct(tradeProduct) {
|
|
|
try {
|
|
|
const info = await this.payment({
|
|
|
skup: tradeProduct.skup,
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* {
|
|
|
* "message": "您有未支付的订单,支付或取消后可提交新的订单",
|
|
|
* "code": 512
|
|
|
* }
|
|
|
*/
|
|
|
if (info.code === 512) {
|
|
|
return this.$createDialog({
|
|
|
type: 'confirm',
|
|
|
content: info.message,
|
|
|
confirmBtn: {
|
|
|
text: '查看订单',
|
|
|
active: true,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;'
|
|
|
},
|
|
|
cancelBtn: {
|
|
|
text: '取消',
|
|
|
active: false,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;'
|
|
|
},
|
|
|
onConfirm: () => {
|
|
|
this.$router.push({
|
|
|
name: this.selectSizeConfig.type === 'buy' ? 'OrderList' : 'InSaleOrderList',
|
|
|
params: {
|
|
|
owner: this.selectSizeConfig.type,
|
|
|
},
|
|
|
});
|
|
|
this.showSizeSelectSheet = false;
|
|
|
},
|
|
|
}).show();
|
|
|
if (this.selectSizeConfig.type === 'buy') {
|
|
|
try {
|
|
|
const info = await this.payment({
|
|
|
skup: tradeProduct.skup,
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* {
|
|
|
* "message": "您有未支付的订单,支付或取消后可提交新的订单",
|
|
|
* "code": 512
|
|
|
* }
|
|
|
*/
|
|
|
if (info.code === 512) {
|
|
|
return this.$createDialog({
|
|
|
type: 'confirm',
|
|
|
content: info.message,
|
|
|
confirmBtn: {
|
|
|
text: '查看订单',
|
|
|
active: true,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;'
|
|
|
},
|
|
|
cancelBtn: {
|
|
|
text: '取消',
|
|
|
active: false,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;'
|
|
|
},
|
|
|
onConfirm: () => {
|
|
|
this.$router.push({
|
|
|
name: 'OrderList',
|
|
|
params: {
|
|
|
owner: this.selectSizeConfig.type,
|
|
|
},
|
|
|
});
|
|
|
this.showSizeSelectSheet = false;
|
|
|
},
|
|
|
}).show();
|
|
|
}
|
|
|
} catch (e) {
|
|
|
// e
|
|
|
}
|
|
|
} catch (e) {
|
|
|
// e
|
|
|
}
|
|
|
|
|
|
this.$router.push({
|
...
|
...
|
|