123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- {include file="public/header-begin" /}
- <link rel="stylesheet" href="{$Think.config.base_url}/static/admin/css/style.min.css?v=4.0.0">
- <script src="{$Think.config.base_url}/static/common/js/vue.js"></script>
- {include file="public/header-end" /}
- <div id="vue" class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-8">
- <div class="ibox">
- <div class="ibox-title">
- <h5>订单信息</h5>
- <div class="ibox-tools">
- <a data-toggle="modal" href="#modal-watch" class="btn btn-primary btn-xs">跟踪</a>
- </div>
- </div>
- <div class="ibox-content">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>名称</th>
- <th>值</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>产品</td>
- <td>[{{item.ptype_text}}] {{item.from_city}}->{{item.to_city}} | {{item.from_name}} -> {{item.to_name}}</td>
- <td align="right">[关联]</td>
- </tr>
- <tr>
- <td>ID/订单编号</td>
- <td>{{item.orderid}}<span style="padding-left: 5px;padding-right: 5px">-</span>{{item.ordernumber}}</td>
- <td></td>
- </tr>
- <tr>
- <td>订单来源</td>
- <td>{{item.partner_name}}<span style="padding-left: 5px;padding-right: 5px">-</span>{{item.partner_ordernumber}}</td>
- <td></td>
- </tr>
- <tr>
- <td>状态</td>
- <td>
- <span v-if="item.status == 1" class="label label-info">{{item.status_text}}</span>
- <span v-if="item.status == 2" class="label label-danger">{{item.status_text}}</span>
- <span v-if="item.status == 3" class="label label-success">{{item.status_text}}</span>
- <span v-if="item.status == 4" class="label label-warning">{{item.status_text}}</span>
- <span v-if="item.status == 5" class="label label-default">{{item.status_text}}</span>
- <span v-if="item.status == 6" class="label label-danger">{{item.status_text}}</span>
- </td>
- <td align="right">
- [修改]
- </td>
- </tr>
- <tr>
- <td>下单时间</td>
- <td>{{item.addtime_text}}</td>
- <td></td>
- </tr>
- <tr>
- <td>更新时间</td>
- <td>{{item.edittime_text}}</td>
- <td></td>
- </tr>
- <tr>
- <td colspan="3"><b>产品订单</b></td>
- </tr>
- <tr>
- <td>用车信息</td>
- <td>用车时间 {{item.usetime}} 用车天数 {{item.cardays}} 天</td>
- <td></td>
- </tr>
- <tr>
- <td>订购车型</td>
- <td>{{item.cartype}}</td>
- <td></td>
- </tr>
- <tr>
- <td>出发地 -> 目的地</td>
- <td>{{item.from_name}} -> {{item.to_name}}</td>
- <td></td>
- </tr>
- <tr>
- <td>出发详细地址</td>
- <td>{{item.from_detail}}</td>
- <td></td>
- </tr>
- <tr>
- <td>目的详细地址</td>
- <td>{{item.to_detail}}</td>
- <td></td>
- </tr>
- <tr>
- <td>行程统计</td>
- <td>
- <span>预计共行驶 {{item.addroute.estimated_distance / 1000}} 公里</span>
- <span> - 共需 {{item.addroute.estimated_time}} 分钟</span>
- <br>
- <span>预计超出套餐 {{item.addroute.over_distance / 1000}} 公里</span>
- <span> - 超出套餐 {{item.addroute.over_time}} 分钟</span>
- <br>
- <span>套餐里程 {{item.addroute.free_distance / 1000}} 公里</span>
- <span> - 套餐时间 {{item.addroute.free_time}} 分钟</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>人数</td>
- <td>总人数 {{item.person}} 人 儿童 {{item.child}} 人</td>
- <td></td>
- </tr>
- <tr>
- <td>总价格</td>
- <td>¥ {{item.amount}} 元</td>
- <td align="right">[明细]</td>
- </tr>
- <tr>
- <td width="15%">备注</td>
- <td>{{item.note}}</td>
- <td width="10%" align="right">
- <a data-toggle="modal" href="#modal-note">[修改]</a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="ibox" v-if="item.status_pay == 1">
- <div class="ibox-title">
- <h5>付款信息</h5>
- </div>
- <div class="ibox-content">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>名称</th>
- <th>值</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>付款金额</td>
- <td>
- ¥ {{item.finance.amount}} 元
- </td>
- </tr>
- <tr>
- <td>支付类型</td>
- <td>{{item.finance.paytype}}</td>
- </tr>
- <tr v-if="item.finance.id">
- <td>支付编号</td>
- <td>{{item.finance.id}}</td>
- </tr>
- <tr v-if="item.finance.paytime">
- <td>交易时间</td>
- <td>{{item.finance.paytime}}</td>
- </tr>
- <tr v-if="item.finance.terminal">
- <td>交易终端</td>
- <td>{{item.finance.terminal}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="col-sm-4">
- <div class="ibox">
- <div class="ibox-title">
- <h5>联系人信息</h5>
- <div class="ibox-tools">
- <a data-toggle="modal" href="#modal-contact" class="btn btn-primary btn-xs">修改</a>
- </div>
- </div>
- <div class="ibox-content">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>名称</th>
- <th>值</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>姓名</td>
- <td>{{item.userinfo.truename}}</td>
- </tr>
- <tr>
- <td>联系电话</td>
- <td>{{item.userinfo.phone}}</td>
- </tr>
- <tr>
- <td>备用电话</td>
- <td>{{item.userinfo.phone2}}</td>
- </tr>
- <tr>
- <td>微信</td>
- <td>{{item.userinfo.wechat}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="ibox">
- <div class="ibox-title">
- <h5>关联订单</h5>
- <div class="ibox-tools">
- <a data-toggle="modal" href="#modal-form" class="btn btn-primary btn-xs">修改</a>
- </div>
- </div>
- <div class="ibox-content">
- <p>
- 123123123123123
- <p>
- </div>
- </div>
- <div class="ibox">
- <div class="ibox-title">
- <h5>下单人</h5>
- </div>
- <div class="ibox-content">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>名称</th>
- <th>值</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>ID</td>
- <td>2</td>
- </tr>
- <tr>
- <td>姓名</td>
- <td>张奇</td>
- </tr>
- <tr>
- <td>手机号</td>
- <td>13136180523</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-status" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
- </button>
- <h4 class="modal-title">修改订单状态</h4>
- </div>
- <form id="formStatus" action="" method="post" class="form-horizontal">
- <input name="id" type="hidden" value="">
- <div class="modal-body" style="text-align: center;">
- <h4 class="modal-title">【服务中】 -> 【待评价】</h4>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-primary">保存</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-form" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <form id="formService" action="" method="post">
- <input name="id" type="hidden" value="">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
- </button>
- <h4 class="modal-title">指派司机</h4>
- </div>
- <div class="modal-body">
- <textarea name="content" id="content" style="width:100%;height:300px;">123123123123123123123</textarea>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-primary">保存</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-note" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <form id="formNote" action="" method="post">
- <input name="id" type="hidden" value="">
- <div class="modal-header">
- <h4 class="modal-title">修改备注</h4>
- </div>
- <div class="modal-body">
- <textarea name="note" style="width:100%;height:200px;">123123123123</textarea>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-primary">保存</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-price" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <form id="formPrice" action="" method="post" class="form-horizontal">
- <div class="modal-header">
- <h4 class="modal-title">修改应付价格</h4>
- </div>
- <div class="modal-body">
- <input name="id" type="hidden" value="">
- <div class="form-group">
- <label class="col-sm-3 control-label">应付价格:</label>
- <div class="col-sm-8">
- <input name="price" type="text" placeholder="真实姓名" value="" class="form-control">
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-primary">保存</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-contact" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
- </button>
- <h4 class="modal-title">修改联系人信息</h4>
- </div>
- <form id="formContact" action="" method="post" class="form-horizontal">
- <div class="modal-body">
- <input name="id" type="hidden" value="">
- <div class="form-group">
- <label class="col-sm-3 control-label">联系人姓名:</label>
- <div class="col-sm-8">
- <input type="truename" placeholder="真实姓名" v-model="item.userinfo.truename" class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">联系电话:</label>
- <div class="col-sm-8">
- <input type="text" placeholder="手机号" v-model="item.userinfo.phone" class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">备用电话:</label>
- <div class="col-sm-8">
- <input type="text" placeholder="微信号" v-model="item.userinfo.phone2" class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">微信:</label>
- <div class="col-sm-8">
- <input type="text" placeholder="微信号" v-model="item.userinfo.wechat" class="form-control">
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-primary">保存</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="modal inmodal" id="modal-watch" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content animated bounceInRight">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
- </button>
- <h4 class="modal-title">订单跟踪</h4>
- </div>
- <div class="modal-body">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>操作</th>
- <th>操作时间</th>
- <th>操作人</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="track of trackList">
- <td>{{track.title}}</td>
- <td>{{track.addtime}}</td>
- <td>{{track.operater}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- {include file="public/footer-js" /}
- <script>
- new Vue({
- el: '#vue',
- data: {
- id: {$id},
- item:{},
- trackList:{}
- },
- computed : {
- },
- methods: {
- getDetail:function() {
- var that = this;
- //锁定城市
- $.ajax({
- url: '{:url('getDetail')}',
- data: {
- orderid: this.id
- },
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- that.item = data.content;
- }
- else {
- swal("订单" + data.msg);
- }
- }
- });
- //得到该城市车型列表
- $.ajax({
- url: '{:url('city/getCartypeListOnEffective')}',
- data: {
- cityid: $(that.$els.area).attr('data-id'),
- ptype: that.item.ptype,
- usetime: that.item.usetime
- },
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- that.carTypeList = data.content.carTypeList;
- that.item.addroute = data.content.addroute;
- }
- else {
- swal("车型" + data.msg);
- }
- }
- });
- if(this.item.ptype == 1 || this.item.ptype == 2) {
- //得到该城市有效机场名称
- $.ajax({
- url: '{:url('city/getAirportList')}',
- data: {
- cityid: $(that.$els.area).attr('data-id')
- },
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- that.airportList = data.content;
- }
- else {
- swal("机场" + data.msg);
- }
- }
- });
- }
- },
- changeStep: function(step) {
- if(step > 0 && this.step == 4) {
- return;
- }
- if(step < 0 && this.step == 1) {
- return;
- }
- if(step > 0 && this.step == 1) {
- this.getDistancematrix();
- }
- this.step += step;
- },
- thisStep: function (step) {
- this.step = step;
- },
- getDistancematrix: function() {
- console.log(this._carTypeItem);
- var that = this;
- var param;
- //接机
- if(this.item.ptype == 1) {
- param = {
- from_name: this._airportItem.name_cn,//起始地址
- from_city: this.city.name_cn,//起始城市名称
- to_name: this.item.to_name,//到达地址
- to_city: this.city.name_cn,//到达城市名称
- to_detail: this.item.to_detail,//到达详细地址
- };
- }
- //送机
- else if(this.item.ptype == 2){
- param = {
- from_name: this.item.to_name,//起始地址
- from_city: this._airportItem.name_cn,//起始城市名称
- to_name: this.item.to_name,//到达地址
- to_city: this.city.name_cn,//到达城市名称
- };
- }
- $.ajax({
- url: '{:url('map/getDistancematrix')}',
- data: param,
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- that.distancematrix = data.content;
- }
- else {
- swal("机场" + data.msg);
- }
- }
- });
- },
- getPartnerList:function () {
- var that = this;
- $.ajax({
- url: '{:url('system/getPartnerList')}',
- data: [],
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- that.partnerList = data.content;
- }
- else {
- swal(data.msg);
- }
- }
- });
- },
- amountCopy: function () {
- this.item.amount = this._amount;
- },
- addOrder: function () {
- //接机
- if(this.item.ptype == 1) {
- this.item.from_name = this._airportItem.name_cn;//起始地址
- this.item.from_detail = this._airportItem.name_cn;//起始地址
- this.item.from_cid = this.city.cityid;//起始城市名称
- this.item.from_city = this.city.name_cn;//起始城市名称
- this.item.from_x = this._airportItem.x;//经度
- this.item.from_y = this._airportItem.y;//维度
- this.item.to_name = this.item.to_name;//到达地址
- this.item.to_detail = this.item.to_detail;//到达详细地址
- this.item.to_cid = this.city.cityid;//到达城市名称
- this.item.to_city = this.city.name_cn;//到达城市名称
- this.item.to_x = 0;//经度
- this.item.to_y = 0;//维度
- }
- //送机
- else if(this.item.ptype == 2) {
- }
- this.item.cartypeid = this._carTypeItem.id;
- this.item.cartype = this._carTypeItem.name;
- this.item.carprice = this._carTypeItem.price;
- this.item.addroute.over_time_price = this._over_time_price;
- this.item.addroute.over_distance_price = this._over_distance_price;
- this.item.addroute.estimated_time = this.distancematrix.duration.value;
- this.item.addroute.estimated_distance = this.distancematrix.distance.value;
- this.item.addroute.over_time = (this.distancematrix.duration.value - this.item.addroute.free_time) * 1 < 0 ? 0 : (this.distancematrix.duration.value - this.item.addroute.free_time) * 1;
- this.item.addroute.over_distance = (this.distancematrix.distance.value - this.item.addroute.free_distance ) * 1 < 0 ? 0 : (this.distancematrix.distance.value - this.item.addroute.free_distance) * 1;
- var that = this;
- console.log(this.item);
- $.ajax({
- url: '{:url('order/addOrder')}',
- data: this.item,
- type: 'post',
- dataType: 'json',
- success: function (data) {
- if (data.code == 1) {
- swal(data.msg);
- }
- else {
- swal(data.msg);
- }
- }
- });
- }
- },
- ready : function () {
- this.getDetail();
- },
- })
- </script>
- <script src="{$Think.config.base_url}/static/admin/js/jquery.min.js?v=2.1.4"></script>
- <script src="{$Think.config.base_url}/static/admin/js/bootstrap.min.js?v=3.3.5"></script>
- <script charset="utf-8" src="{$Think.config.base_url}/static/admin/plugins/kindeditor/kindeditor-all-min.js"></script>
- <script charset="utf-8" src="{$Think.config.base_url}/static/admin/plugins/kindeditor/lang/zh-CN.js"></script>
- <script>
- KindEditor.ready(function (K) {
- window.editor = K.create('#content'
- , {
- items: [
- 'source', 'forecolor', 'hilitecolor', 'bold',
- 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat'
- ]
- });
- });
- </script>
- <script src="{$Think.config.base_url}/static/admin/js/plugins/sweetalert/sweetalert.min.js"></script>
- <script src="{$Think.config.base_url}/static/common/js/jquery.form.js"></script>
- <script type="text/javascript">
- $(function() {
- var commonOptions = {
- beforeSubmit: function(arr, $form, options) {
- for (x of arr) {
- if(x.name == 'content') {
- x.value = editor.html();
- }
- }
- $("button[data-dismiss='modal']").click();
- },
- success: function (data) {
- if(data.code==1) {
- swal({
- title: data.msg,
- type: "success"
- },function () {
- window.location.href = data.forward;
- })
- }
- else {
- swal({
- title: data.msg,
- type: "warning"
- })
- }
- }
- };
- $("#formService").ajaxForm(commonOptions);
- $("#formContact").ajaxForm(commonOptions);
- $("#formPrice").ajaxForm(commonOptions);
- $("#formNote").ajaxForm(commonOptions);
- $("#formStatus").ajaxForm(commonOptions);
- });
- </script>
- {include file="public/footer" /}
|