pref:虚拟商品提交订单

fix/goods-0525
ch 3 years ago
parent 9df955e8d6
commit efaa39c832

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-03 22:41:15 * @Date: 2022-05-03 22:41:15
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-16 20:40:48 * @LastEditTime: 2022-05-25 17:57:25
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -232,15 +232,28 @@ export default {
* 点击去结算 * 点击去结算
*/ */
settlement(){ settlement(){
const ids = this.checkedIds;
//
const baseType = this.list.find(i => ids[0] === i.id).productType;
for(let id of ids){
const item = this.list.find(i => id === i.id);
if(item.productType != baseType){
this.$message.warning('虚拟商品需要单独结算,不可和其他实物订单合并结算哦~');
return false;
}
}
if (ids.length) {
this.$router.push({ this.$router.push({
path : '/order/submit', path : '/order/submit',
query : { query : {
mode: 'cart', mode: 'cart',
ids:this.checkedIds.join(',') productType : baseType,
ids:ids.join(',')
} }
}) })
} }
} }
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -493,9 +493,9 @@ export default {
mode: "buyNow", mode: "buyNow",
skuId: this.curSku.skuId, skuId: this.curSku.skuId,
num: this.curBuyNum, num: this.curBuyNum,
productType : this.detailData.productType,
activityType: 1, activityType: 1,
}; };
console.log(query);
this.$router.push({ this.$router.push({
path: "/order/submit", path: "/order/submit",
query, query,

@ -2,14 +2,16 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-04 17:30:58 * @Date: 2022-05-04 17:30:58
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-17 16:44:30 * @LastEditTime: 2022-05-25 20:00:10
* @Description: file content * @Description: file content
--> -->
<template> <template>
<div class="main"> <div class="main">
<template v-if="productType == 1">
<h3 class="title">收货地址</h3> <h3 class="title">收货地址</h3>
<BsAddress v-model="address"/> <BsAddress v-model="address"/>
</template>
<!-- <h3 class="title">支付方式</h3> <!-- <h3 class="title">支付方式</h3>
<div class="pay-type"> <div class="pay-type">
<el-radio label="微信支付" /> <el-radio label="微信支付" />
@ -45,7 +47,8 @@ export default {
payOrder : {}, payOrder : {},
payVisible : false, payVisible : false,
payTimerTxt : '', payTimerTxt : '',
payTimerStop : null payTimerStop : null,
productType : this.$Route.query.productType
} }
}, },
mounted(){ mounted(){
@ -92,7 +95,7 @@ export default {
async submit(){ async submit(){
const {query} = this.$route; const {query} = this.$route;
if(!this.address.id){ if(!this.address.id && this.productType === 1){
this.$message.error('请选择收货地址'); this.$message.error('请选择收货地址');
return false; return false;
} }

Loading…
Cancel
Save