|
@@ -34,7 +34,7 @@
|
|
|
<div :class="goodsIndex == index ? 'bottom active' : 'bottom'">立省¥{{ item.discountAmount }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="goodsId == '000'" style="margin: 20px 0">
|
|
|
+ <div style="margin: 20px 0">
|
|
|
<el-form ref="form" :model="formgengduode" label-width="160px">
|
|
|
<el-form-item
|
|
|
label="选择需要购买模块"
|
|
@@ -43,7 +43,12 @@
|
|
|
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
|
|
>
|
|
|
<el-checkbox-group v-model="formgengduode.serviceProductList">
|
|
|
- <el-checkbox v-for="(item, index) in serviceProductList" :key="index" :label="item.dictCode" name="type"
|
|
|
+ <el-checkbox
|
|
|
+ :disabled="goodsId != '000'"
|
|
|
+ v-for="(item, index) in serviceProductList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.dictCode"
|
|
|
+ name="type"
|
|
|
>{{ item.dictValue }}(¥{{ item.price }})</el-checkbox
|
|
|
>
|
|
|
</el-checkbox-group>
|
|
@@ -61,6 +66,7 @@
|
|
|
:min="1"
|
|
|
:max="100"
|
|
|
label="描述文字"
|
|
|
+ :disabled="goodsId != '000'"
|
|
|
></el-input-number
|
|
|
><span style="font-size: 16px; margin-left: 10px">年</span>
|
|
|
</el-form-item>
|
|
@@ -181,14 +187,25 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters(['userid'])
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ goodsId() {
|
|
|
+ if (this.goodsId == '000') {
|
|
|
+ this.formgengduode.serviceProductList = []
|
|
|
+ } else {
|
|
|
+ this.formgengduode.serviceProductList = this.serviceProductList.map(item => item.dictCode)
|
|
|
+ }
|
|
|
+ this.formgengduode.year = this.goodsList.find(item => item.id === this.goodsId)?.year || 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
created() {
|
|
|
- this.getUserInfo()
|
|
|
- this.getBuyList()
|
|
|
serviceProductList({
|
|
|
pageNum: 1,
|
|
|
pageSize: -1,
|
|
|
params: [{ param: 'a.status', compare: '=', value: 'true' }]
|
|
|
}).then(res => {
|
|
|
+ this.getUserInfo()
|
|
|
+ this.getBuyList()
|
|
|
this.serviceProductList = res.data.records
|
|
|
})
|
|
|
},
|
|
@@ -227,7 +244,7 @@ export default {
|
|
|
normAmount: 0,
|
|
|
normName: '自定义',
|
|
|
remark: '',
|
|
|
- year: 0
|
|
|
+ year: 1
|
|
|
}
|
|
|
]
|
|
|
this.goodsId = res.data[0].id
|