diff --git a/src/views/system/OperateGoodsInfo/indexjs.js b/src/views/system/OperateGoodsInfo/indexjs.js index 75b1f83..e285da1 100644 --- a/src/views/system/OperateGoodsInfo/indexjs.js +++ b/src/views/system/OperateGoodsInfo/indexjs.js @@ -376,6 +376,9 @@ export default { if (valid) { if (this.form.goodsInfoId != null) { this.form.id = this.form.goodsInfoId; + this.form.goodDetailsLists.forEach(e => { + e.goodsPrice = Number(e.goodsPrice) + }) updateGoodsInfo(this.form).then((response) => { var obj = { pictureUrlList: [] }; if (this.imgone != this.form.goodsPictureUrl) { @@ -392,6 +395,9 @@ export default { this.getList(); }); } else { + this.form.goodDetailsLists.forEach(e => { + e.goodsPrice = Number(e.goodsPrice) + }) // this.nurseStationId=this.form.nurseStationId addGoodsInfo(this.form).then((response) => { console.log(this.form); diff --git a/src/views/system/stationItem/stationItemjs.js b/src/views/system/stationItem/stationItemjs.js index d0e1016..c943ab7 100644 --- a/src/views/system/stationItem/stationItemjs.js +++ b/src/views/system/stationItem/stationItemjs.js @@ -118,7 +118,7 @@ export default { required: true, trigger: "blur", message: "请选择项目头像", - }, ], + },], nurseStationId: [ { required: true, trigger: "blur", message: "请选择所属护理站" }, ], @@ -290,7 +290,7 @@ export default { obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); } this.open = false; @@ -355,7 +355,7 @@ export default { price: null, description: null, ids: this.ids, - }, ], + },], }; this.resetForm("form"); }, @@ -449,7 +449,6 @@ export default { submitForm() { this.form.nurseStationItemConsumables.forEach((e) => { e.nurseStationConsumableId = e.id; - e.consumableCount = Number(e.consumableCount) }); this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId; this.$refs["form"].validate((valid) => { @@ -463,14 +462,20 @@ export default { obj.pictureUrlList.push(this.imgone); } if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); } + this.form.nurseStationItemPrices.forEach(e => { + e.price = Number(e.price) + }) updateNurseItem(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { + this.form.nurseStationItemPrices.forEach(e => { + e.price = Number(e.price) + }) addNurseItem(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.$forceUpdate(); @@ -487,16 +492,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() {