商品信息的前台微微改了一下

master
wuchang2 2024-11-17 22:04:05 +08:00
parent a049288960
commit 629447443b
3 changed files with 31 additions and 1 deletions

View File

@ -36,7 +36,7 @@ export function addInfo(data) {
// 修改商品信息
export function updateInfo(data) {
return request({
url: '/product/info/'+data.id,
url: '/product/info/'+data.projectAddModel.id,
method: 'put',
data: data
})

View File

@ -263,6 +263,7 @@ export default {
getList() {
this.loading = true;
listCategory(this.queryParams).then(response => {
const idToName = response.data.reduce((acc, node) => {
acc[node.id] = node.name;
return acc;
@ -277,6 +278,7 @@ export default {
parentIds: parentName
};
});
this.categoryList = this.handleTree(updatedTreeData, "id", "parentId");
this.loading = false;
});

View File

@ -129,6 +129,21 @@
<el-form-item label="规格名称" prop="name">
<el-input v-model="form.name" placeholder="请输入规格名称" />
</el-form-item>
<el-form-item label="规格状态" prop="status">
<!-- <el-input v-model="form.status" placeholder="请输入规格状态" />-->
<el-switch
v-model="form.status"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
active-value="Y"
inactive-value="N"
active-text="Y"
inactive-text="N"
placeholder="请输入规格状态"
/>
<!-- @change="changeSwitch(scope.row)"-->
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
@ -167,6 +182,19 @@
<el-form-item label="规格属性">
<el-input v-model="ruleAddForm.valueList" placeholder="请输入规格属性"></el-input>
</el-form-item>
<!-- <el-form-item label="规格状态">-->
<!-- <el-input v-model="ruleAddForm.status" placeholder="请输入规格状态"></el-input>-->
<!--&lt;!&ndash; <el-switch&ndash;&gt;-->
<!--&lt;!&ndash; v-model="ruleAddForm.status"&ndash;&gt;-->
<!--&lt;!&ndash; style="&#45;&#45;el-switch-on-color: #13ce66; &#45;&#45;el-switch-off-color: #ff4949"&ndash;&gt;-->
<!--&lt;!&ndash; active-value="Y"&ndash;&gt;-->
<!--&lt;!&ndash; inactive-value="N"&ndash;&gt;-->
<!--&lt;!&ndash; active-text="Y"&ndash;&gt;-->
<!--&lt;!&ndash; inactive-text="N"&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请输入规格状态"&ndash;&gt;-->
<!--&lt;!&ndash; @change="changeSwitch(scope.row)"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" @click="ruleAddFormFun"></el-button>
</el-form-item>