Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
d8b6b436ce
@ -49,4 +49,13 @@ export function delGoodsCategory(id) {
|
|||||||
url: '/system/goodsCategory/' + id,
|
url: '/system/goodsCategory/' + id,
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//不分页
|
||||||
|
export function getStationCategoryList(parentId) {
|
||||||
|
return request({
|
||||||
|
url: `/system/goodsCategory/getStationCategoryList?parentId=${parentId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -190,6 +190,7 @@
|
|||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
width="1200px"
|
width="1200px"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
:before-close="cancel"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
@ -234,7 +235,19 @@
|
|||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
||||||
<el-select
|
<!-- v-model="form.parentIdList" -->
|
||||||
|
<el-cascader
|
||||||
|
:props="treeOption"
|
||||||
|
@change="change"
|
||||||
|
style="width: 210px"
|
||||||
|
:show-all-levels="false"
|
||||||
|
:clearable="true"
|
||||||
|
ref="cascader"
|
||||||
|
:placeholder="form.goodsCategoryName ? form.goodsCategoryName : ''"
|
||||||
|
:key="isResouceShow"
|
||||||
|
>
|
||||||
|
</el-cascader>
|
||||||
|
<!-- <el-select
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
v-model="form.goodsCategoryId"
|
v-model="form.goodsCategoryId"
|
||||||
clearable
|
clearable
|
||||||
@ -247,7 +260,7 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||||
<el-select
|
<el-select
|
||||||
@ -489,5 +502,8 @@ export default indexjs;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-cascader .el-input input::-webkit-input-placeholder {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -9,9 +9,13 @@ import {
|
|||||||
editGoodsWhetherShelf,
|
editGoodsWhetherShelf,
|
||||||
stationList,
|
stationList,
|
||||||
} from "@/api/system/OperateGoodsInfo";
|
} from "@/api/system/OperateGoodsInfo";
|
||||||
|
import {
|
||||||
|
getStationCategoryList,
|
||||||
|
} from "@/api/system/goodsCategory";
|
||||||
import editor from "@/components/Editor";
|
import editor from "@/components/Editor";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
import baseurl from "@/api/baseurl.js";
|
import baseurl from "@/api/baseurl.js";
|
||||||
|
let id = 0;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { stationAcatar, editor },
|
components: { stationAcatar, editor },
|
||||||
@ -25,8 +29,6 @@ export default {
|
|||||||
datas: null,
|
datas: null,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
@ -36,7 +38,6 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
total2: 0,
|
total2: 0,
|
||||||
|
|
||||||
// 商品基本信息表格数据
|
// 商品基本信息表格数据
|
||||||
goodsInfoList: [],
|
goodsInfoList: [],
|
||||||
// 护理站列表
|
// 护理站列表
|
||||||
@ -78,10 +79,6 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
whetherShelf: null,
|
whetherShelf: null,
|
||||||
},
|
},
|
||||||
getListByUserquery: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
queryParams: {
|
queryParams: {
|
||||||
id: null,
|
id: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -131,19 +128,38 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
homestation: null,
|
homestation: null,
|
||||||
|
treeOption: {
|
||||||
|
lazy: true,
|
||||||
|
checkStrictly: true, // 是否可选择任意一级
|
||||||
|
lazyLoad(node, resolve) {
|
||||||
|
const id = (node.level === 0) ? 0 : node.data.id;
|
||||||
|
setTimeout(() => {
|
||||||
|
getStationCategoryList(id).then(res => { // 接口请求
|
||||||
|
res.data.forEach(e => {
|
||||||
|
e.value = e.id
|
||||||
|
e.label = e.goodsCategoryName
|
||||||
|
})
|
||||||
|
resolve(res.data.map(item => {
|
||||||
|
return {
|
||||||
|
...item
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isResouceShow: 1,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.goodsCategoryinfo();
|
// this.goodsCategoryinfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
imgs(item) {
|
imgs(item) {
|
||||||
this.imgsurl.pictureUrlList.push(item);
|
this.imgsurl.pictureUrlList.push(item);
|
||||||
// console.log(this.imgsurl)
|
|
||||||
},
|
},
|
||||||
upwhetherShelf(row) {
|
upwhetherShelf(row) {
|
||||||
console.log(row);
|
|
||||||
if (row.whetherShelf == false) {
|
if (row.whetherShelf == false) {
|
||||||
var obj = {
|
var obj = {
|
||||||
id: row.goodsInfoId,
|
id: row.goodsInfoId,
|
||||||
@ -156,7 +172,6 @@ export default {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
editGoodsWhetherShelf(obj).then((res) => {
|
editGoodsWhetherShelf(obj).then((res) => {
|
||||||
console.log(obj);
|
|
||||||
if (obj.whetherShelf == 0) {
|
if (obj.whetherShelf == 0) {
|
||||||
this.$modal.msgSuccess("已修改上架状态为未上架");
|
this.$modal.msgSuccess("已修改上架状态为未上架");
|
||||||
} else {
|
} else {
|
||||||
@ -199,7 +214,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
delgoodAttributeDetail(item) {
|
delgoodAttributeDetail(item) {
|
||||||
console.log(item);
|
|
||||||
if (item.ids && !item.attributeDetailsId) {
|
if (item.ids && !item.attributeDetailsId) {
|
||||||
if (this.goodDetailsLists.length == 1) {
|
if (this.goodDetailsLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
@ -217,19 +231,15 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.goodDetailsLists);
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
console.log(this.form);
|
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
if (this.imgone != this.form.goodsPictureUrl) {
|
if (this.imgone != this.form.goodsPictureUrl) {
|
||||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||||
updatePicture(this.imgsurl).then((res) => {});
|
updatePicture(this.imgsurl).then((res) => {});
|
||||||
@ -247,6 +257,7 @@ export default {
|
|||||||
attributeDetailsSort: null,
|
attributeDetailsSort: null,
|
||||||
}, ],
|
}, ],
|
||||||
}, ];
|
}, ];
|
||||||
|
++this.isResouceShow
|
||||||
},
|
},
|
||||||
//页面所属护理站
|
//页面所属护理站
|
||||||
ParamsStation(item) {
|
ParamsStation(item) {
|
||||||
@ -335,7 +346,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
console.log(selection);
|
|
||||||
this.ids = selection.map((item) => item.goodsInfoId);
|
this.ids = selection.map((item) => item.goodsInfoId);
|
||||||
this.single = selection.length !== 1;
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
@ -366,23 +376,25 @@ export default {
|
|||||||
if (this.StationName == null) {
|
if (this.StationName == null) {
|
||||||
this.StationName = "请选择所属护理站";
|
this.StationName = "请选择所属护理站";
|
||||||
}
|
}
|
||||||
console.log(this.StationName);
|
|
||||||
getGoodsInfo(id).then((response) => {
|
getGoodsInfo(id).then((response) => {
|
||||||
this.form = response.data[0];
|
// response.data.parentIdList = response.data.parentIdList.split(',')
|
||||||
|
this.form = response.data;
|
||||||
this.imgone = this.form.goodsPictureUrl;
|
this.imgone = this.form.goodsPictureUrl;
|
||||||
if (response.data[0].goodAttributeDetailsLists) {
|
if (response.data.goodAttributeDetailsLists) {
|
||||||
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
||||||
}
|
}
|
||||||
|
// console.log(this.form.parentIdList)
|
||||||
|
// this.form.goodsCategoryId = this.form.goodsCategoryName
|
||||||
|
// this.form.value = this.form.goodsCategoryId
|
||||||
|
// this.form.label = this.form.goodsCategoryName
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改商品基本信息";
|
this.title = "修改商品基本信息";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form)
|
|
||||||
this.form.goodAttributeDetailsLists = [];
|
this.form.goodAttributeDetailsLists = [];
|
||||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||||
console.log(this.form);
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.goodsInfoId != null) {
|
if (this.form.goodsInfoId != null) {
|
||||||
@ -401,12 +413,10 @@ export default {
|
|||||||
}
|
}
|
||||||
this.imgsurl = { pictureUrlList: [] };
|
this.imgsurl = { pictureUrlList: [] };
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
++this.isResouceShow
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -416,9 +426,9 @@ export default {
|
|||||||
})
|
})
|
||||||
// this.nurseStationId=this.form.nurseStationId
|
// this.nurseStationId=this.form.nurseStationId
|
||||||
addGoodsInfo(this.form).then((response) => {
|
addGoodsInfo(this.form).then((response) => {
|
||||||
console.log(this.form);
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.StationName = "请选择所属护理站";
|
this.StationName = "请选择所属护理站";
|
||||||
|
++this.isResouceShow
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -428,7 +438,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
console.log("row :>> ", row);
|
|
||||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@ -439,9 +448,7 @@ export default {
|
|||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -450,11 +457,9 @@ export default {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
imgUrl(imgUrl) {
|
imgUrl(imgUrl) {
|
||||||
console.log(imgUrl);
|
|
||||||
this.form.goodsPictureUrl = imgUrl;
|
this.form.goodsPictureUrl = imgUrl;
|
||||||
},
|
},
|
||||||
attributePitureUrl(imgUrl) {
|
attributePitureUrl(imgUrl) {
|
||||||
console.log(imgUrl);
|
|
||||||
// this.form.attributePitureUrl = imgUrl;
|
// this.form.attributePitureUrl = imgUrl;
|
||||||
},
|
},
|
||||||
attributePitureitem(item) {
|
attributePitureitem(item) {
|
||||||
@ -475,11 +480,17 @@ export default {
|
|||||||
},
|
},
|
||||||
//商品分类
|
//商品分类
|
||||||
goodsCategoryinfo() {
|
goodsCategoryinfo() {
|
||||||
goodsCategory().then((res) => {
|
getStationCategoryList(0).then((res) => {
|
||||||
console.log(this.form);
|
res.data.forEach(e => {
|
||||||
this.goodsCategorylist = res.rows;
|
e.value = e.id
|
||||||
|
e.label = e.goodsCategoryName
|
||||||
|
})
|
||||||
|
this.goodsCategorylist = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
change(e) {
|
||||||
|
this.form.goodsCategoryId = e[e.length - 1]
|
||||||
|
},
|
||||||
//护理站
|
//护理站
|
||||||
info() {
|
info() {
|
||||||
stationList(this.getListByUserquery).then((res) => {
|
stationList(this.getListByUserquery).then((res) => {
|
||||||
|
|||||||
@ -221,7 +221,7 @@
|
|||||||
<el-form-item label="排序" prop="">
|
<el-form-item label="排序" prop="">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="form.sort"
|
v-model.number="form.sort"
|
||||||
placeholder="请输入排序"
|
placeholder="请输入排序(只能输入数字)"
|
||||||
oninput="value=value.replace(/[^\d]/g,'')"
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -1,88 +1,114 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-row :gutter="20">
|
||||||
:model="queryParams"
|
<!--部门数据-->
|
||||||
ref="queryForm"
|
<el-col :span="4" :xs="24">
|
||||||
size="small"
|
<!-- <div class="head-container">
|
||||||
:inline="true"
|
<el-input
|
||||||
v-show="showSearch"
|
v-model="goodsCategoryName"
|
||||||
label-width="100px"
|
placeholder="请输入区域名称"
|
||||||
>
|
clearable
|
||||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
size="small"
|
||||||
<el-input
|
prefix-icon="el-icon-search"
|
||||||
v-model="queryParams.goodsCategoryName"
|
style="margin-bottom: 20px"
|
||||||
placeholder="请输入商品分类名称"
|
/>
|
||||||
clearable
|
</div> -->
|
||||||
@keyup.enter.native="handleQuery"
|
<div class="head-container" style="height: 580px; width: 100%">
|
||||||
/>
|
<el-tree
|
||||||
</el-form-item>
|
node-key="id"
|
||||||
<el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
:default-expanded-keys="[0]"
|
||||||
<el-input
|
class="flow-tree"
|
||||||
v-model="queryParams.goodsCategoryCode"
|
:data="deptOptions"
|
||||||
placeholder="请输入商品分类编码"
|
:props="defaultProps"
|
||||||
clearable
|
@node-click="handleNodeClick"
|
||||||
@keyup.enter.native="handleQuery"
|
@node-expand="handleNodeClick"
|
||||||
/>
|
></el-tree>
|
||||||
</el-form-item>
|
</div>
|
||||||
<el-form-item label="显示顺序" prop="sort">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sort"
|
|
||||||
placeholder="请输入显示顺序"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
size="mini"
|
|
||||||
@click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
||||||
>重置</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['system:goodsCategory:add']"
|
|
||||||
>新增</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!--用户数据-->
|
||||||
<el-button
|
<el-col :span="20" :xs="24">
|
||||||
type="success"
|
<el-form
|
||||||
plain
|
:model="queryParams"
|
||||||
icon="el-icon-edit"
|
ref="queryForm"
|
||||||
size="mini"
|
size="small"
|
||||||
:disabled="single"
|
:inline="true"
|
||||||
@click="handleUpdate"
|
v-show="showSearch"
|
||||||
v-hasPermi="['system:goodsCategory:edit']"
|
label-width="100px"
|
||||||
>修改</el-button
|
|
||||||
>
|
>
|
||||||
</el-col>
|
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||||
<el-col :span="1.5">
|
<el-input
|
||||||
<el-button
|
v-model="queryParams.goodsCategoryName"
|
||||||
type="danger"
|
placeholder="请输入商品分类名称"
|
||||||
plain
|
clearable
|
||||||
icon="el-icon-delete"
|
@keyup.enter.native="handleQuery"
|
||||||
size="mini"
|
/>
|
||||||
:disabled="multiple"
|
</el-form-item>
|
||||||
@click="handleDelete"
|
<el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||||
v-hasPermi="['system:goodsCategory:remove']"
|
<el-input
|
||||||
>删除</el-button
|
v-model="queryParams.goodsCategoryCode"
|
||||||
>
|
placeholder="请输入商品分类编码"
|
||||||
</el-col>
|
clearable
|
||||||
<!-- <el-col :span="1.5">
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="显示顺序" prop="sort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sort"
|
||||||
|
placeholder="请输入显示顺序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:goodsCategory:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:goodsCategory:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:goodsCategory:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
@ -93,74 +119,100 @@
|
|||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
:showSearch.sync="showSearch"
|
:showSearch.sync="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="goodsCategoryList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="商品分类名称"
|
||||||
|
align="center"
|
||||||
|
prop="goodsCategoryName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="商品分类编码"
|
||||||
|
align="center"
|
||||||
|
prop="goodsCategoryCode"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="分类概述"
|
||||||
|
align="center"
|
||||||
|
prop="categoryRemark"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:goodsCategory:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:goodsCategory:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
|
||||||
v-loading="loading"
|
|
||||||
:data="goodsCategoryList"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
label="商品分类名称"
|
|
||||||
align="center"
|
|
||||||
prop="goodsCategoryName"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="商品分类编码"
|
|
||||||
align="center"
|
|
||||||
prop="goodsCategoryCode"
|
|
||||||
/>
|
|
||||||
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
|
||||||
<el-table-column
|
|
||||||
label="分类概述"
|
|
||||||
align="center"
|
|
||||||
prop="categoryRemark"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['system:goodsCategory:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['system:goodsCategory:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改商品分类信息对话框 -->
|
<!-- 添加或修改商品分类信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="父级分类名称" prop="parentName">
|
||||||
|
<el-cascader
|
||||||
|
:props="treeOption"
|
||||||
|
@change="change"
|
||||||
|
style="width: 340px"
|
||||||
|
:show-all-levels="false"
|
||||||
|
ref="cascader"
|
||||||
|
:placeholder="form.parentName ? form.parentName : '商品主分类'"
|
||||||
|
:key="isResouceShow"
|
||||||
|
>
|
||||||
|
</el-cascader>
|
||||||
|
<!-- <el-input
|
||||||
|
v-model="form.parentName"
|
||||||
|
placeholder="请输入父级分类名称"
|
||||||
|
maxlength="10"
|
||||||
|
disabled
|
||||||
|
/> -->
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.goodsCategoryName"
|
v-model="form.goodsCategoryName"
|
||||||
@ -195,7 +247,7 @@
|
|||||||
v-model="form.sort"
|
v-model="form.sort"
|
||||||
maxlength="9"
|
maxlength="9"
|
||||||
oninput="value=value.replace(/[^\d]/g,'')"
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
placeholder="请输入显示顺序"
|
placeholder="请输入显示顺序(只能输入数字)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -215,14 +267,72 @@ import {
|
|||||||
updatePicture,
|
updatePicture,
|
||||||
addGoodsCategory,
|
addGoodsCategory,
|
||||||
updateGoodsCategory,
|
updateGoodsCategory,
|
||||||
|
getStationCategoryList,
|
||||||
} from "@/api/system/goodsCategory";
|
} from "@/api/system/goodsCategory";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
import baseurl from "@/api/baseurl";
|
import baseurl from "@/api/baseurl";
|
||||||
|
let id = 0;
|
||||||
export default {
|
export default {
|
||||||
name: "GoodsCategory",
|
name: "GoodsCategory",
|
||||||
components: { stationAcatar },
|
components: { stationAcatar },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isResouceShow: 1,
|
||||||
|
treeOption: {
|
||||||
|
lazy: true,
|
||||||
|
checkStrictly: true, // 是否可选择任意一级
|
||||||
|
lazyLoad(node, resolve) {
|
||||||
|
const id = node.level === 0 ? 0 : node.data.id;
|
||||||
|
setTimeout(() => {
|
||||||
|
if (id == 9999999) {
|
||||||
|
getStationCategoryList(0).then((res) => {
|
||||||
|
// 接口请求
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
e.value = e.id;
|
||||||
|
e.label = e.goodsCategoryName;
|
||||||
|
});
|
||||||
|
resolve(
|
||||||
|
res.data.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
} else if (id == 0) {
|
||||||
|
var data = [
|
||||||
|
{
|
||||||
|
label: "商品主分类",
|
||||||
|
children: [],
|
||||||
|
id: 9999999,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
resolve(
|
||||||
|
data.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
getStationCategoryList(id).then((res) => {
|
||||||
|
// 接口请求
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
e.value = e.id;
|
||||||
|
e.label = e.goodsCategoryName;
|
||||||
|
});
|
||||||
|
resolve(
|
||||||
|
res.data.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
},
|
||||||
|
},
|
||||||
imgone: "",
|
imgone: "",
|
||||||
baseurl: "",
|
baseurl: "",
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -252,9 +362,16 @@ export default {
|
|||||||
goodsCategoryPicture: null,
|
goodsCategoryPicture: null,
|
||||||
categoryRemark: null,
|
categoryRemark: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
|
parentId: "",
|
||||||
|
parentName: "",
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
goodsCategoryName: null,
|
||||||
|
goodsCategoryPicture: null,
|
||||||
|
categoryRemark: null,
|
||||||
|
sort: null,
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
goodsCategoryName: [
|
goodsCategoryName: [
|
||||||
@ -273,14 +390,76 @@ export default {
|
|||||||
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
|
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// 树选项
|
||||||
|
deptOptions: undefined,
|
||||||
|
categoryLevel: null,
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "goodsCategoryName",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.baseurl = baseurl;
|
this.baseurl = baseurl;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.info();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
change(e) {
|
||||||
|
this.form.parentId = e[e.length - 1];
|
||||||
|
},
|
||||||
|
// 节点单击事件
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.parentId = data.id;
|
||||||
|
this.queryParams.parentName = data.goodsCategoryName;
|
||||||
|
if (data.id != 0) {
|
||||||
|
this.form.parentId = data.id;
|
||||||
|
this.form.parentName = data.goodsCategoryName;
|
||||||
|
} else {
|
||||||
|
this.form.parentId = 0;
|
||||||
|
this.form.parentName = "";
|
||||||
|
}
|
||||||
|
// this.categoryLevel = data.categoryLevel;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
getStationCategoryList(data.id).then((res) => {
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
e.children = [
|
||||||
|
{
|
||||||
|
goodsCategoryName: "",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
data.children = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 查询商品分类信息列表 */
|
/** 查询商品分类信息列表 */
|
||||||
|
info() {
|
||||||
|
this.loading = true;
|
||||||
|
getStationCategoryList(0).then((res) => {
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
e.children = [
|
||||||
|
{
|
||||||
|
goodsCategoryName: "",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
});
|
||||||
|
var obj = [
|
||||||
|
{
|
||||||
|
goodsCategoryName: "商品主分类",
|
||||||
|
children: res.data,
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.deptOptions = obj;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listGoodsCategory(this.queryParams).then((response) => {
|
listGoodsCategory(this.queryParams).then((response) => {
|
||||||
@ -291,42 +470,60 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
console.log(this.form);
|
++this.isResouceShow;
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
if (this.imgone != this.form.goodsCategoryPicture) {
|
if (this.imgone != this.form.goodsCategoryPicture) {
|
||||||
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
|
if (this.form.goodsCategoryPicture) {
|
||||||
|
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// 延时到下一帧才开始,也就是页面刚刚渲染结束!!
|
||||||
|
this.$refs.form.clearValidate();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form.goodsCategoryName = null;
|
||||||
id: null,
|
this.form.goodsCategoryPicture = null;
|
||||||
goodsCategoryName: null,
|
this.form.categoryRemark = null;
|
||||||
goodsCategoryCode: null,
|
this.form.sort = null;
|
||||||
goodsCategoryPicture: null,
|
this.form.id = null;
|
||||||
categoryRemark: null,
|
|
||||||
sort: null,
|
// this.form = {
|
||||||
createBy: null,
|
// id: null,
|
||||||
createTime: null,
|
// goodsCategoryName: null,
|
||||||
updateBy: null,
|
// goodsCategoryCode: null,
|
||||||
updateTime: null,
|
// goodsCategoryPicture: null,
|
||||||
};
|
// categoryRemark: null,
|
||||||
this.resetForm("form");
|
// sort: null,
|
||||||
|
// createBy: null,
|
||||||
|
// createTime: null,
|
||||||
|
// updateBy: null,
|
||||||
|
// updateTime: null,
|
||||||
|
// parentId: null,
|
||||||
|
// parentName: null,
|
||||||
|
// };
|
||||||
|
// this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.parentId = null;
|
||||||
|
this.queryParams.parentName = null;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -341,6 +538,9 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加商品分类信息";
|
this.title = "添加商品分类信息";
|
||||||
|
// if (this.queryParams.parentId != 0) {
|
||||||
|
// }
|
||||||
|
// this.form.categoryLevel = this.categoryLevel;
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -351,13 +551,10 @@ export default {
|
|||||||
this.imgone = this.form.goodsCategoryPicture;
|
this.imgone = this.form.goodsCategoryPicture;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改商品分类信息";
|
this.title = "修改商品分类信息";
|
||||||
console.log(this.form);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form);
|
|
||||||
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -367,19 +564,21 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.imgone);
|
obj.pictureUrlList.push(this.imgone);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
++this.isResouceShow;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.info();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addGoodsCategory(this.form).then((response) => {
|
addGoodsCategory(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
++this.isResouceShow;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.info();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -389,7 +588,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除商品分类信息编号为"' + ids + '"的数据项?')
|
.confirm("是否确认删除?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delGoodsCategory(ids);
|
return delGoodsCategory(ids);
|
||||||
})
|
})
|
||||||
@ -397,11 +596,10 @@ export default {
|
|||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.info();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
@ -422,3 +620,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-cascader .el-input input::-webkit-input-placeholder {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
::v-deep .el-tree {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-tree > .el-tree-node {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -337,11 +337,11 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
const id = row.goodsInfoId || this.ids;
|
const id = row.goodsInfoId || this.ids;
|
||||||
getGoodsInfo(id).then((response) => {
|
getGoodsInfo(id).then((response) => {
|
||||||
this.form = response.data[0];
|
this.form = response.data;
|
||||||
this.form.nurseStationName = row.nurseStationName;
|
this.form.nurseStationName = row.nurseStationName;
|
||||||
this.imgone = this.form.goodsPictureUrl;
|
this.imgone = this.form.goodsPictureUrl;
|
||||||
if (response.data[0].goodAttributeDetailsLists) {
|
if (response.data.goodAttributeDetailsLists) {
|
||||||
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
||||||
}
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改商品基本信息";
|
this.title = "修改商品基本信息";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user