价格 修改
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
|
||||||
|
|||||||
@ -96,53 +96,53 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
message: "请选择所属护理站",
|
message: "请选择所属护理站",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
consumableDetail: [{
|
consumableDetail: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包名称",
|
message: "请输入耗材包名称",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
consumableUnit: [{
|
consumableUnit: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包单位",
|
message: "请输入耗材包单位",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
consumablePrice: [{
|
consumablePrice: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包价格",
|
message: "请输入耗材包价格",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
sort: [{
|
sort: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入排序",
|
message: "请输入排序",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
nurseStationConsumables: {
|
nurseStationConsumables: {
|
||||||
consumableDetail: [{
|
consumableDetail: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包名称",
|
message: "请输入耗材包名称",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
nurseStationId: [{
|
nurseStationId: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择所属护理站",
|
message: "请选择所属护理站",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
consumableUnit: [{
|
consumableUnit: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包单位",
|
message: "请输入耗材包单位",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
consumablePrice: [{
|
consumablePrice: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入耗材包价格",
|
message: "请输入耗材包价格",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
sort: [{
|
sort: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入排序",
|
message: "请输入排序",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
}, ],
|
},],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
homenumber: null,
|
homenumber: null,
|
||||||
@ -280,7 +280,7 @@ export default {
|
|||||||
consumablePrice: "",
|
consumablePrice: "",
|
||||||
consumableDetail: null,
|
consumableDetail: null,
|
||||||
nurseStationName: "请选择所属护理站",
|
nurseStationName: "请选择所属护理站",
|
||||||
}, ],
|
},],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -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 = "请选择所属护理站";
|
||||||
@ -377,14 +396,14 @@ export default {
|
|||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除?")
|
.confirm("是否确认删除?")
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delStationConsumable(ids);
|
return delStationConsumable(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -118,7 +118,7 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请选择项目头像",
|
message: "请选择项目头像",
|
||||||
}, ],
|
},],
|
||||||
nurseStationId: [
|
nurseStationId: [
|
||||||
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
||||||
],
|
],
|
||||||
@ -290,7 +290,7 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -355,7 +355,7 @@ export default {
|
|||||||
price: null,
|
price: null,
|
||||||
description: null,
|
description: null,
|
||||||
ids: this.ids,
|
ids: this.ids,
|
||||||
}, ],
|
},],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -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: [] };
|
||||||
@ -462,19 +464,27 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.imgone);
|
obj.pictureUrlList.push(this.imgone);
|
||||||
}
|
}
|
||||||
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={}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -486,16 +496,16 @@ export default {
|
|||||||
var that = this;
|
var that = this;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除此护理站护理项目?")
|
.confirm("是否确认删除此护理站护理项目?")
|
||||||
.then(function() {
|
.then(function () {
|
||||||
delNurseItem(ids).then(res => {
|
delNurseItem(ids).then(res => {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => { });
|
||||||
that.getList();
|
that.getList();
|
||||||
that.$modal.msgSuccess("删除成功");
|
that.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user