Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
shidongli 2022-10-31 16:46:35 +08:00
commit 3a3bc7c6b8
6 changed files with 250 additions and 247 deletions

View File

@ -1,3 +1,3 @@
var baseurl = "http://192.168.16.81:8080"; var baseurl = "http://192.168.16.30:8080";
export default baseurl export default baseurl

View File

@ -20,7 +20,7 @@ export function goodsInfoList(query) {
// 查询商品基本信息详细 // 查询商品基本信息详细
export function getGoodsInfo(id) { export function getGoodsInfo(id) {
return request({ return request({
url: `/system/goodsInfo/goodsDetails?`+`goodsInfoId=${id}`, url: `/system/goodsInfo/goodsDetails?` + `goodsInfoId=${id}`,
// url: '/system/goodsInfo/goodsDetails/' + goodsInfoId, // url: '/system/goodsInfo/goodsDetails/' + goodsInfoId,
method: 'get' method: 'get'
}) })
@ -55,7 +55,7 @@ export function goodsCategory(query) {
export function updateGoodsInfo(data) { export function updateGoodsInfo(data) {
return request({ return request({
url: '/system/goodsInfo/edit', url: '/system/goodsInfo/edit',
method: 'put', method: 'POST',
data: data data: data
}) })
} }

View File

@ -141,7 +141,6 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -178,7 +177,7 @@
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
@ -188,13 +187,12 @@
v-hasPermi="['system:goodsInfo:export']" v-hasPermi="['system:goodsInfo:export']"
>导出</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-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="goodsInfoList" :data="goodsInfoList"
@ -240,7 +238,12 @@
align="center" align="center"
prop="shelfTime" prop="shelfTime"
width="180" width="180"
/> >
<template slot-scope="scope">
<div v-if="scope.row.whetherShelf">{{ scope.row.shelfTime }}</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -266,7 +269,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -274,9 +276,13 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改商品基本信息对话框 --> <!-- 添加或修改商品基本信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
@ -351,7 +357,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="商品图片" prop="goodsPictureUrl"> <el-form-item label="商品图片" prop="goodsPictureUrl">
<goodsCategoryAcatar <stationAcatar
@imgUrl="imgUrl" @imgUrl="imgUrl"
:img="form.goodsPictureUrl" :img="form.goodsPictureUrl"
:type="'goodsPictureUrl'" :type="'goodsPictureUrl'"
@ -364,15 +370,7 @@
label-width="50px" label-width="50px"
style="margin-top: 20px" style="margin-top: 20px"
> >
<el-table-column label="显示顺序" width="100" align="center"> <el-table-column label="商品属性名称" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.goodAttributeDetailsLists[0].sort"
maxlength="40"
></el-input>
</template>
</el-table-column>
<el-table-column label="商品属性名称" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.attributeName" v-model="scope.row.attributeName"
@ -380,33 +378,42 @@
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品单价" width="100" align="center"> <el-table-column label="商品单价" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.goodAttributeDetailsLists[0].goodsPrice" v-model="scope.row.goodsPrice"
maxlength="40" maxlength="40"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存" width="100" align="center"> <el-table-column label="库存" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.goodAttributeDetailsLists[0].goodsStock" v-model="scope.row.goodsStock"
maxlength="40" maxlength="40"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品属性图片" width="100" align="center"> <el-table-column label="显示顺序" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model=" v-model="scope.row.attributeDetailsSort"
scope.row.goodAttributeDetailsLists[0].attributePitureUrl
"
maxlength="40" maxlength="40"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="120"> <el-table-column label="商品属性图片" align="center">
<template slot-scope="scope">
<stationAcatar
@imgUrl="attributePitureUrl"
@item="attributePitureitem"
:img="scope.row.attributePitureUrl"
:type="'attributePitureUrl'"
:item="scope.row"
/>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="addgoodAttributeDetail" <el-button size="mini" type="text" @click="addgoodAttributeDetail"
>新增</el-button >新增</el-button
@ -442,7 +449,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open2" :visible.sync="open2"
width="700px" width="1000px"
append-to-body append-to-body
> >
<el-form <el-form
@ -525,11 +532,10 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="商品图片" prop="goodsPictureUrl"> <el-form-item label="商品图片" prop="goodsPictureUrl">
<goodsCategoryAcatar <img
@imgUrl="imgUrl" :src="form.goodsPictureUrl"
:img="form.goodsPictureUrl" alt=""
:type="'goodsPictureUrl'" style="width: 150px; height: 150px"
:disabled="true"
/> />
</el-form-item> </el-form-item>
@ -539,64 +545,29 @@
label-width="50px" label-width="50px"
style="margin-top: 20px" style="margin-top: 20px"
> >
<el-table-column label="显示顺序" width="100" align="center"> <el-table-column
<template slot-scope="scope"> label="商品属性名称"
<el-input align="center"
v-model="scope.row.goodAttributeDetailsLists[0].sort" prop="attributeName"
maxlength="40" >
:disabled="true"
></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column label="商品属性名称" width="100" align="center"> <el-table-column label="商品单价" align="center" prop="goodsPrice">
<template slot-scope="scope">
<el-input
v-model="scope.row.attributeName"
maxlength="40"
:disabled="true"
></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column label="商品单价" width="100" align="center"> <el-table-column label="库存" align="center" prop="goodsStock">
<template slot-scope="scope">
<el-input
v-model="scope.row.goodAttributeDetailsLists[0].goodsPrice"
maxlength="40"
:disabled="true"
></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column label="库存" width="100" align="center"> <el-table-column
<template slot-scope="scope"> label="显示顺序"
<el-input align="center"
v-model="scope.row.goodAttributeDetailsLists[0].goodsStock" prop="attributeDetailsSort"
maxlength="40" >
:disabled="true"
></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column label="商品属性图片" width="100" align="center"> <el-table-column label="商品属性图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <img
v-model=" :src="scope.row.attributePitureUrl"
scope.row.goodAttributeDetailsLists[0].attributePitureUrl alt=""
" style="width: 100px; height: 100px"
maxlength="40" />
:disabled="true"
></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="addgoodAttributeDetail"
>新增</el-button
>
<el-button
size="mini"
type="text"
@click="delgoodAttributeDetail(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -605,34 +576,53 @@
prop="goodsRemark" prop="goodsRemark"
style="margin-top: 20px" style="margin-top: 20px"
> >
<editor <textarea
style="margin-left: 30px"
v-model="form.goodsRemark"
name=""
id=""
cols="130"
rows="10"
:disabled="true"
></textarea>
<!-- <editor
:min-height="100" :min-height="100"
style="width: 90%; margin: 0 auto" style="width: 90%; margin: 0 auto"
v-model="form.goodsRemark" v-model="form.goodsRemark"
:disabled="true" :disabled="true"
></editor> ></editor> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button @click="open2 = false">确定</el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listGoodsInfo, getGoodsInfo, delGoodsInfo, addGoodsInfo, updateGoodsInfo, goodsInfoList, listStation, goodsCategory, editGoodsWhetherShelf } from "@/api/system/goodsInfo"; import {
import goodsCategoryAcatar from "../goodsCategoryAcatar/index.vue"; listGoodsInfo,
getGoodsInfo,
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
goodsInfoList,
listStation,
goodsCategory,
editGoodsWhetherShelf,
} from "@/api/system/goodsInfo";
import editor from "@/components/Editor"; import editor from "@/components/Editor";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
export default { export default {
components: { goodsCategoryAcatar, editor }, components: { stationAcatar, editor },
name: "GoodsInfo", name: "GoodsInfo",
data() { data() {
return { return {
value: '', imageUrl: "", //
value: "",
datas: null, datas: null,
// //
loading: true, loading: true,
@ -659,47 +649,35 @@ export default {
open2: false, open2: false,
goods: [ goods: [
{ {
value: 'BUSINESS', value: "BUSINESS",
label: '买卖' label: "买卖",
}, },
{ {
value: 'LEASE', value: "LEASE",
label: '租赁' label: "租赁",
} },
], ],
options: [ options: [
{ {
value: 0, value: 0,
label: '否' label: "否",
}, },
{ {
value: 1, value: 1,
label: '是' label: "是",
} },
], ],
// goodAttributeDetailsLists:[], // goodAttributeDetailsLists:[],
goodDetailsLists: [ goodDetailsLists: [
{ {
attributeName: "", attributePitureUrl: "",
goodAttributeDetailsLists: [{ goodsPrice: "",
attributePitureUrl: "", goodsStock: "",
goodsPrice: "", sort: "",
goodsStock: "", ids: 9999,
sort: "",
ids: 1,
}],
}, },
], ],
// goodAttributeDetailsLists: [{ ids: 9999,
// attributeName: "",
// attributePitureUrl: "",
// goodsPrice: "",
// goodsStock: "",
// sort: "",
// ids: 1,
// }],
ids: 1,
// //
shangjia: { shangjia: {
id: null, id: null,
@ -725,8 +703,7 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
}
}; };
}, },
created() { created() {
@ -735,85 +712,72 @@ export default {
}, },
methods: { methods: {
upwhetherShelf(row) { upwhetherShelf(row) {
console.log(row) console.log(row);
if (row.whetherShelf == false) { if (row.whetherShelf == false) {
var obj = { var obj = {
id: row.goodsInfoId, id: row.goodsInfoId,
whetherShelf: 0 whetherShelf: 0,
} };
} else if (row.whetherShelf == true) { } else if (row.whetherShelf == true) {
var obj = { var obj = {
id: row.goodsInfoId, id: row.goodsInfoId,
whetherShelf: 1 whetherShelf: 1,
} };
} }
editGoodsWhetherShelf(obj).then((res => { editGoodsWhetherShelf(obj).then((res) => {
console.log(res) console.log(obj);
})) if (obj.whetherShelf == 0) {
this.$modal.msgSuccess("已修改上架状态为未上架");
} else {
this.$modal.msgSuccess("已修改上架状态为上架");
}
this.getList();
});
}, },
/** 查询商品基本信息列表 */ /** 查询商品基本信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
goodsInfoList(this.queryParams).then(response => { goodsInfoList(this.queryParams).then((response) => {
response.rows.forEach(e => { response.rows.forEach((e) => {
if (e.whetherShelf == 1) { if (e.whetherShelf == 1) {
e.whetherShelf = true e.whetherShelf = true;
} else if (e.whetherShelf == 0) { } else if (e.whetherShelf == 0) {
e.whetherShelf = false e.whetherShelf = false;
} }
}) });
this.goodsInfoList = response.rows; this.goodsInfoList = response.rows;
console.log(this.goodsInfoList) console.log(this.goodsInfoList);
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
list() { list() {
listStation().then((res) => { listStation().then((res) => {
console.log(res) console.log(res);
this.nurseStationlist = res.data; this.nurseStationlist = res.data;
}); });
goodsCategory().then((res) => { goodsCategory().then((res) => {
console.log(this.form) console.log(this.form);
this.goodsCategorylist = res.rows; this.goodsCategorylist = res.rows;
});
})
},
imgUrl(imgUrl) {
console.log(imgUrl);
this.form.goodsPictureUrl = imgUrl;
},
//
Putshelves(row) {
console.log(row)
this.shangjia = {
id: row.goodsInfoId,
whetherShelf: row.whetherShelf,
},
editGoodsWhetherShelf(this.shangjia).then((res => {
console.log(res)
}))
}, },
// //
addgoodAttributeDetail() { addgoodAttributeDetail() {
console.log(this.goodDetailsLists);
if (this.goodDetailsLists.length == 5) { if (this.goodDetailsLists.length == 5) {
this.$message.error("最多只能5条"); this.$message.error("最多只能5条");
} else { } else {
this.ids++; this.ids++;
var obj = { var obj = {
attributeName: "", attributePitureUrl: "",
goodAttributeDetailsLists: [{ goodsPrice: "",
attributePitureUrl: "", goodsStock: "",
goodsPrice: "", sort: "",
goodsStock: "", ids: this.ids,
sort: "",
ids: this.ids,
}],
}; };
this.goodDetailsLists.push(obj); this.goodDetailsLists.push(obj);
} }
console.log(this.goodDetailsLists);
}, },
// //
delgoodAttributeDetail(item) { delgoodAttributeDetail(item) {
@ -837,7 +801,6 @@ export default {
} }
console.log(this.goodDetailsLists); console.log(this.goodDetailsLists);
}, },
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -846,15 +809,16 @@ export default {
this.goodDetailsLists = [ this.goodDetailsLists = [
{ {
attributeName: "", attributeName: "",
goodAttributeDetailsLists: [{ goodAttributeDetailsLists: [
attributePitureUrl: "", {
goodsPrice: "", attributePitureUrl: "",
goodsStock: "", goodsPrice: "",
sort: "", goodsStock: "",
sort: "",
}], },
],
}, },
] ];
// this.goodDetailsLists = [{ // this.goodDetailsLists = [{
// attributeName: "", // attributeName: "",
@ -884,7 +848,7 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -900,9 +864,10 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) console.log(selection);
this.single = selection.length !== 1 this.ids = selection.map((item) => item.goodsInfoId);
this.multiple = !selection.length this.single = selection.length !== 1;
this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -911,68 +876,57 @@ export default {
this.title = "商品基本信息"; this.title = "商品基本信息";
this.goodDetailsLists = [ this.goodDetailsLists = [
{ {
attributeName: "", attributePitureUrl: "",
goodAttributeDetailsLists: [{ goodsPrice: "",
attributePitureUrl: "", goodsStock: "",
goodsPrice: "", sort: "",
goodsStock: "", ids: 99999999999999999999,
sort: "",
}],
}, },
];
]
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
// console.log(row)
this.reset(); this.reset();
const goodsInfoId = row.goodsInfoId || this.ids const id = row.goodsInfoId || this.ids;
getGoodsInfo(goodsInfoId).then(response => {
getGoodsInfo(id).then((response) => {
this.form = response.data[0]; this.form = response.data[0];
this.form.goodDetailsLists = response.data[0].goodDetailsLists[0].goodAttributeDetailsLists[0]; this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
this.open = true; this.open = true;
this.title = "修改商品基本信息"; this.title = "修改商品基本信息";
console.log(response.data[0].goodDetailsLists)
// console.log(response.data[0].goodDetailsLists[0].goodAttributeDetailsLists[0])
}); });
}, },
reference(row) { reference(row) {
const goodsInfoId = row.goodsInfoId || this.ids getGoodsInfo(row.goodsInfoId).then((response) => {
getGoodsInfo(goodsInfoId).then(response => { response.data[0].goodsPictureUrl =
baseurl + response.data[0].goodsPictureUrl;
this.form = response.data[0]; this.form = response.data[0];
this.form.goodDetailsLists = response.data[0].goodDetailsLists[0].goodAttributeDetailsLists[0]; response.data[0].goodAttributeDetailsLists.forEach((e) => {
// this.open = true; e.attributePitureUrl = baseurl + e.attributePitureUrl;
console.log(response.data[0].goodDetailsLists) });
// console.log(response.data[0].goodDetailsLists[0].goodAttributeDetailsLists[0]) this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
}); this.open2 = true;
this.open2 = true;
updateGoodsInfo(this.form).then(response => {
this.getList();
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form) 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.id != null) { if (this.form.goodsInfoId != null) {
this.form.goodDetailsLists = this.goodDetailsLists; this.form.id = this.form.goodsInfoId;
updateGoodsInfo(this.form).then(response => { updateGoodsInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
this.form = this.goodDetailsLists; addGoodsInfo(this.form).then((response) => {
addGoodsInfo(this.form).then(response => { console.log(this.form);
console.log(this.form)
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} }
} }
@ -981,19 +935,54 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除商品基本信息编号为"' + ids + '"的数据项?').then(function () { this.$modal
return delGoodsInfo(ids); .confirm("是否确认删除?")
}).then(() => { .then(function () {
this.getList(); return delGoodsInfo(ids);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => { }); .then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
/** 导出按钮操作 */ // /** */
handleExport() { // handleExport() {
this.download('system/goodsInfo/export', { // this.download(
...this.queryParams // "system/goodsInfo/export",
}, `goodsInfo_${new Date().getTime()}.xlsx`) // {
} // ...this.queryParams,
} // },
// `goodsInfo_${new Date().getTime()}.xlsx`
// );
// },
imgUrl(imgUrl) {
console.log(imgUrl);
this.form.goodsPictureUrl = imgUrl;
},
attributePitureUrl(imgUrl) {
console.log(imgUrl);
// this.form.attributePitureUrl = imgUrl;
},
attributePitureitem(item) {
let items = JSON.parse(item);
if (items.ids && !items.id) {
this.goodDetailsLists.forEach((e) => {
if (e.ids == items.ids) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
} else if (!items.ids && items.id) {
this.goodDetailsLists.forEach((e) => {
if (e.id == items.id) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
}
},
},
}; };
</script> </script>
<style lang="scss" scoped>
</style>

View File

@ -675,7 +675,7 @@ export default {
value3: "", value3: "",
value2: "", value2: "",
value1: "", value1: "",
value: "360000000000", value: "",
// //
loading: true, loading: true,
// //

View File

@ -112,16 +112,7 @@ import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
export default { export default {
components: { VueCropper }, components: { VueCropper },
props: { props: ["img", "type", "item"],
img: {
inputName: String,
required: true,
},
type: {
inputName: String,
required: true,
},
},
data() { data() {
return { return {
imageUrl: "", imageUrl: "",
@ -140,10 +131,13 @@ export default {
fixedBox: true, // fixedBox: true, //
}, },
previews: {}, previews: {},
rows: {},
}; };
}, },
created() { created() {
this.types = this.type; this.types = this.type;
this.rows = this.item;
if (this.img == null) { if (this.img == null) {
this.options.img = null; this.options.img = null;
} else if (this.img == "") { } else if (this.img == "") {
@ -151,8 +145,21 @@ export default {
} else { } else {
this.options.img = baseurl + this.img; this.options.img = baseurl + this.img;
} }
console.log(this.item);
}, },
watch: { watch: {
item: {
handler(newimg, oldimg) {
console.log(newimg,oldimg)
if (this.item == null) {
this.rows = null;
} else if (this.img == "") {
this.rows = null;
} else {
this.rows = this.item;
}
},
},
img: { img: {
handler(newimg, oldimg) { handler(newimg, oldimg) {
if (this.img == null) { if (this.img == null) {
@ -218,6 +225,11 @@ export default {
updateNurseStationHeads(formData).then((response) => { updateNurseStationHeads(formData).then((response) => {
this.options.img = baseurl + response.imgUrl; this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
console.log(this.rows);
if (this.types == "attributePitureUrl") {
this.rows.attributePitureUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.rows));
}
this.openimg = false; this.openimg = false;
}); });
}); });

View File

@ -364,7 +364,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="护理站"> <el-form-item label="护理站" prop="nurseStationIds">
<el-select <el-select
v-model="form.nurseStationIds" v-model="form.nurseStationIds"
multiple multiple
@ -612,6 +612,9 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
nurseStationIds: [
{ required: true, message: "护理站不能为空", trigger: "blur" },
],
nickName: [ nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }, { required: true, message: "用户昵称不能为空", trigger: "blur" },
], ],
@ -843,7 +846,6 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.nurseStationIds = this.form.nurseStationIds.join(","); this.form.nurseStationIds = this.form.nurseStationIds.join(",");
if (this.form.userId != undefined) { if (this.form.userId != undefined) {
updateUser(this.form).then((response) => { updateUser(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");