7 files added
6 files modified
| | |
| | | import cc.mrbird.febs.mall.entity.AppVersion; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.entity.MallNewsInfo; |
| | | import cc.mrbird.febs.mall.entity.MallShopApply; |
| | | import cc.mrbird.febs.mall.service.IAdminMallMemberService; |
| | | import cc.mrbird.febs.mall.vo.AdminAgentLevelOptionTreeVo; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | return mallMemberService.resetPwd(id); |
| | | } |
| | | |
| | | @GetMapping("shopApplyList") |
| | | @ControllerEndpoint(operation = "申请通道列表", exceptionMessage = "获取失败") |
| | | public FebsResponse shopApplyList(MallShopApply mallShopApply, QueryRequest request) { |
| | | return new FebsResponse().success().data(getDataTable(mallMemberService.findShopApplyListInPage(mallShopApply, request))); |
| | | } |
| | | |
| | | @PostMapping("applyCheckAgree/{id}") |
| | | public FebsResponse applyCheckAgree(@PathVariable Long id) { |
| | | mallMemberService.applyCheckAgree(id); |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | @PostMapping(value = "applyCheckDisAgree/{id}") |
| | | public FebsResponse applyCheckDisAgree(@PathVariable Long id) { |
| | | mallMemberService.applyCheckDisAgree(id); |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cc.mrbird.febs.mall.controller; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.dto.ShopApplyDto; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-05-12 |
| | | **/ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(value = "/api/apply") |
| | | @RequiredArgsConstructor |
| | | @Api(value = "ApiApplyController", tags = "申请通道接口类") |
| | | public class ApiApplyController { |
| | | |
| | | private final IApiMallMemberService memberService; |
| | | |
| | | @ApiOperation(value = "申请通道") |
| | | @PostMapping(value = "/shopApply") |
| | | public FebsResponse shopApply(@RequestBody ShopApplyDto shopApplyDto) { |
| | | memberService.shopApply(shopApplyDto); |
| | | return new FebsResponse().success().message("申请成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取申请信息") |
| | | @GetMapping(value = "/findApply") |
| | | public FebsResponse findApply() { |
| | | return new FebsResponse().success().data(memberService.findNewestApply()); |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.mall.entity.AppVersion; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.entity.MallNewsInfo; |
| | | import cc.mrbird.febs.mall.entity.MallShopApply; |
| | | import cc.mrbird.febs.mall.service.IAdminMallMemberService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | |
| | | |
| | | @GetMapping("shopApply") |
| | | public String shopApply() { |
| | | return FebsUtil.view("modules/mallMember/shopApply"); |
| | | } |
| | | |
| | | |
| | | @GetMapping("applyDetail/{id}") |
| | | public String applyDetail(@PathVariable("id") Long id, Model model) { |
| | | MallShopApply apply = mallMemberService.findShopApplyById(id); |
| | | model.addAttribute("apply", apply); |
| | | return FebsUtil.view("modules/mallMember/shopApplyInfo"); |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package cc.mrbird.febs.mall.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-05-12 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "ShopApplyDto", description = "申请通道接口参数接收类") |
| | | public class ShopApplyDto { |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "姓名", example = "123") |
| | | private String name; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "联系方式", example = "15712341234") |
| | | private String phone; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idcard; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "营业执照") |
| | | private String businessLicense; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "经营场地") |
| | | private String saleArea; |
| | | } |
New file |
| | |
| | | package cc.mrbird.febs.mall.entity; |
| | | |
| | | import cc.mrbird.febs.common.entity.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-05-12 |
| | | **/ |
| | | @Data |
| | | @TableName("mall_shop_apply") |
| | | public class MallShopApply extends BaseEntity { |
| | | |
| | | public static final Integer APPLY_AGREE = 1; |
| | | public static final Integer APPLY_ING = 2; |
| | | public static final Integer APPLY_DISAGREE = 3; |
| | | |
| | | private Long memberId; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 身份证 |
| | | */ |
| | | private String idcard; |
| | | |
| | | /** |
| | | * 营业执照 |
| | | */ |
| | | private String businessLicense; |
| | | |
| | | /** |
| | | * 经营场地 |
| | | */ |
| | | private String saleArea; |
| | | |
| | | /** |
| | | * 1-通过 2-申请中 3-驳回 |
| | | */ |
| | | private Integer status; |
| | | |
| | | @TableField(exist = false) |
| | | private String vipName; |
| | | |
| | | @TableField(exist = false) |
| | | private String inviteId; |
| | | } |
New file |
| | |
| | | package cc.mrbird.febs.mall.mapper; |
| | | |
| | | import cc.mrbird.febs.mall.entity.MallShopApply; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface MallShopApplyMapper extends BaseMapper<MallShopApply> { |
| | | |
| | | IPage<MallShopApply> selectShopApplyInPage(@Param("record") MallShopApply shopApply, Page<MallShopApply> page); |
| | | |
| | | MallShopApply selectNewestApplyByMemberId(@Param("memberId") Long memberId); |
| | | } |
| | |
| | | import cc.mrbird.febs.mall.entity.AppVersion; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.entity.MallNewsInfo; |
| | | import cc.mrbird.febs.mall.entity.MallShopApply; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | FebsResponse resetPwd(Long id); |
| | | |
| | | IPage<MallDataVo> getMallDataList(MallMember mallMember, QueryRequest request); |
| | | |
| | | IPage<MallShopApply> findShopApplyListInPage(MallShopApply mallShopApply, QueryRequest request); |
| | | |
| | | MallShopApply findShopApplyById(Long id); |
| | | |
| | | void applyCheckAgree(Long id); |
| | | void applyCheckDisAgree(Long id); |
| | | } |
| | |
| | | import cc.mrbird.febs.mall.dto.*; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.entity.MallMemberPayment; |
| | | import cc.mrbird.febs.mall.entity.MallShopApply; |
| | | import cc.mrbird.febs.mall.vo.MyCommissionVo; |
| | | import cc.mrbird.febs.mall.vo.MyTeamVo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | MallMember findMemberInfoByAccount(String phone); |
| | | |
| | | MyCommissionVo myCommission(); |
| | | |
| | | void shopApply(ShopApplyDto shopApplyDto); |
| | | |
| | | MallShopApply findNewestApply(); |
| | | } |
| | |
| | | private final AppVersionMapper appVersionMapper; |
| | | |
| | | private final MallNewsInfoMapper mallNewsInfoMapper; |
| | | private final MallShopApplyMapper mallShopApplyMapper; |
| | | |
| | | @Override |
| | | public IPage<MallMember> getMallMemberList(MallMember mallMember, QueryRequest request) { |
| | |
| | | IPage<MallDataVo> mallDataVos = this.baseMapper.getMallDataListInPage(page, mallMember); |
| | | return mallDataVos; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MallShopApply> findShopApplyListInPage(MallShopApply mallShopApply, QueryRequest request) { |
| | | Page<MallShopApply> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | |
| | | return mallShopApplyMapper.selectShopApplyInPage(mallShopApply, page); |
| | | } |
| | | |
| | | @Override |
| | | public MallShopApply findShopApplyById(Long id) { |
| | | return mallShopApplyMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void applyCheckAgree(Long id) { |
| | | MallShopApply apply = mallShopApplyMapper.selectById(id); |
| | | if (!MallShopApply.APPLY_ING.equals(apply.getStatus())) { |
| | | throw new FebsException("申请已审核, 请勿重复操作"); |
| | | } |
| | | |
| | | apply.setStatus(MallShopApply.APPLY_AGREE); |
| | | mallShopApplyMapper.updateById(apply); |
| | | } |
| | | |
| | | @Override |
| | | public void applyCheckDisAgree(Long id) { |
| | | MallShopApply apply = mallShopApplyMapper.selectById(id); |
| | | if (!MallShopApply.APPLY_ING.equals(apply.getStatus())) { |
| | | throw new FebsException("申请已审核, 请勿重复操作"); |
| | | } |
| | | |
| | | apply.setStatus(MallShopApply.APPLY_DISAGREE); |
| | | mallShopApplyMapper.updateById(apply); |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.ICommonService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | |
| | | private final IApiMallMemberWalletService walletService; |
| | | private final MallMemberPaymentMapper mallMemberPaymentMapper; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final MallShopApplyMapper mallShopApplyMapper; |
| | | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | |
| | | commissionVo.setWaitCommission(BigDecimal.ZERO); |
| | | return commissionVo; |
| | | } |
| | | |
| | | @Override |
| | | public void shopApply(ShopApplyDto shopApplyDto) { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | |
| | | MallShopApply hasApply = mallShopApplyMapper.selectNewestApplyByMemberId(member.getId()); |
| | | if (hasApply != null) { |
| | | if (!hasApply.getStatus().equals(MallShopApply.APPLY_DISAGREE)) { |
| | | throw new FebsException("审核中或审核已通过"); |
| | | } |
| | | } |
| | | |
| | | MallShopApply mallShopApply = new MallShopApply(); |
| | | BeanUtil.copyProperties(shopApplyDto, mallShopApply); |
| | | |
| | | mallShopApply.setStatus(MallShopApply.APPLY_ING); |
| | | mallShopApply.setMemberId(member.getId()); |
| | | mallShopApplyMapper.insert(mallShopApply); |
| | | } |
| | | |
| | | @Override |
| | | public MallShopApply findNewestApply() { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | |
| | | return mallShopApplyMapper.selectNewestApplyByMemberId(member.getId()); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cc.mrbird.febs.mall.mapper.MallShopApplyMapper"> |
| | | |
| | | <select id="selectShopApplyInPage" resultType="cc.mrbird.febs.mall.entity.MallShopApply"> |
| | | |
| | | select a.*,b.name vipName, b.invite_id inviteId |
| | | from mall_shop_apply a |
| | | inner join mall_member b on a.member_id=b.ID |
| | | <where> |
| | | <if test="record.name != null and record.name !=''"> |
| | | and (a.name like concat('%', concat(#{record.name, '%'})) or b.invite_id=#{record.name} ) |
| | | </if> |
| | | <if test="record.status != null"> |
| | | and a.status = #{record.status} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectNewestApplyByMemberId" resultType="cc.mrbird.febs.mall.entity.MallShopApply"> |
| | | select *, max(created_time) from mall_shop_apply |
| | | where member_id=#{memberId} |
| | | group by member_id |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-shop-apply" lay-title="申请通道列表"> |
| | | <div class="layui-row febs-container"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body febs-table-full"> |
| | | <form class="layui-form layui-table-form" lay-filter="shop-apply-table-form"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="name" autocomplete="off" class="layui-input" placeholder="法人名称/邀请码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="status"> |
| | | <option value=""></option> |
| | | <option value="2">等待审核</option> |
| | | <option value="1">申请通过</option> |
| | | <option value="3">申请驳回</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table lay-filter="shopApplyTable" lay-data="{id: 'shopApplyTable'}"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-table-cell { height:auto; } |
| | | </style> |
| | | <!-- 表格操作栏 start --> |
| | | <script type="text/html" id="user-option"> |
| | | <span shiro:lacksPermission="user:view,user:update,user:delete"> |
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限 |
| | | </span> |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | </script> |
| | | <script type="text/html" id="card-url"> |
| | | {{# |
| | | var imgUrl = d.idcard; |
| | | if(imgUrl) { |
| | | imgUrl = imgUrl.substring(imgUrl.indexOf(',') + 1); |
| | | } |
| | | }} |
| | | <img src="{{ imgUrl }}" alt="" /> |
| | | </script> |
| | | <script type="text/html" id="license-url"> |
| | | {{# |
| | | var imgUrl = d.businessLicense; |
| | | if(imgUrl) { |
| | | imgUrl = imgUrl.substring(imgUrl.indexOf(',') + 1); |
| | | } |
| | | }} |
| | | <img src="{{ imgUrl }}" alt="" /> |
| | | </script> |
| | | <script type="text/html" id="area-url"> |
| | | {{# |
| | | var imgUrl = d.saleArea; |
| | | if(imgUrl) { |
| | | imgUrl = imgUrl.substring(imgUrl.indexOf(',') + 1); |
| | | } |
| | | }} |
| | | <img src="{{ imgUrl }}" alt="" /> |
| | | </script> |
| | | <script type="text/html" id="apply-status"> |
| | | {{# |
| | | var status = { |
| | | 1: {title: '审核通过'}, |
| | | 2: {title: '等待审核'}, |
| | | 3: {title: '审核驳回'} |
| | | }[d.status]; |
| | | }} |
| | | <span>{{ status.title }}</span> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | | layui.use([ 'jquery', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-shop-apply'), |
| | | $query = $view.find('#query'), |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: '', type: null}, |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(shopApplyTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'shopApplyInfo') { |
| | | febs.modal.open('查看详情', 'modules/mallMember/applyDetail/' + data.id, { |
| | | btn: ['通过申请', '驳回申请'], |
| | | area : $(window).width() <= 750 ? '95%' : '660px', |
| | | yes: function (index, layero) { |
| | | $('#shop-apply-detail').find('#agree').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | $('#shop-apply-detail').find('#disagree').trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | | var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); |
| | | tableIns.reload({where: params, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'shopApplyTable', |
| | | url: ctx + 'admin/mallMember/shopApplyList', |
| | | cols: [[ |
| | | {field: 'vipName', title: '会员名称', minWidth: 100}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100}, |
| | | {field: 'name', title: '法人姓名', minWidth: 100}, |
| | | {field: 'phone', title: '联系方式', minWidth: 100}, |
| | | {templet: '#card-url', title: '身份证', minWidth: 100}, |
| | | {templet: '#license-url', title: '营业执照', minWidth: 100}, |
| | | {templet: '#area-url', title: '经营场地', minWidth: 100}, |
| | | {templet: '#apply-status', title: '状态', minWidth: 100}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="shopApplyInfo" shiro:hasPermission="user:update">查看详情</button>' |
| | | },align:'center'} |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return { |
| | | username: $searchForm.find('input[name="name"]').val().trim(), |
| | | status: $searchForm.find("select[name='status']").val(), |
| | | invalidate_ie_cache: new Date() |
| | | };; |
| | | } |
| | | |
| | | }) |
| | | </script> |
New file |
| | |
| | | <style> |
| | | #shop-apply-detail { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #shop-apply-detail .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #shop-apply-detail #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #user-add .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="shop-apply-detail"> |
| | | <form class="layui-form" action="" lay-filter="shop-apply-detail-form"> |
| | | <div class="layui-form-item febs-hide"> |
| | | <label class="layui-form-label febs-form-item-require">id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="id" data-th-id="${apply.id}"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">法人名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="name" data-th-id="${apply.name}" autocomplete="off" class="layui-input" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">联系方式:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="phone" data-th-id="${apply.phone}" autocomplete="off" class="layui-input" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">身份证:</label> |
| | | <div class="layui-input-block"> |
| | | <blockquote id="cardUrl"></blockquote> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">营业执照:</label> |
| | | <div class="layui-input-block"> |
| | | <blockquote id="businessLicense"></blockquote> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">经营场地:</label> |
| | | <div class="layui-input-block"> |
| | | <blockquote id="areaUrl"></blockquote> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="shop-apply-form-agree" id="agree"></button> |
| | | <button class="layui-btn" lay-submit="" lay-filter="shop-apply-form-disagree" id="disagree"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript" type="text/html" id="urlTemplate"> |
| | | {{# layui.each(d, function(index, item){ }} |
| | | <img src="{{item}}" style="width: 120px" /> |
| | | {{# }) }} |
| | | </script> |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree','laytpl'], function () { |
| | | var $ = layui.$, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | form = layui.form, |
| | | apply = [[${apply}]], |
| | | laytpl = layui.laytpl, |
| | | $view = $('#shop-apply-detail'), |
| | | templateHtml = urlTemplate.innerHTML; |
| | | |
| | | form.render(); |
| | | initUrl(); |
| | | function initUrl() { |
| | | var cardUrl = apply.idcard; |
| | | if (cardUrl) { |
| | | var list = cardUrl.split(",") |
| | | laytpl(templateHtml).render(list, function(html) { |
| | | $('#cardUrl').append(html); |
| | | }) |
| | | } |
| | | |
| | | var businessUrl = apply.businessLicense; |
| | | if (businessUrl) { |
| | | var businessList = businessUrl.split(",") |
| | | laytpl(templateHtml).render(businessList, function(html) { |
| | | $('#businessLicense').append(html); |
| | | }) |
| | | } |
| | | |
| | | var areaUrl = apply.saleArea; |
| | | if (areaUrl) { |
| | | var areaList = areaUrl.split(",") |
| | | laytpl(templateHtml).render(areaList, function(html) { |
| | | $('#areaUrl').append(html); |
| | | }) |
| | | } |
| | | } |
| | | initUserValue(); |
| | | function initUserValue() { |
| | | form.val("shop-apply-detail-form", { |
| | | "name": apply.name, |
| | | "phone": apply.phone, |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(shop-apply-form-agree)', function (data) { |
| | | febs.modal.confirm('通过审核', '确定通过该申请?', function () { |
| | | febs.post(ctx + 'admin/mallMember/applyCheckAgree/' + apply.id, null, function () { |
| | | febs.alert.success("操作成功"); |
| | | layer.closeAll(); |
| | | $('#febs-shop-apply').find('#query').click(); |
| | | }); |
| | | }) |
| | | |
| | | return false; |
| | | }); |
| | | |
| | | form.on('submit(shop-apply-form-disagree)', function (data) { |
| | | febs.modal.confirm('驳回审核', '确定驳回该申请?', function () { |
| | | febs.post(ctx + 'admin/mallMember/applyCheckDisAgree/' + apply.id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | layer.closeAll(); |
| | | $('#febs-shop-apply').find('#query').click(); |
| | | }); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |