修改参数中是否必填和索引选中问题

master
pikachu 2021-05-20 09:45:59 +08:00
parent 5e52e7f157
commit b190a443be
1 changed files with 6 additions and 4 deletions

View File

@ -76,8 +76,8 @@
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="选项" prop="specName3"> <FormItem label="选项" prop="specName3">
<Checkbox :value="Number" v-model="paramForm.required == 1"></Checkbox> <Checkbox label=1 v-model="paramForm.required"></Checkbox>
<Checkbox v-model="paramForm.isIndex == 1"></Checkbox> <Checkbox label=1 v-model="paramForm.isIndex"></Checkbox>
</FormItem> </FormItem>
</Form> </Form>
@ -184,8 +184,8 @@ export default {
this.paramForm = { this.paramForm = {
paramName: param.paramName, paramName: param.paramName,
options: param.options.split(","), options: param.options.split(","),
required: param.required, required: param.required==1?true:false,
isIndex: param.isIndex, isIndex: param.isIndex==1?true:false,
groupId: group.groupId, groupId: group.groupId,
categoryId: this.categoryId, categoryId: this.categoryId,
id: param.id, id: param.id,
@ -233,6 +233,7 @@ export default {
} }
}); });
} else { } else {
console.warn(this.paramGroupForm)
updateParamsGroup(this.paramGroupForm).then((res) => { updateParamsGroup(this.paramGroupForm).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
@ -263,6 +264,7 @@ export default {
} }
}); });
} else { } else {
console.warn(this.paramForm.isIndex)
this.paramForm.isIndex = Number(this.paramForm.isIndex); this.paramForm.isIndex = Number(this.paramForm.isIndex);
this.paramForm.required = Number(this.paramForm.required); this.paramForm.required = Number(this.paramForm.required);
updateGoodsParams(this.paramForm).then((res) => { updateGoodsParams(this.paramForm).then((res) => {