diff --git a/src/views/system/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue index e091c43..dbc0263 100644 --- a/src/views/system/OperateGoodsInfo/index.vue +++ b/src/views/system/OperateGoodsInfo/index.vue @@ -104,6 +104,7 @@ >修改 + { this.form = response.data[0]; this.imgone = this.form.goodsPictureUrl; @@ -869,7 +868,17 @@ export default { if (this.form.goodsInfoId != null) { this.form.id = this.form.goodsInfoId; 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.open = false; this.getList(); }); @@ -896,11 +905,18 @@ export default { }) .then(() => { 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.getList(); }); }) - .catch(() => { }); + .catch(() => {}); }, imgUrl(imgUrl) { console.log(imgUrl); @@ -935,7 +951,17 @@ export default { stationList(this.getListByUserquery).then((res) => { this.nurseStationlist = res.rows; this.total2 = res.total; - console.log(res) + console.log(res); + // if (res.rows[0].isAdmin == "1") { + // this.nurseStationlist = res.rows; + // this.total2 = res.total; + // } else { + // this.total2 = res.total; + // this.nurseStationlist = res.rows; + // this.queryParams.nurseStationId = res.rows[0].id; + // this.form.nurseStationId = res.rows[0].id; + // this.handleQuery(); + // } }); }, //滑动下拉框 diff --git a/src/views/system/goodsCategory/index.vue b/src/views/system/goodsCategory/index.vue index 1214cc6..66a3539 100644 --- a/src/views/system/goodsCategory/index.vue +++ b/src/views/system/goodsCategory/index.vue @@ -212,7 +212,7 @@ import { listGoodsCategory, getGoodsCategory, delGoodsCategory, - updatePicture , + updatePicture, addGoodsCategory, updateGoodsCategory, } from "@/api/system/goodsCategory"; @@ -223,7 +223,7 @@ export default { components: { stationAcatar }, data() { return { - imgone:"", + imgone: "", baseurl: "", // 遮罩层 loading: true, @@ -293,7 +293,7 @@ export default { cancel() { console.log(this.form); var obj = { pictureUrlList: [] }; - if(this.imgone !=this.form.goodsCategoryPicture ){ + if (this.imgone != this.form.goodsCategoryPicture) { obj.pictureUrlList.push(this.form.goodsCategoryPicture); } if (obj.pictureUrlList.length > 0) { @@ -362,6 +362,15 @@ export default { if (valid) { if (this.form.id != null) { 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.open = false; this.getList(); @@ -385,6 +394,13 @@ export default { return delGoodsCategory(ids); }) .then(() => { + var obj = { pictureUrlList: [] }; + obj.pictureUrlList.push(row.goodsCategoryPicture); + if (obj.pictureUrlList.length > 0) { + updatePicture(obj).then((res) => { + console.log(res); + }); + } this.getList(); this.$modal.msgSuccess("删除成功"); }) diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue index e500668..2b2be0f 100644 --- a/src/views/system/goodsInfo/index.vue +++ b/src/views/system/goodsInfo/index.vue @@ -223,7 +223,7 @@ { - console.log(response) + console.log(response); this.form = response.data[0]; - this.form.nurseStationName = row.nurseStationName + this.form.nurseStationName = row.nurseStationName; this.imgone = this.form.goodsPictureUrl; if (response.data[0].goodAttributeDetailsLists) { this.goodDetailsLists = response.data[0].goodAttributeDetailsLists; @@ -860,6 +859,15 @@ export default { if (this.form.goodsInfoId != null) { this.form.id = this.form.goodsInfoId; 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.open = false; this.getList(); @@ -887,13 +895,19 @@ export default { type: "warning", }) .then(() => { + var obj = { pictureUrlList: [] }; + obj.pictureUrlList.push(row.goodsPictureUrl); + updatePicture(obj).then((res) => { + console.log(res); + }); + delGoodsInfo(row.goodsInfoId).then((res) => { this.$message.success("删除成功"); this.getList(); // console.log('this.OrderDetailsList :>> ', this.OrderDetailsList); }); }) - .catch(() => { }); + .catch(() => {}); }, // handleDelete(row) { // const ids = row.id || this.ids; @@ -945,13 +959,13 @@ export default { //权限列表 info() { goodsCategory().then((res) => { - console.log(res) + console.log(res); console.log(this.form); this.goodsCategorylist = res.rows; }); getListByUser(this.getListByUserquery).then((res) => { - console.log(res) + console.log(res); if (res.rows[0].isAdmin == "1") { this.nurseStationlist = res.rows; // console.log(this.queryParams) diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index 554b991..3ecb820 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -685,15 +685,14 @@ export default { }, created() { this.getList(); + this.getaddress(); this.info(); }, methods: { imgUrl(imgUrl) { - console.log(imgUrl); this.form.stationPictureUrl = imgUrl; }, imgUrl2(imgUrl) { - console.log(imgUrl); this.form.stationIntroducePcitureUrl = imgUrl; }, delnurseStationLabelList(index, item) { @@ -740,14 +739,13 @@ export default { }, //点击街道 clickstreet(item) { - this.form.streetCode = item.areaCode; this.form.areaCode = item.areaCode; console.log(item, this.form); }, //点击区县城 clickarea(item) { this.form.areaCode = ""; - this.form.streetName = ""; + this.form.streetCode = ""; getSecondaryLevelInfo(item.id).then((res) => { this.streetlist = res.data; }); @@ -756,7 +754,7 @@ export default { clickcity(item) { this.form.regionName = ""; this.form.areaCode = ""; - this.form.streetName = ""; + this.form.streetCode = ""; getSecondaryLevelInfo(item.id).then((res) => { this.arealist = res.data; }); @@ -766,20 +764,23 @@ export default { this.form.cityName = ""; this.form.regionName = ""; this.form.areaCode = ""; - this.form.streetName = ""; + this.form.streetCode = ""; getSecondaryLevelInfo(item.id).then((res) => { this.citylist = res.data; }); }, /** 查询护理站信息列表 */ - getList() { - this.liststationinfo(); + getaddress() { getFirstLevelInfo().then((res) => { this.provincelist = res.data; }); - getInfoList().then((res) => { - this.nurseStationTypelist = res.data; - }); + }, + getList() { + this.liststationinfo(); + + // getInfoList().then((res) => { + // this.nurseStationTypelist = res.data; + // }); this.loading = true; }, // 取消按钮 @@ -806,7 +807,6 @@ export default { nurseStationCode: null, nurseStationName: null, nurseStationType: null, - agencyIntroduce: null, nurseStationDescription: null, longitude: null, @@ -819,6 +819,7 @@ export default { stationIntroducePcitureUrl: null, sort: null, nurseStationLabelList: [], + streetCode: null, }; this.resetForm("form"); }, @@ -899,7 +900,7 @@ export default { this.looknurseStationLabel = response.data.nurseStationLabel; this.open = true; this.loading = false; - console.log(this.form) + console.log(this.form); }); }, /** 提交按钮 */ @@ -913,6 +914,16 @@ export default { this.form.nurseStationType = this.nurseStationType2.join(","); if (this.form.id != null) { 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.open = false; this.getList(); @@ -940,6 +951,12 @@ export default { return delStation(ids); }) .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.$modal.msgSuccess("删除成功"); }) diff --git a/src/views/system/stationItem/index.vue b/src/views/system/stationItem/index.vue index df89eac..70698fd 100644 --- a/src/views/system/stationItem/index.vue +++ b/src/views/system/stationItem/index.vue @@ -374,7 +374,7 @@ - + " + - response.msg + - "", + response.msg + + "", "导入结果", { dangerouslyUseHTMLString: true } ); @@ -952,7 +951,6 @@ export default { }, /** 耗材列表 */ listStationConsumable() { - listStationConsumable(this.StationConsumablequeryParams).then( (response) => { this.stationConsumableList = response.rows; @@ -993,7 +991,7 @@ export default { cancel() { console.log(this.form.nurseStationItem); var obj = { pictureUrlList: [] }; - if (this.imgone!= this.form.nurseStationItem.itemPictureUrl) { + if (this.imgone != this.form.nurseStationItem.itemPictureUrl) { obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); } if (obj.pictureUrlList.length > 0) { @@ -1113,12 +1111,13 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - this.StationConsumablequeryParams.nurseStationId = null + this.StationConsumablequeryParams.nurseStationId = null; const id = row.id || this.ids; getNurseItem(id).then((response) => { console.log(response); this.form = response.data; - this.StationConsumablequeryParams.nurseStationId=response.data.nurseStationItem.nurseStationId + this.StationConsumablequeryParams.nurseStationId = + response.data.nurseStationItem.nurseStationId; this.imgone = this.form.nurseStationItem.itemPictureUrl; if (this.form.nurseStationItemPrices == []) { var obj = { @@ -1163,6 +1162,17 @@ export default { if (valid) { if (this.form.nurseStationItem.id != null) { 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.open = false; this.getList(); @@ -1170,7 +1180,7 @@ export default { } else { addNurseItem(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); - this.$forceUpdate() + this.$forceUpdate(); this.open = false; this.getList(); }); @@ -1187,10 +1197,15 @@ export default { return delNurseItem(ids); }) .then(() => { + var obj = { pictureUrlList: [] }; + obj.pictureUrlList.push(row.nurseStationItem.itemPictureUrl); + updatePicture(obj).then((res) => { + console.log(res); + }); this.getList(); this.$modal.msgSuccess("删除成功"); }) - .catch(() => { }); + .catch(() => {}); }, /** 导入按钮操作 */ handleExport() {