deconfig.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  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>
  45. body.dragging, body.dragging * {
  46. cursor: move !important;
  47. }
  48. .dragged {
  49. position: absolute;
  50. opacity: 0.5;
  51. z-index: 2000;
  52. border: 1px solid #ccc;
  53. border-radius: 5px;
  54. background: #fff;
  55. }
  56. #sortable li {
  57. border-top: 1px solid #c5c5c5;
  58. padding-top: 20px;
  59. }
  60. #sortable li:first-child {
  61. border: 0;
  62. }
  63. #sortable li.placeholder {
  64. position: relative;
  65. }
  66. #sortable li.placeholder:before {
  67. position: absolute;
  68. }
  69. </style>
  70. </head>
  71. <body layadmin-themealias="default">
  72. <div class="layui-fluid">
  73. <div class="layui-card">
  74. <div class="layui-card-header layui-elem-quote">配送方式设置</div>
  75. <div class="layui-card-body" style="padding:15px;">
  76. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  77. <blockquote class="layui-elem-quote">购物车页面顶部选项卡配送方式自定义</blockquote>
  78. <div class="layui-form-item">
  79. <label class="layui-form-label">全部商品</label>
  80. <div class='layui-input-block'>
  81. <div class="radio-inline">
  82. <div class="layui-form-mid layui-word-aux">修改名称</div>
  83. <div class="layui-input-inline">
  84. <input type="text" name="parameter[shopcar_tab_all_name]" value="{$data['shopcar_tab_all_name']}" class="layui-input" placeholder="全部商品"/>
  85. </div>
  86. <div class="layui-form-mid layui-word-aux">默认:全部商品</div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="layui-form-item">
  91. <label class="layui-form-label">快递商品</label>
  92. <div class='layui-input-block'>
  93. <div class="radio-inline">
  94. <div class="layui-form-mid layui-word-aux">修改名称</div>
  95. <div class="layui-input-inline">
  96. <input type="text" name="parameter[shopcar_tab_express_name]" value="{$data['shopcar_tab_express_name']}" class="layui-input" placeholder="快递商品"/>
  97. </div>
  98. <div class="layui-form-mid layui-word-aux">默认:快递商品</div>
  99. </div>
  100. </div>
  101. </div>
  102. <blockquote class="layui-elem-quote">订单提交页面配送方式自定义(点击<i class="fa fa-arrows-alt text-primary"></i>并拖动排序)</blockquote>
  103. <ul id="sortable" class="limited_drop_targets">
  104. <?php foreach($data['delivery_diy_sort_arr'] as $vo){ ?>
  105. <?php if($vo==0){ ?>
  106. <li data-id="0">
  107. <div class="layui-form-item">
  108. <label class="layui-form-label">
  109. <i class="fa fa-arrows-alt text-primary"></i>
  110. 社区自提
  111. </label>
  112. <div class="layui-input-block">
  113. <label class='radio-inline'>
  114. <input type='radio' title="关闭" name='parameter[delivery_type_ziti]' value='2' <?php if(isset($data['delivery_type_ziti']) && $data['delivery_type_ziti'] ==2){ ?>checked <?php } ?> />
  115. </label>
  116. <label class='radio-inline'>
  117. <input type='radio' title="开启" name='parameter[delivery_type_ziti]' value='1' <?php if( !isset($data['delivery_type_ziti']) || $data['delivery_type_ziti'] ==1 ){ ?>checked <?php } ?> />
  118. </label>
  119. </div>
  120. </div>
  121. <div class="layui-form-item">
  122. <label class="layui-form-label"></label>
  123. <div class='layui-input-block'>
  124. <div class="radio-inline">
  125. <div class="layui-form-mid layui-word-aux">名称</div>
  126. <div class="layui-input-inline">
  127. <input type="text" name="parameter[delivery_ziti_name]" value="{$data['delivery_ziti_name']}" class="layui-input" placeholder="社区自提"/>
  128. </div>
  129. <div class="layui-form-mid layui-word-aux">默认:社区自提(下单页面,配送方式变更为修改的名称)</div>
  130. </div>
  131. </div>
  132. </div>
  133. </li>
  134. <?php } ?>
  135. <?php if($vo==1){ ?>
  136. <li data-id="1">
  137. <div class="layui-form-item">
  138. <label class="layui-form-label">
  139. <i class="fa fa-arrows-alt text-primary"></i>
  140. 团长配送
  141. </label>
  142. <div class="layui-input-block">
  143. <label class='radio-inline'>
  144. <input type='radio' id="close_tuanz" title="关闭" lay-filter="formtuanz" name='parameter[delivery_type_tuanz]' value='2' <?php if( !isset($data['delivery_type_tuanz']) || $data['delivery_type_tuanz'] ==2 ){ ?>checked <?php } ?> />
  145. </label>
  146. <label class='radio-inline'>
  147. <input type='radio' id="open_tuanz" title="开启" lay-filter="formtuanz" name='parameter[delivery_type_tuanz]' value='1' <?php if( isset($data['delivery_type_tuanz']) && $data['delivery_type_tuanz'] ==1 ){ ?>checked <?php } ?> />
  148. </label>
  149. </div>
  150. </div>
  151. <div class="layui-form-item">
  152. <label class="layui-form-label"></label>
  153. <div class='layui-input-block'>
  154. <div class="radio-inline">
  155. <div class="layui-form-mid layui-word-aux">名称</div>
  156. <div class="layui-input-inline">
  157. <input type="text" name="parameter[delivery_tuanzshipping_name]" value="{$data['delivery_tuanzshipping_name']}" class="layui-input" placeholder="团长配送"/>
  158. </div>
  159. <div class="layui-form-mid layui-word-aux">默认:团长配送(下单页面,配送方式变更为修改的名称)</div>
  160. </div>
  161. </div>
  162. </div>
  163. <div class="layui-form-item">
  164. <label class="layui-form-label"></label>
  165. <div class='layui-input-block'>
  166. <div class="radio-inline">
  167. <div class="layui-form-mid layui-word-aux">"配送费"自定义</div>
  168. <div class="layui-input-inline">
  169. <input type="text" name="parameter[placeorder_tuan_name]" value="{$data['placeorder_tuan_name']}" class="layui-input" placeholder="配送费"/>
  170. </div>
  171. <div class="layui-form-mid layui-word-aux">下单页面"配送费"文字自定义,默认:配送费</div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="layui-form-item">
  176. <label class="layui-form-label"></label>
  177. <div class="layui-input-block">
  178. <div class="radio-inline" id="txtPickupDateTip" <?php if(isset($data['delivery_type_tuanz']) && $data['delivery_type_tuanz'] ==1){ ?> display: inline-block;<?php }else{ ?> display: none;<?php } ?>>
  179. <div class="layui-form-mid layui-word-aux">团长配送费</div>
  180. <div class="layui-input-inline">
  181. <input type="text" name="parameter[delivery_tuanz_money]" value="{$data['delivery_tuanz_money']}" class="layui-input" />
  182. </div>
  183. <div class="layui-form-mid layui-word-aux">开启请填写团长配送每单配送费(元)</div>
  184. </div>
  185. <div class="radio-inline" id="free_tuanz_free" <?php if( isset($data['delivery_type_tuanz']) && $data['delivery_type_tuanz'] ==1 ){ ?> display: inline-block;<?php }else{ ?> display: none;<?php } ?>>
  186. <div class="layui-form-mid layui-word-aux">满</div>
  187. <div class="layui-input-inline">
  188. <input type="text" name="parameter[man_free_tuanzshipping]" value="{$data['man_free_tuanzshipping']}" class="layui-input" />
  189. </div>
  190. <div class="layui-form-mid layui-word-aux">免团长配送费(0则不减免运费,只对非独立供应商商品有效)</div>
  191. </div>
  192. </div>
  193. </div>
  194. </li>
  195. <?php } ?>
  196. <?php if($vo==2){ ?>
  197. <li data-id="2">
  198. <div class="layui-form-item">
  199. <label class="layui-form-label">
  200. <i class="fa fa-arrows-alt text-primary"></i>
  201. 快递配送
  202. </label>
  203. <div class="layui-input-block">
  204. <label class='radio-inline'>
  205. <input type='radio' title="关闭" lay-filter="formexpress" name='parameter[delivery_type_express]' value='2' <?php if(!isset($data['delivery_type_express']) || $data['delivery_type_express'] ==2){ ?> checked<?php }else{ ?> <?php } ?> />
  206. </label>
  207. <label class='radio-inline'>
  208. <input type='radio' title="开启" lay-filter="formexpress" name='parameter[delivery_type_express]' value='1' <?php if( isset($data['delivery_type_express']) && $data['delivery_type_express'] ==1 ){ ?> checked<?php }else{ ?> <?php } ?> />
  209. </label>
  210. </div>
  211. </div>
  212. <div class="layui-form-item">
  213. <label class="layui-form-label"></label>
  214. <div class='layui-input-block'>
  215. <div class="radio-inline">
  216. <div class="layui-form-mid layui-word-aux">名称</div>
  217. <div class="layui-input-inline">
  218. <input type="text" name="parameter[delivery_express_name]" value="{$data['delivery_express_name']}" class="layui-input" placeholder="快递配送"/>
  219. </div>
  220. <div class="layui-form-mid layui-word-aux">默认:快递配送(下单页面,配送方式变更为修改的名称)</div>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="layui-form-item">
  225. <label class="layui-form-label"></label>
  226. <div class='layui-input-block'>
  227. <div class="radio-inline">
  228. <div class="layui-form-mid layui-word-aux">"快递费"自定义</div>
  229. <div class="layui-input-inline">
  230. <input type="text" name="parameter[placeorder_trans_name]" value="{$data['placeorder_trans_name']}" class="layui-input" placeholder="快递费"/>
  231. </div>
  232. <div class="layui-form-mid layui-word-aux">下单页面"快递费"文字自定义,默认:快递费</div>
  233. </div>
  234. </div>
  235. </div>
  236. <div class="layui-form-item">
  237. <label class="layui-form-label"></label>
  238. <div class='layui-input-block'>
  239. <div class="radio-inline" id="man_free_shipping" <?php if( isset($data['delivery_type_express']) && $data['delivery_type_express'] ==1 ){ ?> <?php }else{ ?> style="display:none;" <?php } ?> >
  240. <div class="layui-form-mid layui-word-aux">满</div>
  241. <div class="layui-input-inline">
  242. <input type="text" name="parameter[man_free_shipping]" value="{$data['man_free_shipping']}" class="layui-input" />
  243. </div>
  244. <div class="layui-form-mid layui-word-aux">免配送费(0则不减免运费,只对非独立供应商商品有效)</div>
  245. </div>
  246. </div>
  247. </div>
  248. </li>
  249. <?php } ?>
  250. <?php } ?>
  251. </ul>
  252. <blockquote class="layui-elem-quote">订单提交页面新增自定义备注信息</blockquote>
  253. <div class="layui-form-item">
  254. <label class="layui-form-label">
  255. 备注信息
  256. </label>
  257. <div class="layui-input-block">
  258. <label class='radio-inline'>
  259. <input type='radio' title="关闭" lay-filter="formordernote" name='parameter[order_note_open]' value='0' <?php if( !isset($data['order_note_open']) || $data['order_note_open'] ==0){ ?> checked<?php }else{ ?> <?php } ?> />
  260. </label>
  261. <label class='radio-inline'>
  262. <input type='radio' title="开启" lay-filter="formordernote" name='parameter[order_note_open]' value='1' <?php if( isset($data['order_note_open']) && $data['order_note_open'] ==1 ){ ?> checked<?php }else{ ?> <?php } ?> />
  263. </label>
  264. </div>
  265. </div>
  266. <div class="layui-form-item" id="ordernotename" <?php if(!isset($data['order_note_open']) || $data['order_note_open'] ==0){ ?>style="display:none;"<?php } ?>>
  267. <label class="layui-form-label"></label>
  268. <div class='layui-input-block'>
  269. <div class="radio-inline">
  270. <div class="layui-form-mid layui-word-aux">名称</div>
  271. <div class="layui-input-inline">
  272. <input type="text" name="parameter[order_note_name]" value="{$data['order_note_name']}" class="layui-input" placeholder="店名" />
  273. </div>
  274. <div class="layui-form-mid layui-word-aux">默认:店名(下单页面,用户可以对整个订单进行备注)</div>
  275. </div>
  276. </div>
  277. </div>
  278. <div class="layui-form-item">
  279. <label class="layui-form-label">
  280. 楼牌门号
  281. </label>
  282. <div class='layui-input-block'>
  283. <div class="radio-inline">
  284. <div class="layui-form-mid layui-word-aux">名称</div>
  285. <div class="layui-input-inline">
  286. <input type="text" name="parameter[order_lou_meng_hao]" value="{$data['order_lou_meng_hao']}" class="layui-input" placeholder="楼牌门号" />
  287. </div>
  288. <div class="layui-form-mid layui-word-aux">默认:楼牌门号</div>
  289. </div>
  290. <br>
  291. <div class="radio-inline" style="margin-left:0;">
  292. <div class="layui-form-mid layui-word-aux">提示语</div>
  293. <div class="layui-input-inline">
  294. <input type="text" name="parameter[order_lou_meng_hao_placeholder]" value="{$data['order_lou_meng_hao_placeholder']}" class="layui-input" placeholder="例如:A座106室" />
  295. </div>
  296. <div class="layui-form-mid layui-word-aux">默认:例如:A座106室</div>
  297. </div>
  298. </div>
  299. </div>
  300. <div class="layui-form-item">
  301. <label class="layui-form-label"> </label>
  302. <div class="layui-input-block">
  303. <input type="hidden" value="{$data['delivery_diy_sort']}" name="parameter[delivery_diy_sort]" id="sortIpt" />
  304. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  305. </div>
  306. </div>
  307. </form>
  308. </div>
  309. </div>
  310. </div>
  311. <script src="/layuiadmin/layui/layui.js"></script>
  312. <script src="/static/js/jquery-sortable.js"></script>
  313. <script>
  314. layui.config({
  315. base: '/layuiadmin/' //静态资源所在路径
  316. }).extend({
  317. index: 'lib/index' //主入口模块
  318. }).use('index');
  319. </script>
  320. <script>
  321. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  322. var layer = layui.layer;
  323. var $;
  324. var cur_open_div;
  325. layui.use(['jquery', 'layer','form'], function(){
  326. $ = layui.$;
  327. var form = layui.form;
  328. form.on('radio(linktype)', function(data){
  329. if (data.value == 2) {
  330. $('#typeGroup').show();
  331. } else {
  332. $('#typeGroup').hide();
  333. }
  334. });
  335. form.on('radio(formexpress)', function(data){
  336. if (data.value == 1) {
  337. $('#man_free_shipping').show();
  338. } else {
  339. /*$.ajax({
  340. url: "{:U('goods/check_express', array('ok' => 1))}",
  341. type: 'post',
  342. dataType:'json',
  343. success: function (info) {
  344. if(info.status == 1){
  345. $('input[name="parameter[delivery_type_express]"][value=2]').prop("checked","false");
  346. $('input[name="parameter[delivery_type_express]"][value=1]').prop("checked","true");
  347. layer.msg("商品列表或拼团模式存在仅快递,不能关闭快递配送。关闭快递配送,不影响积分商品配送",{icon: 2,time: 3000});
  348. form.render();
  349. }else{
  350. $('#man_free_shipping').hide();
  351. }
  352. }
  353. });*/
  354. $('#man_free_shipping').hide();
  355. }
  356. });
  357. form.on('radio(formordernote)', function(data){
  358. if (data.value == 1) {
  359. $('#ordernotename').show();
  360. } else {
  361. $('#ordernotename').hide();
  362. }
  363. });
  364. $('#close_tuanz').click(function(){
  365. $('#txtPickupDateTip').hide();
  366. $('#free_tuanz_free').hide();
  367. })
  368. $('#open_tuanz').click(function(){
  369. $('#txtPickupDateTip').css('display','inline-block');
  370. $('#free_tuanz_free').css('display','inline-block');
  371. })
  372. $('#chose_link').click(function(){
  373. cur_open_div = $(this).attr('data-input');
  374. $.post("{php echo shopUrl('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  375. layer.open({
  376. type: 1,
  377. area: '930px',
  378. content: shtml //注意,如果str是object,那么需要字符拼接。
  379. });
  380. });
  381. })
  382. //监听提交
  383. form.on('submit(formDemo)', function(data){
  384. $.ajax({
  385. url: data.form.action,
  386. type: data.form.method,
  387. data: data.field,
  388. dataType:'json',
  389. success: function (info) {
  390. if(info.status == 0)
  391. {
  392. layer.msg(info.result.message,{icon: 1,time: 2000});
  393. }else if(info.status == 1){
  394. var go_url = location.href;
  395. if( info.result.hasOwnProperty("url") )
  396. {
  397. go_url = info.result.url;
  398. }
  399. layer.msg('操作成功',{time: 1000,
  400. end:function(){
  401. location.href = info.result.url;
  402. }
  403. });
  404. }
  405. }
  406. });
  407. return false;
  408. });
  409. })
  410. $(function () {
  411. var group = $("#sortable").sortable({
  412. group: 'limited_drop_targets',
  413. handle: 'i.fa-arrows-alt',
  414. onDrop: function ($item, container, _super) {
  415. console.log(group.sortable("serialize").get().join("\n"));
  416. $('#sortIpt').val(group.sortable("serialize").get().join("\n"));
  417. _super($item, container);
  418. },
  419. serialize: function (parent, children, isContainer) {
  420. return isContainer ? children.join() : $(parent).data('id');
  421. },
  422. tolerance: 6,
  423. distance: 10
  424. })
  425. })
  426. </script>
  427. </body>