Commit be297361 by 曾凡江

增加卡时选择

parent 9bde6036
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<el-input-number v-if="item.type === 2" v-model="item.value" :min="0" @change="orderComputerPrice" <el-input-number v-if="item.type === 2" v-model="item.value" :min="0" @change="orderComputerPrice"
style="width: 110px"/> style="width: 110px"/>
<el-radio-group v-if="[0,1].includes(item.type)" v-model="item.value" @change="orderComputerPrice"> <el-radio-group v-if="[0,1,4].includes(item.type)" v-model="item.value" @change="orderComputerPrice">
<el-radio-button v-for="option in item.options" :label="option.id"> <el-radio-button v-for="option in item.options" :label="option.id">
{{ option.model + option.unit }} {{ option.model + option.unit }}
</el-radio-button> </el-radio-button>
...@@ -304,7 +304,7 @@ function selectedProduct(type, id) { ...@@ -304,7 +304,7 @@ function selectedProduct(type, id) {
selectedId.value = id selectedId.value = id
getRDetail({id}).then(res => { getRDetail({id}).then(res => {
res.data.options.forEach(item => { res.data.options.forEach(item => {
if ([0, 1].includes(item.type)) { if ([0, 1, 4].includes(item.type)) {
item.value = item.options[0].id item.value = item.options[0].id
} }
if (item.type === 2) { if (item.type === 2) {
...@@ -322,7 +322,7 @@ function initSubmitData() { ...@@ -322,7 +322,7 @@ function initSubmitData() {
id: selectedId.value, id: selectedId.value,
num: form.value.num, num: form.value.num,
computerItems: productDetail.value.options.map(item => { computerItems: productDetail.value.options.map(item => {
if ([0, 1].includes(item.type)) { if ([0, 1, 4].includes(item.type)) {
return { return {
id: item.id, id: item.id,
name: item.label, name: item.label,
......
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 sign in to comment