价格
This commit is contained in:
parent
425f5426eb
commit
45ece6b6bb
@ -309,7 +309,7 @@
|
|||||||
<el-table-column label="商品单价" align="center">
|
<el-table-column label="商品单价" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.goodsPrice"
|
v-model="scope.row.goodsPrice"
|
||||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
||||||
min="0"
|
min="0"
|
||||||
type="number"
|
type="number"
|
||||||
@ -868,6 +868,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) {
|
||||||
@ -884,7 +887,9 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// this.nurseStationId=this.form.nurseStationId
|
this.form.goodDetailsLists.forEach((e) => {
|
||||||
|
e.goodsPrice = Number(e.goodsPrice);
|
||||||
|
});
|
||||||
addGoodsInfo(this.form).then((response) => {
|
addGoodsInfo(this.form).then((response) => {
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
|||||||
@ -242,16 +242,7 @@ export default {
|
|||||||
}, ],
|
}, ],
|
||||||
}, ];
|
}, ];
|
||||||
},
|
},
|
||||||
// clickinnerVisible() {
|
|
||||||
// this.innerVisible = true;
|
|
||||||
// },
|
|
||||||
// nurseclick(row) {
|
|
||||||
// console.log(this.form);
|
|
||||||
// console.log(row);
|
|
||||||
// this.form.nurseStationId = row.id;
|
|
||||||
// this.StationName = row.nurseStationName;
|
|
||||||
// this.innerVisible = false;
|
|
||||||
// },
|
|
||||||
handleQuery2() {
|
handleQuery2() {
|
||||||
// this.getListByUserquery.pageNum = 1;
|
// this.getListByUserquery.pageNum = 1;
|
||||||
this.getList2();
|
this.getList2();
|
||||||
@ -271,8 +262,6 @@ export default {
|
|||||||
this.handleQuery2();
|
this.handleQuery2();
|
||||||
},
|
},
|
||||||
addcancel() {
|
addcancel() {
|
||||||
// this.innerVisible = false;
|
|
||||||
// this.innerVisiblexg = false;
|
|
||||||
this.resetQuery2();
|
this.resetQuery2();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -378,6 +367,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) {
|
||||||
@ -393,7 +385,9 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// this.nurseStationId=this.form.nurseStationId
|
this.form.goodDetailsLists.forEach((e) => {
|
||||||
|
e.goodsPrice = Number(e.goodsPrice);
|
||||||
|
});
|
||||||
addGoodsInfo(this.form).then((response) => {
|
addGoodsInfo(this.form).then((response) => {
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
@ -504,4 +498,4 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -292,7 +292,7 @@
|
|||||||
<el-table-column label="商品单价" align="center">
|
<el-table-column label="商品单价" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.goodsPrice"
|
v-model="scope.row.goodsPrice"
|
||||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
||||||
min="0"
|
min="0"
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
@ -314,7 +314,7 @@
|
|||||||
<el-table-column property="price" label="价格" align="center">
|
<el-table-column property="price" label="价格" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.price"
|
v-model="scope.row.price"
|
||||||
placeholder="小数点后两位(元)"
|
placeholder="小数点后两位(元)"
|
||||||
min="0"
|
min="0"
|
||||||
type="number"
|
type="number"
|
||||||
@ -1107,12 +1107,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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user