123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409 |
- {layout name="layout2" /}
- <style>
- .layui-form-item .layui-form-label {
- width: 95px;
- }
-
- .layui-form-item .layui-input-inline {
- width: 240px;
- }
-
- .layui-form-item .map-container {
- width: 600px;
- height: 400px;
- margin-left: 100px;
- margin-top: 20px;
- }
-
- .layui-form-select dl {
- z-index: 1001;
- }
- </style>
-
- <div class="layui-card layui-form" style="box-shadow:none;">
- <div class="layui-tab layui-tab-card" lay-filter="like-tabs">
- <ul class="layui-tab-title">
- <li lay-id="1" class="layui-this">基础设置</li>
- <li lay-id="2">经营设置</li>
- <li lay-id="3">账号设置</li>
- </ul>
- <div class="layui-tab-content">
- <!-- 1、基础设置 -->
- <div class="layui-tab-item layui-show">
- <div class="layui-form-item">
- <label for="name" class="layui-form-label"><span style="color:red;">*</span>商家名称:</label>
- <div class="layui-input-inline">
- <input type="text" name="name" id="name" lay-verType="tips" lay-verify="name" switch-tab="0"
- autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label class="layui-form-label"><span style="color:red;">*</span>商家类型:</label>
- <div class="layui-input-inline">
- <input type="radio" name="type" value="1" title="官方自营">
- <input type="radio" name="type" value="2" title="入驻商家" checked>
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label class="layui-form-label"><span style="color:red;">*</span>配送方式:</label>
- <div class="layui-input-inline">
- <input type="checkbox" name="delivery_type[]" value="1" title="快递发货" lay-skin="primary" checked
- disabled>
- <input type="checkbox" name="delivery_type[]" value="2" title="线下自提" lay-skin="primary">
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">
- 实物商品的配送方式【快递发货】默认为必选,虚拟商品默认为虚拟发货,不受配送方式限制</div>
- </div>
- </div>
- <div class="layui-form-item">
- <label for="cid" class="layui-form-label"><span style="color:red;">*</span>主营类目:</label>
- <div class="layui-input-inline">
- <select name="cid" id="cid" lay-verType="tips" lay-verify="cid" switch-tab="0">
- <option value=""></option>
- {volist name="category" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label for="nickname" class="layui-form-label"><span style="color:red;">*</span>联系人:</label>
- <div class="layui-input-inline">
- <input type="text" name="nickname" id="nickname" lay-verType="tips" lay-verify="nickname"
- switch-tab="0" autocomplete="off" class="layui-input" value="wuwu">
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label for="mobile" class="layui-form-label"><span style="color:red;">*</span>联系手机:</label>
- <div class="layui-input-inline">
- <input type="number" name="mobile" id="mobile" lay-verType="tips" lay-verify="mobile"
- switch-tab="0" autocomplete="off" class="layui-input" value="13268119865">
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label class="layui-form-label"><span style="color:red;">*</span>商家logo:</label>
- <div class="layui-input-block">
- <div class="like-upload-image" switch-tab="0" lay-verType="tips" lay-verify="logo">
- <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
- </div>
- <div class="layui-form-mid layui-word-aux">建议尺寸:宽200像素*高200像素的jpg,jpeg,png图片</div>
- </div>
- <input type="hidden" name="logo" value="./uploads/images/20250221/202502211625593cc9c0131.png">
- </div>
-
- <div class="layui-form-item" style="display: none;">
- <label class="layui-form-label">商家地址:</label>
- <div class="layui-input-block">
- <div class="layui-input-inline" style="width:120px;">
- <select name="province_id" id="province" lay-filter="province"></select>
- </div>
- <div class="layui-input-inline" style="width:120px;">
- <select name="city_id" id="city" lay-filter="city"></select>
- </div>
- <div class="layui-input-inline" style="width:120px;">
- <select name="district_id" id="district"></select>
- </div>
- <div class="layui-input-inline">
- <input type="text" name="address" id="address" autocomplete="off" class="layui-input">
- </div>
- <div class="layui-input-inline">
- <button class="layui-btn layui-btn-normal" id="search_map">搜索地图</button>
- </div>
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label class="layui-form-label">地图定位:</label>
- <div class="layui-input-block">
- <div class="layui-inline">
- <div class="layui-input-inline" style="width:120px;margin-right:5px;">
- <input type="text" name="longitude" autocomplete="off" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">经度</div>
- </div>
- <div class="layui-inline" style="margin-right:0;">
- <div class="layui-input-inline" style="width:120px;margin-right:5px;">
- <input type="text" name="latitude" autocomplete="off" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">纬度</div>
- </div>
- </div>
- </div>
- <div class="layui-form-item " style="display: none;">
- <label class="layui-form-label"></label>
- <div class="layui-input-block" style="margin-left:10px;">
- <div id="map-container" style="width: 700px;height: 400px;margin-left: 115px;"></div>
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label for="keywords" class="layui-form-label">商家关键字:</label>
- <div class="layui-input-inline">
- <input type="text" name="keywords" id="keywords" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label for="intro" class="layui-form-label">商家简介:</label>
- <div class="layui-input-inline">
- <textarea name="intro" id="intro" class="layui-textarea"></textarea>
- </div>
- </div>
- </div>
- <!-- 2、经营设置 -->
- <div class="layui-tab-item">
- <div class="layui-form-item" style="display: none;">
- <label for="expire_time" class="layui-form-label"><span style="color:red;">*</span>到期时间:</label>
- <div class="layui-input-inline">
- <input type="text" name="expire_time" id="expire_time" lay-verType="tips"
- lay-verify="expire_time" switch-tab="1" autocomplete="off" class="layui-input">
- </div>
- </div>
-
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:red;">*</span>获客类型:</label>
- <div class="layui-input-inline">
- <input type="radio" name="hksy_type" value="0" title="包月" lay-filter="hksy_type">
- <input type="radio" name="hksy_type" value="1" title="按量付费" lay-filter="hksy_type" checked>
- </div>
- </div>
-
- <div class="layui-form-item hksy_type_item">
- <label for="hksy_count" class="layui-form-label"><span style="color:red;">*</span>赠送评论数:</label>
- <div class="layui-input-inline">
- <input type="number" name="hksy_count" id="hksy_count" value="1000" lay-verType="tips"
- lay-verify="hksy_count" switch-tab="1" autocomplete="off" class="layui-input">
- </div>
- </div>
-
- <div class="layui-form-item hksy_type_item2" style="display: none;">
- <label for="months" class="layui-form-label"><span style="color:red;">*</span>赠送月份数:</label>
- <div class="layui-input-inline">
- <input type="number" name="months" id="months" value="12" lay-verType="tips"
- lay-verify="months" switch-tab="1" autocomplete="off" class="layui-input">
- </div>
- </div>
-
- <div class="layui-form-item" style="display: none;">
- <label for="trade_service_fee" class="layui-form-label"><span
- style="color:red;">*</span>交易服务费:</label>
- <div class="layui-input-inline">
- <input type="number" min="0" max="100" name="trade_service_fee" id="trade_service_fee"
- lay-verType="tips" lay-verify="trade_service_fee"
- onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" switch-tab="1"
- autocomplete="off" class="layui-input" value="0">
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">
- 平台每笔交易收取的服务费用。请填写百分比,填0表示不收取服务费</div>
- </div>
- <div class="layui-form-mid layui-word-aux">%</div>
- </div>
- <div class="layui-form-item" style="display: none;">
- <label for="expire_time" class="layui-form-label"><span style="color:red;">*</span>产品审核:</label>
- <div class="layui-input-inline">
- <input type="radio" name="is_product_audit" value="1" title="需要审核">
- <input type="radio" name="is_product_audit" value="0" title="无需审核" checked>
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家发布商品时是否需要审核</div>
- </div>
- </div>
- <div class="layui-form-item">
- <label for="expire_time" class="layui-form-label"><span style="color:red;">*</span>营业状态:</label>
- <div class="layui-input-inline">
- <input type="radio" name="is_run" value="1" title="营业中">
- <input type="radio" name="is_run" value="0" title="暂停营业" checked>
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家暂停营业后,则不能对外提供服务</div>
- </div>
- </div>
- <div class="layui-form-item">
- <label for="expire_time" class="layui-form-label"><span style="color:red;">*</span>商家状态:</label>
- <div class="layui-input-inline">
- <input type="radio" name="is_freeze" value="0" title="正常">
- <input type="radio" name="is_freeze" value="1" title="冻结" checked>
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家冻结后,商家不能对外提供服务</div>
- </div>
- </div>
- </div>
- <!-- 3、账号设置 -->
- <div class="layui-tab-item">
- <div class="layui-form-item">
- <label for="account" class="layui-form-label"><span style="color:red;">*</span>商家账号:</label>
- <div class="layui-input-inline">
- <input type="text" name="account" id="account" lay-verType="tips" lay-verify="account"
- switch-tab="2" autocomplete="off" class="layui-input">
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家账号和密码用于登录商家后台</div>
- </div>
- </div>
- <div class="layui-form-item">
- <label for="password" class="layui-form-label"><span style="color:red;">*</span>登录密码:</label>
- <div class="layui-input-inline">
- <input type="text" name="password" id="password" lay-verType="tips" lay-verify="password"
- switch-tab="2" autocomplete="off" class="layui-input">
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家账号和密码用于登录商家后台</div>
- </div>
- </div>
- <div class="layui-form-item">
- <label for="okPassword" class="layui-form-label"><span style="color:red;">*</span>确认密码:</label>
- <div class="layui-input-inline">
- <input type="text" name="okPassword" id="okPassword" lay-verType="tips" lay-verify="pwd"
- switch-tab="2" autocomplete="off" class="layui-input">
- <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">商家账号和密码用于登录商家后台</div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="layui-form-item layui-hide">
- <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
- </div>
- </div>
-
-
- <script src="__PUBLIC__/static/common/js/area.js"></script>
- <!--<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key={$tx_map_key}"></script>-->
- <script src="https://map.qq.com/api/gljs?v=1.exp&key={$tx_map_key}&libraries=service"></script>
- <script>
- layui.config({
- base: "/static/lib/"
- }).extend({
- likeArea: "likeArea/likeArea",
- txMap: "likeMap/txMap",
- customTxMap: 'likeMap/customTxMap',
- }).use(["form", "laydate", "likeArea", "txMap", 'customTxMap'], function () {
- var $ = layui.$;
- var form = layui.form;
- var likeArea = layui.likeArea;
- var laydate = layui.laydate;
- var txMap = layui.txMap;
- var customTxMap = layui.customTxMap;
-
- laydate.render({ type: "datetime", elem: "#expire_time", trigger: "click", min: 0 });
-
-
- like.delUpload();
- $(document).on("click", ".add-upload-image", function () {
- like.imageUpload({
- limit: 1,
- field: "logo",
- that: $(this)
- });
- });
-
- form.on('radio(hksy_type)', function (data) {
- // console.log(data.elem); //得到radio原始DOM对象
- // console.log(data.value); //被点击的radio的value值
- if (data.value == 1) {
- $(".hksy_type_item").show();
- $(".hksy_type_item2").hide();
- } else {
- $(".hksy_type_item").hide();
- $(".hksy_type_item2").show();
- }
- });
-
-
- form.verify({
- name: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填写商家名称";
- }
- },
- cid: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请选择主营类目";
- }
- },
- nickname: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填写联系人";
- }
- },
- mobile: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填写联系手机号";
- }
- },
- logo: function (value, item) {
- if (!value) {
- /*if ($(item).find(".upload-image-div").length <= 0) {
- switchTab($(item).attr("switch-tab"))
- return "请上传商家logo";
- }*/
- }
- },
- // expire_time: function (value, item) {
- // if (!value) {
- // switchTab($(item).attr("switch-tab"));
- // return "请选择到期时间";
- // }
- // },
- trade_service_fee: function (value, item) {
- if (!value && parseInt(value) !== 0) {
- switchTab($(item).attr("switch-tab"));
- return "请填写交易服务费";
- }
- },
- account: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填写商家账号";
- }
- },
- password: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填写商家登录密码";
- }
- },
- pwd: function (value, item) {
- if (!value) {
- switchTab($(item).attr("switch-tab"));
- return "请填确认商家登录密码";
- }
- }
- });
-
-
- function switchTab(number) {
- $('.layui-tab-card .layui-tab-title li').removeClass('layui-this');
- $('.layui-tab-content .layui-tab-item').removeClass('layui-show');
- $('.layui-tab-card .layui-tab-title li').eq(number).addClass('layui-this');
- $('.layui-tab-content .layui-tab-item').eq(number).addClass('layui-show');
- }
-
-
-
- likeArea.init(
- "province", "city", "district", "province_id", "city_id", "district_id",
- "", "", ""
- );
- likeArea.init(
- "refund_province", "refund_city", "refund_district", "refund_province_id", "refund_city_id", "refund_district_id",
- "", "", ""
- );
-
- // txMap.init("", "");
- customTxMap.initMap('map-container');
- //搜索地图
- $("#search_map").click(function () {
- var province = $("#province");
- var city = $("#city");
- var district = $("#district");
- var address = $("input[name='address']").val();
- if (!province.val()) {
- layer.msg("请选择省份");
- return;
- }
- if (!city.val()) {
- layer.msg("请选择市");
- return;
- }
- if (!district.val()) {
- layer.msg("请选择镇/区");
- return;
- }
- var intactAddress = province.find("option:selected").text() + city.find("option:selected").text() + district.find("option:selected").text() + address;
- customTxMap.searchMap(intactAddress);
- })
-
- })
- </script>
|