商品规格修改

master
rouchen 2024-03-12 20:26:33 +08:00
parent 8dbfac5726
commit 9690624729
1 changed files with 4 additions and 5 deletions

View File

@ -232,7 +232,7 @@
</div> </div>
<div style="height: 200px; width: 100%;"> <div style="height: 200px; width: 100%;">
<el-form ref="form" label-width="80px"> <el-form ref="form" label-width="80px">
<el-form-item :label="attribute.name" v-for="attribute in categoryCommonElement.attributeList"> <el-form-item :label="attribute.name" v-for="attribute in templateAttributeGroup.attributeList">
<el-input v-model="attribute.value"></el-input> <el-input v-model="attribute.value"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -363,7 +363,7 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button style="margin-top: 12px;" @click="last" v-if="stepNumber > 0"></el-button> <el-button style="margin-top: 12px;" @click="last" v-if="stepNumber > 0"></el-button>
<el-button style="margin-top: 12px;" @click="next" v-if="stepNumber < 3"></el-button> <el-button style="margin-top: 12px;" @click="next" v-if="stepNumber < 3"></el-button>
<el-button type="primary" @click="submitForm"> </el-button> <input type="button" value="添加" @click="sut()">
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -481,7 +481,6 @@ export default {
}, },
"form.type": { "form.type": {
handler(value) { handler(value) {
console.log(value)
if (value != null){ if (value != null){
getTemplateAttribute(value).then(response => { getTemplateAttribute(value).then(response => {
console.log(response) console.log(response)
@ -703,10 +702,9 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { sut() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
console.log(valid)
if (this.form.id != null) { if (this.form.id != null) {
updateInfo(this.form).then(response => { updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -715,6 +713,7 @@ export default {
}); });
} else { } else {
addInfo(this.form).then(response => { addInfo(this.form).then(response => {
console.log(response)
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();