123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>订单详情-未处理</title>
- <link rel="stylesheet" href="../css/main.css" />
- <link rel="stylesheet" href="../css/head.css" />
- <script src="../js/flexible.js"></script>
- <script src="../js/api.js"></script>
- <script src="../js/checkLanguage.js"></script>
- </head>
- <body class="ub ub-ver">
- <div id="header">
- <img src="../images/headerBG.jpg" alt=" " class="headerBG">
- <i id="backBtn"><img src="../images/backBtn.png" alt=""></i>
- <h3 class="headTit"></h3>
- <ul class="headGN">
- <li><i></i></li>
- </ul>
- </div>
- <div class="ub-f1" style="overflow-y: auto">
- <h4 class="fz32 c3d ptb30 plr25 bb" id="h4"></h4>
- <div id="evaluation">
- </div>
- </div>
- <!--<li class="ub plr25 bb ptb30">
- <span>订单号:</span>
- <div class="ub-f1 word-break">DO201711020001</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>起始地:</span>
- <div class="ub-f1 word-break">新港 · 天津 · 中国</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>目的地:</span>
- <div class="ub-f1 word-break">汉堡 · 德国</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>运力:</span>
- <div class="ub-f1 word-break">5*20GP</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>总额:</span>
- <div class="ub-f1 word-break">USD5120</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>支付状态:</span>
- <div class="ub-f1 word-break">已付款</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>订单状态:</span>
- <div class="ub-f1 word-break">未处理</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>下单时间:</span>
- <div class="ub-f1 word-break">2017-11-09 21:20:56</div>
- </li>
- </ul>
- <h4 class="fz32 c3d ptb30 plr25 bb">购买者信息</h4>
- <ul class="bgff fz24 c3d oder-span">
- <li class="ub plr25 bb ptb30">
- <span>企业名称:</span>
- <div class="ub-f1 word-break">北京常青藤贸易有限公司</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>联系人:</span>
- <div class="ub-f1 word-break">刘生</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>联系方式:</span>
- <div class="ub-f1 word-break">13400005656</div>
- </li>-->
- <!--<div class="plr25 mt50 mb70">
- <button type="button" class="release-btn btn-box fz30 cff" id="sureBtn">接受</button>
- <button type="button" class="cancet-btn fz30 btn-box c62 bgff mt30" id="noBtn">拒绝</button>
- </div>-->
- </body>
- <script type="text/javascript">
- try {
- var text=languages.orderDetails;
- $api.dom(".headTit").innerText=text.tit;
- $api.dom("#h4").innerText=text.h4;
- }catch (e){
- alert(languages.all.list5)
- }
- </script>
- <script src="../js/doT.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/publicData.js"></script>
- <script src="../js/jquery-3.1.0.min.js"></script>
- <script id="evaluationtmpl" type="text/x-dot-template">
- <ul class="bgff fz24 c3d oder-span" >
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list1']}}:</span>
- <div class="ub-f1 word-break" id="orderID" rel='{{= it["id"] }}'>{{= it["sysOrderNo"] }}</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list2']}}:</span>
- <div class="ub-f1 word-break">{{= it["startArea"] }}</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list3']}}:</span>
- <div class="ub-f1 word-break">{{= it["endArea"] }}</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list4']}}:</span>
- <div class="ub-f1 word-break clear">{{ for(var i in it['Capacity']){ }}
- <span class="fl mr20" style="white-space: nowrap">{{= it["Capacity"][i]["code"] }}{{= it["Capacity"][i]["perPrice"] }}/{{= it["Capacity"][i]["theCode"] }}*{{= it["Capacity"][i]["buyCount"] }}</span>
- {{ } }}</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list5']}}:</span>
- <div class="ub-f1 word-break">{{= it["code"] }}{{= it["allPrice"] }}</div>
- </li>
- <!--<li class="ub plr25 bb ptb30">-->
- <!--<span>{{=it['languages']['list11']}}:</span>-->
- <!--<div class="ub-f1 word-break">{{= it["take_time"] }}</div>-->
- <!--</li>-->
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list6']}}:</span>
- <div class="ub-f1 word-break">
- {{? it.stateOfOrcer==1 }}
- <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list7']}}</span>
- {{?? it.stateOfOrcer == 4}}
- <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list8']}}</span>
- {{?? it.stateOfOrcer == 5}}
- <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list9']}}</span>
- {{?? it.stateOfOrcer == 3}}
- <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list10']}}</span>
- {{?}}
- </div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list12']}}:</span>
- <div class="ub-f1 word-break">{{= it["addDate"] }}</div>
- </li>
- </ul>
-
- {{? it.stateOfOrcer==1 }}
- {{?? }}
- <h4 class="fz32 c3d ptb30 plr25 bb">{{=it['languages']['list13']}}</h4>
- <ul class="bgff fz24 c3d oder-span">
-
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list14']}}:</span>
- <div class="ub-f1 word-break">{{= it["companyName"] }}</div>
- </li>
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list15']}}:</span>
- <div class="ub-f1 word-break">{{= it["contact"] }}</div>
- </li>
-
- <li class="ub plr25 bb ptb30">
- <span>{{=it['languages']['list16']}}:</span>
- <div class="ub-f1 word-break">
- {{? it["phone"]!=null }}
- {{= it["phone"] }}
- {{??}}
- {{=it['languages']['list17']}}
- {{?}}
- </div>
- </li>
-
- </ul>
- {{?}}
- {{? it.stateOfOrcer==1 }}
- <div class="plr25 mt50 mb70 buttonContent">
- <button type="button" class="release-btn btn-box fz30 cff" id="accept">{{=it['languages']['btn1']}}</button>
- <button type="button" class="cancet-btn fz30 btn-box c62 bgff mt30" id="refuse">{{=it['languages']['btn2']}}</button>
- </div>
- {{?? it.stateOfOrcer == 4}}
- <div class="plr25 mt50 mb70 buttonContent">
- <button type="button" class="orange-btn fz30 btn-box cff bgff" id="sureBtn">{{=it['languages']['btn3']}}</button>
- <button type="button" class="release-btn btn-box fz30 cff mt30" id="lookVoucher">{{=it['languages']['btn4']}}</button>
- </div>
- {{?? it.stateOfOrcer == 5}}
- <div class="plr25 mt50 mb70 buttonContent">
- <button type="button" class="release-btn btn-box fz30 cff" id="recover">{{=it['languages']['btn5']}}</button>
- </div>
- {{?? it.stateOfOrcer == 3}}
- <div class="plr25 mt50 mb70 buttonContent">
- <button type="button" class="orange-btn fz30 btn-box cff bgff" id="lookMaterial">{{=it['languages']['btn6']}}</button>
- <button type="button" class="release-btn btn-box fz30 cff mt30" id="lookVoucher">{{=it['languages']['btn4']}}</button>
- </div>
- {{?}}
- </script>
- <script>
- apiready=function () {
-
- getdata();
- var backBtn=$api.dom("#backBtn"),sureBtn=$api.dom("#sureBtn"),noBtn=$api.dom("#noBtn");
- backBtn.onclick=function () {
- toBack();
- }
- api.addEventListener({
- name:'keyback'
- },function(ret, err){
- toBack()
- });
- // sureBtn.onclick=function () {
- // api.openWin({
- // name: 'receiveOrder',
- // url: 'receiveOrder.html',
- // pageParam: {name: 'pageparamname'}
- // });
- // }
- function toBack() {
- api.closeWin();
- }
- }
- function getdata() {
- api.ajax({
- url: pageUrl+"order/order_detail",
- method: 'get',
- timeout: 30,
- dataType: 'json',
- returnAll: false,
- data: {
- values:{
- "id": api.pageParam.id
- }
- }
- }, function (ret, err) {
- console.log(JSON.stringify(ret))
- var dataEval = ret.data;
- dataEval.languages=languages.orderDetails;
- var evalText = doT.template($("#evaluationtmpl").text());
- $("#evaluation").html(evalText(dataEval));
- buttonclick(ret)
- })
- }
- // 操作按键点击
- function buttonclick(data) {
- var buttonList = $api.domAll(".buttonContent button");
- for(var orderNum = 0, len = buttonList.length; orderNum < len; orderNum++) {
- ! function(i) {
- buttonList[i].onclick = function() {
- var status=""; //成功或者失败
- switch($(this).attr("id")) {
- case "accept":
- popups(languages.orderDetails.remind1,function (ret,dialogBox) {
- if(ret.eventType == 'right') {
- buttons(3,$("#orderID").attr("rel"));
- dialogBox.close({
- dialogName: 'alert'
- });
- }else if (ret.eventType == 'left') {
- dialogBox.close({
- dialogName: 'alert'
- });
- }
- })
- break;
- case "refuse":
- popups(languages.orderDetails.remind2,function (ret,dialogBox) {
- if(ret.eventType == 'right') {
- buttons(5,$("#orderID").attr("rel"));
- dialogBox.close({
- dialogName: 'alert'
- });
- }else if (ret.eventType == 'left') {
- dialogBox.close({
- dialogName: 'alert'
- });
- }
- })
- break;
- case "recover":
- popups(languages.orderDetails.remind3,function (ret,dialogBox) {
- if(ret.eventType == 'right') {
- buttons(3,id);
- dialogBox.close({
- dialogName: 'alert'
- });
- }else if (ret.eventType == 'left') {
- dialogBox.close({
- dialogName: 'alert'
- });
- }
- })
- break;
- case "sureBtn":
- api.openWin({
- name: 'invoice',
- url: 'invoice.html',
- pageParam: {name: 'pageparamname'}
- });
- break;
- case "lookVoucher":
- api.openWin({
- name: 'Voucher',
- url: 'Voucher.html',
- pageParam: {name: 'pageparamname',data:data}
- });
- break;
- case "lookMaterial":
- api.openWin({
- name: 'lookMaterial',
- url: 'lookMaterial.html',
- pageParam: {name: 'pageparamname'}
- });
- break;
- default:
- break;
- }
- }
- }(orderNum)
- }
- }
- // 操作按钮具体操作
- function buttons(statu,ids) {
- api.ajax({
- url: pageUrl + "order/accept",
- method: 'get',
- timeout: 30,
- dataType: 'json',
- returnAll: false,
- headers: {
- "Content-Type": "application/json"
- },
- data: {
- values: {
- id: ids,
- status: statu
- }
- }
- }, function(ret, err) {
- if(ret.status=="200"){
- api.execScript({
- name:"root",
- frameName: 'orderNav',
- script: 'getTotal();'
- });
- }
- api.toast({
- msg: ret.message,
- duration: 2000,
- location: 'bottom'
- });
- getdata()
- })
- }
- function popups(val,fn) {
- var dialogBox = api.require('dialogBox');
- dialogBox.alert({
- texts: {
- title: languages.all.list18,
- content: val,
- leftBtnTitle: languages.all.list2,
- rightBtnTitle: languages.all.list18
- },
- styles: {
- bg: '#fff',
- w: 300,
- title: {
- marginT: 20,
- icon: 'widget://res/gou.png',
- iconSize: 40,
- titleSize: 13,
- titleColor: '#000'
- },
- content: {
- color: '#000',
- size: 16
- },
- left: {
- marginB: 0,
- marginL: 0,
- w: 150,
- h: 60,
- corner: 2,
- bg: '#f9f9f9',
- color: '#818181',
- size: 12
- },
- right: {
- marginB: 0,
- marginL: 0,
- w: 150,
- h:60,
- corner: 2,
- bg: '#51c4d4',
- color: '#fff',
- size: 12
- }
- }
- }, function(ret) {
- fn(ret,dialogBox)
- });
- }
- </script>
- </html>
|