价格 修改
This commit is contained in:
parent
f8869416f5
commit
c7f22e6e06
@ -298,7 +298,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="scope.row.goodsPrice"
|
v-model.number="scope.row.goodsPrice"
|
||||||
type="number"
|
type="number"
|
||||||
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
|||||||
@ -236,10 +236,9 @@
|
|||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.sort"
|
v-model="form.sort"
|
||||||
placeholder="不可输入小数点"
|
placeholder="请输入排序"
|
||||||
type="number"
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
min="0"
|
maxLength="10"
|
||||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -339,11 +338,10 @@
|
|||||||
:prop="`nurseStationConsumables.${index}.sort`"
|
:prop="`nurseStationConsumables.${index}.sort`"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
|
placeholder="请输入排序"
|
||||||
v-model="item.sort"
|
v-model="item.sort"
|
||||||
placeholder="不可输入小数点"
|
maxlength="10"
|
||||||
type="number"
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
min="0"
|
|
||||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@ -345,6 +345,7 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getStationConsumable(id).then((response) => {
|
getStationConsumable(id).then((response) => {
|
||||||
|
console.log(this.form)
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.xgopen = true;
|
this.xgopen = true;
|
||||||
this.title = "修改护理站耗材信息";
|
this.title = "修改护理站耗材信息";
|
||||||
@ -353,6 +354,21 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
if (this.form.id == null) {
|
||||||
|
this.form.consumableDetail =
|
||||||
|
this.form.nurseStationConsumables[0].consumableDetail;
|
||||||
|
this.form.nurseStationId =
|
||||||
|
this.form.nurseStationConsumables[0].nurseStationId;
|
||||||
|
this.form.consumableUnit =
|
||||||
|
this.form.nurseStationConsumables[0].consumableUnit;
|
||||||
|
this.form.consumablePrice =
|
||||||
|
this.form.nurseStationConsumables[0].consumablePrice;
|
||||||
|
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) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -362,6 +378,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 = "请选择所属护理站";
|
||||||
|
|||||||
@ -324,7 +324,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="scope.row.price"
|
v-model.number="scope.row.price"
|
||||||
placeholder="小数点后两位(元)"
|
placeholder="小数点后两位(元)"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
|
|||||||
@ -453,8 +453,10 @@ export default {
|
|||||||
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
|
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
if (this.form.nurseStationItem.id != null) {
|
if (this.form.nurseStationItem.id != null) {
|
||||||
this.form.nurseStationItemPrices.forEach((e) => {
|
|
||||||
|
this.form.nurseStationItemPrices.forEach(e => {
|
||||||
e.nurseStationItemId = this.form.nurseStationItem.id;
|
e.nurseStationItemId = this.form.nurseStationItem.id;
|
||||||
});
|
});
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
@ -464,17 +466,25 @@ export default {
|
|||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => { });
|
updatePicture(obj).then((res) => { });
|
||||||
}
|
}
|
||||||
|
// this.form.nurseStationItemPrices.price.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.price.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();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.form={}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user