| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894 | 
							- <!doctype html>
 
- <html lang="en">
 
- <head>
 
- 	<meta charset="UTF-8">
 
- 	<meta name="viewport"
 
- 		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
 
- 	<meta http-equiv="X-UA-Compatible" content="ie=edge">
 
- 	<link rel="Shortcut Icon" href="/public/images/logo.png" type="image/x-icon" />
 
- 	<title>国天云医院后勤保障服务支持系统</title>
 
- 	<script src="/public/js/jquery-1.11.3.min.js"></script>
 
- 	<script src="/public/layer/layer.js"></script>
 
- 	<link rel="stylesheet" href="/public/elementui/index.min.css" integrity="sha512-UaTBkNLFJFC1jgQBIvKrIbM64pw5QfcjH3tGQcBaPhHh69rqyc2R6UIoV16lVo53PKHIQfdPXs8lBtG7xMsctQ==" crossorigin="anonymous" />
 
- 	<script src="/public/elementui/vue.min.js"></script>
 
- 	<script src="/public/elementui/index.min.js" integrity="sha512-KhiFHhXUBBvO9P5Io/ITsjbu069pjGudMqhpgv57pWDJ3UG51y/YDd4VtGlt/GXhwf36dHgGsTp0Alu48bvk9g==" crossorigin="anonymous"></script>
 
- 	<style>
 
- 		html,body{
 
- 			padding: 0;
 
- 			margin: 0;
 
- 			background-color: #CCCCCC;
 
- 		}
 
- 		.pull-right{
 
- 			float: right !important;
 
- 		}
 
- 		#vueapp{
 
- 			width: 80%;
 
- 			margin: 0 auto;
 
- 			background-color: #ffffff;
 
- 		}
 
- 		.main{
 
- 			padding: 15px;
 
- 		}
 
- 		.add-btns{
 
- 			padding: 10px 0;
 
- 		}
 
- 		.page{
 
- 			text-align: center;
 
- 			padding: 20px 0;
 
- 		}
 
- 		td{
 
- 			padding: 5px;
 
- 		}
 
- 	</style>
 
- </head>
 
- <body>
 
- <div id="vueapp">
 
- 	<el-menu
 
- 		class="el-menu-demo"
 
- 		mode="horizontal"
 
- 	>
 
- 		<el-menu-item index="1"><?=$this->session->userinfo['orgName']?></el-menu-item>
 
- 		<el-submenu index="2"  class="pull-right">
 
- 			<template slot="title">欢迎,<?=$this->session->userinfo['realName']?></template>
 
- 			<el-menu-item index="2-1" @click="handleLogin">退出</el-menu-item>
 
- 		</el-submenu>
 
- 	</el-menu>
 
- 	<el-card class="box-card">
 
- 		<div slot="header" class="clearfix">
 
- 			<el-row>
 
- 				<el-col :span="4">
 
- 					<el-button size="small" @click="addOrder">
 
- 						创建{{btnTitle}}订单
 
- 					</el-button>
 
- 				</el-col>
 
- 				<el-col :span="20" style="text-align: right;">
 
- 				</el-col>
 
- 			</el-row>
 
- 		</div>
 
- 		<el-tabs v-model="activeName" @tab-click="handleClick">
 
- 			<el-tab-pane v-for="(item,index) in menus" :label="item.title" :name="item.id"></el-tab-pane>
 
- <!--			<el-tab-pane label="报修订单" name="first"></el-tab-pane>-->
 
- <!--			<el-tab-pane label="保洁订单" name="second"></el-tab-pane>-->
 
- <!--			<el-tab-pane label="运送订单" name="third"></el-tab-pane>-->
 
- <!--			<el-tab-pane label="隐患预警订单" name="fourth"></el-tab-pane>-->
 
- 		</el-tabs>
 
- 		<el-table
 
- 			v-loading="loading"
 
- 			:data="tableData"
 
- 			style="width: 100%"
 
- 		>
 
- 			<el-table-column prop="orderId" label="编号"></el-table-column>
 
- 			<el-table-column prop="workTypeMode" label="订单类型">
 
- 				<template slot-scope="scope">
 
- 					<span v-if="scope.row.workTypeMode == 1">报修</span>
 
- 					<span v-if="scope.row.workTypeMode == 2">保洁</span>
 
- 					<span v-if="scope.row.workTypeMode == 3">运送</span>
 
- 					<span v-if="scope.row.workTypeMode == 4">隐患预警</span>
 
- 				</template>
 
- 			</el-table-column>
 
- 			<el-table-column prop="createTime" label="申请时间"></el-table-column>
 
- 			<el-table-column prop="content" label="内容"></el-table-column>
 
- 			<el-table-column prop="outContent" label="状态"></el-table-column>
 
- 			<el-table-column label="操作">
 
- 				<template slot-scope="scope">
 
- 					<el-link :underline="false" type="success" @click="handleInfo(scope.row.orderId)">
 
- 						详情
 
- 					</el-link>
 
- 					 
 
- 					<el-link v-if="scope.row.currOrderMode == 1" :underline="false" type="danger" @click="cancelClick(scope.row.orderId)">
 
- 						取消
 
- 					</el-link>
 
- 				</template>
 
- 			</el-table-column>
 
- 		</el-table>
 
- 		<div class="page">
 
- 			<el-pagination
 
- 				class="page-position"
 
- 				background
 
- 				layout="prev, pager, next, sizes, total, jumper"
 
- 				:current-page="page"
 
- 				:page-sizes="[10,15,25,50,100]"
 
- 				:page-size="size"
 
- 				:total="total"
 
- 				@size-change="handleSizeChange"
 
- 				@current-change="handleCurrentChange"
 
- 			>
 
- 			</el-pagination>
 
- 		</div>
 
- 	</el-card>
 
- 	<el-dialog
 
- 		:title="title"
 
- 		:visible.sync="dialogVisible"
 
- 		center
 
- 		width="800px"
 
- 		@close="handleCancelModal"
 
- 	>
 
- 		<el-form v-if="dialogVisible" ref="myForm" :model="form" :rules="rules" label-width="100px">
 
- 			<el-form-item v-if="activeName != 'third'" label="任务内容" prop="content">
 
- 				<el-input v-model="form.content" type="textarea" row="4" maxlength="200" show-word-limit placeholder="请输入" />
 
- 			</el-form-item>
 
- 			<div v-if="activeName == 'third'">
 
- 				<el-row>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="始发空间" prop="start">
 
- 							<el-select v-if="addrLoading" v-model="form.start" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option
 
- 									v-for="item in addrs"
 
- 									:key="item.conveyAddrId"
 
- 									:label="item.title"
 
- 									:value="item.conveyAddrId">
 
- 								</el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="运送类型" prop="cate">
 
- 							<el-select v-if="cateLoading" v-model="form.cate" filterable clearable placeholder="请选择" style="width:100%;" @change="changeCate">
 
- 								<el-option
 
- 									v-for="item in cates"
 
- 									:key="item.id"
 
- 									:label="item.name"
 
- 									:value="item.id">
 
- 								</el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="目的空间" prop="end">
 
- 							<el-select v-if="addrLoading" v-model="form.end" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option
 
- 									v-for="item in addrs"
 
- 									:key="item.conveyAddrId"
 
- 									:label="item.title"
 
- 									:value="item.conveyAddrId">
 
- 								</el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="优先级" prop="priority">
 
- 							<el-select v-model="form.priority" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option
 
- 									v-for="item in prioritys"
 
- 									:key="item.id"
 
- 									:label="item.name"
 
- 									:value="item.id">
 
- 								</el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="24">
 
- 						<el-form-item label="运送设备" prop="device">
 
- 							<el-select v-model="form.device" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option
 
- 									v-for="item in devices"
 
- 									:key="item.id"
 
- 									:label="item.name"
 
- 									:value="item.id">
 
- 								</el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="需求时间" prop="xqTime">
 
- 							<el-date-picker
 
- 								style="width: 100%"
 
- 								v-model="form.xqTime"
 
- 								type="datetime"
 
- 								:editable="false"
 
- 								value-format="yyyy-MM-dd HH:mm"
 
- 								:clearable="true"
 
- 								placeholder="选择日期时间">
 
- 							</el-date-picker>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="应完成时间" prop="ywcTime">
 
- 							<el-date-picker
 
- 								style="width: 100%"
 
- 								v-model="form.ywcTime"
 
- 								type="datetime"
 
- 								:editable="false"
 
- 								value-format="yyyy-MM-dd HH:mm"
 
- 								:clearable="true"
 
- 								placeholder="选择日期时间">
 
- 							</el-date-picker>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="联系人" prop="name">
 
- 							<el-input v-model="form.name" maxlength="50" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="12">
 
- 						<el-form-item label="联系电话" prop="phone">
 
- 							<el-input v-model="form.phone" maxlength="50" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col :span="24">
 
- 						<el-form-item label="任务内容" prop="content">
 
- 							<el-input v-model="form.content" type="textarea" row="4" maxlength="200" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col v-if="brShow" :span="8">
 
- 						<el-form-item label="床号" prop="bedNumber">
 
- 							<el-input v-model="form.bedNumber" maxlength="100" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col v-if="brShow" :span="8">
 
- 						<el-form-item label="姓名" prop="pName">
 
- 							<el-input v-model="form.pName" maxlength="100" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col v-if="brShow"  :span="8">
 
- 						<el-form-item label="病案号" prop="baNumber">
 
- 							<el-input v-model="form.baNumber" maxlength="100" show-word-limit placeholder="请输入" />
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col v-if="brShow"  :span="8">
 
- 						<el-form-item label="性别" prop="gender">
 
- 							<el-select v-model="form.gender" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option value="0" label="未知"></el-option>
 
- 								<el-option value="1" label="男"></el-option>
 
- 								<el-option value="2" label="女"></el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 					<el-col v-if="brShow"  :span="8">
 
- 						<el-form-item label="是否往返" prop="back">
 
- 							<el-select v-model="form.back" filterable clearable placeholder="请选择" style="width:100%;">
 
- 								<el-option value="0" label="否"></el-option>
 
- 								<el-option value="1" label="是"></el-option>
 
- 							</el-select>
 
- 						</el-form-item>
 
- 					</el-col>
 
- 				</el-row>
 
- 			</div>
 
- 		</el-form>
 
- 		<span slot="footer" class="dialog-footer">
 
- 			<el-button type="primary" :loading="flag" @click="submitbtn">确 定</el-button>
 
- 			<el-button @click="handleCancelModal">取 消</el-button>
 
- 		</span>
 
- 	</el-dialog>
 
- 	<el-dialog
 
- 		title="订单详情"
 
- 		:visible.sync="dialogVisible2"
 
- 		center
 
- 		width="800px"
 
- 		@close="handleCancelModal2"
 
- 	>
 
- 		<table v-if="info">
 
- 			<tr>
 
- 				<td style="width: 120px">订单类型</td>
 
- 				<td>{{info.workTypeModeName}}</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>申请人</td>
 
- 				<td>{{info.realName}}</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>申请科室</td>
 
- 				<td>{{info.depName}}</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>申请时间</td>
 
- 				<td>{{info.creatteTime}}</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>状态</td>
 
- 				<td>
 
- 					<span v-if="info.currOrderMode == 1">待处理</span>
 
- 					<span v-if="info.currOrderMode == 2||info.currOrderMode == 3">已取消</span>
 
- 					<span v-if="info.currOrderMode == 5">已派发</span>
 
- 					<span v-if="info.currOrderMode == 9">已完成</span>
 
- 					<span v-if="info.currOrderMode == 11">已评价</span>
 
- 					<span v-if="info.currOrderMode == 12">已作废</span>
 
- 				</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>联系电话</td>
 
- 				<td>{{info.mobile}}</td>
 
- 			</tr>
 
- 			<tr>
 
- 				<td>任务内容</td>
 
- 				<td>{{info.content}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>始发空间</td><td>{{info.startConveyAddrTitle}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>运送类型</td>
 
- 				<td>
 
- 					{{info.conveyTypeName}}
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>目的空间</td><td>{{info.endConveyAddrTitle}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>优先级</td>
 
- 				<td>
 
- 					{{info.priority}}
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>运送设备</td><td>{{info.device}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>需求时间</td><td>{{info.xqTime}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>应完成时间</td><td>{{info.ywcTime}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>联系人</td><td>{{info.pName}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>联系电话</td><td>{{info.phone}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>床号</td><td>{{info.bedNumber}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>姓名</td><td>{{info.pName}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>病案号</td><td>{{info.baNumber}}</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>性别</td>
 
- 				<td>
 
- 					<span v-if="info.gender == 0">未知</span>
 
- 					<span v-if="info.gender == 1">男</span>
 
- 					<span v-if="info.gender == 2">女</span>
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.workTypeMode == 3">
 
- 				<td>往返</td>
 
- 				<td>
 
- 					<span v-if="info.back == 0">否</span>
 
- 					<span v-if="info.back == 1">是</span>
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.currOrderMode == 11">
 
- 				<td>评论</td>
 
- 				<td>
 
- 					<el-rate v-model="info.score" disabled></el-rate>
 
- 					<div>
 
- 						{{info.commentContent}}
 
- 					</div>
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.currOrderMode == 9">
 
- 				<td>评论</td>
 
- 				<td>
 
- 					<el-rate v-model="commentform.score"></el-rate>
 
- 					<div style="padding: 5px 0">
 
- 						<el-input v-model="commentform.content" placeholder="请输入内容"></el-input>
 
- 					</div>
 
- 					<el-button @click="comment">评价</el-button>
 
- 				</td>
 
- 			</tr>
 
- 			<tr v-if="info.sample">
 
- 				<td>已扫描标本</td>
 
- 				<td>
 
- 					{{info.sample}}
 
- 				</td>
 
- 			</tr>
 
- 		</table>
 
- 	</el-dialog>
 
- </div>
 
- <script>
 
- 	new Vue({
 
- 		el: '#vueapp',
 
- 		data: function() {
 
- 			return {
 
- 				page: 1,
 
- 				size: 10,
 
- 				total: 100,
 
- 				btnTitle: '报修',
 
- 				title: '',
 
- 				activeName: 'first',
 
- 				dialogVisible: false,
 
- 				flag: false,
 
- 				commonparam:{
 
- 					userId: <?=$this->session->userinfo['userId']?>,
 
- 					token: '<?=$this->session->userinfo['token']?>',
 
- 					orgId: <?=$this->session->userinfo['orgId']?>
 
- 				},
 
- 				initstart: <?=$this->session->userinfo['user']['addrId']?>,
 
- 				form : {
 
- 					content: '',
 
- 					start: '',
 
- 					end: '',
 
- 					cate: '',
 
- 					priority: '',
 
- 					device: '',
 
- 					name: '',
 
- 					phone: '',
 
- 					xqTime: '',
 
- 					ywcTime: '',
 
- 					bedNumber: '',
 
- 					pName: '',
 
- 					baNumber: '',
 
- 					gender: '',
 
- 					back: '',
 
- 				},
 
- 				commentform : {
 
- 					score: 0,
 
- 					content: ''
 
- 				},
 
- 				rules : {
 
- 					// name: [
 
- 					// 	{ required: true, message: '请输入名称', trigger: 'blur' },
 
- 					// ],
 
- 				},
 
- 				brShow: false, //是否显示病人信息
 
- 				tableData:[],
 
- 				addrs: [],
 
- 				addrLoading: false,
 
- 				cates: [],
 
- 				cateLoading: false,
 
- 				prioritys: [
 
- 					{id: 1,name: '可延缓的'},
 
- 					{id: 2,name: '常规'},
 
- 					{id: 3,name: '紧急'},
 
- 					{id: 4,name: '预约'}
 
- 				],
 
- 				devices: [],
 
- 				alldevices: [],
 
- 				deviceLoading: false,
 
- 				loading: false,
 
- 				dialogVisible2: false,
 
- 				info: null,
 
- 				infoLoading: false,
 
- 				commentform:{
 
- 					score: 5,
 
- 					content: ''
 
- 				},
 
- 				menus: [
 
- 					{id:'first',title:'报修订单',url:'/Order/addshow?mode=1'},
 
- 					{id:'second',title:'保洁订单',url:'/Order/addshow?mode=2'},
 
- 					{id:'third',title:'运送订单',url:'/Order/addshow?mode=3'},
 
- 					{id:'forth',title:'隐患预警订单',url:'/Order/addshow?mode=4'},
 
- 				],
 
- 				urules: <?=json_encode($this->session->userinfo['rules'])?>
 
- 			}
 
- 		},
 
- 		watch: {
 
- 		},
 
- 		created(){
 
- 			const newmenus = this.menus;
 
- 			this.menus = [];
 
- 			newmenus.forEach((item) => {
 
- 				let ff = false;
 
- 				this.urules.forEach((item2) => {
 
- 					if(item.url == item2.url){
 
- 						ff = true;
 
- 					}
 
- 				});
 
- 				if(ff){
 
- 					this.menus.push(item);
 
- 				}
 
- 			});
 
- 			this.activeName = '';
 
- 			if(this.menus.length > 0){
 
- 				this.activeName = this.menus[0].id;
 
- 			}
 
- 			if(this.activeName == 'first'){
 
- 				this.btnTitle = '报修';
 
- 			}else if(this.activeName == 'second'){
 
- 				this.btnTitle = '保洁';
 
- 			}else if(this.activeName == 'third'){
 
- 				this.btnTitle = '运送';
 
- 			}else{
 
- 				this.btnTitle = '隐患预警';
 
- 			}
 
- 			this.getAddrData();
 
- 			this.getCateData();
 
- 			this.getDeviceData(0);
 
- 			this.getListData();
 
- 		},
 
- 		methods: {
 
- 			handleClick(){
 
- 				if(this.activeName == 'first'){
 
- 					this.btnTitle = '报修';
 
- 				}else if(this.activeName == 'second'){
 
- 					this.btnTitle = '保洁';
 
- 				}else if(this.activeName == 'third'){
 
- 					this.btnTitle = '运送';
 
- 				}else{
 
- 					this.btnTitle = '隐患预警';
 
- 				}
 
- 				this.page = 1;
 
- 				this.getListData();
 
- 			},
 
- 			changeCate(){
 
- 				var that = this;
 
- 				this.cates.forEach((item) => {
 
- 					if(item.id.toString() == this.form.cate.toString()){
 
- 						this.form.end = item.ends.length == 1?item.ends[0].id:'';
 
- 						var pp = that.commonparam;
 
- 						pp.cateId=  item.id;
 
- 						$.ajax({
 
- 							url: '/home/conveyXqTime',
 
- 							type: 'POST',
 
- 							data: pp,
 
- 							success: function(res){
 
- 								if(res.code==0){
 
- 									that.form.xqTime = res.data.xqTime;
 
- 									that.form.ywcTime = res.data.wcTime;
 
- 								}else if(data.code == -100){
 
- 									that.checkLogin(res);
 
- 								}else {
 
- 									that.form.xqTime = '';
 
- 									that.form.ywcTime = '';
 
- 									layer.msg(data.message);
 
- 								}
 
- 							},
 
- 							error: function (){
 
- 							}
 
- 						});
 
- 						this.form.priority = item.priority > 0?item.priority:'';
 
- 						if(item.cate == 1){
 
- 							this.brShow = true;
 
- 						}else{
 
- 							this.brShow = false;
 
- 						}
 
- 						this.form.device = '';
 
- 						this.devices = [];
 
- 						this.getDeviceData(this.form.cate);
 
- 					}
 
- 				});
 
- 			},
 
- 			handleLogin(){
 
- 				window.location.href = '/Account/logout';
 
- 			},
 
- 			handleSizeChange(val) {
 
- 				this.size = val;
 
- 				this.getListData();
 
- 			},
 
- 			handleCurrentChange(val) {
 
- 				this.page = val;
 
- 				this.getListData();
 
- 			},
 
- 			addOrder(){
 
- 				if(this.activeName == 'first'){
 
- 					this.title = '创建报修订单';
 
- 				}else if(this.activeName == 'second'){
 
- 					this.title = '创建保洁订单';
 
- 				}else if(this.activeName == 'third'){
 
- 					this.title = '创建运送订单';
 
- 				}else{
 
- 					this.title = '创建隐患预警订单';
 
- 				}
 
- 				this.form = {
 
- 					content: '',
 
- 					start: this.initstart > 0?this.initstart:'',
 
- 					end: '',
 
- 					cate: '',
 
- 					priority: '',
 
- 					device: '',
 
- 					name: '',
 
- 					phone: '',
 
- 					xqTime: '',
 
- 					ywcTime: '',
 
- 					bedNumber: '',
 
- 					pName: '',
 
- 					baNumber: '',
 
- 					gender: '',
 
- 					back: '',
 
- 				};
 
- 				this.dialogVisible = true;
 
- 			},
 
- 			handleCancelModal(){
 
- 				this.dialogVisible = false;
 
- 			},
 
- 			handleInfo(id){
 
- 				console.log(id);
 
- 				this.getInfo(id);
 
- 				this.commentform = {
 
- 					score : 5,
 
- 					content : ''
 
- 				};
 
- 				this.dialogVisible2 = true;
 
- 			},
 
- 			handleCancelModal2(){
 
- 				this.dialogVisible2 = false;
 
- 			},
 
- 			getInfo(id){
 
- 				let that = this;
 
- 				that.infoLoading = true;
 
- 				const param = this.commonparam;
 
- 				param.orderId = id;
 
- 				$.ajax({
 
- 					url: '/home/orderQueryDetail',
 
- 					type: 'POST',
 
- 					data: param,
 
- 					success: function(data){
 
- 						console.log(data);
 
- 						if(data.code == 0){
 
- 							that.info = data.data;
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message)
 
- 						}
 
- 						that.infoLoading = false;
 
- 					},
 
- 					error: function (){
 
- 						that.infoLoading = false;
 
- 					}
 
- 				});
 
- 			},
 
- 			cancelClick(id) {
 
- 				let that = this;
 
- 				if (this.flag === false) {
 
- 					this.$confirm('确定要取消此订单吗?', '提示', {
 
- 						confirmButtonText: '确定',
 
- 						cancelButtonText: '取消',
 
- 						type: 'warning',
 
- 					}).then(() => {
 
- 						const param = this.commonparam;
 
- 						param.orderId = id;
 
- 						that.flag = true;
 
- 						$.ajax({
 
- 							url: '/home/updateOrderModeByUser',
 
- 							type: 'POST',
 
- 							data: param,
 
- 							success: function(data){
 
- 								console.log(data);
 
- 								if(data.code == 0){
 
- 									that.page = 1;
 
- 									that.getListData();
 
- 								}else if(data.code == -100){
 
- 									that.checkLogin(data);
 
- 								}else{
 
- 									layer.msg(data.message)
 
- 								}
 
- 								that.flag = false;
 
- 							},
 
- 							error: function (){
 
- 								that.flag = false;
 
- 							}
 
- 						});
 
- 					}).catch(() => {});
 
- 				}
 
- 			},
 
- 			getCateData(){
 
- 				let that = this;
 
- 				$.ajax({
 
- 					url: '/home/conveyCateLists',
 
- 					type: 'POST',
 
- 					data: this.commonparam,
 
- 					success: function(data){
 
- 						console.log(data);
 
- 						if(data.code == 0){
 
- 							that.cates = data.data;
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message)
 
- 						}
 
- 						that.cateLoading = true;
 
- 					},
 
- 					error: function (){
 
- 						that.cateLoading = true;
 
- 					}
 
- 				});
 
- 			},
 
- 			getAddrData(){
 
- 				let that = this;
 
- 				$.ajax({
 
- 					url: '/home/queryConveyAddrList',
 
- 					type: 'POST',
 
- 					data: this.commonparam,
 
- 					success: function(data){
 
- 						console.log(data);
 
- 						if(data.code == 0){
 
- 							that.addrs = data.data;
 
- 							console.log(that.addrs);
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message)
 
- 						}
 
- 						that.addrLoading = true;
 
- 					},
 
- 					error: function (){
 
- 						that.addrLoading = true;
 
- 					}
 
- 				});
 
- 			},
 
- 			getDeviceData(cateId){
 
- 				let that = this;
 
- 				const param = this.commonparam;
 
- 				param.cateId = cateId;
 
- 				$.ajax({
 
- 					url: '/home/ConveyDeviceLists',
 
- 					type: 'POST',
 
- 					data: param,
 
- 					success: function(data){
 
- 						console.log(data);
 
- 						if(data.code == 0){
 
- 							that.devices = data.data;
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message)
 
- 						}
 
- 						that.deviceLoading = true;
 
- 					},
 
- 					error: function (){
 
- 						that.deviceLoading = true;
 
- 					}
 
- 				});
 
- 			},
 
- 			getListData(){
 
- 				let that = this;
 
- 				const param = this.commonparam;
 
- 				param.page = this.page;
 
- 				param.size = this.size;
 
- 				if(this.activeName == 'first'){
 
- 					param.mode = 1;
 
- 				}else if(this.activeName == 'second'){
 
- 					param.mode = 2;
 
- 				}else if(this.activeName == 'third'){
 
- 					param.mode = 3;
 
- 				}else{
 
- 					param.mode = 4;
 
- 				}
 
- 				that.loading = true;
 
- 				$.ajax({
 
- 					url: '/home/queryUserOrdersByMode',
 
- 					type: 'POST',
 
- 					data: param,
 
- 					success: function(data){
 
- 						if(data.code == 0){
 
- 							that.tableData = data.data.lists;
 
- 							that.total = data.data.total;
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message)
 
- 						}
 
- 						that.loading = false;
 
- 					},
 
- 					error: function (){
 
- 						that.loading = false;
 
- 					}
 
- 				});
 
- 			},
 
- 			submitbtn(){
 
- 				let that = this;
 
- 				const param = this.commonparam;
 
- 				param.content = this.form.content;
 
- 				param.depId = "<?=isset($this->session->userinfo['deptList'][0]['orgId'])?$this->session->userinfo['deptList'][0]['orgId']:""?>";
 
- 				if(this.activeName == 'first'){
 
- 					param.workTypeMode = 1;
 
- 				}else if(this.activeName == 'second'){
 
- 					param.workTypeMode = 2;
 
- 				}else if(this.activeName == 'third'){
 
- 					param.workTypeMode = 3;
 
- 				}else{
 
- 					param.workTypeMode = 4;
 
- 				}
 
- 				if(this.activeName == 'third'){
 
- 					param.start = this.form.start;
 
- 					param.end = this.form.end;
 
- 					param.cate = this.form.cate;
 
- 					param.priority = this.form.priority;
 
- 					param.device = this.form.device;
 
- 					param.name = this.form.name;
 
- 					param.phone = this.form.phone;
 
- 					param.xqTime = this.form.xqTime;
 
- 					param.ywcTime = this.form.ywcTime;
 
- 					param.bedNumber = this.form.bedNumber;
 
- 					param.pName = this.form.pName;
 
- 					param.baNumber = this.form.baNumber;
 
- 					param.gender = this.form.gender;
 
- 					param.back = this.form.back;
 
- 				}
 
- 				$.ajax({
 
- 					url: '/home/orderYhadd',
 
- 					type: 'POST',
 
- 					data: param,
 
- 					success: function(data){
 
- 						if(data.code == 0){
 
- 							layer.msg('操作成功');
 
- 							that.dialogVisible = false;
 
- 							this.page = 1;
 
- 							that.getListData();
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message);
 
- 						}
 
- 					},
 
- 					error: function (){
 
- 					}
 
- 				});
 
- 			},
 
- 			comment(){
 
- 				let that = this;
 
- 				const param2 = this.commonparam;
 
- 				param2.content = this.commentform.content;
 
- 				param2.score = this.commentform.score;
 
- 				param2.fromId = this.info['orderId'];
 
- 				param2.type = this.info['workTypeMode'];
 
- 				$.ajax({
 
- 					url: '/home/commentYhadd',
 
- 					type: 'POST',
 
- 					data: param2,
 
- 					success: function(data){
 
- 						if(data.code == 0){
 
- 							layer.msg('操作成功');
 
- 							that.dialogVisible2 = false;
 
- 							that.getListData();
 
- 						}else if(data.code == -100){
 
- 							that.checkLogin(data);
 
- 						}else{
 
- 							layer.msg(data.message);
 
- 						}
 
- 					},
 
- 					error: function (){
 
- 					}
 
- 				});
 
- 			},
 
- 			checkLogin(res){
 
- 				if(res.code == -100){
 
- 					layer.msg(res.message);
 
- 					setTimeout(function () {
 
- 						window.location.href = '/Account/logout';
 
- 					},1500);
 
- 				}
 
- 			}
 
- 		}
 
- 	})
 
- </script>
 
- </body>
 
- </html>
 
 
  |