123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .rr{
- padding-right: 10px;
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form method="post" action="{:url('send',[],'')}/id/{$id}/mode/{$mode}" class="form-horizontal">
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">转单类型<span class="text-danger">*</span></label></br>
- <select name="work_type_mode" onchange="setWorkType(this.value)" class="form-control">
- <option value="-1">选择转单类型</option>
- {foreach $workType as $k=>$v}
- {if condition="in_array($v.id,$auths)"}
- <option value="{$v.id}">{$v.name}</option>
- {/if}
- {/foreach}
- </select>
- </div>
- </div>
- <div id="type3" style="display:none;">
- {if $dispatch_type==0 && $two_dispatch_off==1}
- <div class="col-sm-12">
- <div class="form-group" >
- <label class="control-label">执行人类型<span class="text-danger">*</span></label></br>
- <select name="userType" id="us" onchange="setType(this.value)" class="form-control">
- <option value="0">员工</option>
- <option value="1">二级调度</option>
- </select>
- </div>
- </div>
- {/if}
- </div>
- <div id="type1" style="display:none">
- {foreach $workType as $k=>$v}
- <div class="col-sm-12">
- <div id="d{$v.id}" style="display:none;">
- <div class="form-group">
- <label class="control-label">二级调度<span class="text-danger">*</span></label></br>
- {if $v.id==0}
- {:widget('common/multiselect',['name'=>'to_roles_id0','lists'=>$dispatch_roles0,'val'=>[]])}
- {/if}
- {if $v.id==1}
- {:widget('common/multiselect',['name'=>'to_roles_id1','lists'=>$dispatch_roles1,'val'=>[]])}
- {/if}
- {if $v.id==2}
- {:widget('common/multiselect',['name'=>'to_roles_id2','lists'=>$dispatch_roles2,'val'=>[]])}
- {/if}
- {if $v.id==3}
- {:widget('common/multiselect',['name'=>'to_roles_id3','lists'=>$dispatch_roles3,'val'=>[]])}
- {/if}
- {if $v.id==4}
- {:widget('common/multiselect',['name'=>'to_roles_id4','lists'=>$dispatch_roles4,'val'=>[]])}
- {/if}
- </div>
- </div>
- </div>
- {/foreach}
- </div>
- <div id="type2">
- {foreach $workType as $k=>$v}
- <div id="user{$v.id}" {if $dispatch_type==1 && $orders.work_type_mode==$v.id} style="display:block;" {else} style="display:none;"{/if} >
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">执行人<span class="text-danger">*</span></label></br>
- {if $v.id==0}
- {:widget('common/user-group-select',['name'=>'to_user_id0','lists'=>$user_list0,'multi'=>$send_user_num0,'val'=>'','msg'=>''])}
- {/if}
- {if $v.id==1}
- {:widget('common/user-group-select',['name'=>'to_user_id1','lists'=>$user_list1,'multi'=>$send_user_num1,'val'=>'','msg'=>''])}
- {/if}
- {if $v.id==2}
- {:widget('common/user-group-select',['name'=>'to_user_id2','lists'=>$user_list2,'multi'=>$send_user_num2,'val'=>'','msg'=>''])}
- {/if}
- {if $v.id==3}
- {:widget('common/user-group-select',['name'=>'to_user_id3','lists'=>$user_list3,'multi'=>$send_user_num3,'val'=>'','msg'=>''])}
- {/if}
- {if $v.id==4}
- {:widget('common/user-group-select',['name'=>'to_user_id4','lists'=>$user_list4,'multi'=>$send_user_num4,'val'=>'','msg'=>''])}
- {/if}
- </div>
- </div>
- </div>
- {/foreach}
- </div>
- <div id="bx" {if $orders.work_type_mode==1} style="display: block" {else} style="display: none" {/if}>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">报修事项<span class="text-danger">*</span></label></br>
- <div class="rr">
- {:widget('common/select',['name'=>'type_id','lists'=>$order_type_list,'value'=>isset($order_repair) && !empty($order_repair)?$order_repair['type_id']:''])}
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">报修地址</label></br>
- {:widget('common/select',['name'=>'address_id','lists'=>$address_list,'value'=>isset($order_repair) && !empty($order_repair)?$order_repair['address_id']:''])}
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">报修紧急程度</label></br>
- <select name="repair_priority" class="form-control" >
- <option value="2">普通</option>
- <option value="1">可延缓</option>
- <option value="3">紧急</option>
- </select>
- </div>
- </div>
- </div>
- <div id="ys" {if $orders.work_type_mode==3} style="display: block" {else} style="display: none" {/if}>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">开始地点<span class="text-danger">*</span></label></br>
- <div class="rr">
- <input type="hidden" name="start" id="start" value="{$ocid.start}">
- <el-select v-model="start" size="small" clearable style="width: 100%" filterable placeholder="请选择">
- <el-option
- v-for="item in starts"
- :key="item.id"
- :label="item.title"
- :value="item.id.toString()">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">运送类型<span class="text-danger">*</span></label></br>
- <input type="hidden" name="type" id="type" value="{$ocid.type}">
- <el-select v-model="type" size="small" clearable style="width: 100%" filterable placeholder="请选择">
- <el-option
- v-for="item in types"
- :key="item.id"
- :label="item.title"
- :value="item.id.toString()">
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">结束地点<span class="text-danger">*</span></label></br>
- <div class="rr">
- <input type="hidden" name="end" id="end" value="{$ocid.end}">
- <el-select v-model="end" size="small" clearable style="width: 100%" filterable placeholder="请选择">
- <el-option
- v-for="item in ends"
- :key="item.id"
- :label="item.title"
- :value="item.id.toString()">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">优 先 级</label></br>
- <input type="hidden" name="priority" id="priority" value="{$ocid.priority}">
- <el-select v-model="priority" size="small" clearable style="width: 100%" placeholder="请选择">
- <el-option
- v-for="(item,index) in prioritys"
- :key="index"
- :label="item"
- :value="index.toString()">
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">运送工具</label></br>
- <input type="hidden" name="device_id" id="device" value="{$ocid.device_id}">
- <el-select v-model="device" size="small" style="width: 100%" clearable filterable placeholder="请选择">
- <el-option
- v-for="item in devices"
- :key="item.id"
- :label="item.title"
- :value="item.id.toString()">
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">需求时间<span class="text-danger">*</span></label></br>
- <div class="rr">
- <input type="hidden" name="xq_time" id="xqtime" value="{$ocid.xq_time}">
- <el-date-picker
- style="width: 100%"
- size="small"
- v-model="xq_time"
- type="datetime"
- :editable="false"
- value-format="yyyy-MM-dd HH:mm"
- :clearable="true"
- placeholder="选择日期时间">
- </el-date-picker>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">应完成时间<span class="text-danger">*</span></label></br>
- <input type="hidden" name="ywc_time" id="ywctime" value="{$ocid.ywc_time}">
- <el-date-picker
- style="width: 100%"
- size="small"
- v-model="ywc_time"
- type="datetime"
- :editable="false"
- value-format="yyyy-MM-dd HH:mm"
- :clearable="true"
- placeholder="选择日期时间">
- </el-date-picker>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">联系人</label></br>
- <div class="rr">
- <input type="text" class="form-control" name="name">
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">联系电话</label></br>
- <input type="text" class="form-control" name="phone">
- </div>
- </div>
- <div id="patient">
- <div class="col-sm-4">
- <div class="form-group">
- <label class="control-label">床号</label></br>
- <div class="rr">
- <input type="text" class="form-control" {if $opt && $opt.bed_number} value="{$opt.bed_number}" {/if} name="bed_number">
- </div>
- </div>
- </div>
- <div class="col-sm-4">
- <div class="form-group">
- <label class="control-label">姓名</label></br>
- <div class="rr">
- <input type="text" class="form-control" {if $opt && $opt.name} value="{$opt.name}" {/if} name="p_name">
- </div>
- </div>
- </div>
- <div class="col-sm-4">
- <div class="form-group">
- <label class="control-label">病案号</label></br>
- <input type="text" class="form-control" {if $opt && $opt.ba_number} value="{$opt.ba_number}" {/if} name="ba_number">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">性别</label></br>
- <div class="rr">
- <select name="gender" class="form-control">
- <option {if $opt && $opt.gender==0} selected {/if} value="0">未知</option>
- <option {if $opt && $opt.gender==1} selected {/if} value="1">男</option>
- <option {if $opt && $opt.gender==2} selected {/if} value="2">女</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">是否往返</label></br>
- <select name="back" class="form-control">
- <option value="0">否</option>
- <option value="1">是</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">备注</label></br>
- <textarea name="todo_content" class="form-control" cols="30" rows="3" ></textarea>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="hr-line-dashed">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" data-layer="1" data-reload="1" target-form="form-horizontal" type="submit">确 定</button>
- <button class="btn cancel-btn btn-default" type="button">取 消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- function setType(val) {
- if(val==1){
- $("#type1").css('display','block')
- $("#type2").css('display','none')
- }else {
- $("#type2").css('display','block')
- $("#type1").css('display','none')
- }
- }
- function setWorkType(val) {
- if(val <0){
- $("#user0").css('display','none')
- $("#user1").css('display','none')
- $("#user2").css('display','none')
- $("#user3").css('display','none')
- $("#user4").css('display','none')
- $("#bx").css('display','none')
- $("#ys").css('display','none')
- $("#type1").css('display','none')
- $("#type2").css('display','none')
- $("#type3").css('display','none')
- }else {
- $("#type3").css('display','block')
- if($('#us option:selected').val()==1){
- $("#type1").css('display','block')
- $("#type2").css('display','none')
- }else {
- $("#type2").css('display','block')
- $("#type1").css('display','none')
- }
- if(val==0){
- $("#user0").css('display','block')
- $("#d0").css('display','block')
- $("#user1").css('display','none')
- $("#d1").css('display','none')
- $("#user2").css('display','none')
- $("#d2").css('display','none')
- $("#user3").css('display','none')
- $("#d3").css('display','none')
- $("#user4").css('display','none')
- $("#d4").css('display','none')
- $("#bx").css('display','none')
- $("#ys").css('display','none')
- }
- if(val==1){
- $("#user0").css('display','none')
- $("#d0").css('display','none')
- $("#user1").css('display','block')
- $("#d1").css('display','block')
- $("#user2").css('display','none')
- $("#d2").css('display','none')
- $("#user3").css('display','none')
- $("#d3").css('display','none')
- $("#user4").css('display','none')
- $("#d4").css('display','none')
- $("#bx").css('display','block')
- $("#ys").css('display','none')
- }
- if(val==2){
- $("#user0").css('display','none')
- $("#d0").css('display','none')
- $("#user1").css('display','none')
- $("#d1").css('display','none')
- $("#user2").css('display','block')
- $("#d2").css('display','block')
- $("#user3").css('display','none')
- $("#d3").css('display','none')
- $("#user4").css('display','none')
- $("#d4").css('display','none')
- $("#bx").css('display','none')
- $("#ys").css('display','none')
- }
- if(val==3){
- $("#user0").css('display','none')
- $("#d0").css('display','none')
- $("#user1").css('display','none')
- $("#d1").css('display','none')
- $("#user2").css('display','none')
- $("#d2").css('display','none')
- $("#user3").css('display','block')
- $("#d3").css('display','block')
- $("#user4").css('display','none')
- $("#d4").css('display','none')
- $("#bx").css('display','none')
- $("#ys").css('display','block')
- }
- if(val==4){
- $("#user0").css('display','none')
- $("#d0").css('display','none')
- $("#user1").css('display','none')
- $("#d1").css('display','none')
- $("#user2").css('display','none')
- $("#d2").css('display','none')
- $("#user3").css('display','none')
- $("#d3").css('display','none')
- $("#user4").css('display','block')
- $("#d4").css('display','block')
- $("#bx").css('display','none')
- $("#ys").css('display','none')
- }
- }
- }
- if('{$ps}'=='1'){
- $('#patient').hide();
- }
- var vdevices = {:json_encode($order_device)};
- new Vue({
- el: '#ys',
- data: function() {
- return {
- starts: {:json_encode($address)},
- start: '{$ocid.start}',
- ends: {:json_encode($address)},
- end: '{$ocid.end}',
- types: {:json_encode($order_convey_type)},
- type:'{$ocid.type}',
- prioritys:{:json_encode($priority)},
- priority: '{$ocid.priority}',
- devices: {:json_encode($order_device)},
- device: '{$ocid.device_id}',
- xq_time: '{$ocid.xq_time}',
- ywc_time:'{$ocid.ywc_time}',
- }
- },
- watch: {
- type: function (newtype, oldtype) {
- $('#type').val(newtype);
- this.types.forEach((item) => {
- if(item.id == newtype){
- console.log(item);
- this.end = item.ends > 0?parseInt(item.ends).toString():'';
- this.xq_time = item.xq_time?item.xq_time:'';
- this.ywc_time = item.ywc_time?item.ywc_time:'';
- this.priority = item.priority > 0?item.priority.toString():'';
- if(item.cate == 1){
- let devices = [];
- vdevices.forEach((item) => {
- if(item.patient == 1){
- devices.push(item);
- }
- });
- this.devices = devices;
- $('#patient').show();
- }else{
- this.devices = vdevices;
- $('#patient').hide();
- }
- }
- });
- },
- start: function (newtype, oldtype) {
- $('#start').val(newtype);
- },
- end: function (newtype, oldtype) {
- $('#end').val(newtype);
- },
- priority: function (newtype, oldtype) {
- $('#priority').val(newtype);
- },
- device: function (newtype, oldtype) {
- $('#device').val(newtype);
- },
- xq_time: function (newtype, oldtype) {
- $('#xqtime').val(newtype);
- },
- ywc_time: function (newtype, oldtype) {
- $('#ywctime').val(newtype);
- },
- }
- })
- </script>
- {/block}
|