fullorderout_edit.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. {Template header}
  2. <style type="text/css">
  3. .calendar{POSITION:absolute;}
  4. </style>
  5. <body>
  6. <div class="warp">
  7. <div class="title"></div>
  8. <div class="packing">
  9. <table class="datatext data" border="0" style="border-collapse:collapse;">
  10. {loop $fpdata as $x=>$val}
  11. <tr data-list="{$val['0']}">
  12. <td height="100">
  13. <p>{$val['1']}</p>
  14. <p><em>{if $val['2'] == '0'}
  15. <font data-id='0'></font>
  16. <font class='fuoutcz fuout fuout1' data-id='1' data-w='{$val['w']}' data-x='{$x}'>加入库存</font>
  17. <font class='fuoutcz fuout fuout2' data-id='2' data-w='{$val['w']}' data-x='{$x}'>退回国内</font>
  18. <font class='fuoutcz fuout fuout3' data-id='3' data-w='{$val['w']}' data-x='{$x}'>美仓销售</font>
  19. <font class='fuoutcz fuout fuout4' data-id='4' data-w='{$val['w']}' data-x='{$x}'>货物错误</font>
  20. {else if $val['2'] == '1'}
  21. <font class='fuout fuout1' data-id='1'>加入库存</font>
  22. {else if $val['2'] == '2'}
  23. <font class='fuout fuout2' data-id='2'>退回国内</font>
  24. {else if $val['2'] == '3'}
  25. <font class='fuout fuout3' data-id='3'>美仓销售</font>
  26. {else if $val['2'] == '4'}
  27. <font class='fuout fuout4' data-id='4'>货物错误</font>
  28. {else if $val['2'] == '5'}
  29. <font class='fuout fuout5' data-id='5'>待入库存</font>
  30. {/if}
  31. </em>
  32. <input value="{$val['3']}" name="val3" type="text" placeholder="货物状态及状态描述" class="fuloutinput">
  33. </p>
  34. </td>
  35. <td class="none"></td>
  36. <td class="none">{$val['4']}</td>
  37. <td class="none">CNY</td>
  38. <td class="none">{$val['5']}</td>
  39. <td class="none">{$val['6']}</td>
  40. <td class="none">{$val['7']}</td>
  41. <td class="none">{$val['8']}</td>
  42. <td class="none">{if isset($val['9'])}{$val['9']}{else}0{/if}</td>
  43. <th></th>
  44. </tr>
  45. {/loop}
  46. </table>
  47. </div>
  48. <ul class="setting">
  49. <li class="need">
  50. <em>退件物流方式:</em>
  51. <select name="thexpress" class="select class">
  52. <option value="" {if $fullorder['thexpress'] == ''}selected="selected"{/if}>请选择</option>
  53. <option value="USPS" {if $fullorder['thexpress'] == 'USPS'}selected="selected"{/if}>USPS</option>
  54. <option value="UPS" {if $fullorder['thexpress'] == 'UPS'}selected="selected"{/if}>UPS</option>
  55. <option value="Fedex" {if $fullorder['thexpress'] == 'Fedex'}selected="selected"{/if}>Fedex</option>
  56. <option value="DHL" {if $fullorder['thexpress'] == 'DHL'}selected="selected"{/if}>DHL</option>
  57. <option value="Royal Mail" {if $fullorder['thexpress'] == 'Royal Mail'}selected="selected"{/if}>Royal Mail</option>
  58. <option value="Canada Post" {if $fullorder['thexpress'] == 'Canada Post'}selected="selected"{/if}>Canada Post</option>
  59. <option value="France Post" {if $fullorder['thexpress'] == 'France Post'}selected="selected"{/if}>France Post</option>
  60. <option value="Germany Post" {if $fullorder['thexpress'] == 'Germany Post'}selected="selected"{/if}>Germany Post</option>
  61. <option value="Australia Post" {if $fullorder['thexpress'] == 'Australia Post'}selected="selected"{/if}>Australia Post</option>
  62. <option value="TNT" {if $fullorder['thexpress'] == 'TNT'}selected="selected"{/if}>TNT</option>
  63. <option value="邮政" {if $fullorder['thexpress'] == '邮政'}selected="selected"{/if}>邮政</option>
  64. <option value="其它" {if $fullorder['thexpress'] == '其它'}selected="selected"{/if}>其它</option>
  65. </select>
  66. </li>
  67. <li class="need">
  68. <em>退回运单号:</em>
  69. <input value="{$fullorder['torderinfo']}" name="torderinfo" type="text" placeholder="输入或点击后扫码" >
  70. </li>
  71. <li class="length need" style="padding-bottom:15px;">
  72. <em>详情:</em>
  73. <textarea name="content" style="height: 120px;">{$fullorder['content']}</textarea>
  74. </li>
  75. <li>
  76. <em>退货登记时间:</em>
  77. <b>{date('Y-m-d H:i:s',$fullorder['stime'])}</b>
  78. </li>
  79. <li>
  80. </li>
  81. <li>
  82. <em>店铺:</em>
  83. <b>{$shop}</b>
  84. </li>
  85. <li>
  86. <em>运单号:</em>
  87. <b>{$fullorder['waybill']}</b>
  88. </li>
  89. <li>
  90. <em>订单号:</em>
  91. <b class="orderinfo">{$fullorder['orderinfo']}</b>
  92. </li>
  93. <li>
  94. <em>编号:</em>
  95. <b>{$fullorder['number']}</b>
  96. </li>
  97. <li>
  98. <em>邮箱:</em>
  99. <b>{$fullorder['email']}</b>
  100. </li>
  101. <li>
  102. <em>国家:</em>
  103. <b>{$country}</b>
  104. </li>
  105. <li>
  106. <em>联系方式:</em>
  107. <b>{$fullorder['country']}</b>
  108. </li>
  109. <li>
  110. <em>省州:</em>
  111. <b>{$fullorder['province']}</b>
  112. </li>
  113. <li>
  114. <em>公司名:</em>
  115. <b>{$fullorder['client']}</b>
  116. </li>
  117. <li>
  118. <em>城市:</em>
  119. <b>{$fullorder['city']}</b>
  120. </li>
  121. <li>
  122. <em>收货人姓名:</em>
  123. <b>{$fullorder['name']}</b>
  124. </li>
  125. <li>
  126. <em>邮编:</em>
  127. <b>{$fullorder['zipcode']}</b>
  128. </li>
  129. <li class="length">
  130. <em>地址2:</em>
  131. <b>{$fullorder['address2']}</b>
  132. </li>
  133. <li class="length">
  134. <em>地址:</em>
  135. <b>{$fullorder['address']}</b>
  136. </li>
  137. <li>
  138. <em>出库时间:</em>
  139. <b>
  140. {if $fullorder['librarytime'] != 0}{date('Y-m-d H:i',$fullorder['librarytime'])}{else}无{/if}
  141. </b>
  142. </li>
  143. <li>
  144. <em>扫描时间:</em>
  145. <b>
  146. {$fullorder['stime']}
  147. </b>
  148. </li>
  149. <div style="clear:both;"></div>
  150. </ul>
  151. </div>
  152. <div class="need"><input type="hidden" name="id" value="{$fullorder['id']}" />
  153. <input type="hidden" name="number" value="{$fullorder['number']}" />
  154. <div class="button"><font class="fullorderdata123">提 交</font> <font class="fh">关 闭</font></div>
  155. </div>
  156. <div class="zm none"></div>
  157. <script type="text/javascript">var addedit="/fullorderout/edit/";var fh="/fullorderout";
  158. $(".datatext .fuoutcz").click(function() {
  159. $(".express p:eq(0)").html("是否确定执行'"+$(this).html()+"'操作?操作后将无法撤回");
  160. $(".express p:eq(1)").html("<font class='tjfout' data-czid='"+$(this).data("id")+"' data-whlabel='"+$(this).data("w")+"' data-x='"+$(this).data("x")+"'>确 定</font><font class='esc'>取 消</font>");
  161. $(".express").show();
  162. });
  163. function custom() {
  164. var num = $('.packing .datatitle tr').children().length;
  165. $('.data tr td').css("width","5%");
  166. $(".data tr").each(function() {
  167. $(this).find('td:eq(0)').css("width","30%");
  168. });}
  169. $(".fullorderdata123").click(function() {
  170. var f = "";
  171. var e = "";
  172. var w = "";
  173. var fpcount = "";
  174. $(".need .select").each(function() {
  175. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  176. });
  177. $(".need input:text").each(function() {
  178. var str = $(this).val().replace(/\+/g,"%2B");
  179. var str = str.replace(/&/g,"%26");
  180. f = f + $(this).attr("name") + "=" + str + "&";
  181. });
  182. $(".need input:hidden").each(function() {
  183. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  184. });
  185. $(".need textarea").each(function() {
  186. var str2 = $(this).val().replace(/\+/g,"%2B");
  187. var str2 = str2.replace(/&/g,"%26");
  188. f = f + $(this).attr("name") + "=" + str2 + "&";
  189. });
  190. var tdweight = 0;
  191. $(".datatext tr").each(function() {
  192. var cc = "";var listqc = "";var data = "";var t = "";var fpdg = "";
  193. var td0 = $(this).find("td:eq(0)").text().replace(/\+/g,"%2B");
  194. var td0 = td0.replace(/&/g,"%26");
  195. var td8 = '';
  196. if($(this).find("td:eq(8)").length > 0)
  197. {
  198. if($(this).find("td:eq(8)").text() == '')
  199. {
  200. td8 = '0';
  201. }
  202. else
  203. {
  204. td8 = $(this).find("td:eq(8)").text();
  205. }
  206. }
  207. else
  208. {
  209. td8 = '0';
  210. }
  211. e = e + $(this).attr("data-list")+ "|" + td0 + "|" + $(this).find("td:eq(0)").find("em font").data("id") + "|" + $(this).find("input").val() + "|" + $(this).find("td:eq(3)").text() + "|" + $(this).find("td:eq(5)").text() + "|" + $(this).find("td:eq(6)").text() + "|" + $(this).find("td:eq(7)").text() + "|" + td8 + "|" + $(this).find("td:eq(9)").text() + ";";
  212. tdweight = tdweight + td8*1;
  213. var list = $(this).attr("data-list").replace(/\-(0|163|164|165|166)\-/,'-');
  214. cc = list.split(",");
  215. listqc = list.replace(/\d{1,3}\,/,'');
  216. listqc = listqc.substring(0,listqc.length-1);
  217. data = listqc.split("-");
  218. for(i=1;i<data.length;i++)
  219. {
  220. if(i == 2)
  221. {
  222. if(cc[0] != list)
  223. {
  224. t = t +data[i] + cc[0];
  225. fpdg = fpdg + '-' + data[i] + '-' + cc[0];
  226. }
  227. else
  228. {
  229. t = t +data[i];
  230. fpdg = fpdg + '-' + data[i];
  231. }
  232. }
  233. else
  234. {
  235. t = t +data[i];
  236. fpdg = fpdg + '-' + data[i];
  237. }
  238. }
  239. w = w + t + '-' + $(this).find("td:eq(0)").find("em font").data("id") + '-' + $(this).find("td:eq(8)").text() + '|';
  240. fpcount = fpcount + fpdg + '-|';
  241. });
  242. f = f + "jweight=" + tdweight + "&";
  243. e = e.replace(/(有可用特殊库存|已选择特殊库存|加入库存退回国内美仓销售货物错误|加入库存|退回国内|美仓销售|货物错误|待入库存)/g,'');
  244. e = e.replace(/( |\s)/g,'_');
  245. f = f + "whlabel=|" + w + "&fpdata=" + encodeURI(e) + "&";
  246. f = f + "fpcount=" + fpcount + "&";
  247. f = f + "budget=" + $(".budget").text() + "&";
  248. var ab = 0;
  249. $(".need .must").each(function() {
  250. if ($.trim($(this).val()).length == 0) {
  251. $(this).css("border", "1px solid #F66");
  252. ab = ab + 1;
  253. }
  254. });
  255. if (ab > 0) {
  256. $(".ts p").text("红框为必填项");
  257. $(".ts").show();
  258. setTimeout('$(".ts").fadeOut()', 600);
  259. return false;
  260. }
  261. //限制必须提交产品详细列表
  262. if (e == '') {
  263. $(".ts p").text("必须添加订单详细信息!");
  264. $(".ts").show();
  265. setTimeout('$(".ts").fadeOut()', 800);
  266. return false;
  267. }
  268. else
  269. {
  270. /**
  271. if($("select[name=warehouse]").find("option:selected").val() == "5" || $("select[name=warehouse]").find("option:selected").val() == "6")
  272. {
  273. var yzdata = {
  274. warehouse: $("select[name=warehouse]").find("option:selected").val(),
  275. shop: $("input[name=shop]").val(),
  276. id: $("input[name=id]").val(),
  277. whlabel: "|" + w
  278. };
  279. $.ajax({
  280. url: "/whlabel/kcyz/",
  281. data: yzdata,
  282. type: "POST",
  283. dataType: "json",
  284. success: function(a) {
  285. if (a && a.success) {
  286. zttj(f);
  287. } else {
  288. if(a.t == 1)
  289. {
  290. layx.alert('错误',a.msg,function(id,button){
  291. },{dialogIcon:'error'});
  292. }
  293. else
  294. {
  295. layx.alert('错误',a.msg,function(id,button){
  296. },{dialogIcon:'error'});
  297. for(i=0;i<a.error.length;i++)
  298. {
  299. $(".datatext tr:eq("+a.error[i]+") td:eq(0)").css("color","red");
  300. }
  301. }
  302. }
  303. }
  304. });
  305. }
  306. else
  307. {
  308. zttj(f);
  309. }
  310. **/
  311. zttj(f);
  312. }
  313. });
  314. </script>
  315. <script src="{$theme}js/fullorder-addedit.js?v=202003200001"></script>
  316. <script type="text/javascript" src="{$theme}js/time.js"></script>
  317. {Template footer}