|
@@ -0,0 +1,482 @@
|
|
|
+{extend name="common/common2" /}
|
|
|
+{block name="main"}
|
|
|
+<style>
|
|
|
+ .rr{
|
|
|
+ padding-right: 10px;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<div class="row" id="formApp">
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <div class="ibox-content">
|
|
|
+ <form method="post" action="{:url('editOrder',[],'')}/mode/{$mode}?id={$id}" class="form-horizontal">
|
|
|
+ <input type="hidden" name="id" value="{$order['id']}">
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">部门</label></br>
|
|
|
+ <input type="hidden" name="dep_id" id="dep" value="{$order['dep_id']|default=0}">
|
|
|
+ <el-select v-model="dep_id" size="small" clearable style="width: 100%" filterable placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in dep"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.id.toString()">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">执行人<span class="text-danger">*</span></label></br>
|
|
|
+ {if $send_user_num==0} <!--多选-->
|
|
|
+ <input type="hidden" name="to_user_id" id="user_id">
|
|
|
+ <el-select v-model="user_id" filterable clearable multiple placeholder="请选择" size="small"
|
|
|
+ style="width:100%">
|
|
|
+ <el-option-group
|
|
|
+ v-for="group in user"
|
|
|
+ :key="group.id"
|
|
|
+ :label="group.name">
|
|
|
+ <el-option
|
|
|
+ v-for="item in group.user"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.real_name"
|
|
|
+ :value="item.id.toString()">
|
|
|
+ </el-option>
|
|
|
+ </el-option-group>
|
|
|
+ </el-select>
|
|
|
+ {else}<!--单选-->
|
|
|
+ <input type="hidden" name="to_user_id" id="user_id">
|
|
|
+ <el-select v-model="user_id" filterable clearable placeholder="请选择" size="small"
|
|
|
+ style="width:100%">
|
|
|
+ <el-option-group
|
|
|
+ v-for="group in user"
|
|
|
+ :key="group.id"
|
|
|
+ :label="group.name">
|
|
|
+ <el-option
|
|
|
+ v-for="item in group.user"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.real_name"
|
|
|
+ :value="item.id.toString()">
|
|
|
+ </el-option>
|
|
|
+ </el-option-group>
|
|
|
+ </el-select>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">运送类型<span class="text-danger">*</span></label></br>
|
|
|
+ <div class="rr">
|
|
|
+
|
|
|
+ <input type="hidden" name="type" id="type" value="{$orderconvey['type']|default=''}">
|
|
|
+ <div>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">优 先 级</label></br>
|
|
|
+ <input type="hidden" name="priority" id="priority" value="{$orderconvey['type']|default=''}">
|
|
|
+ <div style="padding-right: 10px">
|
|
|
+ <el-radio v-model="priority" label="2">常规</el-radio>
|
|
|
+ <el-radio v-model="priority" label="3">紧急</el-radio>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="patient">
|
|
|
+ <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="bed_number" value="{$orderconveypatient['bed_number']|default=''}">
|
|
|
+ </div>
|
|
|
+ </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="p_name" value="{$orderconveypatient['name']|default=''}">
|
|
|
+ </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" name="ba_number">-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </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 value="0">未知</option>-->
|
|
|
+<!-- <option value="1">男</option>-->
|
|
|
+<!-- <option 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 class="col-sm-6">
|
|
|
+ <div class="form-group" >
|
|
|
+ <label class="control-label">开始地点<span class="text-danger">*</span></label></br>
|
|
|
+ <input type="hidden" value="{$user.addr_id==0?'':$user.addr_id}" name="start" id="start" value="{$orderconvey['start']|default=''}">
|
|
|
+ <div class="rr">
|
|
|
+ <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="end" id="end" value="{$orderconvey['end']|default=''}">
|
|
|
+ <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 class="col-sm-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">途径地点</label></br>
|
|
|
+ <div style="padding-right: 10px">
|
|
|
+ <input type="hidden" name="way_addr" id="way_addr" value="{$addrs|default=''}">
|
|
|
+ <el-select v-model="way_addr" size="small" collapse-tags style="width: 100%" multiple placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in way_addrs"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.id.toString()">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </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="{$orderconvey['device_id']|default=''}">
|
|
|
+ <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 id="yy" style="display:none;">
|
|
|
+ <div class="col-sm-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">需求时间<span class="text-danger">*</span></label></br>
|
|
|
+ <input type="hidden" name="xq_time" id="xqtime" value="{$orderconvey['xq_time']|default=''}">
|
|
|
+ <div class="rr">
|
|
|
+ <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"
|
|
|
+ @change="xqDateChange"
|
|
|
+ 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="{$orderconvey['ywc_time']|default=''}">
|
|
|
+ <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>
|
|
|
+
|
|
|
+
|
|
|
+ <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="form-group">
|
|
|
+ <label class="control-label">任务备注</label></br>
|
|
|
+ <input type="text" placeholder="{$tsDh}" class="form-control" name="content" value="{$order['content']}">
|
|
|
+
|
|
|
+ </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" 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')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $(document).ready(function(){
|
|
|
+ formSetValue("back", {$info.back|default=0});
|
|
|
+ $("#yy").css('display','block');
|
|
|
+ });
|
|
|
+ $('#patient').hide();
|
|
|
+ var vdevices = {:json_encode($order_device)};
|
|
|
+ new Vue({
|
|
|
+ el: '#formApp',
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ starts: [],
|
|
|
+ start: "",
|
|
|
+ ends: [],
|
|
|
+ end: '{$orderconvey?$orderconvey["end"]:""}',
|
|
|
+ way_addrs: {:json_encode($address)},
|
|
|
+ way_addr:'',
|
|
|
+ types: {:json_encode($order_convey_type)},
|
|
|
+ type: '',
|
|
|
+ prioritys:{:json_encode($priority)},
|
|
|
+ priority: "",
|
|
|
+ devices: {:json_encode($order_device)},
|
|
|
+ device: '{$orderconvey?$orderconvey["device_id"]:""}',
|
|
|
+ xq_time: '{$orderconvey?$orderconvey["xq_time"]:""}',
|
|
|
+ ywc_time:'{$orderconvey?$orderconvey["ywc_time"]:""}',
|
|
|
+ dep: {:json_encode($dep_list)},
|
|
|
+ dep_id: '{$order?$order["dep_id"]:""}',
|
|
|
+ user: {:json_encode($user_list)},
|
|
|
+ user_id: '',
|
|
|
+ to_roles: {:json_encode($dispatch_roles)},
|
|
|
+ to_roles_id: '',
|
|
|
+ roles_id:''
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ type: function (newtype, oldtype) {
|
|
|
+ var that = this;
|
|
|
+ $.post('{:url("getAddr")}',{id:newtype},function (res){
|
|
|
+ that.starts = res.data.s;
|
|
|
+ that.ends = res.data.e;
|
|
|
+ },'json')
|
|
|
+ $('#type').val(newtype);
|
|
|
+ this.types.forEach((item) => {
|
|
|
+ if(item.id == newtype){
|
|
|
+ console.log(item);
|
|
|
+ // this.end = item.ends > 0?parseInt(item.ends):'';
|
|
|
+ if(item.starts >0){
|
|
|
+ this.start = parseInt(item.starts);
|
|
|
+ }else {
|
|
|
+ if(item.startList.length ==0){
|
|
|
+ this.start= parseInt('{$user.addr_id}') >0?parseInt('{$user.addr_id}').toString():"";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(item.ends >0){
|
|
|
+ this.end = parseInt(item.ends).toString();
|
|
|
+ }else {
|
|
|
+ if(item.endList.length ==0){
|
|
|
+ this.end= parseInt('{$user.addr_id}') >0?parseInt('{$user.addr_id}').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();
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#yy").css('display','block')
|
|
|
+ // if(item.cate==4){
|
|
|
+ // $("#yy").css('display','block')
|
|
|
+ // }else {
|
|
|
+ // $("#yy").css('display','none')
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ start: function (newtype, oldtype) {
|
|
|
+ $('#start').val(newtype);
|
|
|
+ },
|
|
|
+ end: function (newtype, oldtype) {
|
|
|
+ $('#end').val(newtype);
|
|
|
+ },
|
|
|
+ way_addr: function (newtype, oldtype) {
|
|
|
+ $('#way_addr').val(newtype);
|
|
|
+ },
|
|
|
+ priority: function (newtype, oldtype) {
|
|
|
+ $('#priority').val(newtype);
|
|
|
+ },
|
|
|
+ device: function (newtype, oldtype) {
|
|
|
+ $('#device').val(newtype);
|
|
|
+ },
|
|
|
+ xq_time: function (newtype, oldtype) {
|
|
|
+ // var that = this;
|
|
|
+ // $.post("{:url('getTime')}",{type:this.type,'start':newtype},function (res){
|
|
|
+ // if(res.code == 1){
|
|
|
+ // that.xq_time = res.data.xq_time;
|
|
|
+ // that.ywc_time = res.data.ywc_time;
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ $('#xqtime').val(newtype);
|
|
|
+ },
|
|
|
+ ywc_time: function (newtype, oldtype) {
|
|
|
+ $('#ywctime').val(newtype);
|
|
|
+ },
|
|
|
+ dep_id: function (newtype, oldtype) {
|
|
|
+ $('#dep').val(newtype);
|
|
|
+ },
|
|
|
+ user_id: function (newtype, oldtype) {
|
|
|
+ if("{$send_user_num}"==="0"){
|
|
|
+ $('#user_id').val(newtype.join(','));
|
|
|
+ }else {
|
|
|
+ $('#user_id').val(newtype);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ roles_id: function (newtype, oldtype) {
|
|
|
+ $('#to_roles_id').val(newtype);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created(){
|
|
|
+ let t = '{$orderconvey?$orderconvey["type"]:""}';
|
|
|
+ if(t){
|
|
|
+ this.type = t;
|
|
|
+ }
|
|
|
+
|
|
|
+ let way = '{$addrs?$addrs:""}';
|
|
|
+ if(way){
|
|
|
+ this.way_addr = way.split(",");
|
|
|
+ }
|
|
|
+
|
|
|
+ let s = '{$orderconvey?$orderconvey["start"]:""}';
|
|
|
+ if(s){
|
|
|
+ this.start = s;
|
|
|
+ }
|
|
|
+
|
|
|
+ let e = '{$orderconvey?$orderconvey["end"]:""}';
|
|
|
+ if(e){
|
|
|
+ this.end = e;
|
|
|
+ }
|
|
|
+
|
|
|
+ let pp = '{$orderconvey?$orderconvey["priority"]:""}';
|
|
|
+ if(pp){
|
|
|
+ this.priority = pp;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ xqDateChange(e){
|
|
|
+ var that = this;
|
|
|
+ $.post("{:url('getTime')}",{type:this.type,'start':e},function (res){
|
|
|
+ if(res.code == 1){
|
|
|
+ that.xq_time = res.data.xq_time;
|
|
|
+ that.ywc_time = res.data.ywc_time;
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ $('#xqtime').val(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.cancel-btn').click(function () {
|
|
|
+ parent.layer.closeAll();
|
|
|
+ })
|
|
|
+</script>
|
|
|
+{/block}
|