派单 确认取消订单

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({
url: '/system/appointmentOrder/'+appointmentOrderId,
method: 'post',
})
}
} )
}
// 派单
export function getPerson(query) {
return request({
url: '/system/appointmentOrder/getPerson',
method: 'get',
params: query
})
}
// 确认派单
export function dispatchsubmit(data) {
export function dispatchsubmit(params) {
return request({
url: '/system/appointmentOrder/dispatch',
method: 'post',
data: data
params
})
}
// 确认取消订单
export function confirmCancel(data) {
// 认取消订单
export function confirmCancel(params) {
return request({
url: '/system/appointmentOrder/confirmCancel',
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>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<div
: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" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<div :class="show ? 'bj' : ''">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
@ -12,6 +24,7 @@
<settings />
</right-panel>
</div>
</div>
</div>
</template>
@ -31,6 +44,11 @@ export default {
Settings,
Sidebar,
TagsView
},
data() {
return {
show: true,
};
},
mixins: [ResizeMixin],
computed: {
@ -53,8 +71,27 @@ export default {
variables() {
return variables;
}
},
created() {
this.info();
},
watch: {
$route(to, from) {
if (to.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
},
methods: {
info() {
if (this.$route.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
@ -63,49 +100,53 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.bj {
background-image: url("../assets/images/main.png");
-moz-background-size: 100% 100%;
background-size: 100% 100%;
}
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
&.mobile.openSidebar {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.sidebarHide .fixed-header {
width: 100%;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
.mobile .fixed-header {
width: 100%;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.sidebarHide .fixed-header {
width: 100%;
}
.mobile .fixed-header {
width: 100%;
}
</style>

View File

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

View File

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