Order_Detail.aspx 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/View.master" AutoEventWireup="true" CodeFile="Order_Detail.aspx.cs" Inherits="EOrder_Order_Detail" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
  3. <script src="../js/plugins/jquery.fileDownload.js"></script>
  4. <script type="text/javascript" src="../js/address.js"></script>
  5. <script type="text/javascript">
  6. var tradeData = null;
  7. var billData = null;
  8. var cashData = null;
  9. var orderData = null;
  10. var userPostCode = null;
  11. var logData = null;
  12. var afterMainData = null;
  13. var downUrl = "";
  14. function downloadBillClick(stype, id) {
  15. if (stype == '纸质发票') {
  16. fileDown(downUrl, "hexdata=" + id + "&ut=fp");
  17. }
  18. else {
  19. postAjax("get_erp_invoicing", "id=" + id, function (data) {
  20. console.log("downloadBillClick", data)
  21. if (data.data.length <= 0) {
  22. alert("查看发票失败");
  23. return;
  24. }
  25. else {
  26. var urlList = data.data.split(',');
  27. for (var c_url of urlList) {
  28. if (c_url.length > 0)
  29. openWaiWin("发票", c_url, 900, 700, null);
  30. }
  31. }
  32. });
  33. }
  34. }
  35. function downloadCashClick(tid) {
  36. }
  37. $(function () {
  38. if (tradeData != null && tradeData.length > 0) {
  39. var tData = tradeData[0];
  40. $("#detailMemo").html("备注:" + tData.seller_memo);
  41. $("#productId").html("商品id:" + tData.ProductName);
  42. var afhtml = "";
  43. if (tData.AfterSaleState > 0 && tData.status != "CLOSE") {
  44. if (tData.AfterSaleState == 4) {
  45. afhtml = "<div class='state_word' style=''>售后完成</div>"
  46. $("#detailAfterSaleState").html(afhtml);
  47. }
  48. else {
  49. afhtml = "<div class='state_word' style=''>售后中</div>"
  50. $("#detailAfterSaleState").html(afhtml);
  51. }
  52. if (userPostCode != 'Supplier') {
  53. $("#aftersaleReason").html(tData.AfterSaleReason);
  54. $("#aftersaleMethod").html(tData.AfterSaleMethod);
  55. }
  56. if (logData != null && logData.length > 0) {
  57. var ahtml = "";
  58. for (var item of logData) {
  59. ahtml += ("<div style=\"color: sandybrown;\"> ◆" + formatCommonDate(item.OperateTime) + "-" + item.UserName + "-" + item.Con + "</div>")
  60. }
  61. $("#aftersaleLog").html(ahtml);
  62. }
  63. }
  64. else if (tData.ctid.indexOf("S_") != -1) {
  65. var mainData = afterMainData[0];
  66. if (mainData.AfterSaleState == 4) {
  67. afhtml = "<div class='state_word' style=''>售后完成</div>"
  68. $("#detailAfterSaleState").html(afhtml);
  69. }
  70. else {
  71. afhtml = "<div class='state_word' style=''>售后中</div>"
  72. $("#detailAfterSaleState").html(afhtml);
  73. }
  74. if (userPostCode != 'Supplier') {
  75. $("#aftersaleReason").html(mainData.AfterSaleReason);
  76. $("#aftersaleMethod").html(mainData.AfterSaleMethod);
  77. }
  78. if (logData != null && logData.length > 0) {
  79. var ahtml = "";
  80. for (var item of logData) {
  81. ahtml += ("<div style=\"color: sandybrown;\"> ◆" + formatCommonDate(item.OperateTime) + "-" + item.UserName + "-" + item.Con + "</div>")
  82. }
  83. $("#aftersaleLog").html(ahtml);
  84. }
  85. }
  86. else {
  87. afhtml = "<div class='state_word' style=''>无售后</div>"
  88. $("#detailAfterSaleState").html(afhtml);
  89. }
  90. var ststr = (tData.staus == "NOT_SHIPPED" ? "待发货" : "已发货");
  91. $("#detailOrderState").html("<div class='state_word' style='background-color:#84C1FF;'>" + ststr + "</div>");
  92. $("#detailTid").html(tData.ctid);
  93. $("#detailPayTime").html(formatCommonDate(tData.pay_time));
  94. $("#detailBuyerNick").html(getWWurlByNick(tData.buyer_nick));
  95. $("#detailAddress").html(tData.receiver_state + tData.receiver_city + tData.receiver_district + tData.receiver_address);
  96. }
  97. if (billData != null && billData.length > 0) {
  98. var ahtml = "";
  99. for (var item of billData) {
  100. ahtml += ("<div style=\"width:23%;float:left;padding-right:10px; display:flex;flex-direction:column;\"><div>" + item.title + "</div><div>" + item.tax + "</div><div>" + item.payment + "</div></div>");
  101. ahtml += ("<div style=\"width:24%;float:left;display:flex;flex-direction:column;\"><div>" + item.UserName + "</div><div>" + formatCommonDate(item.createTime) + "</div></div>");
  102. ahtml += ("<div style=\"width:24%;float:left;\">" + getBillStateStrByState(item.state) + "</div>");
  103. ahtml += ("<div style=\"width:25%;float:left;\">" + "<a class=\"mini-button\" style='width:50px;height:25px;background-color:lightgreen;line-height:25px;' onclick=\"downloadBillClick('" + item.sendType + "'," + item.ID + ")\" >下载</a> " + "</div>");
  104. }
  105. $("#detailBillRecord").html(ahtml);
  106. }
  107. if (cashData != null && cashData.length > 0) {
  108. var ahtml = "";
  109. for (var item of cashData) {
  110. ahtml += ("<div style=\"width:14%; height:20px; float:left;display:flex;flex-direction:column;\">" + item.rtype + "</div>");
  111. ahtml += ("<div style=\"width:11%;height:20px; float:left;\">" + item.returnprice + "</div>");
  112. ahtml += ("<div style=\"width:36%;height:20px;float:left;display:flex;flex-direction:row;\"><div>" + item.applyUserName + "</div><div>" + formatCommonDate(item.created) + "</div></div>");
  113. ahtml += ("<div style=\"width:10%;height:20px;float:left;color:" + (item.cashstate == 2 ? "red" : "") + ";\">" + (item.cashstate == 0 ? "待审核" : (item.cashstate == 1 ? "已审核" : "已退回")) + "</div>");
  114. ahtml += ("<div style=\"width:28%;height:20px;float:left;color:" + (item.cashstate == 2 ? "red" : "") + ";\">" + item.backreason + "</div>");
  115. }
  116. $("#detailReturnRecord").html(ahtml);
  117. }
  118. if (orderData != null && orderData.length > 0) {
  119. var oData = orderData[0];
  120. $("#detailImg").attr("src", oData.pic_path);
  121. $("#detailTitle").html(oData.title);
  122. $("#detailNum").html(oData.num);
  123. $("#detailPrice").html(oData.price);
  124. }
  125. });
  126. </script>
  127. <style type="text/css">
  128. .win_tb {
  129. width: 96%;
  130. margin-left: auto;
  131. margin-right: auto;
  132. margin-top: 10px;
  133. background-color: #dedede;
  134. }
  135. .win_tb td {
  136. height: 36px;
  137. background-color: #fff;
  138. font-size: 14px;
  139. padding: 5px;
  140. }
  141. .win_tb input[type=text] {
  142. width: 90%;
  143. height: 24px;
  144. font-size: 14px;
  145. }
  146. .win_tb input[type=checkbox] {
  147. width: 18px;
  148. height: 18px;
  149. }
  150. .win_tb select {
  151. font-size: 14px;
  152. height: 30px;
  153. padding: 0px 5px;
  154. }
  155. .win_tb .td1 {
  156. color: #666;
  157. background-color: #F8F8F8;
  158. text-align: center;
  159. }
  160. .win_tb .td2 {
  161. }
  162. .word_tui {
  163. border-radius: 50%;
  164. background-color: red;
  165. color: white;
  166. font-size: 14px;
  167. text-align: center;
  168. padding: 3px;
  169. margin-left: 5px;
  170. }
  171. .word_shou {
  172. background-color: saddlebrown;
  173. }
  174. .word_green {
  175. background-color: forestgreen;
  176. }
  177. .state_word {
  178. width: 70px;
  179. text-align: center;
  180. padding: 3px 6px;
  181. text-align: center;
  182. font-weight: bold;
  183. color: white;
  184. background-color: forestgreen;
  185. }
  186. .mini-grid-cell-nowrap {
  187. overflow: hidden;
  188. /* white-space: nowrap;
  189. text-overflow: ellipsis; */
  190. word-break: keep-all;
  191. word-wrap: break-word;
  192. white-space: normal;
  193. }
  194. .mini-tab-text {
  195. padding: 4px;
  196. }
  197. .order-info {
  198. font-size: 14px;
  199. width: 98%;
  200. margin: 0px auto;
  201. }
  202. .order-info fieldset {
  203. border: solid 1px #dedede;
  204. padding: 3px;
  205. margin-bottom: 10px;
  206. color: #666;
  207. line-height: 25px;
  208. }
  209. .order-info-l {
  210. float: left;
  211. width: 60%;
  212. }
  213. .order-info-r {
  214. width: 38%;
  215. float: right;
  216. }
  217. .order-detail {
  218. font-size: 14px;
  219. width: 98%;
  220. margin: 0px auto;
  221. }
  222. .order-detail fieldset {
  223. border: solid 1px #dedede;
  224. padding: 3px;
  225. margin-bottom: 10px;
  226. color: #666;
  227. line-height: 25px;
  228. }
  229. .mini-tabs-scrollCt {
  230. border: 0px;
  231. margin-top: 5px;
  232. }
  233. /*.win_tb input{height:20px;}
  234. .win_tb .td1{height:35px;width:120px;font-size:12px;text-align:center;}
  235. .win_tb .td2{height:35px;width:280px;font-size:12pt;padding-left:5px;text-align:left;}*/
  236. </style>
  237. </asp:Content>
  238. <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
  239. <div id="tabs1" class="mini-tabs" activeindex="0" style="width: 100%; height: 580px;" plain="false">
  240. <div title="订单信息" style="width: 100%;">
  241. <div class="order-info">
  242. <div class="order-info-l">
  243. <fieldset>
  244. <legend>基本信息</legend>
  245. <div style="padding: 5px;" id="detailMemo"></div>
  246. <div style="padding: 5px;" id="productId"></div>
  247. </fieldset>
  248. <fieldset>
  249. <legend>发票信息</legend>
  250. <div style="padding: 5px;">
  251. <div style="display: flex; flex-direction: row; width: 100%; color: darkgray;">
  252. <div style="width: 25%;">发票信息</div>
  253. <div style="width: 25%;">申请信息</div>
  254. <div style="width: 25%;">状态</div>
  255. <div style="width: 25%;">下载</div>
  256. </div>
  257. <div id="detailBillRecord" style="display: block; width: 100%; margin-top: 6px;">
  258. </div>
  259. </div>
  260. </fieldset>
  261. <fieldset>
  262. <legend>返现信息</legend>
  263. <div style="padding: 5px;">
  264. <div style="display: flex; flex-direction: row; width: 100%; color: darkgray;">
  265. <div style="width: 19%;">类型</div>
  266. <div style="width: 15%;">金额</div>
  267. <div style="width: 25%;">申请信息</div>
  268. <div style="width: 15%;">状态</div>
  269. <div style="width: 25%;">退回原因</div>
  270. </div>
  271. <div id="detailReturnRecord" style="display: block; width: 100%; margin-top: 6px;">
  272. </div>
  273. </div>
  274. </fieldset>
  275. </div>
  276. <div class="order-info-r">
  277. <fieldset>
  278. <legend>售后信息</legend>
  279. <div style="padding: 5px;">
  280. <div class="back-tag" id="detailAfterSaleState"></div>
  281. <div>售后原因:<span style="color: red; font-weight: 600;" id="aftersaleReason"></span></div>
  282. <div>售后进度:</div>
  283. <div style="margin-left: 10px;" id="aftersaleLog">
  284. </div>
  285. <div>
  286. 处理结果:<span style="font-weight: 600;" id="aftersaleMethod"></span>
  287. </div>
  288. </div>
  289. </fieldset>
  290. </div>
  291. </div>
  292. </div>
  293. <div title="商品详情" iconcls="icon-cut">
  294. <div class="order-detail">
  295. <fieldset style="border: solid 1px #aaa; padding: 3px;">
  296. <legend>订单状态</legend>
  297. <div style="padding: 5px;">
  298. <div class="back-tag" id="detailOrderState"></div>
  299. <div>订单编号:<span style="font-weight: 600;" id="detailTid"></span></div>
  300. <div>成交时间:<span style="font-weight: 600;" id="detailPayTime"></span></div>
  301. <div>买家旺旺:<span style="font-weight: 600;" id="detailBuyerNick"></span></div>
  302. <div>收货地址:<span style="font-weight: 600;" id="detailAddress"></span></div>
  303. <%--<div style="background-color: lightblue; height: 30px; line-height: 30px;">买家留言:<span style="font-weight: 600;">阿斯顿发阿斯顿发阿斯顿发阿斯顿发阿斯顿发阿斯顿发阿斯顿发</span></div>--%>
  304. </div>
  305. </fieldset>
  306. <fieldset style="border: solid 1px #aaa; padding: 3px;">
  307. <legend>订单信息</legend>
  308. <div style="padding: 5px;">
  309. <table style="border: 1px solid gray; width: 100%;">
  310. <tr style="width: 100%;">
  311. <td style="width: 60%; background-color: lightblue; text-align: center;">宝贝</td>
  312. <td style="width: 10%; background-color: lightblue; margin-left: 10px; text-align: center;">数量</td>
  313. <td style="width: 10%; background-color: lightblue; margin-left: 10px; text-align: center;">总价</td>
  314. </tr>
  315. <tr style="width: 100%;">
  316. <td style="width: 60%;">
  317. <div style="display: flex; flex-direction: row; align-items: center;">
  318. <img style="width: 40px; height: 40px; padding: 5px; margin-right: 5px;" id="detailImg" />
  319. <div id="detailTitle"></div>
  320. </div>
  321. </td>
  322. <td style="width: 10%; text-align: center;" id="detailNum"></td>
  323. <td style="width: 10%; text-align: center;" id="detailPrice"></td>
  324. </tr>
  325. </table>
  326. </div>
  327. </fieldset>
  328. </div>
  329. </div>
  330. </div>
  331. <%-- <div id="iframe_win" class="mini-window" style="width: 800px; height: 500px; position: relative; display: none">
  332. <iframe id="urlIframe"></iframe>
  333. </div>--%>
  334. </asp:Content>