ordersendconfig.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. <div class="layui-form-item">
  78. <label class="layui-form-label">
  79. 订单推送
  80. </label>
  81. <div class="layui-input-block">
  82. <label class='radio-inline'>
  83. <input type='radio' title="关闭" name='parameter[is_order_push_status]' value='0' <?php if(!isset($data['is_order_push_status']) || $data['is_order_push_status'] ==0){ ?> checked<?php }else{ ?> <?php } ?> />
  84. </label>
  85. <label class='radio-inline'>
  86. <input type='radio' title="开启" name='parameter[is_order_push_status]' value='1' <?php if( isset($data['is_order_push_status']) && $data['is_order_push_status'] ==1 ){ ?> checked<?php }else{ ?> <?php } ?> />
  87. </label>
  88. </div>
  89. <span class='layui-form-mid' style="margin-left: 30px;">开启此功能,同城配送订单支付成功后自动推送给配置的第三方配送公司。</span>
  90. </div>
  91. <div class="layui-form-item">
  92. <label class="layui-form-label">第三方配送公司</label>
  93. <div class="layui-input-block" style="width: 500px;">
  94. <select name='parameter[order_push_third_distribution_company]' class="layui-input layui-unselect">
  95. <option value=''>请选择</option>
  96. <?php foreach($third_delivery_company_list as $k=>$v){ ?>
  97. <option value="<?php echo $v['id'];?>" <?php if($v['id'] == $data['order_push_third_distribution_company']){ ?>selected="selected"<?php }?>><?php echo $v[name]; ?></option>
  98. <?php } ?>
  99. </select>
  100. </div>
  101. </div>
  102. <div class="layui-form-item">
  103. <label class="layui-form-label"></label>
  104. <div class="layui-input-block">
  105. <input type="submit" name="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary col-lg-1"/>
  106. </div>
  107. </div>
  108. </form>
  109. </div>
  110. </div>
  111. </div>
  112. <script src="/layuiadmin/layui/layui.js"></script>
  113. <script src="/static/js/jquery-sortable.js"></script>
  114. <script>
  115. layui.config({
  116. base: '/layuiadmin/' //静态资源所在路径
  117. }).extend({
  118. index: 'lib/index' //主入口模块
  119. }).use('index');
  120. </script>
  121. <script>
  122. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  123. var layer = layui.layer;
  124. var $;
  125. var cur_open_div;
  126. layui.use(['jquery', 'layer','form'], function(){
  127. $ = layui.$;
  128. var form = layui.form;
  129. //监听提交
  130. form.on('submit(formDemo)', function(data){
  131. $.ajax({
  132. url: data.form.action,
  133. type: data.form.method,
  134. data: data.field,
  135. dataType:'json',
  136. success: function (info) {
  137. if(info.status == 0)
  138. {
  139. layer.msg(info.result.message,{icon: 1,time: 2000});
  140. }else if(info.status == 1){
  141. var go_url = location.href;
  142. if( info.result.hasOwnProperty("url") )
  143. {
  144. go_url = info.result.url;
  145. }
  146. layer.msg('操作成功',{time: 1000,
  147. end:function(){
  148. location.href = info.result.url;
  149. }
  150. });
  151. }
  152. }
  153. });
  154. return false;
  155. });
  156. })
  157. </script>
  158. </body>