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