价格 修改

This commit is contained in:
shidongli 2022-11-24 16:00:11 +08:00
parent 92c6a121d7
commit a96866f2bf
2 changed files with 19 additions and 8 deletions

View File

@ -376,6 +376,9 @@ export default {
if (valid) { if (valid) {
if (this.form.goodsInfoId != null) { if (this.form.goodsInfoId != null) {
this.form.id = this.form.goodsInfoId; this.form.id = this.form.goodsInfoId;
this.form.goodDetailsLists.forEach(e => {
e.goodsPrice = Number(e.goodsPrice)
})
updateGoodsInfo(this.form).then((response) => { updateGoodsInfo(this.form).then((response) => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsPictureUrl) { if (this.imgone != this.form.goodsPictureUrl) {
@ -392,6 +395,9 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.goodDetailsLists.forEach(e => {
e.goodsPrice = Number(e.goodsPrice)
})
// this.nurseStationId=this.form.nurseStationId // this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => { addGoodsInfo(this.form).then((response) => {
console.log(this.form); console.log(this.form);

View File

@ -118,7 +118,7 @@ export default {
required: true, required: true,
trigger: "blur", trigger: "blur",
message: "请选择项目头像", message: "请选择项目头像",
}, ], },],
nurseStationId: [ nurseStationId: [
{ required: true, trigger: "blur", message: "请选择所属护理站" }, { required: true, trigger: "blur", message: "请选择所属护理站" },
], ],
@ -290,7 +290,7 @@ export default {
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then((res) => { });
} }
this.open = false; this.open = false;
@ -355,7 +355,7 @@ export default {
price: null, price: null,
description: null, description: null,
ids: this.ids, ids: this.ids,
}, ], },],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -449,7 +449,6 @@ export default {
submitForm() { submitForm() {
this.form.nurseStationItemConsumables.forEach((e) => { this.form.nurseStationItemConsumables.forEach((e) => {
e.nurseStationConsumableId = e.id; e.nurseStationConsumableId = e.id;
e.consumableCount = Number(e.consumableCount)
}); });
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId; this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
@ -463,14 +462,20 @@ export default {
obj.pictureUrlList.push(this.imgone); obj.pictureUrlList.push(this.imgone);
} }
if (obj.pictureUrlList.length > 0) { 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) => { updateNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
this.form.nurseStationItemPrices.forEach(e => {
e.price = Number(e.price)
})
addNurseItem(this.form).then((response) => { addNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.$forceUpdate(); this.$forceUpdate();
@ -487,16 +492,16 @@ export default {
var that = this; var that = this;
this.$modal this.$modal
.confirm("是否确认删除此护理站护理项目?") .confirm("是否确认删除此护理站护理项目?")
.then(function() { .then(function () {
delNurseItem(ids).then(res => { delNurseItem(ids).then(res => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.itemPictureUrl); obj.pictureUrlList.push(row.itemPictureUrl);
updatePicture(obj).then((res) => {}); updatePicture(obj).then((res) => { });
that.getList(); that.getList();
that.$modal.msgSuccess("删除成功"); that.$modal.msgSuccess("删除成功");
}) })
}) })
.catch(() => {}); .catch(() => { });
}, },
/** 导入按钮操作 */ /** 导入按钮操作 */
handleExport() { handleExport() {