This commit is contained in:
曹辉 2023-01-09 15:26:04 +08:00
parent 29584f6da1
commit 65201aa7d8
2 changed files with 45 additions and 34 deletions

View File

@ -129,7 +129,10 @@ export default {
{ required: true, message: "请输入商品度量单位", trigger: "blur" }, { required: true, message: "请输入商品度量单位", trigger: "blur" },
], ],
goodsPictureUrl: [ goodsPictureUrl: [
{ required: true, message: "请输入选择图片", trigger: "blur" }, { required: true, message: "请选择图片", trigger: "blur" },
],
sort: [
{ required: true, message: "请输入商品顺序", trigger: "blur" },
], ],
}, },
}; };
@ -193,7 +196,7 @@ export default {
attributePitureUrl: "", attributePitureUrl: "",
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: null,
ids: this.ids, ids: this.ids,
}; };
this.goodDetailsLists.push(obj); this.goodDetailsLists.push(obj);
@ -246,7 +249,7 @@ export default {
attributePitureUrl: "", attributePitureUrl: "",
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: null,
}, ], }, ],
}, ]; }, ];
}, },
@ -298,7 +301,7 @@ export default {
attributePitureUrl: "", attributePitureUrl: "",
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: null,
ids: 9999999, ids: 9999999,
}, ]; }, ];
this.resetForm("form"); this.resetForm("form");
@ -341,7 +344,7 @@ export default {
attributePitureUrl: "", attributePitureUrl: "",
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: null,
ids: 9999999, ids: 9999999,
}, ]; }, ];
this.open = true; this.open = true;

View File

@ -267,6 +267,13 @@
style="width: 210px" style="width: 210px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="商品顺序" prop="goodsUnit">
<el-input
v-model.number="form.sort"
placeholder="值越小排名越靠前"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="商品图片" prop="goodsPictureUrl"> <el-form-item label="商品图片" prop="goodsPictureUrl">
<stationAcatar <stationAcatar
@imgUrl="imgUrl" @imgUrl="imgUrl"
@ -309,11 +316,12 @@
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="显示顺序" align="center"> <el-table-column label="商品属性顺序" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.attributeDetailsSort" v-model.number="scope.row.attributeDetailsSort"
maxlength="10" maxlength="10"
placeholder="值越小排名越靠前"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
></el-input> ></el-input>
</template> </template>