图片
This commit is contained in:
parent
e80fb60fab
commit
3b2064b9fb
@ -490,7 +490,7 @@ import {
|
|||||||
goodsInfoList,
|
goodsInfoList,
|
||||||
goodsCategory,
|
goodsCategory,
|
||||||
editGoodsWhetherShelf,
|
editGoodsWhetherShelf,
|
||||||
stationList
|
stationList,
|
||||||
} from "@/api/system/OperateGoodsInfo";
|
} from "@/api/system/OperateGoodsInfo";
|
||||||
import editor from "@/components/Editor";
|
import editor from "@/components/Editor";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
@ -800,7 +800,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -808,8 +807,7 @@ export default {
|
|||||||
goodsName: null,
|
goodsName: null,
|
||||||
goodsCategoryName: null,
|
goodsCategoryName: null,
|
||||||
goodsPurpose: null,
|
goodsPurpose: null,
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -846,7 +844,7 @@ export default {
|
|||||||
if (this.StationName == null) {
|
if (this.StationName == null) {
|
||||||
this.StationName = "请选择所属护理站";
|
this.StationName = "请选择所属护理站";
|
||||||
}
|
}
|
||||||
console.log(this.StationName)
|
console.log(this.StationName);
|
||||||
getGoodsInfo(id).then((response) => {
|
getGoodsInfo(id).then((response) => {
|
||||||
this.form = response.data[0];
|
this.form = response.data[0];
|
||||||
this.imgone = this.form.goodsPictureUrl;
|
this.imgone = this.form.goodsPictureUrl;
|
||||||
@ -870,6 +868,15 @@ export default {
|
|||||||
if (this.form.goodsInfoId != null) {
|
if (this.form.goodsInfoId != null) {
|
||||||
this.form.id = this.form.goodsInfoId;
|
this.form.id = this.form.goodsInfoId;
|
||||||
updateGoodsInfo(this.form).then((response) => {
|
updateGoodsInfo(this.form).then((response) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.goodsPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -898,6 +905,13 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -937,7 +951,7 @@ export default {
|
|||||||
stationList(this.getListByUserquery).then((res) => {
|
stationList(this.getListByUserquery).then((res) => {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.total2 = res.total;
|
this.total2 = res.total;
|
||||||
console.log(res)
|
console.log(res);
|
||||||
// if (res.rows[0].isAdmin == "1") {
|
// if (res.rows[0].isAdmin == "1") {
|
||||||
// this.nurseStationlist = res.rows;
|
// this.nurseStationlist = res.rows;
|
||||||
// this.total2 = res.total;
|
// this.total2 = res.total;
|
||||||
|
|||||||
@ -362,6 +362,15 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateGoodsCategory(this.form).then((response) => {
|
updateGoodsCategory(this.form).then((response) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.goodsCategoryPicture) {
|
||||||
|
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -385,6 +394,13 @@ export default {
|
|||||||
return delGoodsCategory(ids);
|
return delGoodsCategory(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
|
|||||||
@ -42,7 +42,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
|
<el-select
|
||||||
|
v-model="queryParams.goodsPurpose"
|
||||||
|
placeholder="请选择商品用途"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in goods"
|
v-for="item in goods"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -785,20 +788,19 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10,
|
||||||
}
|
};
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10;
|
||||||
this.queryParams.goodsName = null
|
this.queryParams.goodsName = null;
|
||||||
this.queryParams.goodsCategoryName = null
|
this.queryParams.goodsCategoryName = null;
|
||||||
this.queryParams.goodsPurpose = null
|
this.queryParams.goodsPurpose = null;
|
||||||
this.queryParams.whetherShelf = null
|
this.queryParams.whetherShelf = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -811,8 +813,8 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset()
|
this.reset();
|
||||||
this.form.nurseStationName=this.nurseStationlist[0].nurseStationName
|
this.form.nurseStationName = this.nurseStationlist[0].nurseStationName;
|
||||||
this.form.nurseStationId = this.nurseStationlist[0].id;
|
this.form.nurseStationId = this.nurseStationlist[0].id;
|
||||||
this.title = "商品基本信息";
|
this.title = "商品基本信息";
|
||||||
this.StationName = "请选择所属护理站";
|
this.StationName = "请选择所属护理站";
|
||||||
@ -829,13 +831,13 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
console.log(row)
|
console.log(row);
|
||||||
// this.reset();
|
// this.reset();
|
||||||
const id = row.goodsInfoId || this.ids;
|
const id = row.goodsInfoId || this.ids;
|
||||||
getGoodsInfo(id).then((response) => {
|
getGoodsInfo(id).then((response) => {
|
||||||
console.log(response)
|
console.log(response);
|
||||||
this.form = response.data[0];
|
this.form = response.data[0];
|
||||||
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[0].goodAttributeDetailsLists) {
|
||||||
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
||||||
@ -857,6 +859,15 @@ export default {
|
|||||||
if (this.form.goodsInfoId != null) {
|
if (this.form.goodsInfoId != null) {
|
||||||
this.form.id = this.form.goodsInfoId;
|
this.form.id = this.form.goodsInfoId;
|
||||||
updateGoodsInfo(this.form).then((response) => {
|
updateGoodsInfo(this.form).then((response) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.goodsPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -884,6 +895,12 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
|
||||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -942,13 +959,13 @@ export default {
|
|||||||
//权限列表
|
//权限列表
|
||||||
info() {
|
info() {
|
||||||
goodsCategory().then((res) => {
|
goodsCategory().then((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
|
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.goodsCategorylist = res.rows;
|
this.goodsCategorylist = res.rows;
|
||||||
});
|
});
|
||||||
getListByUser(this.getListByUserquery).then((res) => {
|
getListByUser(this.getListByUserquery).then((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if (res.rows[0].isAdmin == "1") {
|
if (res.rows[0].isAdmin == "1") {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
// console.log(this.queryParams)
|
// console.log(this.queryParams)
|
||||||
|
|||||||
@ -685,15 +685,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getaddress();
|
||||||
this.info();
|
this.info();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
imgUrl(imgUrl) {
|
imgUrl(imgUrl) {
|
||||||
console.log(imgUrl);
|
|
||||||
this.form.stationPictureUrl = imgUrl;
|
this.form.stationPictureUrl = imgUrl;
|
||||||
},
|
},
|
||||||
imgUrl2(imgUrl) {
|
imgUrl2(imgUrl) {
|
||||||
console.log(imgUrl);
|
|
||||||
this.form.stationIntroducePcitureUrl = imgUrl;
|
this.form.stationIntroducePcitureUrl = imgUrl;
|
||||||
},
|
},
|
||||||
delnurseStationLabelList(index, item) {
|
delnurseStationLabelList(index, item) {
|
||||||
@ -771,14 +770,17 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询护理站信息列表 */
|
/** 查询护理站信息列表 */
|
||||||
getList() {
|
getaddress() {
|
||||||
this.liststationinfo();
|
|
||||||
getFirstLevelInfo().then((res) => {
|
getFirstLevelInfo().then((res) => {
|
||||||
this.provincelist = res.data;
|
this.provincelist = res.data;
|
||||||
});
|
});
|
||||||
getInfoList().then((res) => {
|
},
|
||||||
this.nurseStationTypelist = res.data;
|
getList() {
|
||||||
});
|
this.liststationinfo();
|
||||||
|
|
||||||
|
// getInfoList().then((res) => {
|
||||||
|
// this.nurseStationTypelist = res.data;
|
||||||
|
// });
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@ -898,7 +900,7 @@ export default {
|
|||||||
this.looknurseStationLabel = response.data.nurseStationLabel;
|
this.looknurseStationLabel = response.data.nurseStationLabel;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
console.log(this.form)
|
console.log(this.form);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@ -912,6 +914,16 @@ export default {
|
|||||||
this.form.nurseStationType = this.nurseStationType2.join(",");
|
this.form.nurseStationType = this.nurseStationType2.join(",");
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateStation(this.form).then((response) => {
|
updateStation(this.form).then((response) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.stationIntroducePcitureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.imgone);
|
||||||
|
}
|
||||||
|
if (this.imgtwo != this.form.stationPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.imgtwo);
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {});
|
||||||
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -939,6 +951,12 @@ export default {
|
|||||||
return delStation(ids);
|
return delStation(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(row.stationIntroducePcitureUrl);
|
||||||
|
obj.pictureUrlList.push(row.stationPictureUrl);
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {});
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
|
|||||||
@ -951,7 +951,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 耗材列表 */
|
/** 耗材列表 */
|
||||||
listStationConsumable() {
|
listStationConsumable() {
|
||||||
|
|
||||||
listStationConsumable(this.StationConsumablequeryParams).then(
|
listStationConsumable(this.StationConsumablequeryParams).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
this.stationConsumableList = response.rows;
|
this.stationConsumableList = response.rows;
|
||||||
@ -1112,12 +1111,13 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.StationConsumablequeryParams.nurseStationId = null
|
this.StationConsumablequeryParams.nurseStationId = null;
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getNurseItem(id).then((response) => {
|
getNurseItem(id).then((response) => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.StationConsumablequeryParams.nurseStationId = response.data.nurseStationItem.nurseStationId
|
this.StationConsumablequeryParams.nurseStationId =
|
||||||
|
response.data.nurseStationItem.nurseStationId;
|
||||||
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
||||||
if (this.form.nurseStationItemPrices == []) {
|
if (this.form.nurseStationItemPrices == []) {
|
||||||
var obj = {
|
var obj = {
|
||||||
@ -1162,6 +1162,17 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.nurseStationItem.id != null) {
|
if (this.form.nurseStationItem.id != null) {
|
||||||
updateNurseItem(this.form).then((response) => {
|
updateNurseItem(this.form).then((response) => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(
|
||||||
|
this.form.nurseStationItem.itemPictureUrl
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -1169,7 +1180,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
addNurseItem(this.form).then((response) => {
|
addNurseItem(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$forceUpdate()
|
this.$forceUpdate();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -1186,6 +1197,11 @@ export default {
|
|||||||
return delNurseItem(ids);
|
return delNurseItem(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(row.nurseStationItem.itemPictureUrl);
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user