派单 确认取消订单

This commit is contained in:
shidongli 2022-11-04 17:42:19 +08:00
parent be1c543797
commit 68b875dfb5
5 changed files with 173 additions and 107 deletions

View File

@ -21,34 +21,30 @@ export function deldetailed(appointmentOrderId) {
return request({ return request({
url: '/system/appointmentOrder/'+appointmentOrderId, url: '/system/appointmentOrder/'+appointmentOrderId,
method: 'post', method: 'post',
} )
}) }
}
// 派单 // 派单
export function getPerson(query) { export function getPerson(query) {
return request({ return request({
url: '/system/appointmentOrder/getPerson', url: '/system/appointmentOrder/getPerson',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 确认派单 // 确认派单
export function dispatchsubmit(data) { export function dispatchsubmit(params) {
return request({ return request({
url: '/system/appointmentOrder/dispatch', url: '/system/appointmentOrder/dispatch',
method: 'post', method: 'post',
data: data params
}) })
} }
// 认取消订单
export function confirmCancel(params) {
// 确认取消订单
export function confirmCancel(data) {
return request({ return request({
url: '/system/appointmentOrder/confirmCancel', url: '/system/appointmentOrder/confirmCancel',
method: 'post', method: 'post',
data: data params
}) })
} }

BIN
src/assets/images/main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,9 +1,21 @@
<template> <template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> <div
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> :class="classObj"
class="app-wrapper"
:style="{ '--current-color': theme }"
>
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" /> <sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container"> <div
<div :class="{'fixed-header':fixedHeader}"> :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<div :class="show ? 'bj' : ''">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar /> <navbar />
<tags-view v-if="needTagsView" /> <tags-view v-if="needTagsView" />
</div> </div>
@ -13,6 +25,7 @@
</right-panel> </right-panel>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -31,6 +44,11 @@ export default {
Settings, Settings,
Sidebar, Sidebar,
TagsView TagsView
},
data() {
return {
show: true,
};
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
computed: { computed: {
@ -53,8 +71,27 @@ export default {
variables() { variables() {
return variables; return variables;
} }
},
created() {
this.info();
},
watch: {
$route(to, from) {
if (to.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
}, },
methods: { methods: {
info() {
if (this.$route.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
handleClickOutside() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
} }
@ -63,10 +100,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss"; @import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss"; @import "~@/assets/styles/variables.scss";
.bj {
.app-wrapper { background-image: url("../assets/images/main.png");
-moz-background-size: 100% 100%;
background-size: 100% 100%;
}
.app-wrapper {
@include clearfix; @include clearfix;
position: relative; position: relative;
height: 100%; height: 100%;
@ -76,9 +117,9 @@ export default {
position: fixed; position: fixed;
top: 0; top: 0;
} }
} }
.drawer-bg { .drawer-bg {
background: #000; background: #000;
opacity: 0.3; opacity: 0.3;
width: 100%; width: 100%;
@ -86,26 +127,26 @@ export default {
height: 100%; height: 100%;
position: absolute; position: absolute;
z-index: 999; z-index: 999;
} }
.fixed-header { .fixed-header {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
z-index: 9; z-index: 9;
width: calc(100% - #{$base-sidebar-width}); width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s; transition: width 0.28s;
} }
.hideSidebar .fixed-header { .hideSidebar .fixed-header {
width: calc(100% - 54px); width: calc(100% - 54px);
} }
.sidebarHide .fixed-header { .sidebarHide .fixed-header {
width: 100%; width: 100%;
} }
.mobile .fixed-header { .mobile .fixed-header {
width: 100%; width: 100%;
} }
</style> </style>

View File

@ -86,7 +86,7 @@ export default {
width: 100%; width: 100%;
background-size: cover; background-size: cover;
// margin-top: 300px; // margin-top: 300px;
background-image: url("../assets/images/mian.png"); // background-image: url("../assets/images/mian.png");
// blockquote { // blockquote {
// padding: 10px 20px; // padding: 10px 20px;
// margin: 0 0 20px; // margin: 0 0 20px;

View File

@ -80,7 +80,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-zoom-in"
@click="seeLook(scope.row)" @click="seeLook(scope.row)"
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>查看</el-button >查看</el-button
@ -88,7 +88,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-s-promotion"
@click="dispatch(scope.row)" @click="dispatch(scope.row)"
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>派单</el-button >派单</el-button
@ -96,7 +96,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-error"
@click="cencel(scope.row.appointmentOrderId)" @click="cencel(scope.row.appointmentOrderId)"
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>取消预约</el-button >取消预约</el-button
@ -258,7 +258,7 @@
width="500px" width="500px"
height="100px" height="100px"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="护理员姓名" prop="nursePersonName"> <el-form-item label="护理员姓名" prop="nursePersonName">
<el-button <el-button
type="" type=""
@ -306,27 +306,27 @@
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
:model="querynursePerson" :model="querynursePersonname"
:rules="rules" :rules="rules"
label-width="80px" label-width="80px"
:inline="true" :inline="true"
> >
<el-form-item label="姓名" prop="nursePersonName" label-width="120"> <el-form-item label="姓名" prop="nursePersonName" label-width="120">
<el-input <el-input
v-model="querynursePerson.nursePersonName" v-model="querynursePersonname.nursePersonName"
placeholder="请输入姓名" placeholder="请输入姓名"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="phone" label-width="120"> <!-- <el-form-item label="手机号" prop="phone" label-width="120">
<el-input <el-input
v-model="querynursePerson.phone" v-model="querynursePersonname.phone"
placeholder="请输入手机号" placeholder="请输入手机号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -335,7 +335,7 @@
@click="handleQuery2" @click="handleQuery2"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
@ -346,7 +346,7 @@
<el-button <el-button
type="primary" type="primary"
style="width: 15px; height: 15px; overflow: hidden" style="width: 15px; height: 15px; overflow: hidden"
v-if="nursePersonid == scope.row.id" v-if="nursePersonid == scope.row.nurseStationPersonId"
circle circle
@click="nursePersonclick(scope.row)" @click="nursePersonclick(scope.row)"
></el-button> ></el-button>
@ -367,7 +367,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="nursePersonName" property="nursePersonName"
label="员姓名" label="护理站人员姓名"
width="150" width="150"
align="center" align="center"
> >
@ -397,13 +397,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination <pagination
v-show="total2 > 0" v-show="total2 > 0"
:total="total2" :total="total2"
:page.sync="querynursePerson.pageNum" :page.sync="querynursePersonname.pageNum"
:limit.sync="querynursePerson.pageSize" :limit.sync="querynursePersonname.pageSize"
@pagination="handleQuery2" @pagination="handleQuery2"
/> --> />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -463,10 +463,12 @@ export default {
dispatchlist: [], dispatchlist: [],
nurseName: "请选择护理员", nurseName: "请选择护理员",
nursePersonid: "", nursePersonid: "",
querynursecencel:{ // querynursecencel:{
// appointmentOrderId:"",
// },
appointmentOrderId:"", appointmentOrderId:"",
}, nurseStationPersonId :"",
// total2: 0, total2: 0,
// //
title: "", title: "",
// //
@ -481,17 +483,24 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
querynursePerson: { // querynursePerson: {
nursePersonName: null, // nursePersonName: null,
phone: null, // phone: null,
pageNum: 1, // pageNum: 1,
pageSize: 10, // pageSize: 10,
}, // },
querynursePersonname: { querynursePersonname: {
detailsId: "", orderNo:"",
nursePersonName: null, nursePersonName:null,
nursePersonType: null, nursePersonType: null,
departmentName: null, departmentName: null,
pageNum: 1,
pageSize: 10,
// detailsId: "",
// nursePersonName: null,
}, },
@ -523,7 +532,7 @@ export default {
}, },
// //
seeLook(row) { seeLook(row) {
this.innerVisible = true; this.innerVisible4 = true;
const id = row.orderNo; const id = row.orderNo;
// console.log(row); // console.log(row);
Detailed(id).then((res) => { Detailed(id).then((res) => {
@ -546,43 +555,52 @@ export default {
// //
dispatch(row) { dispatch(row) {
console.log(row) console.log(row)
this.querynursePersonname.detailsId = row.detailsId this.querynursePersonname.orderNo = row.orderNo
console.log(this.querynursePersonname.detailsId); console.log(this.querynursePersonname.orderNo);
// console.log(row) // console.log(row)
this.nurseName = "请选择护理员"; this.nurseName = "请选择护理员";
this.innerdispatch = true; this.innerdispatch = true;
this.nursePersonid =""
}, },
// //
clicknursePersonName() { clicknursePersonName() {
// console.log(this.dispatchlist); // console.log(this.dispatchlist);
getPerson(this.querynursePersonname).then((res) => { getPerson(this.querynursePersonname).then((res) => {
this.dispatchlist = res.rows; this.dispatchlist = res.rows;
// this.total2 = res.total; this.total2 = res.total;
console.log(this.dispatchlist); console.log(this.dispatchlist);
this.nursePersonNameinfo = true; this.nursePersonNameinfo = true;
}); });
}, },
// //
submitForm() { submitForm() {
console.log(this.dispatchlist) // console.log(this.querynursePersonname)
var obj = {} // var obj = {}
obj.id = this.nursePersonid // obj.nurseStationPersonId = nurseStationPersonId
obj.nurseStationPersonId = this.querynursePersonname.detailsId // obj.orderNo = this.querynursePersonname.orderNo
dispatchsubmit(obj).then((res) => { let params={
nurseStationPersonId:this.nursePersonid,
orderNo:this.querynursePersonname.orderNo
}
dispatchsubmit(params).then((res) => {
if(res.code == 200){
this.$modal.msgSuccess("派单成功");
}
this.nurseName = "请选择护理员"; this.nurseName = "请选择护理员";
this.innerdispatch = false; this.innerdispatch = false;
// this.nursePersonid =""
}) })
}, },
// //
nursePersonclick(row) { nursePersonclick(row) {
this.nursePersonid = row.id this.nursePersonid = row.nurseStationPersonId
this.nurseName = row.nursePersonName this.nurseName = row.nursePersonName
this.nursePersonNameinfo = false; this.nursePersonNameinfo = false;
console.log(row) console.log(row)
}, },
//
// cencel(appointmentOrderId) { // cencel(appointmentOrderId) {
// confirmCancel(appointmentOrderId).then((res) => { // confirmCancel(appointmentOrderId).then((res) => {
// // this.nurseName=""; // // this.nurseName="";
@ -591,11 +609,14 @@ export default {
// }) // })
// console.log(appointmentOrderId) // console.log(appointmentOrderId)
// }, // },
// console.log(row.appointmentOrderId)
cencel(row) { // this.appointmentOrderId = row.appointmentOrderId
console.log('row :>> ', this.querynursecencel.appointmentOrderId); // console.log('row :>> ', this.querynursecencel.appointmentOrderId);
this.querynursecencel.appointmentOrderId = row.appointmentOrderId
// obj.appointmentOrderId=row.appointmentOrderId // obj.appointmentOrderId=row.appointmentOrderId
//
cencel(appointmentOrderId) {
this.$confirm( this.$confirm(
'是否确认取消订单', '是否确认取消订单',
"提示", "提示",
@ -606,12 +627,16 @@ export default {
} }
) )
.then(() => { .then(() => {
console.log(appointmentOrderId)
confirmCancel(this.querynursecencel).then((res) => { let params={
appointmentOrderId:appointmentOrderId
}
confirmCancel(params).then((res) => {
this.$message.success("取消成功"); this.$message.success("取消成功");
this.getList(); // this.getList();
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList); // console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
}); });
}) })
.catch(() => { }); .catch(() => { });
}, },
@ -645,16 +670,20 @@ export default {
this.getList(); this.getList();
}, },
handleQuery2() { handleQuery2() {
getPerson(this.querynursePerson).then((res) => { getPerson(this.querynursePersonname).then((res) => {
this.dispatchlist = res.data; this.dispatchlist = res.rows;
console.log(this.dispatchlist); console.log(this.querynursePersonname);
this.innerdispatch = true; // this.innerdispatch = true;
}); });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
},
resetQuery2() {
this.resetForm("queryForm");
this.handleQuery2();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {