门店管理;运营商和门店增加数据权限控制
This commit is contained in:
@ -69,6 +69,10 @@ public class CompanyController extends BaseController
|
|||||||
public TableDataInfo list(Company company)
|
public TableDataInfo list(Company company)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
|
// 运营者账号,只能查询所属商户数据
|
||||||
|
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
|
||||||
|
company.setId(getSysUser().getGroupId());
|
||||||
|
}
|
||||||
List<Company> list = companyService.selectCompanyList(company);
|
List<Company> list = companyService.selectCompanyList(company);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@ -135,6 +139,7 @@ public class CompanyController extends BaseController
|
|||||||
user.setUpdateTime(DateUtils.getNowDate());
|
user.setUpdateTime(DateUtils.getNowDate());
|
||||||
user.setStatus("0");
|
user.setStatus("0");
|
||||||
user.setCreateById(getUserId());
|
user.setCreateById(getUserId());
|
||||||
|
user.setGroupId(company.getId());
|
||||||
userService.insertUser(user);
|
userService.insertUser(user);
|
||||||
}
|
}
|
||||||
return toAjax(flag);
|
return toAjax(flag);
|
||||||
@ -198,6 +203,6 @@ public class CompanyController extends BaseController
|
|||||||
userService.changeStatus(user);
|
userService.changeStatus(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return toAjax(companyService.changeStatus(company));
|
return toAjax(flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,168 @@
|
|||||||
|
package com.ruoyi.operation.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.CompanyConstants;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.operation.domain.Company;
|
||||||
|
import com.ruoyi.operation.service.ICompanyService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.operation.domain.CompanyStore;
|
||||||
|
import com.ruoyi.operation.service.ICompanyStoreService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/operation/store")
|
||||||
|
public class CompanyStoreController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "operation/store";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICompanyStoreService companyStoreService;
|
||||||
|
@Autowired
|
||||||
|
private ICompanyService companyService;
|
||||||
|
|
||||||
|
@RequiresPermissions("operation:store:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String store(ModelMap mmap)
|
||||||
|
{
|
||||||
|
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
|
||||||
|
mmap.put("companyList", companyList); // 将运营商列表传递到前端
|
||||||
|
return prefix + "/store";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
// 运营者账号,只能查询所属商户数据
|
||||||
|
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
|
||||||
|
companyStore.setOperatingCompanyId(getSysUser().getGroupId());
|
||||||
|
}
|
||||||
|
List<CompanyStore> list = companyStoreService.selectCompanyStoreList(companyStore);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出门店列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:export")
|
||||||
|
@Log(title = "门店", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
List<CompanyStore> list = companyStoreService.selectCompanyStoreList(companyStore);
|
||||||
|
ExcelUtil<CompanyStore> util = new ExcelUtil<CompanyStore>(CompanyStore.class);
|
||||||
|
return util.exportExcel(list, "门店数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add(ModelMap mmap)
|
||||||
|
{
|
||||||
|
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
|
||||||
|
mmap.put("companyList", companyList); // 将运营商列表传递到前端
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存门店
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:add")
|
||||||
|
@Log(title = "门店", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
companyStore.setCreateBy(getLoginName());
|
||||||
|
return toAjax(companyStoreService.insertCompanyStore(companyStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
List<Company> companyList = getCompanyList(new Company()); // 获取运营商列表
|
||||||
|
mmap.put("companyList", companyList); // 将运营商列表传递到前端
|
||||||
|
|
||||||
|
CompanyStore companyStore = companyStoreService.selectCompanyStoreById(id);
|
||||||
|
mmap.put("companyStore", companyStore);
|
||||||
|
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存门店
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:edit")
|
||||||
|
@Log(title = "门店", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
companyStore.setUpdateBy(getLoginName());
|
||||||
|
return toAjax(companyStoreService.updateCompanyStore(companyStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("operation:store:remove")
|
||||||
|
@Log(title = "门店", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(companyStoreService.deleteCompanyStoreByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Log(title = "门店管理", businessType = BusinessType.UPDATE)
|
||||||
|
@RequiresPermissions("operation:store:edit")
|
||||||
|
@PostMapping("/changeStatus")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult changeStatus(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
return toAjax(companyStoreService.changeStatus(companyStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Company> getCompanyList(Company company) {
|
||||||
|
company.setStatus(CompanyConstants.company_status_0);
|
||||||
|
// 运营者账号,只能查询所属商户数据
|
||||||
|
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
|
||||||
|
company.setId(getSysUser().getGroupId());
|
||||||
|
}
|
||||||
|
return companyService.selectCompanyList(company);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,11 +16,11 @@ public class Company extends BaseEntity
|
|||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 公司ID */
|
/** 运营商ID */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 公司名称 */
|
/** 运营商名称 */
|
||||||
@Excel(name = "公司名称")
|
@Excel(name = "运营商名称")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/** 联系人姓名 */
|
/** 联系人姓名 */
|
||||||
@ -31,8 +31,8 @@ public class Company extends BaseEntity
|
|||||||
@Excel(name = "联系电话")
|
@Excel(name = "联系电话")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/** 公司地址 */
|
/** 运营商地址 */
|
||||||
@Excel(name = "公司地址")
|
@Excel(name = "运营商地址")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
/** 账户余额 */
|
/** 账户余额 */
|
||||||
@ -43,8 +43,8 @@ public class Company extends BaseEntity
|
|||||||
@Excel(name = "押金/保证金金额")
|
@Excel(name = "押金/保证金金额")
|
||||||
private BigDecimal deposit;
|
private BigDecimal deposit;
|
||||||
|
|
||||||
/** 公司类型(用数字表示的分类) */
|
/** 运营商类型(用数字表示的分类) */
|
||||||
@Excel(name = "公司类型", readConverterExp = "用=数字表示的分类")
|
@Excel(name = "运营商类型", readConverterExp = "用=数字表示的分类")
|
||||||
private Long type;
|
private Long type;
|
||||||
|
|
||||||
/** 是否已删除 */
|
/** 是否已删除 */
|
||||||
|
|||||||
@ -0,0 +1,685 @@
|
|||||||
|
package com.ruoyi.operation.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店对象 company_store
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
public class CompanyStore extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 门店名称 */
|
||||||
|
@Excel(name = "门店名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 联系人 */
|
||||||
|
@Excel(name = "联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
@Excel(name = "手机号码")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 联系人 */
|
||||||
|
@Excel(name = "联系人2")
|
||||||
|
private String contactPerson2;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
@Excel(name = "手机号码2")
|
||||||
|
private String phone2;
|
||||||
|
|
||||||
|
/** 省份 */
|
||||||
|
private String provinceId;
|
||||||
|
|
||||||
|
/** 省份 */
|
||||||
|
@Excel(name = "省份")
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/** 城市 */
|
||||||
|
private String cityId;
|
||||||
|
|
||||||
|
/** 城市 */
|
||||||
|
@Excel(name = "城市")
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/** 区县 */
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 城市 */
|
||||||
|
@Excel(name = "城市")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/** 省市区 */
|
||||||
|
@Excel(name = "省市区")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** 详细地址 */
|
||||||
|
@Excel(name = "详细地址")
|
||||||
|
private String detailedAddress;
|
||||||
|
|
||||||
|
/** 门店logo */
|
||||||
|
@Excel(name = "门店logo")
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
@Excel(name = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
@Excel(name = "经度")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/** 合同签订日期 */
|
||||||
|
@Excel(name = "合同签订日期")
|
||||||
|
private String contractDate;
|
||||||
|
|
||||||
|
/** 每日营业开关时间 */
|
||||||
|
@Excel(name = "每日营业开关时间")
|
||||||
|
private String dayTime;
|
||||||
|
|
||||||
|
/** 每日营业开始时间 */
|
||||||
|
@Excel(name = "每日营业开始时间")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/** 每日营业结束时间 */
|
||||||
|
@Excel(name = "每日营业结束时间")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
/** 是否显示 */
|
||||||
|
@Excel(name = "是否显示")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
/** 是否删除 */
|
||||||
|
@Excel(name = "是否删除")
|
||||||
|
private Integer isDel;
|
||||||
|
|
||||||
|
/** 租车订单分成比例 */
|
||||||
|
@Excel(name = "租车订单分成比例")
|
||||||
|
private BigDecimal zucheRatio;
|
||||||
|
|
||||||
|
/** 租电订单分成比例 */
|
||||||
|
@Excel(name = "租电订单分成比例")
|
||||||
|
private BigDecimal zudianRatio;
|
||||||
|
|
||||||
|
/** 以租代售分成比例 */
|
||||||
|
@Excel(name = "以租代售分成比例")
|
||||||
|
private BigDecimal daishouRatio;
|
||||||
|
|
||||||
|
/** 标签 1.可租车 2.可换电 3.二手车,多个用,号隔开,例如1,2,3 */
|
||||||
|
@Excel(name = "标签 1.可租车 2.可换电 3.二手车,多个用,号隔开,例如1,2,3")
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
/** 运营公司id */
|
||||||
|
@Excel(name = "运营公司id")
|
||||||
|
private Long operatingCompanyId;
|
||||||
|
|
||||||
|
/** 运营性质 1.直营 0.合作 */
|
||||||
|
@Excel(name = "运营性质 1.直营 0.合作")
|
||||||
|
private Integer operatingNature;
|
||||||
|
|
||||||
|
/** 简介 */
|
||||||
|
@Excel(name = "简介")
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/** 对公账号 */
|
||||||
|
@Excel(name = "对公账号")
|
||||||
|
private String bankAccount;
|
||||||
|
|
||||||
|
/** 门店编号 */
|
||||||
|
@Excel(name = "门店编号")
|
||||||
|
private String storeNumber;
|
||||||
|
|
||||||
|
/** 营业执照 */
|
||||||
|
@Excel(name = "营业执照")
|
||||||
|
private String businessLicenseImg;
|
||||||
|
|
||||||
|
/** 审核状态 0.未审核 1.审核通过 2.审核未通过 */
|
||||||
|
@Excel(name = "审核状态 0.未审核 1.审核通过 2.审核未通过")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
/** 审核时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date auditTime;
|
||||||
|
|
||||||
|
/** 审核人id */
|
||||||
|
@Excel(name = "审核人id")
|
||||||
|
private Long auditorId;
|
||||||
|
|
||||||
|
/** 所属用户id */
|
||||||
|
@Excel(name = "所属用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 是否允许回收退租天数 0.不允许 1.允许 */
|
||||||
|
@Excel(name = "是否允许回收退租天数 0.不允许 1.允许")
|
||||||
|
private Integer isReturnAllowed;
|
||||||
|
|
||||||
|
/** 企业套餐保证金 */
|
||||||
|
@Excel(name = "企业套餐保证金")
|
||||||
|
private BigDecimal mealDepositPrice;
|
||||||
|
|
||||||
|
/** 企业充值订单数限制 */
|
||||||
|
@Excel(name = "企业充值订单数限制")
|
||||||
|
private Long orderNumLimit;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 门店是否允许修改 */
|
||||||
|
private String extend1;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String extend2;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String extend3;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String extend4;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private String extend5;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String operatingCompanyName;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setContactPerson(String contactPerson)
|
||||||
|
{
|
||||||
|
this.contactPerson = contactPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactPerson()
|
||||||
|
{
|
||||||
|
return contactPerson;
|
||||||
|
}
|
||||||
|
public void setPhone(String phone)
|
||||||
|
{
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone()
|
||||||
|
{
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactPerson2() {
|
||||||
|
return contactPerson2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContactPerson2(String contactPerson2) {
|
||||||
|
this.contactPerson2 = contactPerson2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone2() {
|
||||||
|
return phone2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone2(String phone2) {
|
||||||
|
this.phone2 = phone2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvinceId(String provinceId)
|
||||||
|
{
|
||||||
|
this.provinceId = provinceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvinceId() {
|
||||||
|
return provinceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvinceName() {
|
||||||
|
return provinceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvinceName(String provinceName) {
|
||||||
|
this.provinceName = provinceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCityId() {
|
||||||
|
return cityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCityId(String cityId) {
|
||||||
|
this.cityId = cityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCityName() {
|
||||||
|
return cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCityName(String cityName) {
|
||||||
|
this.cityName = cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAreaId() {
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaId(Long areaId) {
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName() {
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaName(String areaName) {
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address)
|
||||||
|
{
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress()
|
||||||
|
{
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
public void setDetailedAddress(String detailedAddress)
|
||||||
|
{
|
||||||
|
this.detailedAddress = detailedAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetailedAddress()
|
||||||
|
{
|
||||||
|
return detailedAddress;
|
||||||
|
}
|
||||||
|
public void setImage(String image)
|
||||||
|
{
|
||||||
|
this.image = image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage()
|
||||||
|
{
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
public void setLatitude(String latitude)
|
||||||
|
{
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatitude()
|
||||||
|
{
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
public void setLongitude(String longitude)
|
||||||
|
{
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLongitude()
|
||||||
|
{
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
public void setContractDate(String contractDate)
|
||||||
|
{
|
||||||
|
this.contractDate = contractDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContractDate()
|
||||||
|
{
|
||||||
|
return contractDate;
|
||||||
|
}
|
||||||
|
public void setDayTime(String dayTime)
|
||||||
|
{
|
||||||
|
this.dayTime = dayTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDayTime()
|
||||||
|
{
|
||||||
|
return dayTime;
|
||||||
|
}
|
||||||
|
public void setStartTime(String startTime)
|
||||||
|
{
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartTime()
|
||||||
|
{
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
public void setEndTime(String endTime)
|
||||||
|
{
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime()
|
||||||
|
{
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
public void setIsShow(Integer isShow)
|
||||||
|
{
|
||||||
|
this.isShow = isShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsShow()
|
||||||
|
{
|
||||||
|
return isShow;
|
||||||
|
}
|
||||||
|
public void setIsDel(Integer isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
public void setZucheRatio(BigDecimal zucheRatio)
|
||||||
|
{
|
||||||
|
this.zucheRatio = zucheRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getZucheRatio()
|
||||||
|
{
|
||||||
|
return zucheRatio;
|
||||||
|
}
|
||||||
|
public void setZudianRatio(BigDecimal zudianRatio)
|
||||||
|
{
|
||||||
|
this.zudianRatio = zudianRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getZudianRatio()
|
||||||
|
{
|
||||||
|
return zudianRatio;
|
||||||
|
}
|
||||||
|
public void setDaishouRatio(BigDecimal daishouRatio)
|
||||||
|
{
|
||||||
|
this.daishouRatio = daishouRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDaishouRatio()
|
||||||
|
{
|
||||||
|
return daishouRatio;
|
||||||
|
}
|
||||||
|
public void setLabel(String label)
|
||||||
|
{
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel()
|
||||||
|
{
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
public void setOperatingCompanyId(Long operatingCompanyId)
|
||||||
|
{
|
||||||
|
this.operatingCompanyId = operatingCompanyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOperatingCompanyId()
|
||||||
|
{
|
||||||
|
return operatingCompanyId;
|
||||||
|
}
|
||||||
|
public void setOperatingNature(Integer operatingNature)
|
||||||
|
{
|
||||||
|
this.operatingNature = operatingNature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOperatingNature()
|
||||||
|
{
|
||||||
|
return operatingNature;
|
||||||
|
}
|
||||||
|
public void setIntroduction(String introduction)
|
||||||
|
{
|
||||||
|
this.introduction = introduction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIntroduction()
|
||||||
|
{
|
||||||
|
return introduction;
|
||||||
|
}
|
||||||
|
public void setBankAccount(String bankAccount)
|
||||||
|
{
|
||||||
|
this.bankAccount = bankAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankAccount()
|
||||||
|
{
|
||||||
|
return bankAccount;
|
||||||
|
}
|
||||||
|
public void setStoreNumber(String storeNumber)
|
||||||
|
{
|
||||||
|
this.storeNumber = storeNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStoreNumber()
|
||||||
|
{
|
||||||
|
return storeNumber;
|
||||||
|
}
|
||||||
|
public void setBusinessLicenseImg(String businessLicenseImg)
|
||||||
|
{
|
||||||
|
this.businessLicenseImg = businessLicenseImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusinessLicenseImg()
|
||||||
|
{
|
||||||
|
return businessLicenseImg;
|
||||||
|
}
|
||||||
|
public void setAuditStatus(Integer auditStatus)
|
||||||
|
{
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAuditStatus()
|
||||||
|
{
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
public void setAuditTime(Date auditTime)
|
||||||
|
{
|
||||||
|
this.auditTime = auditTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAuditTime()
|
||||||
|
{
|
||||||
|
return auditTime;
|
||||||
|
}
|
||||||
|
public void setAuditorId(Long auditorId)
|
||||||
|
{
|
||||||
|
this.auditorId = auditorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAuditorId()
|
||||||
|
{
|
||||||
|
return auditorId;
|
||||||
|
}
|
||||||
|
public void setUserId(Long userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
public void setIsReturnAllowed(Integer isReturnAllowed)
|
||||||
|
{
|
||||||
|
this.isReturnAllowed = isReturnAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsReturnAllowed()
|
||||||
|
{
|
||||||
|
return isReturnAllowed;
|
||||||
|
}
|
||||||
|
public void setMealDepositPrice(BigDecimal mealDepositPrice)
|
||||||
|
{
|
||||||
|
this.mealDepositPrice = mealDepositPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMealDepositPrice()
|
||||||
|
{
|
||||||
|
return mealDepositPrice;
|
||||||
|
}
|
||||||
|
public void setOrderNumLimit(Long orderNumLimit)
|
||||||
|
{
|
||||||
|
this.orderNumLimit = orderNumLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrderNumLimit()
|
||||||
|
{
|
||||||
|
return orderNumLimit;
|
||||||
|
}
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setExtend1(String extend1)
|
||||||
|
{
|
||||||
|
this.extend1 = extend1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtend1()
|
||||||
|
{
|
||||||
|
return extend1;
|
||||||
|
}
|
||||||
|
public void setExtend2(String extend2)
|
||||||
|
{
|
||||||
|
this.extend2 = extend2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtend2()
|
||||||
|
{
|
||||||
|
return extend2;
|
||||||
|
}
|
||||||
|
public void setExtend3(String extend3)
|
||||||
|
{
|
||||||
|
this.extend3 = extend3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtend3()
|
||||||
|
{
|
||||||
|
return extend3;
|
||||||
|
}
|
||||||
|
public void setExtend4(String extend4)
|
||||||
|
{
|
||||||
|
this.extend4 = extend4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtend4()
|
||||||
|
{
|
||||||
|
return extend4;
|
||||||
|
}
|
||||||
|
public void setExtend5(String extend5)
|
||||||
|
{
|
||||||
|
this.extend5 = extend5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtend5()
|
||||||
|
{
|
||||||
|
return extend5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOperatingCompanyName() {
|
||||||
|
return operatingCompanyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperatingCompanyName(String operatingCompanyName) {
|
||||||
|
this.operatingCompanyName = operatingCompanyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("contactPerson", getContactPerson())
|
||||||
|
.append("phone", getPhone())
|
||||||
|
.append("contactPerson2", getContactPerson2())
|
||||||
|
.append("phone2", getPhone2())
|
||||||
|
.append("provinceId", getProvinceId())
|
||||||
|
.append("provinceName", getProvinceName())
|
||||||
|
.append("cityId", getCityId())
|
||||||
|
.append("cityName", getCityName())
|
||||||
|
.append("areaId", getAreaId())
|
||||||
|
.append("areaName", getAreaName())
|
||||||
|
.append("address", getAddress())
|
||||||
|
.append("detailedAddress", getDetailedAddress())
|
||||||
|
.append("image", getImage())
|
||||||
|
.append("latitude", getLatitude())
|
||||||
|
.append("longitude", getLongitude())
|
||||||
|
.append("contractDate", getContractDate())
|
||||||
|
.append("dayTime", getDayTime())
|
||||||
|
.append("startTime", getStartTime())
|
||||||
|
.append("endTime", getEndTime())
|
||||||
|
.append("isShow", getIsShow())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("zucheRatio", getZucheRatio())
|
||||||
|
.append("zudianRatio", getZudianRatio())
|
||||||
|
.append("daishouRatio", getDaishouRatio())
|
||||||
|
.append("label", getLabel())
|
||||||
|
.append("operatingCompanyId", getOperatingCompanyId())
|
||||||
|
.append("operatingNature", getOperatingNature())
|
||||||
|
.append("introduction", getIntroduction())
|
||||||
|
.append("bankAccount", getBankAccount())
|
||||||
|
.append("storeNumber", getStoreNumber())
|
||||||
|
.append("businessLicenseImg", getBusinessLicenseImg())
|
||||||
|
.append("auditStatus", getAuditStatus())
|
||||||
|
.append("auditTime", getAuditTime())
|
||||||
|
.append("auditorId", getAuditorId())
|
||||||
|
.append("userId", getUserId())
|
||||||
|
.append("isReturnAllowed", getIsReturnAllowed())
|
||||||
|
.append("mealDepositPrice", getMealDepositPrice())
|
||||||
|
.append("orderNumLimit", getOrderNumLimit())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("extend1", getExtend1())
|
||||||
|
.append("extend2", getExtend2())
|
||||||
|
.append("extend3", getExtend3())
|
||||||
|
.append("extend4", getExtend4())
|
||||||
|
.append("extend5", getExtend5())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.operation.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.operation.domain.CompanyStore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
public interface CompanyStoreMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询门店
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 门店
|
||||||
|
*/
|
||||||
|
public CompanyStore selectCompanyStoreById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店列表
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 门店集合
|
||||||
|
*/
|
||||||
|
public List<CompanyStore> selectCompanyStoreList(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCompanyStore(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCompanyStore(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompanyStoreById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除门店
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompanyStoreByIds(String[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.ruoyi.operation.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.operation.domain.CompanyStore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
public interface ICompanyStoreService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询门店
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 门店
|
||||||
|
*/
|
||||||
|
public CompanyStore selectCompanyStoreById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店列表
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 门店集合
|
||||||
|
*/
|
||||||
|
public List<CompanyStore> selectCompanyStoreList(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCompanyStore(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCompanyStore(CompanyStore companyStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除门店
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的门店主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompanyStoreByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店信息
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCompanyStoreById(Long id);
|
||||||
|
|
||||||
|
public int changeStatus(CompanyStore companyStore);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.operation.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.operation.mapper.CompanyStoreMapper;
|
||||||
|
import com.ruoyi.operation.domain.CompanyStore;
|
||||||
|
import com.ruoyi.operation.service.ICompanyStoreService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-03
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CompanyStoreServiceImpl implements ICompanyStoreService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private CompanyStoreMapper companyStoreMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 门店
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CompanyStore selectCompanyStoreById(Long id)
|
||||||
|
{
|
||||||
|
return companyStoreMapper.selectCompanyStoreById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店列表
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 门店
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CompanyStore> selectCompanyStoreList(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
return companyStoreMapper.selectCompanyStoreList(companyStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertCompanyStore(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
companyStore.setCreateTime(DateUtils.getNowDate());
|
||||||
|
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return companyStoreMapper.insertCompanyStore(companyStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店
|
||||||
|
*
|
||||||
|
* @param companyStore 门店
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateCompanyStore(CompanyStore companyStore)
|
||||||
|
{
|
||||||
|
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return companyStoreMapper.updateCompanyStore(companyStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除门店
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的门店主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCompanyStoreByIds(String ids)
|
||||||
|
{
|
||||||
|
return companyStoreMapper.deleteCompanyStoreByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店信息
|
||||||
|
*
|
||||||
|
* @param id 门店主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCompanyStoreById(Long id)
|
||||||
|
{
|
||||||
|
return companyStoreMapper.deleteCompanyStoreById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int changeStatus(CompanyStore companyStore) {
|
||||||
|
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return companyStoreMapper.updateCompanyStore(companyStore);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
|
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
|
||||||
<include refid="selectCompanyVo"/>
|
<include refid="selectCompanyVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||||
|
|||||||
@ -0,0 +1,298 @@
|
|||||||
|
<?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="com.ruoyi.operation.mapper.CompanyStoreMapper">
|
||||||
|
|
||||||
|
<resultMap type="CompanyStore" id="CompanyStoreResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="contactPerson" column="contact_person" />
|
||||||
|
<result property="phone" column="phone" />
|
||||||
|
<result property="contactPerson2" column="contact_person2" />
|
||||||
|
<result property="phone2" column="phone2" />
|
||||||
|
<result property="provinceId" column="province_id" />
|
||||||
|
<result property="provinceName" column="province_name" />
|
||||||
|
<result property="cityId" column="city_id" />
|
||||||
|
<result property="cityName" column="city_name" />
|
||||||
|
<result property="areaId" column="area_id" />
|
||||||
|
<result property="areaName" column="area_name" />
|
||||||
|
<result property="address" column="address" />
|
||||||
|
<result property="detailedAddress" column="detailed_address" />
|
||||||
|
<result property="image" column="image" />
|
||||||
|
<result property="latitude" column="latitude" />
|
||||||
|
<result property="longitude" column="longitude" />
|
||||||
|
<result property="contractDate" column="contract_date" />
|
||||||
|
<result property="dayTime" column="day_time" />
|
||||||
|
<result property="startTime" column="start_time" />
|
||||||
|
<result property="endTime" column="end_time" />
|
||||||
|
<result property="isShow" column="is_show" />
|
||||||
|
<result property="isDel" column="is_del" />
|
||||||
|
<result property="zucheRatio" column="zuche_ratio" />
|
||||||
|
<result property="zudianRatio" column="zudian_ratio" />
|
||||||
|
<result property="daishouRatio" column="daishou_ratio" />
|
||||||
|
<result property="label" column="label" />
|
||||||
|
<result property="operatingCompanyId" column="operating_company_id" />
|
||||||
|
<result property="operatingCompanyName" column="operating_company_name" />
|
||||||
|
<result property="operatingNature" column="operating_nature" />
|
||||||
|
<result property="introduction" column="introduction" />
|
||||||
|
<result property="bankAccount" column="bank_account" />
|
||||||
|
<result property="storeNumber" column="store_number" />
|
||||||
|
<result property="businessLicenseImg" column="business_license_img" />
|
||||||
|
<result property="auditStatus" column="audit_status" />
|
||||||
|
<result property="auditTime" column="audit_time" />
|
||||||
|
<result property="auditorId" column="auditor_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="isReturnAllowed" column="is_return_allowed" />
|
||||||
|
<result property="mealDepositPrice" column="meal_deposit_price" />
|
||||||
|
<result property="orderNumLimit" column="order_num_limit" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="extend1" column="extend1" />
|
||||||
|
<result property="extend2" column="extend2" />
|
||||||
|
<result property="extend3" column="extend3" />
|
||||||
|
<result property="extend4" column="extend4" />
|
||||||
|
<result property="extend5" column="extend5" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectCompanyStoreVo">
|
||||||
|
select id, name, contact_person, phone, province_id, province_name, city_id, city_name, area_id, area_name, address, detailed_address, image, latitude, longitude, contract_date, day_time, start_time, end_time, is_show, is_del, zuche_ratio, zudian_ratio, daishou_ratio, label, operating_company_id, operating_nature, introduction, bank_account, store_number, business_license_img, audit_status, audit_time, auditor_id, user_id, is_return_allowed, meal_deposit_price, order_num_limit, create_by, create_time, update_by, update_time, del_flag, status, extend1, extend2, extend3, extend4, extend5 from company_store
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectCompanyStoreList" parameterType="CompanyStore" resultMap="CompanyStoreResult">
|
||||||
|
select cs.id, cs.name, cs.contact_person, cs.phone, cs.province_id, cs.province_name, cs.city_id, cs.city_name, cs.area_id, cs.area_name, cs.address, cs.detailed_address, cs.image, cs.latitude, cs.longitude, cs.contract_date, cs.day_time, cs.start_time, cs.end_time, cs.is_show, cs.is_del, cs.zuche_ratio, cs.zudian_ratio, cs.daishou_ratio, cs.label, cs.operating_company_id, cs.operating_nature, cs.introduction, cs.bank_account, cs.store_number, cs.business_license_img, cs.audit_status, cs.audit_time, cs.auditor_id, cs.user_id, cs.is_return_allowed, cs.meal_deposit_price, cs.order_num_limit, cs.create_by, cs.create_time, cs.update_by, cs.update_time, cs.del_flag, cs.status, cs.extend1, cs.extend2, cs.extend3, cs.extend4, cs.extend5
|
||||||
|
,c.company_name as operating_company_name
|
||||||
|
from company_store cs
|
||||||
|
left join company c on c.id = cs.operating_company_id
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and cs.name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="contactPerson != null and contactPerson != ''"> and cs.contact_person = #{contactPerson}</if>
|
||||||
|
<if test="phone != null and phone != ''"> and cs.phone = #{phone}</if>
|
||||||
|
<if test="provinceId != null "> and cs.province_id = #{provinceId}</if>
|
||||||
|
<if test="provinceName != null "> and cs.province_name like concat('%', #{provinceName}, '%')</if>
|
||||||
|
<if test="cityId != null "> and cs.city_id = #{cityId}</if>
|
||||||
|
<if test="cityName != null "> and cs.city_name like concat('%', #{cityName}, '%')</if>
|
||||||
|
<if test="areaId != null "> and cs.area_id = #{areaId}</if>
|
||||||
|
<if test="areaName != null "> and cs.area_name like concat('%', #{areaName}, '%')</if>
|
||||||
|
<if test="address != null and address != ''"> and cs.address = #{address}</if>
|
||||||
|
<if test="detailedAddress != null and detailedAddress != ''"> and cs.detailed_address = #{detailedAddress}</if>
|
||||||
|
<if test="image != null and image != ''"> and cs.image = #{image}</if>
|
||||||
|
<if test="latitude != null and latitude != ''"> and cs.latitude = #{latitude}</if>
|
||||||
|
<if test="longitude != null and longitude != ''"> and cs.longitude = #{longitude}</if>
|
||||||
|
<if test="contractDate != null and contractDate != ''"> and cs.contract_date = #{contractDate}</if>
|
||||||
|
<if test="dayTime != null and dayTime != ''"> and cs.day_time = #{dayTime}</if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and cs.start_time = #{startTime}</if>
|
||||||
|
<if test="endTime != null and endTime != ''"> and cs.end_time = #{endTime}</if>
|
||||||
|
<if test="isShow != null "> and cs.is_show = #{isShow}</if>
|
||||||
|
<if test="isDel != null "> and cs.is_del = #{isDel}</if>
|
||||||
|
<if test="zucheRatio != null "> and cs.zuche_ratio = #{zucheRatio}</if>
|
||||||
|
<if test="zudianRatio != null "> and cs.zudian_ratio = #{zudianRatio}</if>
|
||||||
|
<if test="daishouRatio != null "> and cs.daishou_ratio = #{daishouRatio}</if>
|
||||||
|
<if test="label != null and label != ''"> and cs.label = #{label}</if>
|
||||||
|
<if test="operatingCompanyId != null "> and cs.operating_company_id = #{operatingCompanyId}</if>
|
||||||
|
<if test="operatingNature != null "> and cs.operating_nature = #{operatingNature}</if>
|
||||||
|
<if test="introduction != null and introduction != ''"> and cs.introduction = #{introduction}</if>
|
||||||
|
<if test="bankAccount != null and bankAccount != ''"> and cs.bank_account = #{bankAccount}</if>
|
||||||
|
<if test="storeNumber != null and storeNumber != ''"> and cs.store_number = #{storeNumber}</if>
|
||||||
|
<if test="businessLicenseImg != null and businessLicenseImg != ''"> and cs.business_license_img = #{businessLicenseImg}</if>
|
||||||
|
<if test="auditStatus != null "> and cs.audit_status = #{auditStatus}</if>
|
||||||
|
<if test="auditTime != null "> and cs.audit_time = #{auditTime}</if>
|
||||||
|
<if test="auditorId != null "> and cs.auditor_id = #{auditorId}</if>
|
||||||
|
<if test="userId != null "> and cs.user_id = #{userId}</if>
|
||||||
|
<if test="isReturnAllowed != null "> and cs.is_return_allowed = #{isReturnAllowed}</if>
|
||||||
|
<if test="mealDepositPrice != null "> and cs.meal_deposit_price = #{mealDepositPrice}</if>
|
||||||
|
<if test="status != null and status != ''"> and cs.status = #{status}</if>
|
||||||
|
<if test="extend1 != null and extend1 != ''"> and cs.extend1 = #{extend1}</if>
|
||||||
|
<if test="extend2 != null and extend2 != ''"> and cs.extend2 = #{extend2}</if>
|
||||||
|
<if test="extend3 != null and extend3 != ''"> and cs.extend3 = #{extend3}</if>
|
||||||
|
<if test="extend4 != null and extend4 != ''"> and cs.extend4 = #{extend4}</if>
|
||||||
|
<if test="extend5 != null and extend5 != ''"> and cs.extend5 = #{extend5}</if>
|
||||||
|
</where>
|
||||||
|
order by cs.create_time desc
|
||||||
|
</select>
|
||||||
|
<select id="selectCompanyStoreById" parameterType="Long" resultMap="CompanyStoreResult">
|
||||||
|
<include refid="selectCompanyStoreVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertCompanyStore" parameterType="CompanyStore" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into company_store
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="contactPerson != null and contactPerson != ''">contact_person,</if>
|
||||||
|
<if test="phone != null and phone != ''">phone,</if>
|
||||||
|
<if test="contactPerson2 != null and contactPerson2 != ''">contact_person2,</if>
|
||||||
|
<if test="phone2 != null and phone2 != ''">phone2,</if>
|
||||||
|
<if test="provinceId != null">province_id,</if>
|
||||||
|
<if test="provinceName != null">province_name,</if>
|
||||||
|
<if test="cityId != null">city_id,</if>
|
||||||
|
<if test="cityName != null">city_name,</if>
|
||||||
|
<if test="areaId != null">area_id,</if>
|
||||||
|
<if test="areaName != null">area_name,</if>
|
||||||
|
<if test="address != null">address,</if>
|
||||||
|
<if test="detailedAddress != null and detailedAddress != ''">detailed_address,</if>
|
||||||
|
<if test="image != null">image,</if>
|
||||||
|
<if test="latitude != null and latitude != ''">latitude,</if>
|
||||||
|
<if test="longitude != null and longitude != ''">longitude,</if>
|
||||||
|
<if test="contractDate != null">contract_date,</if>
|
||||||
|
<if test="dayTime != null">day_time,</if>
|
||||||
|
<if test="startTime != null">start_time,</if>
|
||||||
|
<if test="endTime != null">end_time,</if>
|
||||||
|
<if test="isShow != null">is_show,</if>
|
||||||
|
<if test="isDel != null">is_del,</if>
|
||||||
|
<if test="zucheRatio != null">zuche_ratio,</if>
|
||||||
|
<if test="zudianRatio != null">zudian_ratio,</if>
|
||||||
|
<if test="daishouRatio != null">daishou_ratio,</if>
|
||||||
|
<if test="label != null and label != ''">label,</if>
|
||||||
|
<if test="operatingCompanyId != null">operating_company_id,</if>
|
||||||
|
<if test="operatingNature != null">operating_nature,</if>
|
||||||
|
<if test="introduction != null and introduction != ''">introduction,</if>
|
||||||
|
<if test="bankAccount != null and bankAccount != ''">bank_account,</if>
|
||||||
|
<if test="storeNumber != null and storeNumber != ''">store_number,</if>
|
||||||
|
<if test="businessLicenseImg != null and businessLicenseImg != ''">business_license_img,</if>
|
||||||
|
<if test="auditStatus != null">audit_status,</if>
|
||||||
|
<if test="auditTime != null">audit_time,</if>
|
||||||
|
<if test="auditorId != null">auditor_id,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="isReturnAllowed != null">is_return_allowed,</if>
|
||||||
|
<if test="mealDepositPrice != null">meal_deposit_price,</if>
|
||||||
|
<if test="orderNumLimit != null">order_num_limit,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="extend1 != null">extend1,</if>
|
||||||
|
<if test="extend2 != null">extend2,</if>
|
||||||
|
<if test="extend3 != null">extend3,</if>
|
||||||
|
<if test="extend4 != null">extend4,</if>
|
||||||
|
<if test="extend5 != null">extend5,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="contactPerson != null and contactPerson != ''">#{contactPerson},</if>
|
||||||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||||||
|
<if test="contactPerson != null and contactPerson2 != ''">#{contactPerson2},</if>
|
||||||
|
<if test="phone2 != null and phone2 != ''">#{phone2},</if>
|
||||||
|
<if test="provinceId != null">#{provinceId},</if>
|
||||||
|
<if test="provinceName != null">#{provinceName},</if>
|
||||||
|
<if test="cityId != null">#{cityId},</if>
|
||||||
|
<if test="cityName != null">#{cityName},</if>
|
||||||
|
<if test="areaId != null">#{areaId},</if>
|
||||||
|
<if test="areaName != null">#{areaName},</if>
|
||||||
|
<if test="address != null">#{address},</if>
|
||||||
|
<if test="detailedAddress != null and detailedAddress != ''">#{detailedAddress},</if>
|
||||||
|
<if test="image != null">#{image},</if>
|
||||||
|
<if test="latitude != null and latitude != ''">#{latitude},</if>
|
||||||
|
<if test="longitude != null and longitude != ''">#{longitude},</if>
|
||||||
|
<if test="contractDate != null">#{contractDate},</if>
|
||||||
|
<if test="dayTime != null">#{dayTime},</if>
|
||||||
|
<if test="startTime != null">#{startTime},</if>
|
||||||
|
<if test="endTime != null">#{endTime},</if>
|
||||||
|
<if test="isShow != null">#{isShow},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="zucheRatio != null">#{zucheRatio},</if>
|
||||||
|
<if test="zudianRatio != null">#{zudianRatio},</if>
|
||||||
|
<if test="daishouRatio != null">#{daishouRatio},</if>
|
||||||
|
<if test="label != null and label != ''">#{label},</if>
|
||||||
|
<if test="operatingCompanyId != null">#{operatingCompanyId},</if>
|
||||||
|
<if test="operatingNature != null">#{operatingNature},</if>
|
||||||
|
<if test="introduction != null and introduction != ''">#{introduction},</if>
|
||||||
|
<if test="bankAccount != null and bankAccount != ''">#{bankAccount},</if>
|
||||||
|
<if test="storeNumber != null and storeNumber != ''">#{storeNumber},</if>
|
||||||
|
<if test="businessLicenseImg != null and businessLicenseImg != ''">#{businessLicenseImg},</if>
|
||||||
|
<if test="auditStatus != null">#{auditStatus},</if>
|
||||||
|
<if test="auditTime != null">#{auditTime},</if>
|
||||||
|
<if test="auditorId != null">#{auditorId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="isReturnAllowed != null">#{isReturnAllowed},</if>
|
||||||
|
<if test="mealDepositPrice != null">#{mealDepositPrice},</if>
|
||||||
|
<if test="orderNumLimit != null">#{orderNumLimit},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="extend1 != null">#{extend1},</if>
|
||||||
|
<if test="extend2 != null">#{extend2},</if>
|
||||||
|
<if test="extend3 != null">#{extend3},</if>
|
||||||
|
<if test="extend4 != null">#{extend4},</if>
|
||||||
|
<if test="extend5 != null">#{extend5},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCompanyStore" parameterType="CompanyStore">
|
||||||
|
update company_store
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="contactPerson != null and contactPerson != ''">contact_person = #{contactPerson},</if>
|
||||||
|
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||||
|
<if test="contactPerson2 != null and contactPerson2 != ''">contact_person2 = #{contactPerson2},</if>
|
||||||
|
<if test="phone2 != null and phone2 != ''">phone2 = #{phone2},</if>
|
||||||
|
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||||
|
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||||
|
<if test="cityId != null">city_id = #{cityId},</if>
|
||||||
|
<if test="cityName != null">city_name = #{cityName},</if>
|
||||||
|
<if test="areaId != null">area_id = #{areaId},</if>
|
||||||
|
<if test="areaName != null">area_name = #{areaName},</if>
|
||||||
|
<if test="address != null">address = #{address},</if>
|
||||||
|
<if test="detailedAddress != null and detailedAddress != ''">detailed_address = #{detailedAddress},</if>
|
||||||
|
<if test="image != null">image = #{image},</if>
|
||||||
|
<if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
|
||||||
|
<if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
|
||||||
|
<if test="contractDate != null">contract_date = #{contractDate},</if>
|
||||||
|
<if test="dayTime != null">day_time = #{dayTime},</if>
|
||||||
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||||||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||||||
|
<if test="isShow != null">is_show = #{isShow},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="zucheRatio != null">zuche_ratio = #{zucheRatio},</if>
|
||||||
|
<if test="zudianRatio != null">zudian_ratio = #{zudianRatio},</if>
|
||||||
|
<if test="daishouRatio != null">daishou_ratio = #{daishouRatio},</if>
|
||||||
|
<if test="label != null and label != ''">label = #{label},</if>
|
||||||
|
<if test="operatingCompanyId != null">operating_company_id = #{operatingCompanyId},</if>
|
||||||
|
<if test="operatingNature != null">operating_nature = #{operatingNature},</if>
|
||||||
|
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
|
||||||
|
<if test="bankAccount != null and bankAccount != ''">bank_account = #{bankAccount},</if>
|
||||||
|
<if test="storeNumber != null and storeNumber != ''">store_number = #{storeNumber},</if>
|
||||||
|
<if test="businessLicenseImg != null and businessLicenseImg != ''">business_license_img = #{businessLicenseImg},</if>
|
||||||
|
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||||
|
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
||||||
|
<if test="auditorId != null">auditor_id = #{auditorId},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="isReturnAllowed != null">is_return_allowed = #{isReturnAllowed},</if>
|
||||||
|
<if test="mealDepositPrice != null">meal_deposit_price = #{mealDepositPrice},</if>
|
||||||
|
<if test="orderNumLimit != null">order_num_limit = #{orderNumLimit},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="extend1 != null">extend1 = #{extend1},</if>
|
||||||
|
<if test="extend2 != null">extend2 = #{extend2},</if>
|
||||||
|
<if test="extend3 != null">extend3 = #{extend3},</if>
|
||||||
|
<if test="extend4 != null">extend4 = #{extend4},</if>
|
||||||
|
<if test="extend5 != null">extend5 = #{extend5},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteCompanyStoreById" parameterType="Long">
|
||||||
|
delete from company_store where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteCompanyStoreByIds" parameterType="String">
|
||||||
|
delete from company_store where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -144,14 +144,14 @@
|
|||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 用户管理-停用 */
|
/* 停用 */
|
||||||
function disable(id,phone) {
|
function disable(id,phone) {
|
||||||
$.modal.confirm("确认是否停用此运营商?<span style='color: red'>停用后此运营商的车辆与门店不会显示在小程序中</span>", function() {
|
$.modal.confirm("确认是否停用此运营商?<span style='color: red'>停用后此运营商的车辆与门店不会显示在小程序中</span>", function() {
|
||||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 1 });
|
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 1 });
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 用户管理启用 */
|
/* 启用 */
|
||||||
function enable(id,phone) {
|
function enable(id,phone) {
|
||||||
$.modal.confirm("确认是否启用此运营商?<span style='color: red'>启用运营商后停用前的数据将恢复正常,运营商可登录管理后台。</span>", function() {
|
$.modal.confirm("确认是否启用此运营商?<span style='color: red'>启用运营商后停用前的数据将恢复正常,运营商可登录管理后台。</span>", function() {
|
||||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 0 });
|
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 0 });
|
||||||
|
|||||||
@ -0,0 +1,314 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增门店')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-store-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="storeNumber" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="name" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">联系人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPerson" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">联系电话:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="phone" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label ">联系人2:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPerson2" class="form-control" type="text" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label ">联系电话2:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="phone2" class="form-control" type="text" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">所属运营公司:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
|
||||||
|
<option value="">请选择所属运营商</option>
|
||||||
|
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="areatreeId" name="cityId" type="hidden" th:value="${sysAreaHn?.areaCode}"/>
|
||||||
|
<input class="form-control" type="text" onclick="selectAreaHnTree()" id="areatreeName" name="cityName" readonly="true" th:value="${sysAreaHn?.name}" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">详细地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="detailedAddress" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">纬度:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="latitude" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">经度:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="longitude" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">业务范围:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="label" class="form-control m-b" th:with="type=${@dict.getType('key_store_level')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">租车订单分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="zucheRatio" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">租电订单分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="zudianRatio" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">以租代售分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="daishouRatio" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">合同签订日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contractDate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">每日营业开始时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="startTime" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">每日营业结束时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="endTime" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">运营性质:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="operatingNature" class="form-control m-b" th:with="type=${@dict.getType('key_store_operating_nature')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">简介:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="introduction" class="form-control" required></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">对公账号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bankAccount" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店图片:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" name="image">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">营业执照:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" name="businessLicenseImg">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="businessLicenseImg" name="file" type="file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店修改信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_is_update')}">
|
||||||
|
<input type="radio" th:id="${'extend1_' + dict.dictCode}" name="extend1" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||||
|
<label th:for="${'extend1_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">审核状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_audit_status')}">
|
||||||
|
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||||
|
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">审核时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="auditTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "operation/store"
|
||||||
|
var areaPrefix = ctx + "system/areaHn";
|
||||||
|
$("#form-store-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 单图上传
|
||||||
|
$("#image").fileinput({
|
||||||
|
uploadUrl: ctx + 'common/newUpload',
|
||||||
|
uploadExtraData: {
|
||||||
|
dataType: '30'
|
||||||
|
},
|
||||||
|
maxFileCount: 1,
|
||||||
|
autoReplace: true,
|
||||||
|
showClose: false,
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||||
|
actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||||
|
},
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
preId = previewId;
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
}).on("filebatchselected", function(event, files) {
|
||||||
|
if(preId !== ''){
|
||||||
|
document.getElementById(preId).remove()
|
||||||
|
}
|
||||||
|
$("#image").fileinput("upload");
|
||||||
|
}).on('fileerror', function (event,data,msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||||
|
$(event.target).fileinput('clear').fileinput('unlock')
|
||||||
|
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||||
|
// 打开失败的信息弹窗
|
||||||
|
$.modal.alertError('上传失败,请稍后重试')
|
||||||
|
}
|
||||||
|
).on("filecleared",function(event, data, msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#businessLicenseImg").fileinput({
|
||||||
|
uploadUrl: ctx + 'common/newUpload',
|
||||||
|
uploadExtraData: {
|
||||||
|
dataType: '30'
|
||||||
|
},
|
||||||
|
maxFileCount: 1,
|
||||||
|
autoReplace: true,
|
||||||
|
showClose: false,
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||||
|
actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||||
|
},
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
preId = previewId;
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
}).on("filebatchselected", function(event, files) {
|
||||||
|
if(preId !== ''){
|
||||||
|
document.getElementById(preId).remove()
|
||||||
|
}
|
||||||
|
$("#businessLicenseImg").fileinput("upload");
|
||||||
|
}).on('fileerror', function (event,data,msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||||
|
$(event.target).fileinput('clear').fileinput('unlock')
|
||||||
|
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||||
|
// 打开失败的信息弹窗
|
||||||
|
$.modal.alertError('上传失败,请稍后重试')
|
||||||
|
}
|
||||||
|
).on("filecleared",function(event, data, msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-store-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='auditTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
/*行政区域-新增-选择父行政区域树*/
|
||||||
|
function selectAreaHnTree() {
|
||||||
|
var options = {
|
||||||
|
title: '行政区域选择',
|
||||||
|
width: "380",
|
||||||
|
url: areaPrefix + "/selectAreaHnTree/" + $("#areatreeId").val(),
|
||||||
|
callBack: doAreaSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doAreaSubmit(index, layero){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
$("#areatreeId").val(body.find('#treeId').val());
|
||||||
|
$("#areatreeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,337 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改门店')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-store-edit" th:object="${companyStore}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="storeNumber" th:field="*{storeNumber}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="name" th:field="*{name}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">联系人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPerson" th:field="*{contactPerson}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">联系电话:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="phone" th:field="*{phone}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label ">联系人2:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPerson2" th:field="*{contactPerson2}" class="form-control" type="text" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label ">联系电话2:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="phone2" th:field="*{phone2}" class="form-control" type="text" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">所属运营公司:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
|
||||||
|
<option value="">请选择所属运营商</option>
|
||||||
|
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="areatreeId" name="cityId" type="hidden" th:value="${sysAreaHn?.areaCode}" th:field="*{cityId}"/>
|
||||||
|
<input class="form-control" type="text" onclick="selectAreaHnTree()" id="areatreeName" name="cityName" th:field="*{cityName}" readonly="true" th:value="${sysAreaHn?.name}" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">详细地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="detailedAddress" th:field="*{detailedAddress}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">纬度:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="latitude" th:field="*{latitude}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">经度:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="longitude" th:field="*{longitude}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">业务范围:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="label" class="form-control m-b" th:with="type=${@dict.getType('key_store_level')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{label}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">租车订单分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="zucheRatio" th:field="*{zucheRatio}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">租电订单分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="zudianRatio" th:field="*{zudianRatio}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">以租代售分成比例:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="daishouRatio" th:field="*{daishouRatio}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">合同签订日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contractDate" th:field="*{contractDate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">每日营业开始时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="startTime" th:field="*{startTime}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">每日营业结束时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="endTime" th:field="*{endTime}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">运营性质:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="operatingNature" class="form-control m-b" th:with="type=${@dict.getType('key_store_operating_nature')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{operatingNature}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">简介:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="introduction" th:field="*{introduction}" class="form-control" required></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">对公账号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店图片:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" name="image" th:value="*{image}">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">营业执照:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" name="businessLicenseImg" th:value="*{businessLicenseImg}">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="businessLicenseImg" name="file" type="file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">门店修改信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_is_update')}">
|
||||||
|
<input type="radio" th:id="${'extend1_' + dict.dictCode}" name="extend1" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{extend1}" required>
|
||||||
|
<label th:for="${'extend1_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">审核状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_audit_status')}">
|
||||||
|
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{auditStatus}" required>
|
||||||
|
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">审核时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input id="auditTime" name="auditTime" th:value="${#dates.format(companyStore.auditTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "operation/store"
|
||||||
|
var areaPrefix = ctx + "system/areaHn";
|
||||||
|
$("#form-store-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
laydate.render({
|
||||||
|
elem: '#auditTime',
|
||||||
|
type: 'date'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
let preId = '';
|
||||||
|
let initUrl = new Array();
|
||||||
|
initUrl.push([[${companyStore.image}]]);
|
||||||
|
|
||||||
|
$("#image").fileinput({
|
||||||
|
uploadUrl: ctx + 'common/newUpload',
|
||||||
|
uploadExtraData: {
|
||||||
|
dataType: '30'
|
||||||
|
},
|
||||||
|
maxFileCount: 1,
|
||||||
|
autoReplace: true,
|
||||||
|
showClose: false,
|
||||||
|
initialPreview: initUrl,
|
||||||
|
initialPreviewFileType: 'image',
|
||||||
|
initialPreviewAsData: true,
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||||
|
// actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||||
|
},
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
preId = previewId;
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
}).on("filebatchselected", function(event, files) {
|
||||||
|
if(preId !== ''){
|
||||||
|
document.getElementById(preId).remove()
|
||||||
|
}
|
||||||
|
$("#image").fileinput("upload");
|
||||||
|
}).on('fileerror', function (event,data,msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||||
|
$(event.target).fileinput('clear').fileinput('unlock')
|
||||||
|
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||||
|
// 打开失败的信息弹窗
|
||||||
|
$.modal.alertError('上传失败,请稍后重试')
|
||||||
|
}
|
||||||
|
).on("filecleared",function(event, data, msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
});
|
||||||
|
|
||||||
|
let preId2 = '';
|
||||||
|
let initUrl2 = new Array();
|
||||||
|
initUrl2.push([[${companyStore.businessLicenseImg}]]);
|
||||||
|
$("#businessLicenseImg").fileinput({
|
||||||
|
uploadUrl: ctx + 'common/newUpload',
|
||||||
|
uploadExtraData: {
|
||||||
|
dataType: '30'
|
||||||
|
},
|
||||||
|
maxFileCount: 1,
|
||||||
|
autoReplace: true,
|
||||||
|
showClose: false,
|
||||||
|
initialPreview: initUrl2,
|
||||||
|
initialPreviewFileType: 'image',
|
||||||
|
initialPreviewAsData: true,
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||||
|
//actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||||
|
},
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
preId2 = previewId;
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
}).on("filebatchselected", function(event, files) {
|
||||||
|
if(preId2 !== ''){
|
||||||
|
document.getElementById(preId2).remove()
|
||||||
|
}
|
||||||
|
$("#businessLicenseImg").fileinput("upload");
|
||||||
|
}).on('fileerror', function (event,data,msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||||
|
$(event.target).fileinput('clear').fileinput('unlock')
|
||||||
|
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||||
|
// 打开失败的信息弹窗
|
||||||
|
$.modal.alertError('上传失败,请稍后重试')
|
||||||
|
}
|
||||||
|
).on("filecleared",function(event, data, msg){
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-store-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='auditTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
/*行政区域-新增-选择父行政区域树*/
|
||||||
|
function selectAreaHnTree() {
|
||||||
|
var options = {
|
||||||
|
title: '行政区域选择',
|
||||||
|
width: "380",
|
||||||
|
url: areaPrefix + "/selectAreaHnTree/" + $("#areatreeId").val(),
|
||||||
|
callBack: doAreaSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doAreaSubmit(index, layero){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
$("#areatreeId").val(body.find('#treeId').val());
|
||||||
|
$("#areatreeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
@ -0,0 +1,226 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('门店列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>运营商:</label>
|
||||||
|
<select name="operatingCompanyId" id="operatingCompanyId" >
|
||||||
|
<option value="">请选择所属运营商</option>
|
||||||
|
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>门店编码:</label>
|
||||||
|
<input type="text" name="storeNumber"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>门店名称:</label>
|
||||||
|
<input type="text" name="name"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>联系人:</label>
|
||||||
|
<input type="text" name="contactPerson"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>联系电话:</label>
|
||||||
|
<input type="text" name="phone"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>业务范围:</label>
|
||||||
|
<select name="label" th:with="type=${@dict.getType('key_store_level')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>运营性质:</label>
|
||||||
|
<select name="operatingNature" th:with="type=${@dict.getType('key_store_operating_nature')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>审核状态:</label>
|
||||||
|
<select name="auditStatus" th:with="type=${@dict.getType('key_store_audit_status')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="operation:store:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:store:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:store:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:store:export">-->
|
||||||
|
<!-- <i class="fa fa-download"></i> 导出-->
|
||||||
|
<!-- </a>-->
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('operation:store:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('operation:store:remove')}]];
|
||||||
|
var labelDatas = [[${@dict.getType('key_store_level')}]];
|
||||||
|
var operatingNatureDatas = [[${@dict.getType('key_store_operating_nature')}]];
|
||||||
|
var auditStatusDatas = [[${@dict.getType('key_store_audit_status')}]];
|
||||||
|
var keyCompanyStatus = [[${@dict.getType('key_company_status')}]];
|
||||||
|
var prefix = ctx + "operation/store";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "门店",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'storeNumber',
|
||||||
|
title: '门店编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'name',
|
||||||
|
title: '门店名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'contactPerson',
|
||||||
|
title: '联系人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phone',
|
||||||
|
title: '联系电话'
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'provinceName',
|
||||||
|
title: '省'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'cityName',
|
||||||
|
title: '市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'areaName',
|
||||||
|
title: '县'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'zucheRatio',
|
||||||
|
title: '租车订单分成比例'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'zudianRatio',
|
||||||
|
title: '租电订单分成比例'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'daishouRatio',
|
||||||
|
title: '以租代售分成比例'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'label',
|
||||||
|
title: '业务范围',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(labelDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'operatingCompanyName',
|
||||||
|
title: '所属运营商'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'operatingNature',
|
||||||
|
title: '运营性质',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(operatingNatureDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'auditStatus',
|
||||||
|
title: '审核状态',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(auditStatusDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '门店状态',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(keyCompanyStatus, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'auditTime',
|
||||||
|
title: '审核时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
if (row.status == 1) {
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="enable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>启用</a> ');
|
||||||
|
} else {
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="disable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>停用</a> ');
|
||||||
|
}
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 停用 */
|
||||||
|
function disable(id,phone) {
|
||||||
|
$.modal.confirm("确认是否停用此门店?<span style='color: red'>停用后门店不可在小程序中查看,门店车辆建议尽快重新分配</span>", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 启用 */
|
||||||
|
function enable(id,phone) {
|
||||||
|
$.modal.confirm("确认是否启用此门店?<span style='color: red'>启用门店后停用前的数据将恢复正常。</span>", function() {
|
||||||
|
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.ruoyi.common.constant;
|
||||||
|
|
||||||
|
public class CompanyConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商状态
|
||||||
|
* 0正常 1停用
|
||||||
|
*/
|
||||||
|
public static final String company_status_0 = "0";
|
||||||
|
public static final String company_status_1 = "1";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user