价格 修改

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

@ -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) => {
@ -465,12 +464,18 @@ export default {
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();