fullordertt.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <ul class="search">
  6. <li>
  7. 店铺名称:<select name="shop" class="select" style="width:90px">
  8. <option value="">请选择</option>
  9. {loop usershop() as $val}
  10. <option value="{$val['id']}">{$val['shopname']}</option>
  11. {/loop}</select>
  12. </li>
  13. <li>
  14. 订单类型:<select name="source" class="select" style="width:90px">
  15. <option value="">请选择</option>
  16. <option value="1">线下订单</option>
  17. <option value="2d">店内订单</option>
  18. </select>
  19. </li>
  20. <li>订单状态:<select name="state" class="select" style="width:90px">
  21. <option value="">请选择</option>
  22. {loop typeclass(29,2) as $val}
  23. <option value="{$val['id']}">{$val['spare']}</option>
  24. {/loop}
  25. <option value="283">null</option>
  26. </select>
  27. </li>
  28. <li>
  29. 审核状态:<select name="review" class="select" style="width:90px">
  30. <option value="">请选择</option>
  31. <option value="1">未送审</option>
  32. <option value="2">待审核</option>
  33. <option value="3">不通过</option>
  34. <option value="4">取消重审</option>
  35. <option value="5">审核通过</option>
  36. <option value="6">自动通过</option>
  37. </select>
  38. </li>
  39. <li>
  40. 发货仓库:<select name="warehouse" class="select" style="width:90px">
  41. <option value="">请选择</option>
  42. {loop warehouse(100) as $val}
  43. <option value="{$val['id']}">{$val['title']}</option>
  44. {/loop}</select>
  45. </li>
  46. <li>
  47. 快递公司:<select name="express" class="select" style="width:90px">
  48. <option value="">请选择</option>
  49. {loop express(100) as $val}
  50. <option value="{$val['id']}">{$val['servicename']}</option>
  51. {/loop}</select>
  52. </li>
  53. <li>订单号:<input value="" name="orderinfo" type="text" ></li>
  54. <li>编号:<input value="" name="number" type="text" ></li>
  55. <li>运单号:<input value="" name="waybill" type="text" ></li>
  56. <li>客户名称:<input value="" name="name" type="text" style="width:160px"></li>
  57. <li>邮箱:<input value="" name="email" type="text" style="width:200px"></li>
  58. <li>电话:<input value="" name="phone" type="text" style="width:100px"></li>
  59. <li>更新状态:<select name="dlz" class="select" style="width:90px">
  60. <option value="">请选择</option>
  61. <option value="0">未更新</option>
  62. <option value="1">更新成功</option>
  63. <option value="2">更新失败</option>
  64. <option value="3">不需要更新</option>
  65. </select>
  66. </li>
  67. <li>打印状态:<select name="print" class="select" style="width:90px">
  68. <option value="">请选择</option>
  69. <option value="1">不可打印</option>
  70. <option value="2">未打印</option>
  71. <option value="3">已打印</option>
  72. </select>
  73. </li>
  74. <li>发货状态:<select name="library" class="select" style="width:90px">
  75. <option value="">请选择</option>
  76. <option value="1">未出库</option>
  77. <option value="2">已出库</option>
  78. <option value="3">已退库</option>
  79. </select>
  80. </li>
  81. <li>出库确认:<select name="libraryconfirm" class="select" style="width:90px">
  82. <option value="">请选择</option>
  83. <option value="1">不允许出库</option>
  84. <option value="2">允许出库</option>
  85. </select>
  86. </li>
  87. <!--
  88. <li>
  89. 订单状态:<select name="state" class="select">
  90. <option value="">请选择</option>
  91. {loop typeclass(29) as $val}
  92. <option value="{$val['id']}">{$val['title']}</option>
  93. {/loop}</select>
  94. </li>
  95. -->
  96. <li>选择时间条件:<select name="xztime" class="select">
  97. <option value="dtime">订单时间</option>
  98. <option value="reviewtime">审核时间</option>
  99. <option value="printtime">打印时间</option>
  100. <option value="librarytime">出库时间</option>
  101. </select></li>
  102. <li><input id="timetk" value="{date('Y-m-d',time()-29*24*3600)} 0:00" name="timetk" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})" style="width:130px">
  103. 至&nbsp;&nbsp;&nbsp;&nbsp; <input id="timetj" value="{date('Y-m-d',time()+24*3600)} 0:00" name="timetj" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})" style="width:130px"></li>
  104. <input type="hidden" name="pl" value="" />
  105. <li><span>确 定</span></li>
  106. </ul>
  107. <div class="control">
  108. {if $power ==1}<a href="/fullorderexcel/">设置导出模板</a>{/if}
  109. <a href="javascript:void(0);" class="plcx">批量查询</a>
  110. <select name="fexcel" class="dcmb">
  111. <option value="">选择导出模板</option>
  112. {loop $fullorderexcel as $val}
  113. <option value="{$val['id']}">{$val['title']}</option>
  114. {/loop}</select>
  115. {if $userkz != 1}
  116. <select name="khexcel" class="dcmb">
  117. <option value="">选择导出客户信息</option>
  118. <option value="1">新老客户数量统计</option>
  119. <option value="2">老客户清单</option>
  120. <option value="3">新客户清单</option>
  121. <option value="4">老客户订单</option>
  122. <option value="5">新客户订单</option>
  123. </select>
  124. {/if}
  125. <select name="wlshop" class="dcmb dryd">
  126. <option value="">选择导入运单店铺</option>
  127. {loop usershop() as $val}
  128. <option value="{$val['id']}">{$val['shopname']}</option>
  129. {/loop}</select>
  130. <a href="javascript:void(0);" class="skuzh">SKU转换</a>
  131. <!-- <a href="/fullordertt/dqpm/">地区销售统计</a>-->
  132. <a href="javascript:void(0);" class="window" data-h="/customertt/newold" data-t="新老客户走势">新老客户走势</a>
  133. {if $error > 0}
  134. <a href="/fullordertt/error/" style="background-color:#F00">打印错误订单({$error})</a>
  135. {/if}
  136. {if $yc > 0}
  137. <a href="/fullordertt/yc/" style="background-color:#F00">异常取消订单({$yc})</a>
  138. {/if}
  139. <a href="javascript:void(0);" class="dcdxyz">导出多运单号订单</a>
  140. <a href="javascript:void(0);" class="thxz">导出退货订单</a>
  141. <a href="javascript:void(0);" class="pljzzd">批量禁止占单</a>
  142. </div>
  143. <table class="datatitle data" border="0" style="border-collapse:collapse;">
  144. <tr>
  145. <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
  146. <td>店铺名称</td>
  147. <td>发货仓库</td>
  148. <!--<td>订单类型</td>-->
  149. <!--<td>负责人</td>-->
  150. <td>订单号</td>
  151. <td>编号</td>
  152. <td>客户姓名</td>
  153. <td>电话</td>
  154. <td>订单状态</td>
  155. <td>订单时间</td>
  156. <!--<td>客户留言</td>-->
  157. <td>审核状态</td>
  158. <!--<td>打印状态</td>
  159. <td>出库状态</td>-->
  160. <td>物流方式</td>
  161. <td>运单号</td>
  162. <td>订单备注</td>
  163. <td>发货状态</td>
  164. <td>操作</td>
  165. </tr>
  166. </table>
  167. </div>
  168. <table class="datatext data" border="0" style="border-collapse:collapse;">
  169. </table>
  170. <div class="lbwlxq"></div>
  171. <div class="bomf"></div>
  172. </div>
  173. <div style="display:none;">
  174. <input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
  175. </div>
  176. <script>
  177. var dataurl = "/fullordertt"; var operate = "/fullordertt";var excel = "/fullorderexcel/excel/";var khexcel = "/fullordertt/khdd/";
  178. var customon = 1;
  179. function custom(){
  180. $(".data tr").each(function() {
  181. $(this).find('td:eq(0)').css("width","1%");
  182. $(this).find('td:eq(1)').css("width","5.5%");
  183. $(this).find('td:eq(2)').css("width","5%");
  184. $(this).find('td:eq(3)').css("width","5.5%");
  185. $(this).find('td:eq(4)').css("width","7%");
  186. $(this).find('td:eq(5)').css("width","7%");
  187. $(this).find('td:eq(6)').css("width","9%");
  188. $(this).find('td:eq(7)').css("width","4.5%");
  189. $(this).find('td:eq(8)').css("width","5%");
  190. $(this).find('td:eq(9)').css("width","4%");
  191. $(this).find('td:eq(10)').css("width","5%");
  192. $(this).find('td:eq(11)').css("width","6%");
  193. $(this).find('td:eq(12)').css("width","11%");
  194. $(this).find('td:eq(13)').css("width","5.5%");
  195. $(this).find('td:eq(14)').css("width","6%");
  196. $(this).find('td:eq(15)').css("width","6%");
  197. });}
  198. $(".datatext").on('mouseover mouseout',".method",function(event) {
  199. if (event.type === "mouseover") {
  200. $(this).parent().parent("td").append('<font style="position: absolute;z-index: 1;border-radius:3px;border: 1px solid #39F;padding:0 10px;background-color: #FFF;box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 24px;">'+$(this).data("t")+'</font>');
  201. }else if(event.type == "mouseout"){
  202. $(this).parent().siblings("font").remove();
  203. }
  204. });
  205. $(".data").on('mouseover',".lbwlxx",function() {
  206. var offset = $(this).offset();
  207. ///得到位置
  208. var left1 = offset.left + 20;
  209. ///得到位置
  210. var top1 = offset.top + 20;
  211. $(".lbwlxq").css({'top': top1, 'left': left1});
  212. $(".lbwlxx").mouseover(function(){
  213. $(".lbwlxq").html($(this).find('font').html());
  214. $(".lbwlxq").show();
  215. });
  216. $(".data").on('mouseout',".lbwlxx",function() {
  217. $(".lbwlxq").html("");
  218. $(".lbwlxq").hide();
  219. });
  220. });
  221. $(".dcdxyz").click(function() {
  222. window.location.href = dataurl+"/dcdxyz?timetk="+$("input[name='timetk']").val()+"&timetj="+$("input[name='timetj']").val();
  223. });
  224. $(".thxz").click(function() {
  225. window.location.href = dataurl+"/thxz?timetk="+$("input[name='timetk']").val()+"&timetj="+$("input[name='timetj']").val();
  226. });
  227. $(".skuzh").click(function() {
  228. if($(this).find("option:selected").val() != "")
  229. {
  230. var me = $(this);
  231. $("#upload-file").click();
  232. $("#upload-file").unbind("change");
  233. $("#upload-file").bind("change",function(){
  234. uploadFileskuzh(me);
  235. layx.load('loadId','导入中,请稍后',{shadable:0.6});
  236. });
  237. }
  238. });
  239. function uploadFileskuzh(me){
  240. var file = document.getElementById("upload-file").files[0];
  241. var data = new FormData();
  242. data.append("userfile",file);
  243. $.ajax({
  244. data : data,
  245. type : "POST",
  246. url : "/fullorderexcel/skuzh",
  247. timeout: 1200000,
  248. cache : false,
  249. contentType : false,
  250. processData : false,
  251. dataType:"json",
  252. success: function(a) {
  253. layx.destroy('loadId');
  254. if (a && a.success) {
  255. if(a.error == 1)
  256. {
  257. layx.confirm('完成',a.msg,null,{
  258. buttons:[
  259. {
  260. label:'下载信息',
  261. callback:function(id, button, event){
  262. window.location.href = a.error;
  263. layx.destroy(id);
  264. }
  265. }
  266. ],dialogIcon:'success',shadable:0.6
  267. });
  268. }
  269. else
  270. {
  271. layx.confirm('完成',a.msg,null,{
  272. buttons:[
  273. {
  274. label:'下载信息',
  275. callback:function(id, button, event){
  276. window.location.href = a.error;
  277. layx.destroy(id);
  278. }
  279. }
  280. ],dialogIcon:'success',shadable:0.6
  281. });
  282. }
  283. } else {
  284. layx.confirm('完成',a.msg,null,{
  285. buttons:[
  286. {
  287. label:'下载信息',
  288. callback:function(id, button, event){
  289. window.location.href = a.error;
  290. layx.destroy(id);
  291. }
  292. }
  293. ],dialogIcon:'success',shadable:0.6
  294. });
  295. }
  296. },
  297. error: function (XMLHttpRequest,textStatus) {
  298. console.log(XMLHttpRequest); //XMLHttpRequest.responseText XMLHttpRequest.status XMLHttpRequest.readyState
  299. console.log(textStatus);
  300. $(".express").hide();
  301. layx.alert('错误','请求超时!请查看是否成功!',function(id,button){
  302. $(".search span").click();
  303. },{dialogIcon:'error'});
  304. },
  305. });
  306. }
  307. $(".pljzzd").click(function() {
  308. var a = "";
  309. $(".datatext input[name='check']:checked").each(function() {
  310. a = a + $(this).val()+",";
  311. });
  312. if (a) {
  313. layx.confirm('确认','是否确认禁止占单操作?',function(id)
  314. {
  315. pljzzddata()
  316. layx.destroy(id);
  317. });
  318. }
  319. else
  320. {
  321. layx.alert('提示','请勾选需要禁止占单的内容!',null,{ dialogIcon:'warn' } );
  322. }
  323. });
  324. //批量删除
  325. function pljzzddata() {
  326. $(".express").hide();
  327. layx.load('loadId','处理中');
  328. var a = "";
  329. $(".datatext input[name='check']:checked").each(function() {
  330. a = a + $(this).val()+",";
  331. });
  332. $.ajax({
  333. url: dataurl+"/pljzzd",
  334. data: "s=" + a,
  335. type: "POST",
  336. dataType: "json",
  337. success: function(c) {
  338. layx.destroy('loadId');
  339. if (c && c.success) {
  340. layx.alert('提示',c.msg,null,{dialogIcon:'success'});
  341. $.each(c.del,function(f,b){ $("#"+b).hide()});
  342. return false;
  343. } else {
  344. $(".ts p").html(c.msg);
  345. $(".ts").fadeIn();
  346. setTimeout('$(".ts").fadeOut()', 900);
  347. return false;
  348. }
  349. }
  350. });
  351. };
  352. </script>
  353. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  354. {Template footer}