99057f10db7a8420345fac848d27e342.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_W['attachurl_remote']); ?>',
  31. 'module': {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie': {'pre': ''},
  33. 'account': <?php echo json_encode($_W['account']);?>,
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style type="text/css">
  45. .img-40 {
  46. width: 40px;
  47. height: 40px;
  48. }
  49. </style>
  50. </head>
  51. <body layadmin-themealias="default">
  52. <div class="layui-fluid">
  53. <div class="layui-card">
  54. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">配送单设置</span></div>
  55. <div class="layui-card-body" style="padding:15px;">
  56. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  57. <div class="layui-form-item">
  58. <label class="layui-form-label">统计范围:</label>
  59. <div class="layui-input-block ">
  60. <input type="checkbox" lay-skin="primary" name="parameter[is_delivery_add]" class="form-control valid" <?php if( !empty($data) && $data['is_delivery_add'] ==1 ){ ?>checked<?php } ?> value="1" title="快递的订单" />
  61. <br/>
  62. <div class="layui-form-mid layui-word-aux">
  63. 勾选后,生成配送单时,将统计该团长下快递类型的订单
  64. </div>
  65. </div>
  66. </div>
  67. <div class="layui-form-item">
  68. <label class="layui-form-label">拖动排序:</label>
  69. <div class="layui-input-block">
  70. <p style="padding: 8px 0;font-weight: bold;">导出相关订单表格:</p>
  71. <div class="multi-img-details">
  72. <?php $i=1; ?>
  73. <?php foreach( $columns as $key => $val ){ ?>
  74. <label class="move_item">
  75. <input type="checkbox" lay-ignore name="order_index" value="<?php echo ($val['field']); ?>" class="item_input" <?php if( $val['is_check'] ==1 ){ ?>checked<?php } ?> title="" /><?php echo $val['title']; ?>&nbsp;&nbsp;&nbsp;&nbsp;
  76. </label>
  77. <?php if( $i % 8 == 0 ) { echo '<br/><br/>'; } $i++; ?>
  78. <?php } ?>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="layui-form-item">
  83. <label class="layui-form-label">导出商品总单范围:</label>
  84. <div class="layui-input-block ">
  85. <input type="checkbox" lay-skin="primary" name="parameter[is_export_deliverygoods_category]" class="form-control valid" <?php if( !empty($data) && $data['is_export_deliverygoods_category'] ==1 ){ ?>checked<?php } ?> value="1" title="导出商品分类" />
  86. <input type="checkbox" lay-skin="primary" name="parameter[is_export_deliverygoods_supply]" class="form-control valid" <?php if( !empty($data) && $data['is_export_deliverygoods_supply'] ==1 ){ ?>checked<?php } ?> value="1" title="导出商品所属供应商" />
  87. <br/>
  88. <div class="layui-form-mid layui-word-aux">
  89. 配送单管理 - 导出商品总单 -是否打印 商品分类,商品所属供应商
  90. </div>
  91. </div>
  92. </div>
  93. <div class="layui-form-item">
  94. <label class="layui-form-label"> </label>
  95. <div class="layui-input-block">
  96. <input type="hidden" name="modify_explode_arr" id="modify_explode_arr" value="" />
  97. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  98. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  99. </div>
  100. </div>
  101. </form>
  102. </div>
  103. </div>
  104. </div>
  105. <script src="/layuiadmin/layui/layui.js"></script>
  106. <script type="text/javascript" src="/static/js/jquery-migrate-1.1.1.js"></script>
  107. <script src="/static/js/jquery-ui.min.js"></script>
  108. <script>
  109. layui.config({
  110. base: '/layuiadmin/' //静态资源所在路径
  111. }).extend({
  112. index: 'lib/index' //主入口模块
  113. }).use('index');
  114. </script>
  115. <script>
  116. var layer = layui.layer;
  117. var $;
  118. layui.use(['jquery', 'layer', 'form'], function(){
  119. $ = layui.$;
  120. var form = layui.form;
  121. $('#clerk_allprint,#clerk_allprint_order').click(function(){
  122. var searchtime = $('#searchtime').val();
  123. var start = $('input[name="time[start]"]').val();
  124. var end = $('input[name="time[end]"]').val();
  125. var s_url= $(this).attr('data-href');
  126. s_url += '&searchtime='+searchtime+"&start="+start+"&end="+end;
  127. window.open(s_url);
  128. //console.log( start );
  129. //console.log(searchtime);
  130. //name="time[start]"
  131. //time[end]
  132. })
  133. $('.deldom').click(function(){
  134. var s_url = $(this).attr('data-href');
  135. layer.confirm($(this).attr('data-confirm'), function(index){
  136. $.ajax({
  137. url:s_url,
  138. type:'post',
  139. dataType:'json',
  140. success:function(info){
  141. if(info.status == 0)
  142. {
  143. layer.msg(info.result.message,{icon: 1,time: 2000});
  144. }else if(info.status == 1){
  145. var go_url = location.href;
  146. if( info.result.hasOwnProperty("url") )
  147. {
  148. go_url = info.result.url;
  149. }
  150. layer.msg('操作成功',{time: 1000,
  151. end:function(){
  152. location.href = info.result.url;
  153. }
  154. });
  155. }
  156. }
  157. })
  158. });
  159. })
  160. $('.btn-operation').click(function(){
  161. var ids_arr = [];
  162. var obj = $(this);
  163. var s_toggle = $(this).attr('data-toggle');
  164. var s_url = $(this).attr('data-href');
  165. $("input[name=item_checkbox]").each(function() {
  166. if( $(this).prop('checked') )
  167. {
  168. ids_arr.push( $(this).val() );
  169. }
  170. })
  171. if(ids_arr.length < 1)
  172. {
  173. layer.msg('请选择要操作的内容');
  174. }else{
  175. var can_sub = true;
  176. if( s_toggle == 'batch-remove' )
  177. {
  178. can_sub = false;
  179. layer.confirm($(obj).attr('data-confirm'), function(index){
  180. $.ajax({
  181. url:s_url,
  182. type:'post',
  183. dataType:'json',
  184. data:{ids:ids_arr},
  185. success:function(info){
  186. if(info.status == 0)
  187. {
  188. layer.msg(info.result.message,{icon: 1,time: 2000});
  189. }else if(info.status == 1){
  190. var go_url = location.href;
  191. if( info.result.hasOwnProperty("url") )
  192. {
  193. go_url = info.result.url;
  194. }
  195. layer.msg('操作成功',{time: 1000,
  196. end:function(){
  197. location.href = info.result.url;
  198. }
  199. });
  200. }
  201. }
  202. })
  203. });
  204. }else{
  205. $.ajax({
  206. url:s_url,
  207. type:'post',
  208. dataType:'json',
  209. data:{ids:ids_arr},
  210. success:function(info){
  211. if(info.status == 0)
  212. {
  213. layer.msg(info.result.message,{icon: 1,time: 2000});
  214. }else if(info.status == 1){
  215. var go_url = location.href;
  216. if( info.result.hasOwnProperty("url") )
  217. {
  218. go_url = info.result.url;
  219. }
  220. layer.msg('操作成功',{time: 1000,
  221. end:function(){
  222. location.href = info.result.url;
  223. }
  224. });
  225. }
  226. }
  227. })
  228. }
  229. }
  230. })
  231. form.on('switch(statewsitch)', function(data){
  232. var s_url = $(this).attr('data-href')
  233. var s_value = 1;
  234. if(data.elem.checked)
  235. {
  236. s_value = 1;
  237. }else{
  238. s_value = 0;
  239. }
  240. $.ajax({
  241. url:s_url,
  242. type:'post',
  243. dataType:'json',
  244. data:{value:s_value},
  245. success:function(info){
  246. if(info.status == 0)
  247. {
  248. layer.msg(info.result.message,{icon: 1,time: 2000});
  249. }else if(info.status == 1){
  250. var go_url = location.href;
  251. if( info.result.hasOwnProperty("url") )
  252. {
  253. go_url = info.result.url;
  254. }
  255. layer.msg('操作成功',{time: 1000,
  256. end:function(){
  257. location.href = info.result.url;
  258. }
  259. });
  260. }
  261. }
  262. })
  263. });
  264. form.on('checkbox(checkboxall)', function(data){
  265. if(data.elem.checked)
  266. {
  267. $("input[name=item_checkbox]").each(function() {
  268. $(this).prop("checked", true);
  269. });
  270. $("input[name=checkall]").each(function() {
  271. $(this).prop("checked", true);
  272. });
  273. }else{
  274. $("input[name=item_checkbox]").each(function() {
  275. $(this).prop("checked", false);
  276. });
  277. $("input[name=checkall]").each(function() {
  278. $(this).prop("checked", false);
  279. });
  280. }
  281. form.render('checkbox');
  282. });
  283. //监听提交
  284. form.on('submit(formDemo)', function(data){
  285. var arr_box = [];
  286. $('.item_input').each(function() {
  287. if( $(this).is(':checked') ) {
  288. arr_box.push($(this).val());
  289. }
  290. });
  291. data.field.modify_explode_arr = arr_box;
  292. $.ajax({
  293. url: data.form.action,
  294. type: data.form.method,
  295. data: data.field,
  296. dataType:'json',
  297. success: function (info) {
  298. if(info.status == 0)
  299. {
  300. layer.msg(info.result.message,{icon: 1,time: 2000});
  301. }else if(info.status == 1){
  302. var go_url = location.href;
  303. if( info.result.hasOwnProperty("url") )
  304. {
  305. go_url = info.result.url;
  306. }
  307. layer.msg('操作成功',{time: 1000,
  308. end:function(){
  309. location.href = info.result.url;
  310. }
  311. });
  312. }
  313. }
  314. });
  315. return false;
  316. });
  317. })
  318. </script>
  319. <script>
  320. $(function () {
  321. // 拖拽时开始滚动的间距
  322. var scrollingSensitivity = 20
  323. // 拖拽时滚动速度
  324. let scrollingSpeed = 20
  325. // 拖拽前的父级节点
  326. let dragBeforeParentNode = null
  327. // 初始化拖拽函数
  328. $('.multi-img-details').sortable({
  329. // 自适应placeholder的大小
  330. forceHelperSize: true,
  331. // 拖拽时的鼠标形状
  332. cursor: '-webkit-grabbing',
  333. // 拖拽的父级节点(该节点一定要注意,配置错误会导致当前屏幕外的元素没法自动滚动拖拽,两列之间拖拽的滚动也会出问题)
  334. appendTo: '.layui-form-item',
  335. // 拖拽时的倾斜度
  336. rotate: '5deg',
  337. // 延迟时间(毫秒),避免和click同时操作时出现的冲突
  338. delay: 0,
  339. // 拖拽到边框出现滚动的间距,
  340. scrollSensitivity: scrollingSensitivity,
  341. // 应用于拖拽空白区域的样式
  342. placeholder: 'portlet-placeholder ui-state-highlight',
  343. // 允许拖拽预留空白区域
  344. forcePlaceholderSize: false,
  345. // 多个列表之间的拖拽的dom元素
  346. connectWith: '.multi-img-details',
  347. // 鼠标到区域则填充
  348. tolerance: "pointer",
  349. // 可以拖拽的项
  350. items: '.move_item',
  351. // 填充动画
  352. revert: 0,
  353. // 拖拽结束函数
  354. stop: (e, ui) => {
  355. // 当前拽入的元素
  356. let item = $(ui.item)
  357. // 当前拽入元素的下标
  358. let index = item.index()
  359. let kid = ''
  360. // xxxx 这里面可以操作数据更新
  361. },
  362. // 开始拖拽时的函数
  363. start: (e, ui) => {
  364. // 拖拽前的父级节点
  365. dragBeforeParentNode = ui.item[0].parentNode
  366. // 让placeholder和源高度一致
  367. ui.helper.addClass('item').width(110)
  368. // xxxx 这里可以记录一些拖拽前的元素属性
  369. },
  370. // 处理两列滚动条问题
  371. sort: function (event, ui) {
  372. var scrollContainer = ui.placeholder[0].parentNode
  373. // 设置拽入的列表的滚动位置
  374. var overflowOffset = $(scrollContainer).offset()
  375. if ((overflowOffset.top + scrollContainer.offsetHeight) - event.pageY <
  376. scrollingSensitivity) {
  377. scrollContainer.scrollTop = scrollContainer.scrollTop + scrollingSpeed
  378. } else if (event.pageY - overflowOffset.top < scrollingSensitivity) {
  379. scrollContainer.scrollTop = scrollContainer.scrollTop - scrollingSpeed
  380. }
  381. }
  382. }).disableSelection()
  383. })
  384. </script>
  385. </body>
  386. </html>