config.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <!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': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_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': {: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="{$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
  78. if( $i % 8 == 0 )
  79. {
  80. echo '<br/><br/>';
  81. }
  82. $i++;
  83. ?>
  84. <?php } ?>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="layui-form-item">
  89. <label class="layui-form-label">导出商品总单范围:</label>
  90. <div class="layui-input-block ">
  91. <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="导出商品分类" />
  92. <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="导出商品所属供应商" />
  93. <br/>
  94. <div class="layui-form-mid layui-word-aux">
  95. 配送单管理 - 导出商品总单 -是否打印 商品分类,商品所属供应商
  96. </div>
  97. </div>
  98. </div>
  99. <div class="layui-form-item">
  100. <label class="layui-form-label"> </label>
  101. <div class="layui-input-block">
  102. <input type="hidden" name="modify_explode_arr" id="modify_explode_arr" value="" />
  103. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  104. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  105. </div>
  106. </div>
  107. </form>
  108. </div>
  109. </div>
  110. </div>
  111. <script src="/layuiadmin/layui/layui.js"></script>
  112. <script type="text/javascript" src="/static/js/jquery-migrate-1.1.1.js"></script>
  113. <script src="/static/js/jquery-ui.min.js"></script>
  114. <script>
  115. layui.config({
  116. base: '/layuiadmin/' //静态资源所在路径
  117. }).extend({
  118. index: 'lib/index' //主入口模块
  119. }).use('index');
  120. </script>
  121. <script>
  122. var layer = layui.layer;
  123. var $;
  124. layui.use(['jquery', 'layer', 'form'], function(){
  125. $ = layui.$;
  126. var form = layui.form;
  127. $('#clerk_allprint,#clerk_allprint_order').click(function(){
  128. var searchtime = $('#searchtime').val();
  129. var start = $('input[name="time[start]"]').val();
  130. var end = $('input[name="time[end]"]').val();
  131. var s_url= $(this).attr('data-href');
  132. s_url += '&searchtime='+searchtime+"&start="+start+"&end="+end;
  133. window.open(s_url);
  134. //console.log( start );
  135. //console.log(searchtime);
  136. //name="time[start]"
  137. //time[end]
  138. })
  139. $('.deldom').click(function(){
  140. var s_url = $(this).attr('data-href');
  141. layer.confirm($(this).attr('data-confirm'), function(index){
  142. $.ajax({
  143. url:s_url,
  144. type:'post',
  145. dataType:'json',
  146. success:function(info){
  147. if(info.status == 0)
  148. {
  149. layer.msg(info.result.message,{icon: 1,time: 2000});
  150. }else if(info.status == 1){
  151. var go_url = location.href;
  152. if( info.result.hasOwnProperty("url") )
  153. {
  154. go_url = info.result.url;
  155. }
  156. layer.msg('操作成功',{time: 1000,
  157. end:function(){
  158. location.href = info.result.url;
  159. }
  160. });
  161. }
  162. }
  163. })
  164. });
  165. })
  166. $('.btn-operation').click(function(){
  167. var ids_arr = [];
  168. var obj = $(this);
  169. var s_toggle = $(this).attr('data-toggle');
  170. var s_url = $(this).attr('data-href');
  171. $("input[name=item_checkbox]").each(function() {
  172. if( $(this).prop('checked') )
  173. {
  174. ids_arr.push( $(this).val() );
  175. }
  176. })
  177. if(ids_arr.length < 1)
  178. {
  179. layer.msg('请选择要操作的内容');
  180. }else{
  181. var can_sub = true;
  182. if( s_toggle == 'batch-remove' )
  183. {
  184. can_sub = false;
  185. layer.confirm($(obj).attr('data-confirm'), function(index){
  186. $.ajax({
  187. url:s_url,
  188. type:'post',
  189. dataType:'json',
  190. data:{ids:ids_arr},
  191. success:function(info){
  192. if(info.status == 0)
  193. {
  194. layer.msg(info.result.message,{icon: 1,time: 2000});
  195. }else if(info.status == 1){
  196. var go_url = location.href;
  197. if( info.result.hasOwnProperty("url") )
  198. {
  199. go_url = info.result.url;
  200. }
  201. layer.msg('操作成功',{time: 1000,
  202. end:function(){
  203. location.href = info.result.url;
  204. }
  205. });
  206. }
  207. }
  208. })
  209. });
  210. }else{
  211. $.ajax({
  212. url:s_url,
  213. type:'post',
  214. dataType:'json',
  215. data:{ids:ids_arr},
  216. success:function(info){
  217. if(info.status == 0)
  218. {
  219. layer.msg(info.result.message,{icon: 1,time: 2000});
  220. }else if(info.status == 1){
  221. var go_url = location.href;
  222. if( info.result.hasOwnProperty("url") )
  223. {
  224. go_url = info.result.url;
  225. }
  226. layer.msg('操作成功',{time: 1000,
  227. end:function(){
  228. location.href = info.result.url;
  229. }
  230. });
  231. }
  232. }
  233. })
  234. }
  235. }
  236. })
  237. form.on('switch(statewsitch)', function(data){
  238. var s_url = $(this).attr('data-href')
  239. var s_value = 1;
  240. if(data.elem.checked)
  241. {
  242. s_value = 1;
  243. }else{
  244. s_value = 0;
  245. }
  246. $.ajax({
  247. url:s_url,
  248. type:'post',
  249. dataType:'json',
  250. data:{value:s_value},
  251. success:function(info){
  252. if(info.status == 0)
  253. {
  254. layer.msg(info.result.message,{icon: 1,time: 2000});
  255. }else if(info.status == 1){
  256. var go_url = location.href;
  257. if( info.result.hasOwnProperty("url") )
  258. {
  259. go_url = info.result.url;
  260. }
  261. layer.msg('操作成功',{time: 1000,
  262. end:function(){
  263. location.href = info.result.url;
  264. }
  265. });
  266. }
  267. }
  268. })
  269. });
  270. form.on('checkbox(checkboxall)', function(data){
  271. if(data.elem.checked)
  272. {
  273. $("input[name=item_checkbox]").each(function() {
  274. $(this).prop("checked", true);
  275. });
  276. $("input[name=checkall]").each(function() {
  277. $(this).prop("checked", true);
  278. });
  279. }else{
  280. $("input[name=item_checkbox]").each(function() {
  281. $(this).prop("checked", false);
  282. });
  283. $("input[name=checkall]").each(function() {
  284. $(this).prop("checked", false);
  285. });
  286. }
  287. form.render('checkbox');
  288. });
  289. //监听提交
  290. form.on('submit(formDemo)', function(data){
  291. var arr_box = [];
  292. $('.item_input').each(function() {
  293. if( $(this).is(':checked') ) {
  294. arr_box.push($(this).val());
  295. }
  296. });
  297. data.field.modify_explode_arr = arr_box;
  298. $.ajax({
  299. url: data.form.action,
  300. type: data.form.method,
  301. data: data.field,
  302. dataType:'json',
  303. success: function (info) {
  304. if(info.status == 0)
  305. {
  306. layer.msg(info.result.message,{icon: 1,time: 2000});
  307. }else if(info.status == 1){
  308. var go_url = location.href;
  309. if( info.result.hasOwnProperty("url") )
  310. {
  311. go_url = info.result.url;
  312. }
  313. layer.msg('操作成功',{time: 1000,
  314. end:function(){
  315. location.href = info.result.url;
  316. }
  317. });
  318. }
  319. }
  320. });
  321. return false;
  322. });
  323. })
  324. </script>
  325. <script>
  326. $(function () {
  327. // 拖拽时开始滚动的间距
  328. var scrollingSensitivity = 20
  329. // 拖拽时滚动速度
  330. let scrollingSpeed = 20
  331. // 拖拽前的父级节点
  332. let dragBeforeParentNode = null
  333. // 初始化拖拽函数
  334. $('.multi-img-details').sortable({
  335. // 自适应placeholder的大小
  336. forceHelperSize: true,
  337. // 拖拽时的鼠标形状
  338. cursor: '-webkit-grabbing',
  339. // 拖拽的父级节点(该节点一定要注意,配置错误会导致当前屏幕外的元素没法自动滚动拖拽,两列之间拖拽的滚动也会出问题)
  340. appendTo: '.layui-form-item',
  341. // 拖拽时的倾斜度
  342. rotate: '5deg',
  343. // 延迟时间(毫秒),避免和click同时操作时出现的冲突
  344. delay: 0,
  345. // 拖拽到边框出现滚动的间距,
  346. scrollSensitivity: scrollingSensitivity,
  347. // 应用于拖拽空白区域的样式
  348. placeholder: 'portlet-placeholder ui-state-highlight',
  349. // 允许拖拽预留空白区域
  350. forcePlaceholderSize: false,
  351. // 多个列表之间的拖拽的dom元素
  352. connectWith: '.multi-img-details',
  353. // 鼠标到区域则填充
  354. tolerance: "pointer",
  355. // 可以拖拽的项
  356. items: '.move_item',
  357. // 填充动画
  358. revert: 0,
  359. // 拖拽结束函数
  360. stop: (e, ui) => {
  361. // 当前拽入的元素
  362. let item = $(ui.item)
  363. // 当前拽入元素的下标
  364. let index = item.index()
  365. let kid = ''
  366. // xxxx 这里面可以操作数据更新
  367. },
  368. // 开始拖拽时的函数
  369. start: (e, ui) => {
  370. // 拖拽前的父级节点
  371. dragBeforeParentNode = ui.item[0].parentNode
  372. // 让placeholder和源高度一致
  373. ui.helper.addClass('item').width(110)
  374. // xxxx 这里可以记录一些拖拽前的元素属性
  375. },
  376. // 处理两列滚动条问题
  377. sort: function (event, ui) {
  378. var scrollContainer = ui.placeholder[0].parentNode
  379. // 设置拽入的列表的滚动位置
  380. var overflowOffset = $(scrollContainer).offset()
  381. if ((overflowOffset.top + scrollContainer.offsetHeight) - event.pageY <
  382. scrollingSensitivity) {
  383. scrollContainer.scrollTop = scrollContainer.scrollTop + scrollingSpeed
  384. } else if (event.pageY - overflowOffset.top < scrollingSensitivity) {
  385. scrollContainer.scrollTop = scrollContainer.scrollTop - scrollingSpeed
  386. }
  387. }
  388. }).disableSelection()
  389. })
  390. </script>
  391. </body>
  392. </html>