护理机构分类+护理项目预约人数上限校验
This commit is contained in:
parent
a20380de04
commit
6fcfa80e05
@ -36,7 +36,14 @@ export function updateStation(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构分类信息列表
|
||||
export function listStationClassify(query) {
|
||||
return request({
|
||||
url: '/system/stationClassify/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除护理站信息
|
||||
export function delStation(id) {
|
||||
return request({
|
||||
|
||||
@ -268,6 +268,7 @@
|
||||
<el-form-item label="护理机构分类" required>
|
||||
<template>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
@ -279,10 +280,11 @@
|
||||
color: #c0c4cc;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-if="form.classifyNameList == '请选择护理站所属机构分类'"
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
v-if="form.classifyName == '请选择护理站所属机构分类'"
|
||||
>{{ form.classifyName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
@ -294,7 +296,7 @@
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-else
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>{{ form.classifyName }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-form-item>
|
||||
@ -469,7 +471,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理分类 -->
|
||||
<!-- <el-dialog
|
||||
<el-dialog
|
||||
title="选择护理机构分类"
|
||||
:visible.sync="Classifyshow"
|
||||
width="1100px"
|
||||
@ -517,7 +519,7 @@
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choiceclassify(scope.row)"
|
||||
v-if="form.nurseStationItem.nurseClassifyId == scope.row.id"
|
||||
v-if="form.nurseStationClassifyIds.find((e) => e == scope.row.id)"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
@ -549,7 +551,20 @@
|
||||
:limit.sync="classifyquery.pageSize"
|
||||
@pagination="classifylistInfo"
|
||||
/>
|
||||
</el-dialog> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="cancelClassifyshow"
|
||||
style="
|
||||
margin-top: 30px;
|
||||
margin-left: 85%;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
"
|
||||
>选择完成</el-button
|
||||
>
|
||||
</el-dialog>
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
|
||||
@ -2,6 +2,7 @@ import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
listStationClassify,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
@ -77,20 +78,21 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total2: 0,
|
||||
classifytotal: 0,
|
||||
//所属标签
|
||||
looknurseStationLabel: [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
}, ],
|
||||
},],
|
||||
// 护理站信息表格数据
|
||||
stationList: [{
|
||||
sysAreaVOList: [{
|
||||
provinceName: null,
|
||||
cityName: null,
|
||||
streetName: null,
|
||||
}, ],
|
||||
}, ],
|
||||
},],
|
||||
},],
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
@ -103,12 +105,22 @@ export default {
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
nurseStationClassifyIds: [],
|
||||
},
|
||||
idd: 1,
|
||||
provincelist: [],
|
||||
arealist: [],
|
||||
citylist: [],
|
||||
streetlist: [],
|
||||
classifylist: [],
|
||||
|
||||
classifyquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
},
|
||||
resid: null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
@ -129,13 +141,13 @@ export default {
|
||||
validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
}, ],
|
||||
},],
|
||||
|
||||
dutyPhone: [{
|
||||
validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
}, ],
|
||||
},],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
longitude: [
|
||||
@ -159,6 +171,7 @@ export default {
|
||||
created() {
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.classifylistInfo();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
@ -179,7 +192,7 @@ export default {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
}, ];
|
||||
},];
|
||||
} else {
|
||||
this.looknurseStationLabel.splice(index, 1);
|
||||
}
|
||||
@ -241,6 +254,7 @@ export default {
|
||||
getList() {
|
||||
this.info();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -251,10 +265,10 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.stationPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
updatePicture(this.imgsurl).then((res) => { });
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
@ -290,11 +304,53 @@ export default {
|
||||
afternoonOpenEndTime: null, //下午结束
|
||||
morningOpenEndTime: null, //上午结束
|
||||
morningOpenStartTime: null, //上午开始
|
||||
nurseStationClassifyIds: null,
|
||||
classifyNameList: '请选择护理站所属机构分类',
|
||||
nurseStationClassifyIds: [],
|
||||
classifyName: '请选择护理站所属机构分类',
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//护理机构分类
|
||||
clickinnerVisible() {
|
||||
this.classifylistInfo();
|
||||
this.Classifyshow = true;
|
||||
},
|
||||
|
||||
classifylistcancel() {
|
||||
this.classifyquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
};
|
||||
this.classifylistInfo();
|
||||
},
|
||||
choiceclassify(e) {
|
||||
if (this.form.classifyName == '请选择护理站所属机构分类') {
|
||||
this.form.classifyName = e.classifyName;
|
||||
} else {
|
||||
this.form.classifyName = this.form.classifyName + e.classifyName;
|
||||
}
|
||||
if ( this.form.nurseStationClassifyIds.find(el => el == e.id)) {
|
||||
this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id)
|
||||
}
|
||||
else {
|
||||
this.form.nurseStationClassifyIds.push(e.id);
|
||||
}
|
||||
console.log(this.form.nurseStationClassifyIds)
|
||||
},
|
||||
/** 查询护理机构分类信息列表 */
|
||||
classifylistInfo() {
|
||||
// this.loading = true;
|
||||
listStationClassify(this.classifyquery).then((response) => {
|
||||
this.classifylist = response.rows;
|
||||
this.classifytotal = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
cancelClassifyshow() {
|
||||
this.Classifyshow = false;
|
||||
// this。
|
||||
},
|
||||
//护理站列表
|
||||
info() {
|
||||
this.loading = true
|
||||
@ -347,7 +403,7 @@ export default {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
}, ];
|
||||
},];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -356,7 +412,15 @@ export default {
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id).then((response) => {
|
||||
|
||||
if (response.data.nurseClassifyInfoList) {
|
||||
response.data.nurseStationClassifyIds=[]
|
||||
response.data.nurseClassifyInfoList.forEach(e => {
|
||||
response.data.nurseStationClassifyIds.push(e.id)
|
||||
})
|
||||
}
|
||||
this.form = response.data;
|
||||
this.form.classifyName=response.data.classifyNameList;
|
||||
this.form.streetCode = this.form.streetName;
|
||||
this.imgone = this.form.stationIntroducePcitureUrl;
|
||||
this.imgtwo = this.form.stationPictureUrl;
|
||||
@ -368,6 +432,10 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
// this.form.nurseStationClassifyIds.forEach((e) => {
|
||||
// e.classifyNameList = e.id;
|
||||
// });
|
||||
this.form.classifyNameList=this.form.classifyName
|
||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
|
||||
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
||||
@ -393,7 +461,7 @@ export default {
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -418,7 +486,7 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站信息?")
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delStation(ids);
|
||||
})
|
||||
.then(() => {
|
||||
@ -426,19 +494,19 @@ export default {
|
||||
obj.pictureUrlList.push(row.stationIntroducePcitureUrl);
|
||||
obj.pictureUrlList.push(row.stationPictureUrl);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export", {
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
@ -78,7 +78,7 @@ export default {
|
||||
value: 'TWO_HOUR',
|
||||
label: '两小时'
|
||||
}
|
||||
|
||||
|
||||
],
|
||||
value:"",
|
||||
optionlist: [{
|
||||
@ -88,8 +88,8 @@ export default {
|
||||
value: 'ONE_DAY',
|
||||
label: '一小时'
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
value1:"",
|
||||
//权限查询
|
||||
@ -134,7 +134,7 @@ export default {
|
||||
nurseClassifyId: '',
|
||||
appointmentLimitCount:"",
|
||||
appointmentTimeInterval:"",
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
idd: 1,
|
||||
@ -157,11 +157,11 @@ export default {
|
||||
trigger: "blur",
|
||||
message: "请选择项目头像",
|
||||
}, ],
|
||||
"nurseStationItem.appointmentLimitCount": [{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入预约人数上限",
|
||||
}, ],
|
||||
// "nurseStationItem.appointmentLimitCount": [{
|
||||
// required: true,
|
||||
// trigger: "blur",
|
||||
// message: "请输入预约人数上限",
|
||||
// }, ],
|
||||
"nurseStationItem.appointmentTimeInterval": [{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
@ -204,8 +204,8 @@ export default {
|
||||
},
|
||||
//选中
|
||||
choiceclassify(e) {
|
||||
this.form.nurseStationItem.nurseClassifyId = e.id
|
||||
this.form.nurseStationItem.classifyName = e.classifyName
|
||||
this.form.nurseStationItem.nurseClassifyId = e.id;
|
||||
this.form.nurseStationItem.classifyName = e.classifyName;
|
||||
this.Classifyshow = false
|
||||
},
|
||||
//重置
|
||||
@ -504,6 +504,7 @@ export default {
|
||||
this.StationConsumablequeryParams.nurseStationId = null;
|
||||
const id = row.id || this.ids;
|
||||
getNurseItem(id).then((response) => {
|
||||
this.form = response.data;
|
||||
if (response.data.nurseStationItemConsumables) {
|
||||
response.data.nurseStationItemConsumables.forEach(e => {
|
||||
e.id = e.nurseStationConsumableId
|
||||
@ -511,7 +512,7 @@ export default {
|
||||
} else {
|
||||
response.data.nurseStationItemConsumables = []
|
||||
}
|
||||
this.form = response.data;
|
||||
|
||||
this.StationConsumablequeryParams.nurseStationId =
|
||||
response.data.nurseStationItem.nurseStationId;
|
||||
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
||||
@ -568,7 +569,7 @@ export default {
|
||||
this.form.nurseStationItemPrices.forEach(e => {
|
||||
e.price = Number(e.price)
|
||||
})
|
||||
|
||||
|
||||
updateNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -578,7 +579,7 @@ export default {
|
||||
this.form.nurseStationItemPrices.forEach(e => {
|
||||
e.price = Number(e.price)
|
||||
})
|
||||
|
||||
|
||||
addNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$forceUpdate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user