This commit is contained in:
闫晓茹 2022-11-24 14:52:01 +08:00
parent c0127dea55
commit 425f5426eb
4 changed files with 11 additions and 13 deletions

View File

@ -309,10 +309,10 @@
<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="scope.row.goodsPrice" v-model.number="scope.row.goodsPrice"
type="number"
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"
placeholder="小数点后两位(元)" placeholder="小数点后两位(元)"
></el-input> ></el-input>
</template> </template>
@ -625,7 +625,6 @@ export default {
this.getList(); this.getList();
this.info(); this.info();
this.infos(); this.infos();
// this.getList2();
}, },
methods: { methods: {
upwhetherShelf(row) { upwhetherShelf(row) {
@ -750,12 +749,6 @@ export default {
// this.getListByUserquery.pageNum = 1; // this.getListByUserquery.pageNum = 1;
this.info(); this.info();
}, },
// getList2() {
// stationList(this.getListByUserquery).then((res) => {
// this.total2 = res.total;
// this.nurseStationlist = res.rows;
// });
// },
resetQuery2() { resetQuery2() {
this.resetForm("queryForm"); this.resetForm("queryForm");
(this.getListByUserquery = { (this.getListByUserquery = {

View File

@ -292,10 +292,10 @@
<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="scope.row.goodsPrice" v-model.number="scope.row.goodsPrice"
type="number"
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"
placeholder="小数点后两位(元)" placeholder="小数点后两位(元)"
></el-input> ></el-input>
</template> </template>

View File

@ -993,6 +993,8 @@ export default {
this.form.consumablePrice = this.form.consumablePrice =
this.form.nurseStationConsumables[0].consumablePrice; this.form.nurseStationConsumables[0].consumablePrice;
this.form.sort = this.form.nurseStationConsumables[0].sort; this.form.sort = this.form.nurseStationConsumables[0].sort;
} else {
this.form.consumablePrice = Number(this.form.consumablePrice);
} }
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
@ -1003,6 +1005,9 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.nurseStationConsumables.forEach((e) => {
e.consumablePrice = Number(e.consumablePrice);
});
addStationConsumable(this.form).then((response) => { addStationConsumable(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.nurseStationName = "请选择所属护理站"; this.nurseStationName = "请选择所属护理站";

View File

@ -314,10 +314,10 @@
<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="scope.row.price" v-model.number="scope.row.price"
placeholder="小数点后两位(元)" placeholder="小数点后两位(元)"
type="number"
min="0" min="0"
type="number"
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>6){value=value.slice(0,6)}" oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>6){value=value.slice(0,6)}"
></el-input> ></el-input>
</template> </template>