Commit 8c27f62c authored by zhengke's avatar zhengke

修改

parent 325a13dd
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
color: #409EFF; color: #409EFF;
cursor: pointer; cursor: pointer;
} }
.gdDis_Item{
background-color: #e1e3e6!important;
}
</style> </style>
<template> <template>
<div class="flexOne goodlist"> <div class="flexOne goodlist">
...@@ -129,14 +131,27 @@ ...@@ -129,14 +131,27 @@
{{currentGoodsObj.name}} {{currentGoodsObj.name}}
</div> </div>
<el-form label-width="80px" size="small"> <el-form label-width="80px" size="small">
<template v-for="(subItem,subIndex) in currentGoodsObj.attr_groups"> <template>
<el-form-item :key="subIndex" :label="subItem.attr_group_name" style="line-height:25px;"> <template v-if="currentGoodsObj.goods_stock>0">
<span class="gd_Item" v-for="(childItem,childIndex) in subItem.attr_list" :key="childIndex" <template v-for="(subItem,subIndex) in currentGoodsObj.attr_groups">
@click="chooseSpec(subIndex,childIndex),calcTotalPrice()" <el-form-item :key="subIndex" :label="subItem.attr_group_name" style="line-height:25px;">
:class="{'checkSpec':subItem.checkId==childItem.attr_id}"> <span class="gd_Item" v-for="(childItem,childIndex) in subItem.attr_list" :key="childIndex"
{{childItem.attr_name}} @click="chooseSpec(subIndex,childIndex),calcTotalPrice()"
</span> :class="{'checkSpec':subItem.checkId==childItem.attr_id}">
</el-form-item> {{childItem.attr_name}}
</span>
</el-form-item>
</template>
</template>
<template v-else>
<template v-for="(subItem,subIndex) in currentGoodsObj.attr_groups">
<el-form-item :key="subIndex" :label="subItem.attr_group_name" style="line-height:25px;">
<span class="gd_Item gdDis_Item" v-for="(childItem,childIndex) in subItem.attr_list" :key="childIndex">
{{childItem.attr_name}}
</span>
</el-form-item>
</template>
</template>
</template> </template>
<el-form-item label="购买数量" size="small"> <el-form-item label="购买数量" size="small">
<el-input-number @change="calcTotalPrice()" size="small" style="height:32px;" v-model="orderMsg.Number" <el-input-number @change="calcTotalPrice()" size="small" style="height:32px;" v-model="orderMsg.Number"
...@@ -447,6 +462,7 @@ ...@@ -447,6 +462,7 @@
}) })
} }
this.DataList = tempArray; this.DataList = tempArray;
console.log(this.DataList,'datalist');
this.msg.total = res.data.data.count; this.msg.total = res.data.data.count;
} }
}); });
...@@ -529,6 +545,12 @@ ...@@ -529,6 +545,12 @@
NewUserId: this.orderMsg.mallUserId, NewUserId: this.orderMsg.mallUserId,
NewShopId: this.getLocalStorage().MallSmallShopsId NewShopId: this.getLocalStorage().MallSmallShopsId
} }
if(this.currentGoodsObj.goods_stock>0){
if(DetailList[0].SpecificationList.length==0){
this.Error('请选择规格');
return;
}
}
this.mallapipost("/api/AppletOrder/SetERPGoodsOrderInfo", orderData, res => { this.mallapipost("/api/AppletOrder/SetERPGoodsOrderInfo", orderData, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
......
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