价格 修改

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 (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);

View File

@ -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() {