完善本地生活商家审核和列表显示
This commit is contained in:
parent
7f570b7430
commit
cbe0d4f7b2
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\shop;
|
||||
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\server\ConfigServer;
|
||||
use app\common\enum\LocalLifeICBCEnum;
|
||||
|
||||
class LocalLife extends AdminBase
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return view('', []);
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
return view('', [
|
||||
'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表
|
||||
'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型
|
||||
'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型
|
||||
'tx_map_key' => ConfigServer::get('map', 'tx_map_key')
|
||||
]);
|
||||
}
|
||||
}
|
||||
65
app/admin/controller/shop/LocalStore.php
Normal file
65
app/admin/controller/shop/LocalStore.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\shop;
|
||||
|
||||
use app\admin\logic\shop\AuthLogic;
|
||||
use app\admin\validate\ShopAuthValidate;
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\server\ConfigServer;
|
||||
use app\common\enum\LocalLifeICBCEnum;
|
||||
use app\admin\logic\shop\LocalStoreLogic;
|
||||
use app\common\server\JsonServer;
|
||||
|
||||
class LocalStore extends AdminBase
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$lists = LocalStoreLogic::lists();
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
return View();
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
return view('', [
|
||||
'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表
|
||||
'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型
|
||||
'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型
|
||||
'tx_map_key' => ConfigServer::get('map', 'tx_map_key')
|
||||
]);
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
}
|
||||
return view('', [
|
||||
'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表
|
||||
'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型
|
||||
'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型
|
||||
'tx_map_key' => ConfigServer::get('map', 'tx_map_key'),
|
||||
'id' => $id
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核操作
|
||||
*/
|
||||
public function operation()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
if ($post['state'] == 1 || $post['state'] == 2) {
|
||||
if (LocalStoreLogic::update_state($post['id'], $post['state'])) {
|
||||
return JsonServer::success('操作成功');
|
||||
}
|
||||
}
|
||||
return JsonServer::error('操作失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
22
app/admin/logic/shop/LocalStoreLogic.php
Normal file
22
app/admin/logic/shop/LocalStoreLogic.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\logic\shop;
|
||||
|
||||
use app\common\basics\Logic;
|
||||
use app\common\model\LocalStore;
|
||||
use app\common\model\user\User;
|
||||
|
||||
class LocalStoreLogic extends Logic
|
||||
{
|
||||
public static function lists()
|
||||
{
|
||||
return array(
|
||||
'lists' => LocalStore::with('info')->select()->toArray()
|
||||
);
|
||||
}
|
||||
|
||||
public static function update_state($id, $state)
|
||||
{
|
||||
return LocalStore::where(['lstore_id' => $id])->update(['store_state' => $state]);
|
||||
}
|
||||
}
|
||||
385
app/admin/view/shop/local_store/edit.html
Normal file
385
app/admin/view/shop/local_store/edit.html
Normal file
@ -0,0 +1,385 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.layui-form {padding: 20px 30px;background-color: #ffffff;}
|
||||
.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; }
|
||||
</style>
|
||||
|
||||
<div class="layui-card layui-form">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<input name="id" id="form_id" type="hidden" value="{$id}">
|
||||
<div class="layui-form-item">
|
||||
<label for="rgiNo" class="layui-form-label"><span style="color:red;">*</span>地区号:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="rgiNo" id="rgiNo" lay-verType="tips" lay-verify="rgiNo"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="dominationBankNo" class="layui-form-label"><span style="color:red;">*</span>管辖网点号:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="dominationBankNo" id="dominationBankNo" lay-verType="tips" lay-verify="dominationBankNo"
|
||||
switch-tab="0" 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-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>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="crftType1" class="layui-form-label"><span style="color:red;">*</span>商户证件类型:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select id="crftType1" name="crftType1" class="layui-select" lay-search>
|
||||
{volist name='crftType1List' id='vo' key="k" }
|
||||
<option value="{$k}">{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="crftNo1" class="layui-form-label"><span style="color:red;">*</span>证件号码:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="crftNo1" id="crftNo1" lay-verType="tips" lay-verify="crftNo1"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="crftName2" class="layui-form-label"><span style="color:red;">*</span>法人/负责人名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="crftName2" id="crftName2" lay-verType="tips" lay-verify="crftName2"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="crftType2" class="layui-form-label"><span style="color:red;">*</span>法人/负责人证件类型:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select id="crftType2" name="crftType2" class="layui-select" lay-search>
|
||||
{volist name='crftType2List' id='vo' key="k" }
|
||||
<option value="{$k}">{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="crftNo2" class="layui-form-label"><span style="color:red;">*</span>法人/负责人证件号码:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="crftNo2" id="crftNo2" lay-verType="tips" lay-verify="crftNo2"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="lidaddr" class="layui-form-label"><span style="color:red;">*</span>商户地址(营业执照地址):</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="lidaddr" id="lidaddr" lay-verType="tips" lay-verify="lidaddr"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="chnsName" class="layui-form-label"><span style="color:red;">*</span>特约商户中文名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="chnsName" id="chnsName" lay-verType="tips" lay-verify="chnsName"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="englName" class="layui-form-label"><span style="color:red;">*</span>特约商户英文名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="englName" id="englName" lay-verType="tips" lay-verify="englName"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="shortName" class="layui-form-label"><span style="color:red;">*</span>门店名称/商户简称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="shortName" id="shortName" lay-verType="tips" lay-verify="shortName"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="postCode" class="layui-form-label"><span style="color:red;">*</span>邮政编码(实际营业地址):</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="postCode" id="postCode" lay-verType="tips" lay-verify="postCode"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="merconat" class="layui-form-label"><span style="color:red;">*</span>商户联系人:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="merconat" id="merconat" lay-verType="tips" lay-verify="merconat"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="mertel" class="layui-form-label"><span style="color:red;">*</span>联系电话:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="mertel" id="mertel" lay-verType="tips" lay-verify="mertel"
|
||||
switch-tab="0" 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="ebankConFlag" value="1" title="是">
|
||||
<input type="radio" name="ebankConFlag" value="2" title="否" checked>
|
||||
</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="shopHomeConFlag" value="1" title="是">
|
||||
<input type="radio" name="shopHomeConFlag" value="2" title="否" checked>
|
||||
</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="mcssAdminFlag" value="1" title="是">
|
||||
<input type="radio" name="mcssAdminFlag" value="2" title="否" checked>
|
||||
</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="creditSwitch" value="1" title="是">
|
||||
<input type="radio" name="creditSwitch" value="2" title="否" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="accntType1" class="layui-form-label"><span style="color:red;">*</span>结算账户类型:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select id="accntType1" name="accntType1" class="layui-select" lay-search>
|
||||
{volist name='accntType1List' id='vo' key="k" }
|
||||
<option value="{$k}">{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="accntNo1" class="layui-form-label"><span style="color:red;">*</span>消费结算卡号/账户:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="accntNo1" id="accntNo1" lay-verType="tips" lay-verify="accntNo1"
|
||||
switch-tab="0" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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="searchMap">搜索地图</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-input-block" style="margin-left:10px;">
|
||||
<div class="map-container" id="map-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-ite">
|
||||
<button class="layui-btn layui-btn-normal operation-agree">审核通过</button>
|
||||
<button class="layui-btn layui-btn-danger operation-pass">拒绝审核</button>
|
||||
</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>
|
||||
layui.config({
|
||||
base: "/static/lib/"
|
||||
}).extend({
|
||||
likeArea: "likeArea/likeArea",
|
||||
txMap: "likeMap/txMap"
|
||||
}).use(["form", "laydate", "likeArea", "txMap"], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var likeArea = layui.likeArea;
|
||||
var laydate = layui.laydate;
|
||||
var txMap = layui.txMap;
|
||||
|
||||
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)
|
||||
});
|
||||
});
|
||||
|
||||
$(".operation-agree").on('click', function() {
|
||||
console.log($('#form_id').val());
|
||||
layer.confirm('是否通过审核?', function(index){
|
||||
like.ajax({
|
||||
url:'{:url("shop.LocalStore/operation")}',
|
||||
data: {id: $("#form_id").val(), state: 1},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1) {
|
||||
layer.close(index);
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function(){
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
$(".operation-pass").on('click', function() {
|
||||
console.log($('#form_id').val());
|
||||
layer.confirm('是否拒绝审核?', function(index){
|
||||
like.ajax({
|
||||
url:'{:url("shop.LocalStore/operation")}',
|
||||
data: {id: $("#form_id").val(), state: 2},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1) {
|
||||
layer.close(index);
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function(){
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
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("", "");
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -37,17 +37,44 @@
|
||||
</button>
|
||||
|
||||
<table id="like-table-lists" lay-filter="like-table-lists"></table>
|
||||
<script type="text/html" id="table-image">
|
||||
<script type="text/html" id="businesslicense-operation">
|
||||
{{# if(d.businessLicense){ }}
|
||||
<img src="{{d.businessLicense}}" alt="营业执照" style="width: 200px;height: 200px;object-fit: contain;">
|
||||
<img src="{{d.businessLicense}}" alt="营业执照" style="width: 200px;height: 200px;object-fit: contain;" class="image-show">
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="table-operation">
|
||||
<script type="text/html" id="ebank-operation">
|
||||
{{# if(d.ebankConFlag == 1){ }}
|
||||
<span>是</span>
|
||||
{{# } else{ }}
|
||||
<span>否</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="shophome-operation">
|
||||
{{# if(d.ebankConFlag == 1){ }}
|
||||
<span>是</span>
|
||||
{{# } else{ }}
|
||||
<span>否</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="mcssadmin-operation">
|
||||
{{# if(d.ebankConFlag == 1){ }}
|
||||
<span>是</span>
|
||||
{{# } else{ }}
|
||||
<span>否</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="creditwwitch-operation">
|
||||
{{# if(d.ebankConFlag == 1){ }}
|
||||
<span>是</span>
|
||||
{{# } else{ }}
|
||||
<span>否</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="localstore-operation">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del">删除</a>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -55,25 +82,45 @@
|
||||
layui.use(["table", "form"], function () {
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
|
||||
like.tableLists("#like-table-lists", "{:url()}", [
|
||||
{field: "id", width: 60, title: "ID"}
|
||||
, {field: "storeInfo", width: 200, title: "营业执照", templet: "#table-business-license"}
|
||||
, {field: "name", width: 120, align: "center", title: "法人/负责人名称"}
|
||||
, {field: "image", width: 200, align: "center", title: "商户地址"}
|
||||
, {field: "sort", width: 200, align: "center", title: "门店名称/商户简称"}
|
||||
, {field: "sort", width: 120, align: "center", title: "商户联系人"}
|
||||
, {field: "sort", width: 150, align: "center", title: "联系电话"}
|
||||
, {title: "操作", width: 150, align: "center", fixed: "right", toolbar: "#table-operation"}
|
||||
{field: "lstore_id", width: 60, title: "ID"}
|
||||
, {field: "businessLicense", width: 120, align: "center", title: "营业执照", toolbar: '#businesslicense-operation'}
|
||||
, {field: "rgiNo", width: 120, align: "center", title: "地区号"}
|
||||
, {field: "dominationBankNo", width: 120, align: "center", title: "地区号"}
|
||||
, {field: "crftType1", width: 120, align: "center", title: "商户证件类型"}
|
||||
, {field: "crftNo1", width: 120, align: "center", title: "证件号码"}
|
||||
, {field: "crftName2", width: 120, align: "center", title: "法人/负责人名称"}
|
||||
, {field: "crftType2", width: 120, align: "center", title: "法人/负责人证件类型"}
|
||||
, {field: "crftNo2", width: 120, align: "center", title: "法人/负责人证件号码"}
|
||||
, {field: "lidaddr", width: 200, align: "center", title: "商户地址"}
|
||||
, {field: "chnsName", width: 200, align: "center", title: "商户中文名称"}
|
||||
, {field: "englName", width: 200, align: "center", title: "商户英文名称"}
|
||||
, {field: "shortName", width: 200, align: "center", title: "门店名称/商户简称"}
|
||||
, {field: "postCode", width: 200, align: "center", title: "邮政编码"}
|
||||
, {field: "merconat", width: 120, align: "center", title: "商户联系人"}
|
||||
, {field: "mertel", width: 150, align: "center", title: "联系电话"}
|
||||
, {field: "ebankConFlag", width: 150, align: "center", title: "关联企业网银", toolbar: '#ebank-operation'}
|
||||
, {field: "shopHomeConFlag", width: 150, align: "center", title: "开通商户之家", toolbar: '#shophome-operation'}
|
||||
, {field: "mcssAdminFlag", width: 150, align: "center", title: "开通商户之家管理员", toolbar: '#mcssadmin-operation'}
|
||||
, {field: "creditSwitch", width: 150, align: "center", title: "受理信用卡", toolbar: '#creditwwitch-operation'}
|
||||
, {field: "accntType1", width: 150, align: "center", title: "结算账户类型"}
|
||||
, {field: "accntNo1", width: 150, align: "center", title: "消费结算卡号/账户"}
|
||||
, {field: "address", width: 150, align: "center", title: "地理位置"}
|
||||
, {fixed: 'right', title: '操作', width: 280, align: 'center', toolbar: '#localstore-operation'}
|
||||
]);
|
||||
|
||||
//图片放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
var active = {
|
||||
add: function () {
|
||||
layer.open({
|
||||
type: 2
|
||||
, title: "新增本地生活商家"
|
||||
, content: "{:url('shop.LocalLife/add')}"
|
||||
, content: "{:url('shop.LocalStore/add')}"
|
||||
, area: ['90%', '90%']
|
||||
, btn: ["确定", "取消"]
|
||||
, yes: function (index, layero) {
|
||||
@ -103,9 +150,9 @@
|
||||
edit: function (obj) {
|
||||
layer.open({
|
||||
type: 2
|
||||
, title: "编辑主营类目"
|
||||
, content: "{:url('shop.Category/edit')}?id=" + obj.data.id
|
||||
, area: ["550px", "400px"]
|
||||
, title: "编辑本地生活"
|
||||
, content: "{:url('shop.LocalStore/edit')}?id=" + obj.data.lstore_id
|
||||
, area: ['90%', '90%']
|
||||
, btn: ["确定", "取消"]
|
||||
, yes: function (index, layero) {
|
||||
var iframeWindow = window["layui-layer-iframe" + index];
|
||||
16
app/common/model/LocalStore.php
Normal file
16
app/common/model/LocalStore.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use app\common\model\user\User;
|
||||
use think\Model;
|
||||
|
||||
class LocalStore extends Model
|
||||
{
|
||||
protected $name = 'local_store';
|
||||
|
||||
public function info()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id', 'id')->field('id, nickname');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user