123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <!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="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <script src="http://md.jya-tech.com/static/elementui2.15.5/vue-2.6.14.js"></script>
- <script src="http://md.jya-tech.com/static/elementui2.15.5/index.js"></script>
- <link rel="stylesheet" href="http://md.jya-tech.com/repair/style.css">
- <link rel="stylesheet" href="http://md.jya-tech.com/static/elementui2.15.5/index.css"/>
- <link rel="stylesheet" href="http://md.jya-tech.com/static/elementui2.15.5/style/theme/index.css">
- <title>{$title}</title>
- </head>
- <body>
- <div class="container">
- <form method="post" action="{:url('add')}" class="form-horizontal" id="form">
- <input type="hidden" name="mode" value="{$mode}">
- <div class="add-content-box">
- <textarea name="content" id="" placeholder="请输入内容..." ></textarea>
- </div>
- <div class="add-img-box">
- <div class="upload-bx">
- {:widget_view('common/upimg',['name'=>'images','multi'=>9,'val'=>''])}
- </div>
- </div>
- <div class="add-contacts-info-box">
- <div class="header-box">联系人信息</div>
- <div class="add-form-group">
- <label class="control-label">姓名</label>
- <div class="input-right">
- <input type="text" name="name" value="" placeholder="请输入">
- </div>
- </div>
- <div class="add-form-group">
- <label class="control-label">电话</label>
- <div class="input-right">
- <input type="text" name="phone" value="" placeholder="请输入">
- </div>
- </div>
- </div>
- {if $mode == 3}
- <div class="add-content-box" style="padding-left: 10px;padding-top: 20px;height: 330px!important;" id="vueapp">
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label" style="display: inline-block;float: left">运送类型<span class="text-danger">*</span></label></br>
- <div class="rr" style="width: 60%;display: inline-block;float: left;margin-top: -20px">
- <input type="hidden" name="type" id="type">
- <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">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group" >
- <label class="control-label" style="display: inline-block;float: left">开始地点<span class="text-danger">*</span></label></br>
- <input type="hidden" value="0" name="start" id="start">
- <div class="rr" style="width: 60%;display: inline-block;float: left;margin-top: -20px">
- <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">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label" style="display: inline-block;float: left">结束地点<span class="text-danger">*</span></label></br>
- <input type="hidden" name="end" id="end">
- <div style="width: 60%;display: inline-block;float: left;margin-top: -20px">
- <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">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label" style="display: inline-block;float: left">需求时间<span class="text-danger">*</span></label></br>
- <input type="hidden" name="xqTime" id="xqtime">
- <div class="rr" style="width: 60%;display: inline-block;float: left;margin-top: -20px">
- <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-12">
- <div class="form-group">
- <label class="control-label" style="display: inline-block;float: left">应完成时间<span class="text-danger">*</span></label></br>
- <input type="hidden" name="ywcTime" id="ywctime">
- <div style="width: 60%;display: inline-block;float: left;margin-top: -20px">
- <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>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label" style="display: inline-block;float: left">优 先 级</label></br>
- <input type="hidden" name="priority" id="priority">
- <div style="width: 60%;display: inline-block;float: left;margin-top: -13px">
- <el-radio v-model="priority" label="2">常规</el-radio>
- <el-radio v-model="priority" label="3">紧急</el-radio>
- </div>
- </div>
- </div>
- </div>
- {/if}
- <!-- <button type="submit" target-form="form-horizontal" class="add-btn ajax-post" >提交</button>-->
- <div class="add-btn" id="addBtn">提交</div>
- </form>
- </div>
- {if $mode == 2}
- <!-- <div class="add-table-record-box">-->
- <!-- <table class="table table-bordered">-->
- <!-- <tbody>-->
- <!-- {if isset($list)}-->
- <!-- {foreach $list as $k=>$v}-->
- <!-- <tr>-->
- <!-- <td>{$v['create_time']}</td>-->
- <!-- <td>{$v['addrName']}</td>-->
- <!-- <td>{$v['content']}</td>-->
- <!-- <td>{$v['statusTxt']}({$v['userName']})</td>-->
- <!-- </tr>-->
- <!-- {/foreach}-->
- <!-- {/if}-->
- <!-- </tbody>-->
- <!-- </table>-->
- <!-- </div>-->
- {/if}
- </body>
- </html>
- <script>
- $('#addBtn').click(function (){
- $.ajax({
- type: "POST",
- dataType: "json",
- url: '{:url("repair/add")}' ,
- data: $('#form').serialize(),
- success: function (res) {
- if (res.code == 1) {
- layer.msg('操作成功',{time:2000},function (){
- window.location.href = "{:url('addSuccess')}";
- })
- }else{
- layer.msg(res.msg,{time:2000},)
- }
- },
- error : function() {
- layer.msg('网络异常')
- }
- });
- })
- new Vue({
- el: '#vueapp',
- data: function() {
- return {
- starts: {:json_encode($address)},
- start: "",
- ends: {:json_encode($address)},
- end: '',
- types: {:json_encode($order_convey_type)},
- type: '',
- prioritys:{:json_encode($priority)},
- priority: "",
- devices: {:json_encode($order_device)},
- device: '',
- xq_time: '',
- ywc_time:'',
- }
- },
- watch: {
- type: function (newtype, oldtype) {
- $('#type').val(newtype);
- },
- 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) {
- // 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) {
- },
- roles_id: function (newtype, oldtype) {
- $('#to_roles_id').val(newtype);
- },
- },
- 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);
- }
- }
- })
- </script>
|