From c2a7707b2f2e0ab9180efcb4b3e6462d582fcf0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Wed, 8 Feb 2023 16:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/classifyItem.js | 44 ++ src/views/system/OperateGoodsInfo/indexjs.js | 23 +- src/views/system/classifyItem/index.vue | 578 ++++++++++++++++++ src/views/system/goodsInfo/indexjs.js | 23 +- src/views/system/nurseType/index.vue | 123 ++-- src/views/system/station/stationjs.js | 12 +- src/views/system/stationAvatar/index.vue | 5 +- src/views/system/stationItem/stationItemjs.js | 48 +- 8 files changed, 738 insertions(+), 118 deletions(-) create mode 100644 src/api/system/classifyItem.js create mode 100644 src/views/system/classifyItem/index.vue diff --git a/src/api/system/classifyItem.js b/src/api/system/classifyItem.js new file mode 100644 index 0000000..426939e --- /dev/null +++ b/src/api/system/classifyItem.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询护理机构和护理项目分类信息列表 +export function listInfo(query) { + return request({ + url: '/classifyItem/info/list', + method: 'get', + params: query + }) +} + +// 查询护理机构和护理项目分类信息详细 +export function getInfo(id) { + return request({ + url: '/classifyItem/info/' + id, + method: 'get' + }) +} + +// 新增护理机构和护理项目分类信息 +export function addInfo(data) { + return request({ + url: '/classifyItem/info/add', + method: 'post', + data: data + }) +} + +// 修改护理机构和护理项目分类信息 +export function updateInfo(data) { + return request({ + url: '/classifyItem/info/edit', + method: 'post', + data: data + }) +} + +// 删除护理机构和护理项目分类信息 +export function delInfo(id) { + return request({ + url: '/classifyItem/info/' + id, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/views/system/OperateGoodsInfo/indexjs.js b/src/views/system/OperateGoodsInfo/indexjs.js index 1a33542..5cfa635 100644 --- a/src/views/system/OperateGoodsInfo/indexjs.js +++ b/src/views/system/OperateGoodsInfo/indexjs.js @@ -73,7 +73,8 @@ export default { ], // goodAttributeDetailsLists:[], goodDetailsLists: [], - ids: 9999999, + idd: 9999999, + ids: [], // 查询参数 shangjia: { id: null, @@ -201,28 +202,28 @@ export default { // if (this.goodDetailsLists.length == 5) { // this.$message.error("最多只能5条"); // } else { - this.ids++; + this.idd++; var obj = { attributePitureUrl: "", goodsPrice: "", goodsStock: "", attributeDetailsSort: null, - ids: this.ids, + idd: this.idd, }; this.goodDetailsLists.push(obj); // } }, // 删除 delgoodAttributeDetail(item) { - if (item.ids && !item.attributeDetailsId) { + if (item.idd && !item.attributeDetailsId) { if (this.goodDetailsLists.length == 1) { this.$message.error("最后一条不可删除"); } else { this.goodDetailsLists = this.goodDetailsLists.filter( - (e) => e.ids != item.ids + (e) => e.idd != item.idd ); } - } else if (!item.ids && item.attributeDetailsId) { + } else if (!item.idd && item.attributeDetailsId) { if (this.goodDetailsLists.length == 1) { this.$message.error("最后一条不可删除"); } else { @@ -322,7 +323,7 @@ export default { goodsPrice: "", goodsStock: "", attributeDetailsSort: null, - ids: 9999999, + idd: 9999999, }, ]; this.resetForm("form"); }, @@ -363,7 +364,7 @@ export default { goodsPrice: "", goodsStock: "", sort: null, - ids: 9999999, + idd: 9999999, }, ]; this.open = true; }, @@ -464,13 +465,13 @@ export default { }, attributePitureitem(item) { let items = JSON.parse(item); - if (items.ids && !items.id) { + if (items.idd && !items.id) { this.goodDetailsLists.forEach((e) => { - if (e.ids == items.ids) { + if (e.idd == items.idd) { e.attributePitureUrl = items.attributePitureUrl; } }); - } else if (!items.ids && items.attributeDetailsId) { + } else if (!items.idd && items.attributeDetailsId) { this.goodDetailsLists.forEach((e) => { if (e.attributeDetailsId == items.attributeDetailsId) { e.attributePitureUrl = items.attributePitureUrl; diff --git a/src/views/system/classifyItem/index.vue b/src/views/system/classifyItem/index.vue new file mode 100644 index 0000000..7750701 --- /dev/null +++ b/src/views/system/classifyItem/index.vue @@ -0,0 +1,578 @@ + + + diff --git a/src/views/system/goodsInfo/indexjs.js b/src/views/system/goodsInfo/indexjs.js index b679394..7a2b0e2 100644 --- a/src/views/system/goodsInfo/indexjs.js +++ b/src/views/system/goodsInfo/indexjs.js @@ -69,7 +69,7 @@ export default { }, ], goodDetailsLists: [], - ids: 9999999, + idd: 9999999, // 查询参数 shangjia: { id: null, @@ -180,28 +180,28 @@ export default { if (this.goodDetailsLists.length == 5) { this.$message.error("最多只能5条"); } else { - this.ids++; + this.idd++; var obj = { attributePitureUrl: "", goodsPrice: "", goodsStock: "", sort: "", - ids: this.ids, + idd: this.idd, }; this.goodDetailsLists.push(obj); } }, // 删除 delgoodAttributeDetail(item) { - if (item.ids && !item.attributeDetailsId) { + if (item.idd && !item.attributeDetailsId) { if (this.goodDetailsLists.length == 1) { this.$message.error("最后一条不可删除"); } else { this.goodDetailsLists = this.goodDetailsLists.filter( - (e) => e.ids != item.ids + (e) => e.idd != item.idd ); } - } else if (!item.ids && item.attributeDetailsId) { + } else if (!item.idd && item.attributeDetailsId) { if (this.goodDetailsLists.length == 1) { this.$message.error("最后一条不可删除"); } else { @@ -293,7 +293,7 @@ export default { goodsPrice: "", goodsStock: "", sort: "", - ids: 9999999, + idd: 9999999, }, ]; this.resetForm("form"); }, @@ -329,7 +329,7 @@ export default { goodsPrice: "", goodsStock: "", sort: "", - ids: 9999999, + idd: 9999999, }, ]; this.open = true; }, @@ -390,7 +390,6 @@ export default { var obj = { pictureUrlList: [] }; obj.pictureUrlList.push(row.goodsPictureUrl); updatePicture(obj).then((res) => {}); - delGoodsInfo(row.goodsInfoId).then((res) => { this.$message.success("删除成功"); this.getList(); @@ -404,13 +403,13 @@ export default { attributePitureUrl(imgUrl) {}, attributePitureitem(item) { let items = JSON.parse(item); - if (items.ids && !items.id) { + if (items.idd && !items.id) { this.goodDetailsLists.forEach((e) => { - if (e.ids == items.ids) { + if (e.idd == items.idd) { e.attributePitureUrl = items.attributePitureUrl; } }); - } else if (!items.ids && items.attributeDetailsId) { + } else if (!items.idd && items.attributeDetailsId) { this.goodDetailsLists.forEach((e) => { if (e.attributeDetailsId == items.attributeDetailsId) { e.attributePitureUrl = items.attributePitureUrl; diff --git a/src/views/system/nurseType/index.vue b/src/views/system/nurseType/index.vue index 74f21b9..9e5b8f1 100644 --- a/src/views/system/nurseType/index.vue +++ b/src/views/system/nurseType/index.vue @@ -8,7 +8,6 @@ v-show="showSearch" label-width="100px" > - - - - + + + - +
- + - + - - -
+ +
+ - - + + - + - @@ -243,7 +240,6 @@ export default { multiple: true, // 显示搜索条件 showSearch: true, - // 总条数 total: 0, // 护理类型信息表格数据 @@ -260,7 +256,6 @@ export default { userId: null, nurseTypeCode: null, nurseTypeName: null, - }, // 表单参数 form: {}, @@ -276,12 +271,12 @@ export default { ], }, nurseTypeName: [ - { - required: true, - message: "请输入护理类型名称", - trigger: "blur", - }, - ], + { + required: true, + message: "请输入护理类型名称", + trigger: "blur", + }, + ], }, }; }, @@ -289,8 +284,8 @@ export default { this.getList(); }, methods: { - //删除deldisease - deldisease(index) { + //删除deldisease + deldisease(index) { this.form.nurseTypeList.splice(index, 1); }, adddisease() { @@ -303,7 +298,7 @@ export default { this.form.nurseTypeList.push(obj); } }, - + /** 查询护理类型信息列表 */ getList() { this.loading = true; @@ -322,11 +317,11 @@ export default { // 表单重置 reset() { this.form = { - nurseTypeList:[ + nurseTypeList: [ { - nurseTypeName:"", - } - ] + nurseTypeName: "", + }, + ], }; this.resetForm("form"); }, @@ -364,8 +359,8 @@ export default { }, /** 提交按钮 */ submitForm() { - if(this.form==null){ - this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName + if (this.form == null) { + this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName; } this.$refs["form"].validate((valid) => { if (valid) { @@ -389,7 +384,7 @@ export default { handleDelete(row) { const ids = row.id || this.ids; this.$modal - .confirm('是否确认删除护理类型信息的数据项?') + .confirm("是否确认删除护理类型信息的数据项?") .then(function () { return delNurseType(ids); }) diff --git a/src/views/system/station/stationjs.js b/src/views/system/station/stationjs.js index 9567591..fc85eac 100644 --- a/src/views/system/station/stationjs.js +++ b/src/views/system/station/stationjs.js @@ -81,7 +81,7 @@ export default { looknurseStationLabel: [{ labelDescription: "", sort: "", - ids: 1, + idd: 1, }, ], // 护理站信息表格数据 stationList: [{ @@ -103,7 +103,7 @@ export default { }, // 表单参数 form: {}, - ids: 1, + idd: 1, provincelist: [], arealist: [], citylist: [], @@ -177,7 +177,7 @@ export default { this.looknurseStationLabel = [{ labelDescription: "", sort: "", - ids: 1, + idd: 1, }, ]; } else { this.looknurseStationLabel.splice(index, 1); @@ -189,11 +189,11 @@ export default { if (this.looknurseStationLabel.length == 5) { this.$message.error("最多只能5条"); } else { - this.ids++; + this.idd++; var obj = { labelDescription: "", sort: "", - ids: this.ids, + idd: this.idd, }; this.looknurseStationLabel.push(obj); } @@ -338,7 +338,7 @@ export default { this.looknurseStationLabel = [{ labelDescription: "", sort: "", - ids: 1, + idd: 1, }, ]; this.title = "添加护理站信息"; }, diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index b92f238..612dd08 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -227,6 +227,10 @@ export default { this.items.attributePitureUrl = response.imgUrl; this.$emit("item", JSON.stringify(this.items)); } + if (this.types == "nurseItemClassifyUrl") { + this.items.classifyPictureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } this.openimg = false; }); } else { @@ -235,7 +239,6 @@ export default { }, // 实时预览 realTime(data) { - console.log(data); this.previews = data; }, // 关闭窗口 diff --git a/src/views/system/stationItem/stationItemjs.js b/src/views/system/stationItem/stationItemjs.js index 1464d88..8a978c2 100644 --- a/src/views/system/stationItem/stationItemjs.js +++ b/src/views/system/stationItem/stationItemjs.js @@ -100,7 +100,7 @@ export default { nurseStationName: "请选择所属护理站", }, }, - ids: 1, + idd: 1, // 表单校验 rules: { "nurseStationItem.nurseItemName": [ @@ -119,7 +119,7 @@ export default { required: true, trigger: "blur", message: "请选择项目头像", - },], + }, ], nurseStationId: [ { required: true, trigger: "blur", message: "请选择所属护理站" }, ], @@ -138,7 +138,7 @@ export default { methods: { imgs(item) { this.imgsurl.pictureUrlList.push(item); - }, + }, imgUrl(imgUrl) { this.form.nurseStationItem.itemPictureUrl = imgUrl; @@ -295,12 +295,12 @@ export default { obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => { }); + updatePicture(obj).then((res) => {}); } if (this.imgsurl.pictureUrlList.length > 0) { updatePicture(this.imgsurl).then((res) => {}); - } - this.imgsurl={pictureUrlList:[]}; + } + this.imgsurl = { pictureUrlList: [] }; this.open = false; this.reset(); @@ -310,25 +310,25 @@ export default { if (this.form.nurseStationItemPrices.length == 5) { this.$message.error("最多只能5条"); } else { - this.ids++; + this.idd++; var obj = { serveDurationUnit: "", price: "", description: "", - ids: this.ids, + idd: this.idd, }; this.form.nurseStationItemPrices.push(obj); } }, delnurseStationItemPrices(item) { - if (item.ids && !item.nurseItemPriceId) { + if (item.idd && !item.nurseItemPriceId) { if (this.form.nurseStationItemPrices.length == 1) { this.$message.error("最后一条不可删除"); } else { this.form.nurseStationItemPrices = - this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids); + this.form.nurseStationItemPrices.filter((e) => e.idd != item.idd); } - } else if (!item.ids && item.nurseItemPriceId) { + } else if (!item.idd && item.nurseItemPriceId) { if (this.form.nurseStationItemPrices.length == 1) { this.$message.error("最后一条不可删除"); } else { @@ -363,8 +363,8 @@ export default { serveDurationUnit: null, price: null, description: null, - ids: this.ids, - },], + idd: this.idd, + }, ], }; this.resetForm("form"); }, @@ -429,7 +429,7 @@ export default { serveDurationUnit: "", price: "", description: "", - ids: this.ids, + idd: this.idd, }; this.form.nurseStationItemPrices.push(obj); } else if (this.form.nurseStationItemPrices.length == 0) { @@ -437,7 +437,7 @@ export default { serveDurationUnit: "", price: "", description: "", - ids: this.ids, + idd: this.idd, }; this.form.nurseStationItemPrices.push(obj); } else if (this.form.nurseStationItemPrices == null) { @@ -445,7 +445,7 @@ export default { serveDurationUnit: "", price: "", description: "", - ids: this.ids, + idd: this.idd, }; this.form.nurseStationItemPrices.push(obj); } @@ -471,13 +471,13 @@ export default { obj.pictureUrlList.push(this.imgone); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => { }); + updatePicture(obj).then((res) => {}); } - this.imgsurl={pictureUrlList:[]}; + this.imgsurl = { pictureUrlList: [] }; this.form.nurseStationItemPrices.forEach(e => { e.price = Number(e.price) }) - this.form.nurseStationItem.advanceAppointDuration=0 + this.form.nurseStationItem.advanceAppointDuration = 0 updateNurseItem(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -487,7 +487,7 @@ export default { this.form.nurseStationItemPrices.forEach(e => { e.price = Number(e.price) }) - this.form.nurseStationItem.advanceAppointDuration=0 + this.form.nurseStationItem.advanceAppointDuration = 0 addNurseItem(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.$forceUpdate(); @@ -504,16 +504,16 @@ export default { var that = this; this.$modal .confirm("是否确认删除此护理站护理项目?") - .then(function () { + .then(function() { delNurseItem(ids).then(res => { var obj = { pictureUrlList: [] }; obj.pictureUrlList.push(row.itemPictureUrl); - updatePicture(obj).then((res) => { }); + updatePicture(obj).then((res) => {}); that.getList(); that.$modal.msgSuccess("删除成功"); }) }) - .catch(() => { }); + .catch(() => {}); }, /** 导入按钮操作 */ handleExport() { @@ -521,4 +521,4 @@ export default { this.upload.open = true; }, }, -}; +}; \ No newline at end of file