Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

order_details.htm 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. {include file="public/layout" /}
  2. <script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
  3. <body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;min-width:auto;">
  4. <style type="text/css">
  5. .system_table{ border:1px solid #dcdcdc; width:100%;}
  6. .system_table td{ height:40px; line-height:40px; font-size:12px; color:#454545; border-bottom:1px solid #dcdcdc; border-right:1px solid #dcdcdc; width:35%; padding-left:1%;}
  7. .system_table td.gray_bg{ background:#f7f7f7; width:15%;}
  8. </style>
  9. <div id="append_parent"></div>
  10. <div id="ajaxwaitid"></div>
  11. {empty name='$iframe'}
  12. {include file="order/left" /}
  13. <div class="page" style="min-width:auto;margin-left:100px;padding-bottom: 15px;">
  14. {else /}
  15. <div class="page" style="min-width:auto;">
  16. {/empty}
  17. <div class="flexigrid">
  18. {empty name="$iframe"}
  19. <div class="fixed-bar">
  20. <div class="item-title">
  21. <a class="back_xin" href="{empty name="$backurl"}javascript:history.back();{else /}{$backurl}{/empty}" title="返回"><i class="iconfont e-fanhui"></i></a>
  22. <div class="subject"> <h3>订单详情</h3> <h5></h5> </div>
  23. </div>
  24. </div>
  25. {/empty}
  26. <div class="order-status pt5 pb5">
  27. <div class="status-item current">
  28. <div class="pl5 pr5">
  29. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  30. </div>
  31. <div class="status-title"> <span class="text">买家下单</span> <span class="time">{$OrderData.add_time}</span> </div>
  32. </div>
  33. {if condition="in_array($OrderData.order_status, [0, 1, 2, 3])"}
  34. {empty name="$OrderData.pay_time"}
  35. <div class="status-item disabled">
  36. <div class="status-icon"> 2 </div>
  37. <div class="status-title"> <span class="text">买家付款</span> <span class="time"></span> </div>
  38. </div>
  39. {else/}
  40. <div class="status-item current">
  41. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  42. <div class="status-title"> <span class="text">买家付款</span> <span class="time">{$OrderData.pay_time}</span> </div>
  43. </div>
  44. {/empty}
  45. {if condition="$OrderData.prom_type == 0"}
  46. {if condition="$OrderData.logistics_type == 2"}
  47. {empty name="$weappVerifyLog.verify_time"}
  48. <div class="status-item disabled">
  49. <div class="status-icon"> 3 </div>
  50. <div class="status-title"> <span class="text">待核销</span> <span class="time"></span> </div>
  51. </div>
  52. {else/}
  53. <div class="status-item current">
  54. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  55. <div class="status-title"> <span class="text">已核销</span> <span class="time">{$weappVerifyLog.verify_time}</span> </div>
  56. </div>
  57. {/empty}
  58. {else/}
  59. {empty name="$OrderData.express_time"}
  60. <div class="status-item disabled">
  61. <div class="status-icon"> 3 </div>
  62. <div class="status-title"> <span class="text">商家发货</span> <span class="time"></span> </div>
  63. </div>
  64. {else/}
  65. <div class="status-item current">
  66. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  67. <div class="status-title"> <span class="text">商家发货</span> <span class="time">{$OrderData.express_time}</span> </div>
  68. </div>
  69. {/empty}
  70. {/if}
  71. {elseif condition="$OrderData.prom_type == 1"}
  72. {gt name="$OrderData.order_status" value="1"}
  73. <div class="status-item current">
  74. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  75. <div class="status-title"> <span class="text">商家发货</span> <span class="time">{$OrderData.express_time|default=$OrderData.pay_time}</span> </div>
  76. </div>
  77. {else/}
  78. <div class="status-item disabled">
  79. <div class="status-icon"> 3 </div>
  80. <div class="status-title"> <span class="text">商家发货</span> <span class="time"></span> </div>
  81. </div>
  82. {/gt}
  83. {/if}
  84. {empty name="$OrderData.confirm_time"}
  85. <div class="status-item disabled">
  86. <div class="status-icon"> 4 </div>
  87. <div class="status-title"> <span class="text">订单完成</span> <span class="time"></span> </div>
  88. </div>
  89. {else/}
  90. <div class="status-item current">
  91. <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
  92. <div class="status-title"> <span class="text">订单完成</span> <span class="time">{$OrderData.confirm_time}</span> </div>
  93. </div>
  94. {/empty}
  95. {/if}
  96. {if condition="in_array($OrderData.order_status, [-1])"}
  97. <div class="status-item cancel">
  98. <div class="status-icon"> <i class="iconfont e-quxiao"></i> </div>
  99. <div class="status-title"> <span class="text">订单关闭</span> <span class="time">{$OrderData.update_time}</span> </div>
  100. </div>
  101. {/if}
  102. {if condition="in_array($OrderData.order_status, [4])"}
  103. <div class="status-item cancel">
  104. <div class="status-icon"> <i class="iconfont e-quxiao"></i> </div>
  105. <div class="status-title"> <span class="text">订单过期</span> <span class="time">{$OrderData.update_time}</span> </div>
  106. </div>
  107. {/if}
  108. </div>
  109. </div>
  110. </div>
  111. {empty name='$iframe'}
  112. <div class="page pt0 mt10" style="min-width:auto;margin-left:100px;padding-bottom: 15px;">
  113. {else /}
  114. <div class="page pt0 mt10" style="min-width: auto; padding-bottom: 15px;">
  115. {/empty}
  116. <div class="flexigrid">
  117. <div class="mDiv"> <div class="ftitle"> <h3>订单状态</h3> </div> </div>
  118. <div class="order-information mb30">
  119. <div class="order-information-lumping" style="width: 100%;">
  120. <div class="lumping-content">
  121. <div class="lumping-content-title" style="line-height: 37px;">当前状态:</div>
  122. <div class="lumping-content-text">
  123. {eq name="$OrderData.order_status" value="0"}
  124. <span class="f-28" style="color: #ff1f2c;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  125. {/eq}
  126. {eq name="$OrderData.order_status" value="1"}
  127. {if condition="$OrderData.logistics_type == 2"}
  128. <span class="f-28" style="color: #2d8cf0;">待核销</span>
  129. {else/}
  130. <span class="f-28" style="color: #ff9900;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  131. {/if}
  132. {/eq}
  133. {eq name="$OrderData.order_status" value="2"}
  134. {if condition="$OrderData.prom_type == 0"}
  135. <span class="f-28" style="color: #2d8cf0;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  136. {elseif condition="$OrderData.prom_type == 1"}
  137. <span class="f-28" style="color: #19be6b;">未完成</span>
  138. {/if}
  139. {/eq}
  140. {eq name="$OrderData.order_status" value="3"}
  141. {if condition="$OrderData.prom_type == 0"}
  142. <span class="f-28" style="color: #19be6b;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  143. {elseif condition="$OrderData.prom_type == 1"}
  144. <span class="f-28" style="color: #19be6b;">已完成</span>
  145. {/if}
  146. {/eq}
  147. {eq name="$OrderData.order_status" value="4"}
  148. <span class="f-28" style="color: #939799;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  149. {/eq}
  150. {eq name="$OrderData.order_status" value="-1"}
  151. <span class="f-28" style="color: #939799;">{$admin_order_status_arr[$OrderData.order_status]|default=''}</span>
  152. {/eq}
  153. </div>
  154. </div>
  155. <div class="lumping-content">
  156. <div class="lumping-content-title"></div>
  157. <div class="lumping-content-text">
  158. {eq name="$OrderData.order_status" value="0"}
  159. <a class="lumping-btn-big lumping-btn-green mr10" href="JavaScript:void(0);" onclick="orderMark('yfk', '{$OrderData.order_id}', '{$OrderData.users_id}');">确认付款</a>
  160. {/eq}
  161. {eq name="$OrderData.order_status" value="1"}
  162. {if condition="2 == $OrderData.logistics_type"}
  163. <a class="lumping-btn-big lumping-btn-green mr10" href="JavaScript:void(0);" onclick="OrderVerify('{$OrderData.order_id}','{$OrderData.users_id}');">确认核销</a>
  164. {else/}
  165. <a class="lumping-btn-big lumping-btn-green mr10" href="JavaScript:void(0);" data-url="{:url('Shop/order_send', ['order_id'=>$OrderData.order_id])}" onclick="orderConfirmSend(this);">确认发货</a>
  166. {/if}
  167. {/eq}
  168. {if condition="0 == $OrderData.prom_type && 2 == $OrderData.order_status"}
  169. <a class="lumping-btn-big lumping-btn-green mr10" href="JavaScript:void(0);" onclick="orderMark('ysh','{$OrderData.order_id}','{$OrderData.users_id}');">确认收货</a>
  170. {/if}
  171. {eq name="$OrderData.order_status" value="0"}
  172. <a class="lumping-btn-big mr10" href="JavaScript:void(0);" onclick="promptChangePrice();">调整价格</a>
  173. <a class="lumping-btn-big mr10" href="JavaScript:void(0);" onclick="orderMark('gbdd', '{$OrderData.order_id}', '{$OrderData.users_id}');">关闭订单</a>
  174. {/eq}
  175. {if condition="1 == $OrderData.order_status"}
  176. <a class="lumping-btn-big mr10" href="JavaScript:void(0);" onclick="orderMark('sdtk', '{$OrderData.order_id}');">手动退款</a>
  177. {/if}
  178. {if condition="in_array($OrderData.order_status, [4, -1])"}
  179. <a class="lumping-btn-big mr10" href="JavaScript:void(0);" onclick="orderMark('ddsc','{$OrderData.order_id}','{$OrderData.users_id}');">订单删除</a>
  180. {/if}
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. {empty name='$iframe'}
  188. <div class="page pt0 mt10" style="min-width:auto;margin-left:100px;">
  189. {else /}
  190. <div class="page pt0 mt10" style="min-width: auto;">
  191. {/empty}
  192. <div class="flexigrid">
  193. <div class="mDiv"> <div class="ftitle"> <h3>订单信息</h3> </div> </div>
  194. <div class="order-information mb30">
  195. <div class="order-information-lumping">
  196. <!-- <div class="lumping-content">
  197. <div class="lumping-content-title">订单序号:</div> <div class="lumping-content-text text-num">{$OrderData.order_id}</div>
  198. </div> -->
  199. <div class="lumping-content">
  200. <div class="lumping-content-title">订单编号:</div> <div class="lumping-content-text text-num">{$OrderData.order_code} <a class="copy order_code curpoin" onclick="orderCopy();" data-clipboard-text="{$OrderData.order_code}"><i class="iconfont e-fuzhi basics-color" title="点击复制"></i></a></div>
  201. </div>
  202. <div class="lumping-content">
  203. <div class="lumping-content-title">订单类型:</div> <div class="lumping-content-text">{$OrderData.prom_type_name}</div>
  204. </div>
  205. <div class="lumping-content">
  206. <div class="lumping-content-title">订单来源:</div> <div class="lumping-content-text">{$OrderData.order_terminal_name}</div>
  207. </div>
  208. <div class="lumping-content">
  209. <div class="lumping-content-title">付款方式:</div>
  210. <div class="lumping-content-text">
  211. {eq name="$vo.order_source" value="30"}积分兑换{else/}{$pay_method_arr[$OrderData.pay_name]|default='微信支付'}{/eq}
  212. </div>
  213. </div>
  214. </div>
  215. <div class="order-information-contentTwo">
  216. <div class="lumping-content">
  217. <div class="lumping-content-title">配送方式:</div>
  218. <div class="lumping-content-text">{if condition="$OrderData.prom_type == 0"}{eq name="$OrderData.logistics_type" value="1"}物流配送{else/}到店自提{/eq}{elseif condition="$OrderData.prom_type == 1"}无需物流{/if}</div>
  219. </div>
  220. {if condition="!empty($OrderData.express_order)"}
  221. <div class="lumping-content">
  222. <div class="lumping-content-title">物流单号:</div>
  223. <div class="lumping-content-text">
  224. <span class="mr10">{$OrderData.express_name}</span>{$OrderData.express_order}
  225. <a class="copy express_order curpoin" onclick="expressOrderCopy();" data-clipboard-text="{$OrderData.express_order}"><i class="iconfont e-fuzhi basics-color" title="点击复制"></i></a>
  226. <!-- <a href="javascript:void(0);" data-url="{$pcExpressUrl}" onclick="logisticsInquiry(this);">[物流查询]</a> -->
  227. </div>
  228. </div>
  229. <script type="text/javascript">
  230. // 物流单号复制
  231. function expressOrderCopy() {
  232. var clipboard1 = new Clipboard(".express_order");
  233. clipboard1.on("success", function(e) {
  234. layer.msg("复制成功");
  235. });
  236. clipboard1.on("error", function(e) {
  237. layer.msg("复制失败!请手动复制", {icon: 5});
  238. });
  239. }
  240. // function logisticsInquiry(obj) {
  241. // var iframes = layer.open({
  242. // type: 2,
  243. // title: '物流查询',
  244. // shadeClose: false,
  245. // maxmin: false,
  246. // area: ['60%', '80%'],
  247. // content: $(obj).attr('data-url')
  248. // });
  249. // }
  250. </script>
  251. {/if}
  252. <div class="lumping-content">
  253. <div class="lumping-content-title">收货人:</div> <div class="lumping-content-text">
  254. {eq name="$OrderData.logistics_type" value="2"}{$weappVerifyLog.buyer}{else /}{$OrderData.consignee}{/eq}
  255. </div>
  256. </div>
  257. <div class="lumping-content">
  258. <div class="lumping-content-title">联系电话:</div> <div class="lumping-content-text">
  259. {eq name="$OrderData.logistics_type" value="2"}{$weappVerifyLog.phone}{else /}{$OrderData.mobile}{/eq}
  260. </div>
  261. </div>
  262. {eq name="$OrderData.logistics_type" value="2"}
  263. <div class="lumping-content">
  264. <div class="lumping-content-title">核销码:</div> <div class="lumping-content-text">{$weappVerifyLog.verify_code}</div>
  265. </div>
  266. {/eq}
  267. {if condition="$OrderData.prom_type == 0 && 1 == $OrderData.logistics_type"}
  268. <div class="lumping-content">
  269. <div class="lumping-content-title">收货地址:</div>
  270. <div class="lumping-content-text">
  271. <div class="lumping-content-address" style="max-width: 100%; display: contents;">
  272. {$OrderData.province} {$OrderData.city} {$OrderData.district} {$OrderData.address}
  273. </div>
  274. {if condition="in_array($OrderData.order_status, [0, 1])"}
  275. <a class="ml10" href="JavaScript:void(0);" data-url="{:url('Shop/order_address', ['order_id'=>$OrderData.order_id])}" onclick="changeOrderAddress(this);">修改</a>
  276. {/if}
  277. </div>
  278. </div>
  279. {/if}
  280. </div>
  281. <div class="order-information-contentTwo">
  282. <div class="lumping-content">
  283. <div class="lumping-content-title">买家信息:</div>
  284. <div class="lumping-content-text">
  285. <img style="float: unset; border: 1px solid #e9edef; width: 24px; height: 24px; border-radius: 50%;" src="{$UsersData.head_pic}">
  286. <a href="javascript:void(0);" data-href="{:url('Member/users_edit', ['id'=>$UsersData.users_id,'from'=>'money_index','iframe'=>1])}" {empty name='$iframe'}onclick="openFullframe(this, '会员资料','100%','100%');"{else /}onclick="parent_openFullframe(this, '会员资料','100%','100%');"{/empty}>{$UsersData.nickname}</a>
  287. </div>
  288. </div>
  289. {notempty name="$OrderData.user_note"}
  290. <div class="lumping-content">
  291. <div class="lumping-content-title">买家留言:</div> <div class="lumping-content-text">{$OrderData.user_note}</div>
  292. </div>
  293. {/notempty}
  294. <div class="lumping-content">
  295. <div class="lumping-content-title">商家备注:</div>
  296. <div class="lumping-content-text">
  297. {notempty name="$OrderData.admin_note"}已有{$adminNoteCount}条备注{/notempty}
  298. <a href="javascript:void(0);" data-href="{:url('shop/order_remarks', ['order_id'=>$OrderData.order_id])}" onclick="openFullframe(this, '商家备注', '600px', '55%');" id="adminNoteHtml">{empty name="$OrderData.admin_note"}添加{else/}查看{/empty}</a>
  299. </div>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. {empty name='$iframe'}
  306. <div class="page pt0 mt10" style="min-width:auto;margin-left:100px;">
  307. {else /}
  308. <div class="page pt0 mt10" style="min-width: auto;">
  309. {/empty}
  310. <div class="flexigrid" style=" padding-right: 1px; ">
  311. <div class="mDiv"> <div class="ftitle"> <h3>商品信息</h3> </div> </div>
  312. </div>
  313. <div class="flexigrid flexigrid-xin" style=" padding-right: 1px; ">
  314. <div class="tableDiv bubbleInfo mt5">
  315. <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
  316. <thead>
  317. <tr>
  318. <th class=""> <div class="">商品名称</div> </th>
  319. <th class="w240 tc"> <div class="">单价/数量</div> </th>
  320. <th class="w160 tc"> <div class="">小计</div> </th>
  321. </tr>
  322. </thead>
  323. <tbody>
  324. {empty name="DetailsData"}
  325. <tr>
  326. <td class="no-data" align="center" axis="col0" colspan="50">
  327. <div class="">
  328. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  329. </div>
  330. </td>
  331. </tr>
  332. {else/}
  333. {foreach name="DetailsData" item="vo" key="k" }
  334. <tr class="order-empty"><td colspan="7"></td></tr>
  335. <tr class="order-empty">
  336. <td class="pl0">
  337. <div class="goods-detail pl0">
  338. <div class="goods-image"><img src="{$vo.litpic}"> </div>
  339. <div class="goods-info"> <p class="goods-title">{$vo.product_name}</p> <p class="goods-spec">{$vo.product_spec}</p> </div>
  340. </div>
  341. </td>
  342. <td class="tc"> <p>{empty name="$OrderData.points_shop_order"}¥{/empty}{$vo.product_price} x {$vo.num}</p> </td>
  343. <td class="tc"> <p>{empty name="$OrderData.points_shop_order"}¥{/empty}{$vo.subtotal}</p> </td>
  344. </tr>
  345. {/foreach}
  346. {/empty}
  347. </tbody>
  348. </table>
  349. </div>
  350. <div class="order-total">
  351. <div class="order-total-box">
  352. <div class="order-total-con">
  353. <div class="total-name"> 商品小计:</div>
  354. {empty name="$OrderData.points_shop_order"}
  355. <div class="total-value">¥{$OrderData.totalAmount}</div>
  356. {else/}
  357. <div class="total-value">{$OrderData.order_total_amount}</div>
  358. {/empty}
  359. </div>
  360. {notempty name="$OrderData.coupon_id"}
  361. <div class="order-total-con">
  362. <div class="total-name"> 优惠券: </div>
  363. <div class="total-value"> -¥{$OrderData.coupon_price} </div>
  364. </div>
  365. {/notempty}
  366. {eq name="$OrderData.order_source" value="10"}
  367. <div class="order-total-con">
  368. <div class="total-name"> 运费: </div>
  369. <div class="total-value"> ¥{$OrderData.shipping_fee} </div>
  370. </div>
  371. <div class="order-total-con actual-payment mt10">
  372. <div class="total-name"> 实付款: </div>
  373. <div class="total-value"> {empty name="$OrderData.points_shop_order"}¥{/empty}{$OrderData.order_amount} </div>
  374. </div>
  375. {/eq}
  376. {if condition="30 == $OrderData.order_source && $OrderData.pay_use_scores > 0"}
  377. <div class="order-total-con">
  378. <div class="total-name"> 积分兑换: </div>
  379. <div class="total-value">{$OrderData.pay_use_scores_num}积分 </div>
  380. </div>
  381. {/if}
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. {empty name='$iframe'}
  387. <div class="page pt0 mt10" style="min-width:auto;margin-left:100px;">
  388. {else /}
  389. <div class="page pt0 mt10" style="min-width: auto;">
  390. {/empty}
  391. <div class="flexigrid">
  392. <div class="mDiv"> <div class="ftitle"> <h3>订单日志</h3> </div> </div>
  393. <div class="hDiv" style="margin-top: 5px;">
  394. <div class="hDivBox">
  395. <table cellspacing="0" cellpadding="0" style="width: 100%">
  396. <thead>
  397. <tr>
  398. <th axis="col6"> <div class="tl text-l10">操作记录</div> </th>
  399. <th axis="col6" class="sign w210"> <div class="tc">操作人</div> </th>
  400. <th axis="col6" class="w210"> <div class="tc">操作时间</div> </th>
  401. </tr>
  402. </thead>
  403. </table>
  404. </div>
  405. </div>
  406. <div class="bDiv" style="height: auto;">
  407. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  408. <table style="width: 100%;">
  409. <tbody>
  410. {empty name="Action"}
  411. <tr>
  412. <td class="no-data" align="center" axis="col0" colspan="50">
  413. <div class="no_row"> <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div> </div>
  414. </td>
  415. </tr>
  416. {else/}
  417. {foreach name="Action" item="vo" key="k" }
  418. <tr>
  419. <td class="sort" style="width: 100%;"> <div class="tl text-l10"> {$vo.action_note} </div> </td>
  420. <td class="sort"> <div class="tc w210"> {$vo.action_users} </div> </td>
  421. <td class="sort"> <div class="tc w210"> {$vo.add_time|MyDate='Y-m-d H:i:s',###} </div> </td>
  422. </tr>
  423. {/foreach}
  424. {/empty}
  425. </tbody>
  426. </table>
  427. </div>
  428. <div class="iDiv" style="display: none;"></div>
  429. </div>
  430. </div>
  431. </div>
  432. <script type="text/javascript">
  433. $(document).ready(function(){
  434. // 表格行点击选中切换
  435. $('#flexigrid > table>tbody >tr').click(function(){
  436. $(this).toggleClass('trSelected');
  437. });
  438. });
  439. // 订单ID
  440. var order_id = {$OrderData.order_id};
  441. // 订单会员ID
  442. var users_id = {$OrderData.users_id};
  443. // 订单金额
  444. var order_amount = "{$OrderData.order_amount}";
  445. // 订单号复制
  446. function orderCopy() {
  447. var clipboard1 = new Clipboard(".order_code");
  448. clipboard1.on("success", function(e) {
  449. layer.msg("复制成功");
  450. });
  451. clipboard1.on("error", function(e) {
  452. layer.msg("复制失败!请手动复制", {icon: 5});
  453. });
  454. }
  455. // 弹出改价输入框
  456. function promptChangePrice() {
  457. layer.prompt({
  458. formType: 3,
  459. shade: layer_shade,
  460. move: false,
  461. title: '提示',
  462. id: 'orderChangePrice',
  463. btnAlign:'r',
  464. closeBtn: 3,
  465. btn: ['确定', '关闭'],
  466. success: function(layero, index) {
  467. $("#orderChangePrice").find('input').attr('placeholder', '请输入应付金额');
  468. $("#orderChangePrice").find('input').attr('value', order_amount);
  469. $("#orderChangePrice").find('input').attr('onkeyup', "this.value=this.value.replace(/[^\\d.]/g,'')");
  470. $("#orderChangePrice").find('input').attr('onpaste', "this.value=this.value.replace(/[^\\d.]/g,'')");
  471. var msg = '<span style="color: red;">改价后让买家重新进入订单列表点击支付</span>';
  472. $("#orderChangePrice").append(msg);
  473. // 修改订单金额后为保证支付金额准确有效<br/>请让买家刷新订单列表页后重新点击支付
  474. }
  475. }, function(price, index) {
  476. if (0 < price) {
  477. layer.close(index);
  478. orderChangePrice(price);
  479. } else {
  480. layer.msg('应付金额不允许为0', {time: 1500});
  481. }
  482. });
  483. }
  484. // 提交改价数据并追加一条订单操作记录
  485. function orderChangePrice(price) {
  486. if (0 >= price) layer.msg('应付金额不允许为0', {time: 1500});
  487. layer_loading('正在处理');
  488. $.ajax({
  489. type: 'post',
  490. url : "{:url('Shop/order_change_price')}",
  491. data: {order_id: order_id, order_amount: price, order_amount_old: order_amount, _ajax: 1},
  492. dataType: 'json',
  493. success: function(res) {
  494. layer.closeAll();
  495. if (1 == res.code) {
  496. layer.msg(res.msg, {time: 1500}, function() {
  497. window.location.reload();
  498. });
  499. } else {
  500. layer.alert(res.msg, {title: false, closeBtn: 0}, function() {
  501. window.location.reload();
  502. });
  503. }
  504. }
  505. });
  506. }
  507. // 订单发货
  508. function orderConfirmSend(obj) {
  509. var url = $(obj).attr('data-url');
  510. var iframes = layer.open({
  511. type: 2,
  512. title: '订单发货详情',
  513. fixed: true, //不固定
  514. shadeClose: false,
  515. shade: layer_shade,
  516. area: ['840px', '600px'],
  517. content: url
  518. });
  519. }
  520. // 订单操作
  521. function orderMark(status_name, order_id, users_id, admin_note, update_time) {
  522. if('yfk' == status_name) {
  523. var msg = '确认订单已付款?';
  524. } else if ('ysh' == status_name) {
  525. var msg = '确认订单已收货?';
  526. } else if ('gbdd' == status_name) {
  527. var msg = '确认关闭订单?';
  528. } else if ('ddbz' == status_name) {
  529. layer.prompt({
  530. formType: 2,
  531. shade: layer_shade,
  532. value: admin_note,
  533. title: '提示',
  534. closeBtn: 3,
  535. id: 'AdminNote',
  536. area: ['300px', '100px'],
  537. success: function(layero, index) {
  538. if (admin_note) {
  539. var msg = '<br/><span style="color: #999; font-size: 12px;">最后更新:'+update_time+'</span>';
  540. $("#AdminNote").append(msg);
  541. $(".layui-layer-content").css('text-align', 'left');
  542. }
  543. }
  544. }, function(value, index, elem) {
  545. OrderNote(order_id, value);
  546. layer.close(index);
  547. });
  548. return false;
  549. } else if ('sdtk' == status_name) {
  550. layer.prompt({
  551. formType: 2,
  552. shade: layer_shade,
  553. value: ' ',
  554. title: '提示',
  555. closeBtn: 3,
  556. id: 'manualRefund',
  557. btnAlign:'r',
  558. btn: ['关闭并退款', '取消'],
  559. area: ['300px', '120px'],
  560. success: function(layero, index) {
  561. $("#manualRefund").find('textarea').attr('placeholder', '请填写关闭订单原因(非必填)');
  562. var msg = '<span class="f-16 mb5" style="display: block;">是否关闭订单并自行手动退款</span><span class="red f-12">此操作系统不会自动退款,需手动线下退款</span><br/><br/>';
  563. $("#manualRefund").prepend(msg);
  564. $(".layui-layer-content").css('text-align', 'left');
  565. }
  566. }, function(value, index, elem) {
  567. // 手动关闭订单并退款
  568. manualRefund(order_id, value);
  569. layer.close(index);
  570. });
  571. return false;
  572. } else if ('ddsc' == status_name) {
  573. var msg = '确认删除订单?';
  574. }
  575. layer.confirm(msg, {
  576. shade: layer_shade,
  577. title: '提示',
  578. closeBtn: 3,
  579. btnAlign:'r',
  580. btn: ['确定','取消'],
  581. success: function () {
  582. $(".layui-layer-content").css('text-align', 'left');
  583. }
  584. }, function() {
  585. $.ajax({
  586. url: "{:url('Shop/order_mark_status')}",
  587. data: {order_id: order_id, status_name: status_name, users_id: users_id, _ajax: 1},
  588. type: 'post',
  589. dataType: 'json',
  590. success:function(res) {
  591. layer.closeAll();
  592. if (1 == res.code) {
  593. layer.msg(res.msg, {time: 1500}, function() {
  594. if ('ddsc' == status_name) {
  595. window.location.href = res.url;
  596. } else {
  597. window.location.reload();
  598. }
  599. });
  600. } else {
  601. layer.msg(res.msg, {time: 1500});
  602. }
  603. }
  604. });
  605. },function(index) {
  606. layer.closeAll(index);
  607. });
  608. }
  609. // 手动关闭订单并退款
  610. function manualRefund(order_id, refund_note) {
  611. $.ajax({
  612. url: "{:url('Shop/order_manual_refund')}",
  613. data: {order_id: order_id, refund_note: refund_note, _ajax: 1},
  614. type:'post',
  615. dataType:'json',
  616. success:function(res) {
  617. layer.closeAll();
  618. if (1 == res.code) {
  619. layer.msg(res.msg, {time: 1500}, function() {
  620. window.location.reload();
  621. });
  622. } else {
  623. layer.msg(res.msg, {time: 1500});
  624. }
  625. }
  626. });
  627. }
  628. // 订单更新收货地址
  629. function changeOrderAddress(obj) {
  630. var url = $(obj).attr('data-url');
  631. var iframes = layer.open({
  632. type: 2,
  633. title: '收货地址',
  634. fixed: true, //不固定
  635. shadeClose: false,
  636. shade: layer_shade,
  637. area: ['660px', '550px'],
  638. content: url
  639. });
  640. }
  641. function OrderVerify(order_id, users_id) {
  642. // 是否开启核销功能
  643. var openVerify = "{$weappInfo['data']['openVerify']|default=0}";
  644. if (0 === parseInt(openVerify)) {
  645. layer.alert('已关闭核销功能,核销订单将无法操作', {
  646. shade: layer_shade,
  647. area: ['480px', '190px'],
  648. move: false,
  649. title: '提示',
  650. btnAlign:'r',
  651. closeBtn: 3,
  652. success: function () {
  653. $(".layui-layer-content").css('text-align', 'left');
  654. }
  655. });
  656. return false;
  657. }
  658. // 是否开启后台二次核销
  659. var openSecondVerify = "{$weappInfo['data']['openSecondVerify']|default=0}";
  660. layer.confirm('核销后用户的核销凭证将失效,确认核销此单?', {
  661. shade: layer_shade,
  662. title: '提示',
  663. closeBtn: 3,
  664. btnAlign:'r',
  665. btn: ['确定','取消'],
  666. success: function () {
  667. $(".layui-layer-content").css('text-align', 'left');
  668. if (1 === parseInt(openSecondVerify)) {
  669. var html = '<div style="padding: 0 0 10px 20px; color: red;">请输入核销码二次验证:</div><input type="text" id="verify_code" style="margin-left: 20px; margin-bottom: 5px;" placeholder="请输入订单核销码"/></div>';
  670. $(".layui-layer-content").after(html);
  671. }
  672. }
  673. }, function() {
  674. var verify_code = 1 === parseInt(openSecondVerify) ? $("#verify_code").val() : '';
  675. if ('' == verify_code && 1 === parseInt(openSecondVerify)) {
  676. $('#verify_code').focus();
  677. return false;
  678. }
  679. layer_loading('正在处理');
  680. $.ajax({
  681. url: "{:url('Shop/verify')}",
  682. data: {order_id: order_id, verify_code: verify_code, users_id: users_id, _ajax: 1},
  683. type:'post',
  684. dataType:'json',
  685. success:function(res) {
  686. layer.closeAll();
  687. if (1 == res.code) {
  688. layer.msg(res.msg, {time: 1500},function(){
  689. window.location.reload();
  690. });
  691. } else {
  692. layer.msg(res.msg, {time: 1500});
  693. }
  694. }
  695. });
  696. }, function(index) {
  697. layer.closeAll(index);
  698. });
  699. }
  700. </script>
  701. {include file="public/footer" /}