截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-form-item .layui-input-inline { line-height: 36px; width: 250px; }
  4. .layui-form-item .layui-form-label { width: 120px; }
  5. .layui-form-item .map-container{ width: 600px; height: 400px; margin-left: 140px; margin-top: 20px; }
  6. .layui-form-select dl {
  7. z-index: 1001;
  8. }
  9. </style>
  10. <div class="wrapper">
  11. <div class="layui-card layui-form">
  12. <!-- 主体区域 -->
  13. <div class="layui-tab layui-tab-card" lay-filter="like-tabs">
  14. <ul class="layui-tab-title">
  15. <li lay-id="1" class="layui-this">基础信息</li>
  16. <li lay-id="2">经营信息</li>
  17. <li lay-id="3">资质信息</li>
  18. </ul>
  19. <div class="layui-tab-content">
  20. <!-- 1、基础信息 -->
  21. <div class="layui-tab-item layui-show">
  22. <div class="layui-form-item">
  23. <label class="layui-form-label">商家名称:</label>
  24. <div class="layui-input-inline">
  25. <p>{$detail.name}</p>
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">商家类型:</label>
  30. <div class="layui-input-inline">
  31. <p>{$detail.type}</p>
  32. </div>
  33. </div>
  34. <div class="layui-form-item">
  35. <label class="layui-form-label">主营类目:</label>
  36. <div class="layui-input-inline">
  37. <p>{$detail.category}</p>
  38. </div>
  39. </div>
  40. <div class="layui-form-item">
  41. <label class="layui-form-label">商家评分:</label>
  42. <div class="layui-input-inline">
  43. {if $detail.star === 0}
  44. 无星
  45. {else}
  46. {for start="0" end="$detail.star"}
  47. <span class="layui-icon layui-icon-rate-solid" style="color:#FFB800;"></span>
  48. {/for}
  49. {/if}
  50. </div>
  51. </div>
  52. <div class="layui-form-item">
  53. <label for="nickname" class="layui-form-label"><span style="color:red;">*</span>联系人:</label>
  54. <div class="layui-input-inline">
  55. <input type="hidden" name="id" value="{$detail.id}">
  56. <input type="text" name="nickname" id="nickname" lay-verType="tips" lay-verify="required"
  57. value="{$detail.nickname}" autocomplete="off" class="layui-input">
  58. </div>
  59. </div>
  60. <div class="layui-form-item">
  61. <label for="mobile" class="layui-form-label"><span style="color:red;">*</span>联系人电话:</label>
  62. <div class="layui-input-inline">
  63. <input type="text" name="mobile" lay-verType="tips" lay-verify="required|mobile"
  64. id="mobile" value="{$detail.mobile}" autocomplete="off" class="layui-input">
  65. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">填写联系人手机号码,商家通知会短信发送至联系人手机</div>
  66. </div>
  67. </div>
  68. <div class="layui-form-item">
  69. <label for="keywords" class="layui-form-label">商家关键字:</label>
  70. <div class="layui-input-inline">
  71. <input type="text" name="keywords" id="keywords" value="{$detail.keywords}" autocomplete="off" class="layui-input">
  72. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">多个关键字用英文”,”分隔。</div>
  73. </div>
  74. </div>
  75. <div class="layui-form-item">
  76. <label for="intro" class="layui-form-label">商家简介:</label>
  77. <div class="layui-input-inline">
  78. <textarea name="intro" id="intro" class="layui-textarea">{$detail.intro}</textarea>
  79. </div>
  80. </div>
  81. </div>
  82. <!-- 2、经营信息 -->
  83. <div class="layui-tab-item">
  84. <div class="layui-form-item">
  85. <label class="layui-form-label"><span style="color:red;">*</span>营业状态:</label>
  86. <div class="layui-input-inline">
  87. <input type="radio" name="is_run" value="1" title="营业中" {if $detail.is_run==1}checked{/if}>
  88. <input type="radio" name="is_run" value="0" title="暂停营业" {if $detail.is_run==0}checked{/if}>
  89. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家暂停营业后,则不能对外提供服务</div>
  90. </div>
  91. </div>
  92. <div class="layui-form-item">
  93. <label class="layui-form-label"><span style="color:red;">*</span>配送方式:</label>
  94. <div class="layui-input-inline">
  95. <input type="checkbox" name="delivery_type[]" value="1" lay-skin="primary" title="快递发货" checked disabled>
  96. <input type="checkbox" name="delivery_type[]" value="2" lay-skin="primary" title="线下自提" {if in_array(2, $detail.delivery_type)}checked{/if}>
  97. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">实物商品的配送方式【快递发货】默认为必选,虚拟商品默认为虚拟发货,不受配送方式限制</div>
  98. </div>
  99. </div>
  100. <div class="layui-form-item">
  101. <label class="layui-form-label">工作日:</label>
  102. <div class="layui-input-block">
  103. <input type="checkbox" name="weekdays[1]" value="1" lay-skin="primary" title="星期一" {if in_array(1, $detail.weekdays)}checked{/if}>
  104. <input type="checkbox" name="weekdays[2]" value="2" lay-skin="primary" title="星期二" {if in_array(2, $detail.weekdays)}checked{/if}>
  105. <input type="checkbox" name="weekdays[3]" value="3" lay-skin="primary" title="星期三" {if in_array(3, $detail.weekdays)}checked{/if}>
  106. <input type="checkbox" name="weekdays[4]" value="4" lay-skin="primary" title="星期四" {if in_array(4, $detail.weekdays)}checked{/if}>
  107. <input type="checkbox" name="weekdays[5]" value="5" lay-skin="primary" title="星期五" {if in_array(5, $detail.weekdays)}checked{/if}>
  108. <input type="checkbox" name="weekdays[6]" value="6" lay-skin="primary" title="星期六" {if in_array(6, $detail.weekdays)}checked{/if}>
  109. <input type="checkbox" name="weekdays[0]" value="0" lay-skin="primary" title="星期日" {if in_array(0, $detail.weekdays)}checked{/if}>
  110. </div>
  111. </div>
  112. <div class="layui-form-item">
  113. <label class="layui-form-label">营业时间:</label>
  114. <div class="layui-input-block">
  115. <div class="layui-inline" style="margin-right:0;">
  116. <div class="layui-input-inline" style="width:190px;">
  117. <input type="text" id="run_start_time" name="run_start_time" value="{$detail.run_start_time}" autocomplete="off" class="layui-input">
  118. </div>
  119. </div>
  120. <div class="layui-inline"> - </div>
  121. <div class="layui-inline" style="margin-right:0;">
  122. <div class="layui-input-inline" style="margin-right:0;width:190px;">
  123. <input type="text" id="run_end_time" name="run_end_time" value="{$detail.run_end_time}" autocomplete="off" class="layui-input">
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="layui-form-item">
  129. <label class="layui-form-label">商家地址:</label>
  130. <div class="layui-input-block">
  131. <div class="layui-input-inline" style="width:120px;">
  132. <select name="province_id" id="province" lay-filter="province"></select>
  133. </div>
  134. <div class="layui-input-inline" style="width:120px;">
  135. <select name="city_id" id="city" lay-filter="city"></select>
  136. </div>
  137. <div class="layui-input-inline" style="width:120px;">
  138. <select name="district_id" id="district"></select>
  139. </div>
  140. <div class="layui-input-inline">
  141. <input type="text" name="address" id="address" value="{$detail.address}" autocomplete="off" class="layui-input">
  142. </div>
  143. <div class="layui-input-inline">
  144. <button class="layui-btn layui-btn-normal" id="searchMap">搜索地图</button>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="layui-form-item">
  149. <label class="layui-form-label">地图定位:</label>
  150. <div class="layui-input-block">
  151. <div class="layui-inline" >
  152. <div class="layui-input-inline" style="width:120px;margin-right:5px;">
  153. <input type="text" name="longitude" value="{$detail.longitude}" autocomplete="off" class="layui-input">
  154. </div>
  155. <div class="layui-form-mid layui-word-aux">经度</div>
  156. </div>
  157. <div class="layui-inline" style="margin-right:0;">
  158. <div class="layui-input-inline" style="width:120px;margin-right:5px;">
  159. <input type="text" name="latitude" value="{$detail.latitude}" autocomplete="off" class="layui-input">
  160. </div>
  161. <div class="layui-form-mid layui-word-aux">纬度</div>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="layui-form-item ">
  166. <label class="layui-form-label"></label>
  167. <div class="layui-input-block" style="margin-left:10px;">
  168. <div class="map-container" id="map-container"></div>
  169. </div>
  170. </div>
  171. <div class="layui-form-item">
  172. <label for="refund_nickname" class="layui-form-label">退货联系人:</label>
  173. <div class="layui-input-inline">
  174. <input type="text" name="refund_nickname" id="refund_nickname" value="{$detail.refund_address.nickname ?? ''}" autocomplete="off" class="layui-input">
  175. </div>
  176. </div>
  177. <div class="layui-form-item">
  178. <label for="refund_mobile" class="layui-form-label">退货联系人手机:</label>
  179. <div class="layui-input-inline">
  180. <input type="text" name="refund_mobile" id="refund_mobile" value="{$detail.refund_address.mobile ?? ''}" autocomplete="off" class="layui-input">
  181. </div>
  182. </div>
  183. <div class="layui-form-item" style="margin-bottom:0;">
  184. <label class="layui-form-label">退货地址:</label>
  185. <div class="layui-input-block">
  186. <div class="layui-input-inline" style="width:120px;">
  187. <select name="refund_province_id" id="refund_province" lay-filter="refund_province"></select>
  188. </div>
  189. <div class="layui-input-inline" style="width:120px;">
  190. <select name="refund_city_id" id="refund_city" lay-filter="refund_city"></select>
  191. </div>
  192. <div class="layui-input-inline" style="width:120px;">
  193. <select name="refund_district_id" id="refund_district"></select>
  194. </div>
  195. <div class="layui-input-inline">
  196. <input type="text" name="refund_address" id="refund_address" value="{$detail.refund_address.address ?? ''}" autocomplete="off" class="layui-input">
  197. </div>
  198. </div>
  199. </div>
  200. <div class="layui-form-item">
  201. <label class="layui-form-label"></label>
  202. <div class="layui-input-block">
  203. <div class="layui-form-mid layui-word-aux">会员退货时显示在退货信息填写页面</div>
  204. </div>
  205. </div>
  206. <!--发票开关-->
  207. <div class="layui-form-item">
  208. <label class="layui-form-label">发票开关:</label>
  209. <div class="layui-input-inline">
  210. <input type="radio" name="open_invoice" value="1" title="开启" {if $detail.open_invoice==1}checked{/if}>
  211. <input type="radio" name="open_invoice" value="0" title="关闭"{if $detail.open_invoice==0}checked{/if} >
  212. </div>
  213. </div>
  214. <!--是否支持专票-->
  215. <div class="layui-form-item">
  216. <label class="layui-form-label">是否支持专票:</label>
  217. <div class="layui-input-inline">
  218. <input type="radio" name="spec_invoice" value="1" title="支持" {if $detail.spec_invoice==1}checked{/if}>
  219. <input type="radio" name="spec_invoice" value="0" title="不支持" {if $detail.spec_invoice==0}checked{/if}>
  220. </div>
  221. </div>
  222. </div>
  223. <!-- 3、资质信息 -->
  224. <div class="layui-tab-item">
  225. <div class="layui-form-item">
  226. <label class="layui-form-label">营业执照:</label>
  227. <div class="layui-input-inline">
  228. <div class="like-upload-image">
  229. {if !empty($detail.business_license)}
  230. <div class="upload-image-div">
  231. <img src="{$detail.business_license}" alt="img" style="background-color:#EEEEEE;height: 80px;width:auto">
  232. <input name="business_license" type="hidden" value="{$detail.business_license}">
  233. <div class="del-upload-btn">x</div>
  234. </div>
  235. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image business_license"> + 添加图片</a></div>
  236. {else}
  237. <div class="upload-image-elem"><a class="add-upload-image business_license"> + 添加图片</a></div>
  238. {/if}
  239. </div>
  240. </div>
  241. </div>
  242. <div class="layui-form-item" style="margin-bottom: 0px">
  243. <label class="layui-form-label">其他资质:</label>
  244. <div class="layui-input-block" id="qualifications_images">
  245. {if !empty($detail.other_qualifications)}
  246. {foreach $detail.other_qualifications as $val}
  247. <div class="upload-image-div">
  248. <img src="{$val}" alt="img" />
  249. <input type="hidden" name="other_qualifications[]" value="{$val}">
  250. <div class="del-upload-btn">x</div>
  251. </div>
  252. {/foreach}
  253. {/if}
  254. <div class="like-upload-image">
  255. <div class="upload-image-elem"><a class="add-upload-image" id="other_qualifications"> + 添加图片</a></div>
  256. </div>
  257. </div>
  258. </div>
  259. <div class="layui-form-item">
  260. <label class="layui-form-label"></label>
  261. <span style="color: #a3a3a3;font-size: 9px">最多上传5张</span>
  262. </div>
  263. </div>
  264. </div>
  265. <div class="layui-form-item">
  266. <div class="layui-input-block">
  267. <button class="layui-btn layui-btn-normal" lay-submit lay-filter="addSubmit">确定</button>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. <script src="__PUBLIC__/static/common/js/area.js"></script>
  274. <!--<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key={$tx_map_key}"></script>-->
  275. <script src="https://map.qq.com/api/gljs?v=1.exp&key={$tx_map_key}&libraries=service"></script>
  276. <script>
  277. layui.config({
  278. base: "/static/lib/"
  279. }).extend({
  280. likeArea: "likeArea/likeArea",
  281. txMap: "likeMap/txMap",
  282. customTxMap:'likeMap/customTxMap',
  283. }).use(["form", "laydate", "likeArea", "txMap",'customTxMap'], function(){
  284. var $ = layui.$;
  285. var form = layui.form;
  286. var likeArea = layui.likeArea;
  287. var laydate = layui.laydate;
  288. var txMap = layui.txMap;
  289. var customTxMap = layui.customTxMap;
  290. var element = layui.element;
  291. laydate.render({type:"time", elem:"#run_start_time", trigger:"click"});
  292. laydate.render({type:"time", elem:"#run_end_time", trigger:"click"});
  293. likeArea.init(
  294. "province", "city", "district", "province_id", "city_id", "district_id",
  295. "{$detail.province_id}", "{$detail.city_id}", "{$detail.district_id}"
  296. );
  297. likeArea.init(
  298. "refund_province", "refund_city", "refund_district", "refund_province_id", "refund_city_id", "refund_district_id",
  299. "{$detail.refund_address.province_id ?? ''}", "{$detail.refund_address.city_id ?? ''}", "{$detail.refund_address.district_id ?? ''}"
  300. );
  301. form.on("submit(addSubmit)", function(data){
  302. like.ajax({
  303. url: "{:url('Store/edit')}",
  304. data: data.field,
  305. type: "POST",
  306. success:function(res) {
  307. if(res.code === 1) {
  308. layui.layer.msg(res.msg);
  309. }
  310. }
  311. });
  312. });
  313. like.delUpload();
  314. $(document).on("click", ".business_license", function () {
  315. like.imageUpload({
  316. limit: 1,
  317. field: "business_license",
  318. that: $(this),
  319. content: '/shop/file/lists?type=10'
  320. });
  321. });
  322. $(document).on("click", "#other_qualifications", function () {
  323. like.imageUpload({
  324. limit: 5,
  325. field: "other_qualifications[]",
  326. that: $(this),
  327. content: '/shop/file/lists?type=10'
  328. });
  329. })
  330. // tab 切换事件
  331. element.on('tab(like-tabs)', function(data){
  332. if (data.index === 1) {
  333. var map = $("#map-container").html();
  334. if (map.length !== 0) {
  335. return;
  336. }
  337. // txMap.init("{$detail.latitude ?? ''}", "{$detail.longitude ?? ''}");
  338. var longitude = "{$detail.longitude ?? ''}";
  339. var latitude = "{$detail.latitude ?? ''}";
  340. if (longitude.length > 0 && latitude.length > 0) {
  341. customTxMap.initMap('map-container',longitude,latitude);
  342. } else {
  343. customTxMap.initMap('map-container');
  344. }
  345. //搜索地图
  346. $("#searchMap").click(function () {
  347. var province = $("#province");
  348. var city = $("#city");
  349. var district = $("#district");
  350. var address = $("input[name='address']").val();
  351. if(!province.val()){
  352. layer.msg("请选择省份");
  353. return;
  354. }
  355. if(!city.val()){
  356. layer.msg("请选择市");
  357. return;
  358. }
  359. if(!district.val()){
  360. layer.msg("请选择镇/区");
  361. return;
  362. }
  363. var intactAddress = province.find("option:selected").text() + city.find("option:selected").text() + district.find("option:selected").text() + address;
  364. customTxMap.searchMap(intactAddress);
  365. })
  366. }
  367. });
  368. })
  369. </script>