diff --git a/src/api/system/OperateGoodsInfo.js b/src/api/system/OperateGoodsInfo.js index 7772816..5f53ad6 100644 --- a/src/api/system/OperateGoodsInfo.js +++ b/src/api/system/OperateGoodsInfo.js @@ -16,6 +16,14 @@ export function getGoodsInfo(id) { method: 'get' }) } +//取消 +export function updatePicture(data) { + return request({ + url: '/system/patientArchives/updatePicture', + method: 'post', + data: data + }) +} // 新增商品基本信息 export function addGoodsInfo(data) { diff --git a/src/api/system/goodsCategory.js b/src/api/system/goodsCategory.js index afa3b3f..e32248e 100644 --- a/src/api/system/goodsCategory.js +++ b/src/api/system/goodsCategory.js @@ -16,6 +16,14 @@ export function getGoodsCategory(id) { method: 'get' }) } +//取消 +export function updatePicture(data) { + return request({ + url: '/system/patientArchives/updatePicture', + method: 'post', + data: data + }) +} // 新增商品分类信息 export function addGoodsCategory(data) { diff --git a/src/api/system/goodsInfo.js b/src/api/system/goodsInfo.js index 8ebd782..f71ee9e 100644 --- a/src/api/system/goodsInfo.js +++ b/src/api/system/goodsInfo.js @@ -76,3 +76,12 @@ export function delGoodsInfo(goodsInfoId) { method: 'delete' }) } +//取消 +export function updatePicture(data) { + return request({ + url: '/system/patientArchives/updatePicture', + method: 'post', + data: data + }) +} + diff --git a/src/api/system/station.js b/src/api/system/station.js index e881784..418a9ec 100644 --- a/src/api/system/station.js +++ b/src/api/system/station.js @@ -95,4 +95,12 @@ export function getLabelList(id) { url: `/system/nurseStationlabel/getLabelList?nurseStationId=${id}`, method: 'get' }) -} \ No newline at end of file +} +//取消 +export function updatePicture(data) { + return request({ + url: '/system/patientArchives/updatePicture', + method: 'post', + data: data + }) +} diff --git a/src/views/system/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue index b21485d..81399f1 100644 --- a/src/views/system/OperateGoodsInfo/index.vue +++ b/src/views/system/OperateGoodsInfo/index.vue @@ -672,6 +672,7 @@ import { goodsInfoList, goodsCategory, editGoodsWhetherShelf, + updatePicture, } from "@/api/system/OperateGoodsInfo"; import editor from "@/components/Editor"; import { getListByUser } from "@/api/system/userlist.js"; @@ -682,6 +683,7 @@ export default { name: "OperateGoodsInfo", data() { return { + imgone:"", imageUrl: "", //商品图片 value: "", datas: null, @@ -884,6 +886,14 @@ export default { }, // 取消按钮 cancel() { + console.log(this.form); + var obj = { pictureUrlList: [] }; + if(this.imgone !=this.form.goodsPictureUrl ){ + obj.pictureUrlList.push(this.form.goodsPictureUrl); + } + updatePicture(obj).then((res) => { + console.log(res); + }); this.open = false; this.reset(); this.StationName = "请选择所属护理站"; diff --git a/src/views/system/goodsCategory/index.vue b/src/views/system/goodsCategory/index.vue index f4e3ad1..3fcd0fd 100644 --- a/src/views/system/goodsCategory/index.vue +++ b/src/views/system/goodsCategory/index.vue @@ -212,6 +212,7 @@ import { listGoodsCategory, getGoodsCategory, delGoodsCategory, + updatePicture , addGoodsCategory, updateGoodsCategory, } from "@/api/system/goodsCategory"; @@ -222,6 +223,7 @@ export default { components: { stationAcatar }, data() { return { + imgone:"", baseurl: "", // 遮罩层 loading: true, @@ -289,6 +291,14 @@ export default { }, // 取消按钮 cancel() { + console.log(this.form); + var obj = { pictureUrlList: [] }; + if(this.imgone !=this.form.goodsCategoryPicture ){ + obj.pictureUrlList.push(this.form.goodsCategoryPicture); + } + updatePicture (obj).then((res) => { + console.log(res); + }); this.open = false; this.reset(); }, diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue index 218a175..79d8255 100644 --- a/src/views/system/goodsInfo/index.vue +++ b/src/views/system/goodsInfo/index.vue @@ -94,7 +94,7 @@ >修改 - + 删除 - + @@ -237,7 +237,7 @@ " >{{ StationName }} - + - + + @@ -402,7 +403,7 @@ label-width="120" > @@ -463,10 +464,10 @@ @@ -479,10 +480,11 @@ import { delGoodsInfo, addGoodsInfo, updateGoodsInfo, + updatePicture, goodsInfoList, goodsCategory, editGoodsWhetherShelf, -} from "@/api/system/OperateGoodsInfo"; +} from "@/api/system/goodsInfo"; import editor from "@/components/Editor"; import { getListByUser } from "@/api/system/userlist.js"; import stationAcatar from "../stationAvatar/index.vue"; @@ -492,6 +494,7 @@ export default { name: "OperateGoodsInfo", data() { return { + imgone:"", imageUrl: "", //商品图片 value: "", datas: null, @@ -507,6 +510,8 @@ export default { showSearch: true, // 总条数 total: 0, + total2: 0, + // 商品基本信息表格数据 goodsInfoList: [], // 护理站列表 @@ -550,7 +555,7 @@ export default { id: null, whetherShelf: null, }, - nurseStationqueryParams: { + getListByUserquery: { pageNum: 1, pageSize: 10, }, @@ -604,7 +609,7 @@ export default { created() { this.getList(); this.info(); - this.getList2(); + // this.getList2(); }, methods: { upwhetherShelf(row) { @@ -688,6 +693,14 @@ export default { }, // 取消按钮 cancel() { + console.log(this.form); + var obj = { pictureUrlList: [] }; + if(this.imgone !=this.form.goodsPictureUrl ){ + obj.pictureUrlList.push(this.form.goodsPictureUrl); + } + updatePicture(obj).then((res) => { + console.log(res); + }); this.open = false; this.reset(); this.StationName = "请选择所属护理站"; @@ -717,30 +730,30 @@ export default { }, handleQuery2(){ this.queryParams.pageNum = 1; - this.getList2() - }, - getList2(){ - getListByUser(this.nurseStationqueryParams).then((res) => { - this.nursetotal = res.total; - this.nurseStationlist = res.rows; - }); + this.info() }, + // getList2(){ + // getListByUser(this.nurseStationqueryParams).then((res) => { + // this.nursetotal = res.total; + // this.nurseStationlist = res.rows; + // }); + // }, resetQuery2() { this.resetForm("queryForm"); - this.nurseStationqueryParams={ + this.getListByUserquery={ pageNum:1, pageSize:10 }, this.handleQuery2(); - + }, addcancel() { this.innerVisible = false; // this.innerVisiblexg = false; this.resetQuery2(); - + }, - + // 表单重置 reset() { this.form = { @@ -822,7 +835,7 @@ export default { this.title = "修改商品基本信息"; }); }, - + /** 提交按钮 */ submitForm() { console.log(this.form); @@ -844,7 +857,7 @@ export default { addGoodsInfo(this.form).then((response) => { console.log(this.form); this.$modal.msgSuccess("新增成功"); - + this.StationName = "请选择所属护理站"; this.open = false; this.getList(); diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index 6d378f5..c9a9b40 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -145,18 +145,7 @@ >修改 - + 导入 - + - + @@ -250,13 +218,6 @@ class-name="small-padding fixed-width" >