update.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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. <link href="/static/css/szyV6.css" rel="stylesheet">
  45. </head>
  46. <body layadmin-themealias="default">
  47. <!-- 菜单组件 begin-->
  48. <include file="Public/componts_menu"/>
  49. <!-- 菜单组件end -->
  50. <div class="div-iframe">
  51. <div class="layui-fluid">
  52. <div class="layui-card">
  53. <div class="layui-card layadmin-header" style="display:block;">
  54. <div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
  55. <a href="{:U('application/index')}">应用</a><span lay-separator="">/</span>
  56. <a href="{:U('mptradecomponts/index')}"><cite>交易组件</cite></a><span lay-separator="">/</span>
  57. <a href="{:U('mptradecomponts/update')}"><cite>更新交易组件商品</cite></a>
  58. </div>
  59. </div>
  60. <!--- 内容开始 -->
  61. <div class="layui-card-body" style="padding:15px;">
  62. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  63. <input type="hidden" value="{$goods_id}" name="goods_id" >
  64. <div class="layui-form-item" id="goods_form_item" >
  65. <label class="layui-form-label">商品</label>
  66. <div class="layui-input-block">
  67. <input type="text" disabled value="{$goods_info['goodsname']}" class="form-control valid">
  68. </div>
  69. </div>
  70. <div class="layui-form-item" >
  71. <label class="layui-form-label">选择分类</label>
  72. <div class="layui-input-block">
  73. <select name="tx_cate_id" lay-filter="cateid" lay-search>
  74. <option value="0"></option>
  75. <?php foreach($catelist as $cate ){ ?>
  76. <option value="{$cate['third_cat_id']}" data-product_qualification="{$cate['product_qualification']}" data-qualification="{$cate['qualification']}" <?php if( $last_third_cate_id == $cate['third_cat_id'] ){ ?> selected<?php } ?> >{$cate['first_cat_name']} {$cate['second_cat_name']} {$cate['third_cat_name']}</option>
  77. <?php } ?>
  78. </select>
  79. <span class='help-block'>
  80. 请认真选择此分类,腾讯将依据此分类进行商品审核。<font color="red">分类较多,点击下拉框可输入文字筛选分类</font>
  81. </span>
  82. </div>
  83. </div>
  84. <div class="layui-form-item">
  85. <label class="layui-form-label must">类目资质</label>
  86. <div class="layui-input-block gimgs" id="gimgs_mult">
  87. {:tpl_form_field_multi_image3('thumbs',[])}
  88. <span class="layui-form-mid layui-word-aux image-block" style="color:red!important;" id="notice_image">
  89. 该类目无须资质,可不传
  90. </span>
  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="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  97. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  98. </div>
  99. </div>
  100. </form>
  101. </div>
  102. <!--- 内容结束-->
  103. </div>
  104. </div>
  105. </div>
  106. <script src="/layuiadmin/layui/layui.js"></script>
  107. <script>
  108. layui.config({
  109. base: '/layuiadmin/' //静态资源所在路径
  110. }).extend({
  111. index: 'lib/index' //主入口模块
  112. }).use('index');
  113. </script>
  114. <script>
  115. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  116. var layer = layui.layer;
  117. var $;
  118. var is_need_qualification = 0;
  119. layui.use(['jquery', 'layer','form'], function(){
  120. $ = layui.$;
  121. var form = layui.form;
  122. $('.sub-nav').css('height', $(window).height() + 'px');
  123. form.on('radio(isopen_tradecomponts)', function(data){
  124. if ( data.value == 1 ) {
  125. $('#open_div').show();
  126. } else {
  127. $('#open_div').hide();
  128. }
  129. });
  130. $('#chose_agent_id').click(function(){
  131. cur_open_div = $(this).attr('data-input');
  132. $.post("{:U('goods/query_normal')}", {}, function(shtml){
  133. layer.open({
  134. type: 1,
  135. area: '930px',
  136. content: shtml //注意,如果str是object,那么需要字符拼接。
  137. });
  138. });
  139. })
  140. form.on('select(cateid)', function(data){
  141. var _product_qual = $(data.elem).find("option:selected").attr('data-product_qualification');
  142. var _qualification = $(data.elem).find("option:selected").attr('data-qualification');
  143. var s_html = '该类目无须资质,可不传';
  144. if( _product_qual != '' && _qualification != '')
  145. {
  146. s_html = _product_qual +"<br/>";
  147. s_html += _qualification;
  148. is_need_qualification = 1;
  149. }else if( _product_qual != '' )
  150. {
  151. s_html = _product_qual +"<br/>";
  152. is_need_qualification = 1;
  153. }
  154. else if( _qualification != '' )
  155. {
  156. s_html += _qualification;
  157. is_need_qualification =1;
  158. }else{
  159. is_need_qualification = 0;
  160. }
  161. //brand_id: 2100000000
  162. $('#notice_image').html( s_html );
  163. });
  164. //监听提交
  165. form.on('submit(formDemo)', function(data){
  166. var loadingIndex = layer.load(); // 加载中动画遮罩层(1)
  167. data.field.is_need_qualification = is_need_qualification;
  168. $.ajax({
  169. url: data.form.action,
  170. type: data.form.method,
  171. data: data.field,
  172. dataType:'json',
  173. success: function (info) {
  174. layer.close(loadingIndex); // 提交成功失败都需要关闭
  175. if(info.status == 0)
  176. {
  177. layer.msg(info.result.message,{icon: 1,time: 2000});
  178. can_sub = true;
  179. }else if(info.status == 1){
  180. var go_url = location.href;
  181. if( info.result.hasOwnProperty("url") )
  182. {
  183. go_url = info.result.url;
  184. }
  185. layer.msg('操作成功',{time: 1000,
  186. end:function(){
  187. location.href = go_url;
  188. }
  189. });
  190. can_sub = true;
  191. }
  192. }
  193. });
  194. return false;
  195. });
  196. })
  197. function cancle_bind(obj,sdiv)
  198. {
  199. $('#'+sdiv).val('');
  200. $(obj).parent().parent().remove();
  201. }
  202. </script>
  203. </body>
  204. </html>