orderDetails.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>订单详情-未处理</title>
  6. <link rel="stylesheet" href="../css/main.css" />
  7. <link rel="stylesheet" href="../css/head.css" />
  8. <script src="../js/flexible.js"></script>
  9. <script src="../js/api.js"></script>
  10. <script src="../js/checkLanguage.js"></script>
  11. </head>
  12. <body class="ub ub-ver">
  13. <div id="header">
  14. <img src="../images/headerBG.jpg" alt=" " class="headerBG">
  15. <i id="backBtn"><img src="../images/backBtn.png" alt=""></i>
  16. <h3 class="headTit"></h3>
  17. <ul class="headGN">
  18. <li><i></i></li>
  19. </ul>
  20. </div>
  21. <div class="ub-f1" style="overflow-y: auto">
  22. <h4 class="fz32 c3d ptb30 plr25 bb" id="h4"></h4>
  23. <div id="evaluation">
  24. </div>
  25. </div>
  26. <!--<li class="ub plr25 bb ptb30">
  27. <span>订单号:</span>
  28. <div class="ub-f1 word-break">DO201711020001</div>
  29. </li>
  30. <li class="ub plr25 bb ptb30">
  31. <span>起始地:</span>
  32. <div class="ub-f1 word-break">新港&nbsp;·&nbsp;天津&nbsp;·&nbsp;中国</div>
  33. </li>
  34. <li class="ub plr25 bb ptb30">
  35. <span>目的地:</span>
  36. <div class="ub-f1 word-break">汉堡&nbsp;·&nbsp;德国</div>
  37. </li>
  38. <li class="ub plr25 bb ptb30">
  39. <span>运力:</span>
  40. <div class="ub-f1 word-break">5*20GP</div>
  41. </li>
  42. <li class="ub plr25 bb ptb30">
  43. <span>总额:</span>
  44. <div class="ub-f1 word-break">USD5120</div>
  45. </li>
  46. <li class="ub plr25 bb ptb30">
  47. <span>支付状态:</span>
  48. <div class="ub-f1 word-break">已付款</div>
  49. </li>
  50. <li class="ub plr25 bb ptb30">
  51. <span>订单状态:</span>
  52. <div class="ub-f1 word-break">未处理</div>
  53. </li>
  54. <li class="ub plr25 bb ptb30">
  55. <span>下单时间:</span>
  56. <div class="ub-f1 word-break">2017-11-09 21:20:56</div>
  57. </li>
  58. </ul>
  59. <h4 class="fz32 c3d ptb30 plr25 bb">购买者信息</h4>
  60. <ul class="bgff fz24 c3d oder-span">
  61. <li class="ub plr25 bb ptb30">
  62. <span>企业名称:</span>
  63. <div class="ub-f1 word-break">北京常青藤贸易有限公司</div>
  64. </li>
  65. <li class="ub plr25 bb ptb30">
  66. <span>联系人:</span>
  67. <div class="ub-f1 word-break">刘生</div>
  68. </li>
  69. <li class="ub plr25 bb ptb30">
  70. <span>联系方式:</span>
  71. <div class="ub-f1 word-break">13400005656</div>
  72. </li>-->
  73. <!--<div class="plr25 mt50 mb70">
  74. <button type="button" class="release-btn btn-box fz30 cff" id="sureBtn">接受</button>
  75. <button type="button" class="cancet-btn fz30 btn-box c62 bgff mt30" id="noBtn">拒绝</button>
  76. </div>-->
  77. </body>
  78. <script type="text/javascript">
  79. try {
  80. var text=languages.orderDetails;
  81. $api.dom(".headTit").innerText=text.tit;
  82. $api.dom("#h4").innerText=text.h4;
  83. }catch (e){
  84. alert(languages.all.list5)
  85. }
  86. </script>
  87. <script src="../js/doT.min.js" type="text/javascript" charset="utf-8"></script>
  88. <script src="../js/publicData.js"></script>
  89. <script src="../js/jquery-3.1.0.min.js"></script>
  90. <script id="evaluationtmpl" type="text/x-dot-template">
  91. <ul class="bgff fz24 c3d oder-span" >
  92. <li class="ub plr25 bb ptb30">
  93. <span>{{=it['languages']['list1']}}:</span>
  94. <div class="ub-f1 word-break" id="orderID" rel='{{= it["id"] }}'>{{= it["sysOrderNo"] }}</div>
  95. </li>
  96. <li class="ub plr25 bb ptb30">
  97. <span>{{=it['languages']['list2']}}:</span>
  98. <div class="ub-f1 word-break">{{= it["startArea"] }}</div>
  99. </li>
  100. <li class="ub plr25 bb ptb30">
  101. <span>{{=it['languages']['list3']}}:</span>
  102. <div class="ub-f1 word-break">{{= it["endArea"] }}</div>
  103. </li>
  104. <li class="ub plr25 bb ptb30">
  105. <span>{{=it['languages']['list4']}}:</span>
  106. <div class="ub-f1 word-break clear">{{ for(var i in it['Capacity']){ }}
  107. <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>
  108. {{ } }}</div>
  109. </li>
  110. <li class="ub plr25 bb ptb30">
  111. <span>{{=it['languages']['list5']}}:</span>
  112. <div class="ub-f1 word-break">{{= it["code"] }}{{= it["allPrice"] }}</div>
  113. </li>
  114. <!--<li class="ub plr25 bb ptb30">-->
  115. <!--<span>{{=it['languages']['list11']}}:</span>-->
  116. <!--<div class="ub-f1 word-break">{{= it["take_time"] }}</div>-->
  117. <!--</li>-->
  118. <li class="ub plr25 bb ptb30">
  119. <span>{{=it['languages']['list6']}}:</span>
  120. <div class="ub-f1 word-break">
  121. {{? it.stateOfOrcer==1 }}
  122. <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list7']}}</span>
  123. {{?? it.stateOfOrcer == 4}}
  124. <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list8']}}</span>
  125. {{?? it.stateOfOrcer == 5}}
  126. <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list9']}}</span>
  127. {{?? it.stateOfOrcer == 3}}
  128. <span class="ub-f1">{{=it['languages']['list6']}}:{{=it['languages']['list10']}}</span>
  129. {{?}}
  130. </div>
  131. </li>
  132. <li class="ub plr25 bb ptb30">
  133. <span>{{=it['languages']['list12']}}:</span>
  134. <div class="ub-f1 word-break">{{= it["addDate"] }}</div>
  135. </li>
  136. </ul>
  137. {{? it.stateOfOrcer==1 }}
  138. {{?? }}
  139. <h4 class="fz32 c3d ptb30 plr25 bb">{{=it['languages']['list13']}}</h4>
  140. <ul class="bgff fz24 c3d oder-span">
  141. <li class="ub plr25 bb ptb30">
  142. <span>{{=it['languages']['list14']}}:</span>
  143. <div class="ub-f1 word-break">{{= it["companyName"] }}</div>
  144. </li>
  145. <li class="ub plr25 bb ptb30">
  146. <span>{{=it['languages']['list15']}}:</span>
  147. <div class="ub-f1 word-break">{{= it["contact"] }}</div>
  148. </li>
  149. <li class="ub plr25 bb ptb30">
  150. <span>{{=it['languages']['list16']}}:</span>
  151. <div class="ub-f1 word-break">
  152. {{? it["phone"]!=null }}
  153. {{= it["phone"] }}
  154. {{??}}
  155. {{=it['languages']['list17']}}
  156. {{?}}
  157. </div>
  158. </li>
  159. </ul>
  160. {{?}}
  161. {{? it.stateOfOrcer==1 }}
  162. <div class="plr25 mt50 mb70 buttonContent">
  163. <button type="button" class="release-btn btn-box fz30 cff" id="accept">{{=it['languages']['btn1']}}</button>
  164. <button type="button" class="cancet-btn fz30 btn-box c62 bgff mt30" id="refuse">{{=it['languages']['btn2']}}</button>
  165. </div>
  166. {{?? it.stateOfOrcer == 4}}
  167. <div class="plr25 mt50 mb70 buttonContent">
  168. <button type="button" class="orange-btn fz30 btn-box cff bgff" id="sureBtn">{{=it['languages']['btn3']}}</button>
  169. <button type="button" class="release-btn btn-box fz30 cff mt30" id="lookVoucher">{{=it['languages']['btn4']}}</button>
  170. </div>
  171. {{?? it.stateOfOrcer == 5}}
  172. <div class="plr25 mt50 mb70 buttonContent">
  173. <button type="button" class="release-btn btn-box fz30 cff" id="recover">{{=it['languages']['btn5']}}</button>
  174. </div>
  175. {{?? it.stateOfOrcer == 3}}
  176. <div class="plr25 mt50 mb70 buttonContent">
  177. <button type="button" class="orange-btn fz30 btn-box cff bgff" id="lookMaterial">{{=it['languages']['btn6']}}</button>
  178. <button type="button" class="release-btn btn-box fz30 cff mt30" id="lookVoucher">{{=it['languages']['btn4']}}</button>
  179. </div>
  180. {{?}}
  181. </script>
  182. <script>
  183. apiready=function () {
  184. getdata();
  185. var backBtn=$api.dom("#backBtn"),sureBtn=$api.dom("#sureBtn"),noBtn=$api.dom("#noBtn");
  186. backBtn.onclick=function () {
  187. toBack();
  188. }
  189. api.addEventListener({
  190. name:'keyback'
  191. },function(ret, err){
  192. toBack()
  193. });
  194. // sureBtn.onclick=function () {
  195. // api.openWin({
  196. // name: 'receiveOrder',
  197. // url: 'receiveOrder.html',
  198. // pageParam: {name: 'pageparamname'}
  199. // });
  200. // }
  201. function toBack() {
  202. api.closeWin();
  203. }
  204. }
  205. function getdata() {
  206. api.ajax({
  207. url: pageUrl+"order/order_detail",
  208. method: 'get',
  209. timeout: 30,
  210. dataType: 'json',
  211. returnAll: false,
  212. data: {
  213. values:{
  214. "id": api.pageParam.id
  215. }
  216. }
  217. }, function (ret, err) {
  218. console.log(JSON.stringify(ret))
  219. var dataEval = ret.data;
  220. dataEval.languages=languages.orderDetails;
  221. var evalText = doT.template($("#evaluationtmpl").text());
  222. $("#evaluation").html(evalText(dataEval));
  223. buttonclick(ret)
  224. })
  225. }
  226. // 操作按键点击
  227. function buttonclick(data) {
  228. var buttonList = $api.domAll(".buttonContent button");
  229. for(var orderNum = 0, len = buttonList.length; orderNum < len; orderNum++) {
  230. ! function(i) {
  231. buttonList[i].onclick = function() {
  232. var status=""; //成功或者失败
  233. switch($(this).attr("id")) {
  234. case "accept":
  235. popups(languages.orderDetails.remind1,function (ret,dialogBox) {
  236. if(ret.eventType == 'right') {
  237. buttons(3,$("#orderID").attr("rel"));
  238. dialogBox.close({
  239. dialogName: 'alert'
  240. });
  241. }else if (ret.eventType == 'left') {
  242. dialogBox.close({
  243. dialogName: 'alert'
  244. });
  245. }
  246. })
  247. break;
  248. case "refuse":
  249. popups(languages.orderDetails.remind2,function (ret,dialogBox) {
  250. if(ret.eventType == 'right') {
  251. buttons(5,$("#orderID").attr("rel"));
  252. dialogBox.close({
  253. dialogName: 'alert'
  254. });
  255. }else if (ret.eventType == 'left') {
  256. dialogBox.close({
  257. dialogName: 'alert'
  258. });
  259. }
  260. })
  261. break;
  262. case "recover":
  263. popups(languages.orderDetails.remind3,function (ret,dialogBox) {
  264. if(ret.eventType == 'right') {
  265. buttons(3,id);
  266. dialogBox.close({
  267. dialogName: 'alert'
  268. });
  269. }else if (ret.eventType == 'left') {
  270. dialogBox.close({
  271. dialogName: 'alert'
  272. });
  273. }
  274. })
  275. break;
  276. case "sureBtn":
  277. api.openWin({
  278. name: 'invoice',
  279. url: 'invoice.html',
  280. pageParam: {name: 'pageparamname'}
  281. });
  282. break;
  283. case "lookVoucher":
  284. api.openWin({
  285. name: 'Voucher',
  286. url: 'Voucher.html',
  287. pageParam: {name: 'pageparamname',data:data}
  288. });
  289. break;
  290. case "lookMaterial":
  291. api.openWin({
  292. name: 'lookMaterial',
  293. url: 'lookMaterial.html',
  294. pageParam: {name: 'pageparamname'}
  295. });
  296. break;
  297. default:
  298. break;
  299. }
  300. }
  301. }(orderNum)
  302. }
  303. }
  304. // 操作按钮具体操作
  305. function buttons(statu,ids) {
  306. api.ajax({
  307. url: pageUrl + "order/accept",
  308. method: 'get',
  309. timeout: 30,
  310. dataType: 'json',
  311. returnAll: false,
  312. headers: {
  313. "Content-Type": "application/json"
  314. },
  315. data: {
  316. values: {
  317. id: ids,
  318. status: statu
  319. }
  320. }
  321. }, function(ret, err) {
  322. if(ret.status=="200"){
  323. api.execScript({
  324. name:"root",
  325. frameName: 'orderNav',
  326. script: 'getTotal();'
  327. });
  328. }
  329. api.toast({
  330. msg: ret.message,
  331. duration: 2000,
  332. location: 'bottom'
  333. });
  334. getdata()
  335. })
  336. }
  337. function popups(val,fn) {
  338. var dialogBox = api.require('dialogBox');
  339. dialogBox.alert({
  340. texts: {
  341. title: languages.all.list18,
  342. content: val,
  343. leftBtnTitle: languages.all.list2,
  344. rightBtnTitle: languages.all.list18
  345. },
  346. styles: {
  347. bg: '#fff',
  348. w: 300,
  349. title: {
  350. marginT: 20,
  351. icon: 'widget://res/gou.png',
  352. iconSize: 40,
  353. titleSize: 13,
  354. titleColor: '#000'
  355. },
  356. content: {
  357. color: '#000',
  358. size: 16
  359. },
  360. left: {
  361. marginB: 0,
  362. marginL: 0,
  363. w: 150,
  364. h: 60,
  365. corner: 2,
  366. bg: '#f9f9f9',
  367. color: '#818181',
  368. size: 12
  369. },
  370. right: {
  371. marginB: 0,
  372. marginL: 0,
  373. w: 150,
  374. h:60,
  375. corner: 2,
  376. bg: '#51c4d4',
  377. color: '#fff',
  378. size: 12
  379. }
  380. }
  381. }, function(ret) {
  382. fn(ret,dialogBox)
  383. });
  384. }
  385. </script>
  386. </html>