diff --git a/src/views/system/InformationCategory/index.vue b/src/views/system/InformationCategory/index.vue index 1f6cf0c..09c87bc 100644 --- a/src/views/system/InformationCategory/index.vue +++ b/src/views/system/InformationCategory/index.vue @@ -189,7 +189,7 @@ :prop="`informationCategoryList.${index}.informationCategoryName`" > { if (valid) { - if (this.form.id != null) { updateInformationCategory(this.form).then((response) => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { - addInformationCategory(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.addopen = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.addopen = false; + this.getList(); + } }); } } diff --git a/src/views/system/OperateGoodsInfo/indexjs.js b/src/views/system/OperateGoodsInfo/indexjs.js index 3c9f5a5..7e68b10 100644 --- a/src/views/system/OperateGoodsInfo/indexjs.js +++ b/src/views/system/OperateGoodsInfo/indexjs.js @@ -187,6 +187,7 @@ export default { whetherShelf: 1, }; } + console.log(obj) editGoodsWhetherShelf(obj).then((res) => { if (obj.whetherShelf == 0) { this.$modal.msgSuccess("已修改上架状态为未上架"); @@ -453,10 +454,12 @@ export default { if (obj.pictureUrlList.length > 0) { updatePicture(obj).then((res) => {}); } + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); ++this.isResouceShow this.open = false; this.getList(); + } }); } else { this.form.goodDetailsLists.forEach(e => { @@ -464,11 +467,13 @@ export default { }) // this.nurseStationId=this.form.nurseStationId addGoodsInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.StationName = "请选择所属护理站"; ++this.isResouceShow this.open = false; this.getList(); + } }); } } @@ -537,4 +542,4 @@ export default { }); }, }, -}; \ No newline at end of file +}; diff --git a/src/views/system/StationDepartment/indexjs.js b/src/views/system/StationDepartment/indexjs.js index 7d0320c..96496cb 100644 --- a/src/views/system/StationDepartment/indexjs.js +++ b/src/views/system/StationDepartment/indexjs.js @@ -283,15 +283,19 @@ export default { if (valid) { if (this.form.id != null) { updateStationDepartment(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addStationDepartment(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.addopen = false; this.getList(); + } }); } } diff --git a/src/views/system/appFileInfo/index.vue b/src/views/system/appFileInfo/index.vue index 35ba00c..d869f0a 100644 --- a/src/views/system/appFileInfo/index.vue +++ b/src/views/system/appFileInfo/index.vue @@ -337,15 +337,19 @@ export default { if (valid) { if (this.form.id != null) { updateAppFileInfo(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addAppFileInfo(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index b77cc00..42752b9 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -564,17 +564,21 @@ export default { if (valid) { if (this.form.id != null) { updateArea(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addArea(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.queryParams.parentCode = this.form.parentCode; this.queryParams.areaLevel = null; this.getList(); + } }); } } diff --git a/src/views/system/certificate/index.vue b/src/views/system/certificate/index.vue index 1932821..c0c8ec5 100644 --- a/src/views/system/certificate/index.vue +++ b/src/views/system/certificate/index.vue @@ -596,15 +596,19 @@ export default { if (valid) { if (this.form.id != null) { updateCertificate(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addCertificate(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/classifyItem/index.vue b/src/views/system/classifyItem/index.vue index 2a569d6..4305abd 100644 --- a/src/views/system/classifyItem/index.vue +++ b/src/views/system/classifyItem/index.vue @@ -481,6 +481,7 @@ export default { if (valid) { if (this.form.id != null) { updateInfo(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); if (this.form.classifyPictureUrl != this.imgone) { var obj = { pictureUrlList: [] }; @@ -489,13 +490,16 @@ export default { } this.editopen = false; this.getList(); + } }); } else { addInfo(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/communityInfo/index.vue b/src/views/system/communityInfo/index.vue index 4b67520..d9a26b1 100644 --- a/src/views/system/communityInfo/index.vue +++ b/src/views/system/communityInfo/index.vue @@ -938,18 +938,22 @@ export default { if (this.form.id != null) { updateCommunityInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open2 = false; this.open = false; this.getList(); + } }); } else { addCommunityInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.open2 = false; this.getList(); + } }); } } diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index f580b98..d8291a3 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -302,15 +302,19 @@ export default { if (valid) { if (this.form.configId != undefined) { updateConfig(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addConfig(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/coupon/index.vue b/src/views/system/coupon/index.vue index 840ecf0..37f2dad 100644 --- a/src/views/system/coupon/index.vue +++ b/src/views/system/coupon/index.vue @@ -593,15 +593,19 @@ export default { if (valid) { if (this.form.id != null) { updateCoupon(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addCoupon(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 5b898a2..4be35d9 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -308,15 +308,19 @@ export default { if (valid) { if (this.form.deptId != undefined) { updateDept(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addDept(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/diseaseInfo/index.vue b/src/views/system/diseaseInfo/index.vue index 77899dd..28d81de 100644 --- a/src/views/system/diseaseInfo/index.vue +++ b/src/views/system/diseaseInfo/index.vue @@ -419,15 +419,19 @@ export default { if (valid) { if (this.form.id != null) { updateDiseaseInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addDiseaseInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open2 = false; this.getList(); + } }); } } diff --git a/src/views/system/goodsCategory/index.vue b/src/views/system/goodsCategory/index.vue index 70d6174..c8ca5fd 100644 --- a/src/views/system/goodsCategory/index.vue +++ b/src/views/system/goodsCategory/index.vue @@ -566,19 +566,23 @@ export default { if (obj.pictureUrlList.length > 0) { updatePicture(obj).then((res) => {}); } + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); ++this.isResouceShow; this.open = false; this.getList(); this.info(); + } }); } else { addGoodsCategory(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); ++this.isResouceShow; this.open = false; this.getList(); this.info(); + } }); } } diff --git a/src/views/system/goodsInfo/indexjs.js b/src/views/system/goodsInfo/indexjs.js index 7a2b0e2..c3ddc8a 100644 --- a/src/views/system/goodsInfo/indexjs.js +++ b/src/views/system/goodsInfo/indexjs.js @@ -51,22 +51,22 @@ export default { nursetotal: 0, nurseStationId: null, goods: [{ - value: "BUSINESS", - label: "买卖", - }, - { - value: "LEASE", - label: "租赁", - }, + value: "BUSINESS", + label: "买卖", + }, + { + value: "LEASE", + label: "租赁", + }, ], options: [{ - value: 0, - label: "否", - }, - { - value: 1, - label: "是", - }, + value: 0, + label: "否", + }, + { + value: 1, + label: "是", + }, ], goodDetailsLists: [], idd: 9999999, @@ -218,7 +218,7 @@ export default { obj.pictureUrlList.push(this.form.goodsPictureUrl); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); } this.open = false; this.reset(); @@ -230,8 +230,8 @@ export default { goodsPrice: "", goodsStock: "", sort: "", - }, ], - }, ]; + },], + },]; }, //护理站页面选择护理站 nurseclick(item) { @@ -294,7 +294,7 @@ export default { goodsStock: "", sort: "", idd: 9999999, - }, ]; + },]; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -330,7 +330,7 @@ export default { goodsStock: "", sort: "", idd: 9999999, - }, ]; + },]; this.open = true; }, /** 修改按钮操作 */ @@ -362,18 +362,22 @@ export default { obj.pictureUrlList.push(this.imgone); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); } + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { // this.nurseStationId=this.form.nurseStationId addGoodsInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } @@ -382,28 +386,28 @@ export default { /** 删除按钮操作 */ handleDelete(row) { this.$confirm("是否确认删除订单信息的数据项?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) .then(() => { var obj = { pictureUrlList: [] }; obj.pictureUrlList.push(row.goodsPictureUrl); - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); delGoodsInfo(row.goodsInfoId).then((res) => { this.$message.success("删除成功"); this.getList(); }); }) - .catch(() => {}); + .catch(() => { }); }, imgUrl(imgUrl) { this.form.goodsPictureUrl = imgUrl; }, - attributePitureUrl(imgUrl) {}, + attributePitureUrl(imgUrl) { }, attributePitureitem(item) { let items = JSON.parse(item); - if (items.idd && !items.id) { + if (items.idd && !items.attributeDetailsId) { this.goodDetailsLists.forEach((e) => { if (e.idd == items.idd) { e.attributePitureUrl = items.attributePitureUrl; @@ -418,4 +422,4 @@ export default { } }, }, -}; \ No newline at end of file +}; diff --git a/src/views/system/goodsOrder/indexjs.js b/src/views/system/goodsOrder/indexjs.js index bb0b06b..754c351 100644 --- a/src/views/system/goodsOrder/indexjs.js +++ b/src/views/system/goodsOrder/indexjs.js @@ -388,15 +388,19 @@ export default { if (valid) { if (this.form.id != null) { updateGoodsOrder(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addGoodsOrder(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/groupQrCodeInfo/index.vue b/src/views/system/groupQrCodeInfo/index.vue index 1a76ffa..e7e914d 100644 --- a/src/views/system/groupQrCodeInfo/index.vue +++ b/src/views/system/groupQrCodeInfo/index.vue @@ -701,16 +701,19 @@ export default { obj.pictureUrlList.push(this.imgone); updatePicture(obj).then(res => {}); } - + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.editopen = false; this.getList(); + } }); } else { addGroupQrCodeInfo(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/hospital/index.vue b/src/views/system/hospital/index.vue index 6fea290..524ac22 100644 --- a/src/views/system/hospital/index.vue +++ b/src/views/system/hospital/index.vue @@ -353,15 +353,19 @@ export default { if (valid) { if (this.form.id != null) { updateHospital(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addHospital(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/hospitalDepartment/index.vue b/src/views/system/hospitalDepartment/index.vue index 4e443c8..0d85e37 100644 --- a/src/views/system/hospitalDepartment/index.vue +++ b/src/views/system/hospitalDepartment/index.vue @@ -799,15 +799,19 @@ export default { if (valid) { if (this.form.id != null) { updateHospitalDepartment(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addHospitalDepartment(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.addopen = false; this.getList(); + } }); } } diff --git a/src/views/system/hospitalPerson/index.vue b/src/views/system/hospitalPerson/index.vue index 002a6d6..3ae9624 100644 --- a/src/views/system/hospitalPerson/index.vue +++ b/src/views/system/hospitalPerson/index.vue @@ -969,15 +969,19 @@ export default { if (valid) { if (this.form.id != null) { updateHospitalPerson(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.addopen = false; this.getList(); + } }); } else { addHospitalPerson(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.addopen = false; this.getList(); + } }); } } diff --git a/src/views/system/informationInfo/index.vue b/src/views/system/informationInfo/index.vue index 02ac7c7..89db05d 100644 --- a/src/views/system/informationInfo/index.vue +++ b/src/views/system/informationInfo/index.vue @@ -753,6 +753,7 @@ export default { if (valid) { if (this.form.id != null) { updateInformationInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); var obj = { pictureUrlList: [] }; if (this.imgone != this.form.leadThumbnailUrl) { @@ -764,13 +765,16 @@ export default { this.imgsurl = { pictureUrlList: [] }; this.open = false; this.getList(); + } }); } else { this.form.informationSort = parseInt(this.form.informationSort); addInformationInfo(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index c30be85..a3c866a 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -425,15 +425,19 @@ export default { if (valid) { if (this.form.menuId != undefined) { updateMenu(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addMenu(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 7982b54..46dbd66 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -283,15 +283,19 @@ export default { if (valid) { if (this.form.noticeId != undefined) { updateNotice(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addNotice(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/nurseType/index.vue b/src/views/system/nurseType/index.vue index 9e5b8f1..1c193f2 100644 --- a/src/views/system/nurseType/index.vue +++ b/src/views/system/nurseType/index.vue @@ -366,15 +366,19 @@ export default { if (valid) { if (this.form.id != null) { updateNurseType(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addNurseType(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open2 = false; this.getList(); + } }); } } diff --git a/src/views/system/patientArchives/index.vue b/src/views/system/patientArchives/index.vue index d142eb6..f9689c0 100644 --- a/src/views/system/patientArchives/index.vue +++ b/src/views/system/patientArchives/index.vue @@ -858,15 +858,19 @@ export default { // this.form.areaCode = Number(item.areaCode); if (this.form.id != null) { updatePatientArchives(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addPatientArchives(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/person/indexjs.js b/src/views/system/person/indexjs.js index 6eb9014..650706b 100644 --- a/src/views/system/person/indexjs.js +++ b/src/views/system/person/indexjs.js @@ -516,17 +516,21 @@ export default { } if (this.form.id != null) { updatePerson(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addPerson(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); this.nurseStationName = "请选择所属护理站"; this.departmentName = "请选择所属科室"; + } }); } } diff --git a/src/views/system/poser/index.vue b/src/views/system/poser/index.vue index ad005f8..7ebb705 100644 --- a/src/views/system/poser/index.vue +++ b/src/views/system/poser/index.vue @@ -382,11 +382,11 @@ }, ]" > - + @@ -1073,24 +1073,19 @@ export default { if (valid) { if (this.form.id != null) { updatePoser(this.form).then((response) => { - // var obj = { pictureUrlList: [] }; - // if (this.form.posterPictureUrlLists) { - // this.form.posterPictureUrlLists.forEach((e) => { - // obj.pictureUrlList.push(e.posterPictureUrl); - // }); - // } - // updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => { - // this.open = false; - // }); - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { addPoser(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } }); } } diff --git a/src/views/system/revenue/index.vue b/src/views/system/revenue/index.vue index ee1caae..c0af63a 100644 --- a/src/views/system/revenue/index.vue +++ b/src/views/system/revenue/index.vue @@ -468,15 +468,19 @@ export default { if (valid) { if (this.form.id != null) { updateRevenue(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addRevenue(this.form).then(response => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/settings/index.vue b/src/views/system/settings/index.vue index 3b33789..120254e 100644 --- a/src/views/system/settings/index.vue +++ b/src/views/system/settings/index.vue @@ -570,15 +570,19 @@ export default { if (valid) { if (this.form.id != null) { updateSettings(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { addSettings(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/station/stationjs.js b/src/views/system/station/stationjs.js index 4eb0034..66c9d2a 100644 --- a/src/views/system/station/stationjs.js +++ b/src/views/system/station/stationjs.js @@ -490,13 +490,15 @@ export default { if (obj.pictureUrlList.length > 0) { updatePicture(obj).then((res) => {}); } - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { addStation(this.form).then((response) => { - if (response.code) { + if (response.code==200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); diff --git a/src/views/system/stationClassify/index.vue b/src/views/system/stationClassify/index.vue index 08f8675..02b78e0 100644 --- a/src/views/system/stationClassify/index.vue +++ b/src/views/system/stationClassify/index.vue @@ -495,6 +495,7 @@ export default { if (this.form.id != null) { updateStationClassify(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); if (this.form.classifyPictureUrl != this.imgone) { var obj = { pictureUrlList: [] }; @@ -503,6 +504,7 @@ export default { } this.editopen = false; this.getList(); + } }); } else { // if(this.form.nurseClassifyInfoList[0].classifySort){ @@ -510,9 +512,11 @@ export default { // } addStationClassify(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/stationConsumable/indexjs.js b/src/views/system/stationConsumable/indexjs.js index 06d5bc3..93a864f 100644 --- a/src/views/system/stationConsumable/indexjs.js +++ b/src/views/system/stationConsumable/indexjs.js @@ -369,19 +369,23 @@ export default { if (valid) { if (this.form.id != null) { updateStationConsumable(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.xgopen = false; this.getList(); + } }); } else { this.form.nurseStationConsumables.forEach((e) => { e.consumablePrice = Number(e.consumablePrice); }); addStationConsumable(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.nurseStationName = "请选择所属护理站"; this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/stationItem/stationItemjs.js b/src/views/system/stationItem/stationItemjs.js index 0a09d6d..d946ed8 100644 --- a/src/views/system/stationItem/stationItemjs.js +++ b/src/views/system/stationItem/stationItemjs.js @@ -621,19 +621,23 @@ export default { e.price = Number(e.price) }) updateNurseItem(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); + } }); } else { this.form.nurseStationItemPrices.forEach(e => { e.price = Number(e.price) }) addNurseItem(this.form).then((response) => { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.$forceUpdate(); this.open = false; this.getList(); + } }); } } diff --git a/src/views/system/trainingCategory/index.vue b/src/views/system/trainingCategory/index.vue index d0d6d68..815bdd0 100644 --- a/src/views/system/trainingCategory/index.vue +++ b/src/views/system/trainingCategory/index.vue @@ -394,15 +394,19 @@ export default { if (valid) { if (this.form.id != null) { updateTrainingCategory(this.form).then((response) => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { addTrainingCategory(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } }); } } diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue index cbd3cce..9625881 100644 --- a/src/views/system/trainingItem/index.vue +++ b/src/views/system/trainingItem/index.vue @@ -1440,15 +1440,19 @@ export default { if (obj.pictureUrlList.length > 0) { updatePicture(obj).then((res) => {}); } - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { addTrainingItem(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } }); } } diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue index eeeff6f..ac3307d 100644 --- a/src/views/system/trainingOrder/index.vue +++ b/src/views/system/trainingOrder/index.vue @@ -856,15 +856,19 @@ export default { if (valid) { if (this.form.id != null) { updateTrainingOrder(this.form).then((response) => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } }); } else { addTrainingOrder(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if (response.code == 200) { + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } }); } }