基本显示完成
This commit is contained in:
parent
49c1a18e93
commit
ca3a7de834
@ -0,0 +1,193 @@
|
||||
package com.ruoyi.winery.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.winery.domain.WineryCompanyRecord;
|
||||
import com.ruoyi.winery.service.IWineryCompanyRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 酒庄厂家登记记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-18
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/winery_company_record")
|
||||
public class WineryCompanyRecordController extends BaseController {
|
||||
|
||||
private final IWineryCompanyRecordService iWineryCompanyRecordService;
|
||||
|
||||
/**
|
||||
* 查询酒庄厂家登记记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryCompanyRecord wineryCompanyRecord) {
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryCompanyRecord> lqw = Wrappers.lambdaQuery(wineryCompanyRecord);
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getStatus())) {
|
||||
lqw.eq(WineryCompanyRecord::getStatus, wineryCompanyRecord.getStatus());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getOpenid())) {
|
||||
lqw.eq(WineryCompanyRecord::getOpenid, wineryCompanyRecord.getOpenid());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getEmail())) {
|
||||
lqw.eq(WineryCompanyRecord::getEmail, wineryCompanyRecord.getEmail());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getPersonName())) {
|
||||
lqw.like(WineryCompanyRecord::getPersonName, wineryCompanyRecord.getPersonName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getMobile())) {
|
||||
lqw.eq(WineryCompanyRecord::getMobile, wineryCompanyRecord.getMobile());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getWineryName())) {
|
||||
lqw.like(WineryCompanyRecord::getWineryName, wineryCompanyRecord.getWineryName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getBuildTime())) {
|
||||
lqw.eq(WineryCompanyRecord::getBuildTime, wineryCompanyRecord.getBuildTime());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getRegion())) {
|
||||
lqw.eq(WineryCompanyRecord::getRegion, wineryCompanyRecord.getRegion());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getAddress())) {
|
||||
lqw.eq(WineryCompanyRecord::getAddress, wineryCompanyRecord.getAddress());
|
||||
}
|
||||
if (wineryCompanyRecord.getWineryArea() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getWineryArea, wineryCompanyRecord.getWineryArea());
|
||||
}
|
||||
if (wineryCompanyRecord.getBuildArea() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getBuildArea, wineryCompanyRecord.getBuildArea());
|
||||
}
|
||||
if (wineryCompanyRecord.getWineryStatus() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getWineryStatus, wineryCompanyRecord.getWineryStatus());
|
||||
}
|
||||
if (wineryCompanyRecord.getPlantArea() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getPlantArea, wineryCompanyRecord.getPlantArea());
|
||||
}
|
||||
if (wineryCompanyRecord.getPlantWeight() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getPlantWeight, wineryCompanyRecord.getPlantWeight());
|
||||
}
|
||||
if (wineryCompanyRecord.getSoilType() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getSoilType, wineryCompanyRecord.getSoilType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getRedVariety())) {
|
||||
lqw.eq(WineryCompanyRecord::getRedVariety, wineryCompanyRecord.getRedVariety());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getWhiteVariety())) {
|
||||
lqw.eq(WineryCompanyRecord::getWhiteVariety, wineryCompanyRecord.getWhiteVariety());
|
||||
}
|
||||
if (wineryCompanyRecord.getIrrigationType() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getIrrigationType, wineryCompanyRecord.getIrrigationType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getFermentationProcess())) {
|
||||
lqw.eq(WineryCompanyRecord::getFermentationProcess, wineryCompanyRecord.getFermentationProcess());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getContainer())) {
|
||||
lqw.eq(WineryCompanyRecord::getContainer, wineryCompanyRecord.getContainer());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getClarificationMethod())) {
|
||||
lqw.eq(WineryCompanyRecord::getClarificationMethod, wineryCompanyRecord.getClarificationMethod());
|
||||
}
|
||||
if (wineryCompanyRecord.getAnnualOutput() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getAnnualOutput, wineryCompanyRecord.getAnnualOutput());
|
||||
}
|
||||
if (wineryCompanyRecord.getStock() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getStock, wineryCompanyRecord.getStock());
|
||||
}
|
||||
if (wineryCompanyRecord.getBucketCount() != null) {
|
||||
lqw.eq(WineryCompanyRecord::getBucketCount, wineryCompanyRecord.getBucketCount());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getMainPrice())) {
|
||||
lqw.eq(WineryCompanyRecord::getMainPrice, wineryCompanyRecord.getMainPrice());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getSalesMode())) {
|
||||
lqw.eq(WineryCompanyRecord::getSalesMode, wineryCompanyRecord.getSalesMode());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getAwards())) {
|
||||
lqw.eq(WineryCompanyRecord::getAwards, wineryCompanyRecord.getAwards());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getAwardInformation())) {
|
||||
lqw.eq(WineryCompanyRecord::getAwardInformation, wineryCompanyRecord.getAwardInformation());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryCompanyRecord.getSlogan())) {
|
||||
lqw.eq(WineryCompanyRecord::getSlogan, wineryCompanyRecord.getSlogan());
|
||||
}
|
||||
List<WineryCompanyRecord> list = iWineryCompanyRecordService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出酒庄厂家登记记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:export')")
|
||||
@Log(title = "酒庄厂家登记记录", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(WineryCompanyRecord wineryCompanyRecord) {
|
||||
LambdaQueryWrapper<WineryCompanyRecord> lqw = new LambdaQueryWrapper<WineryCompanyRecord>(wineryCompanyRecord);
|
||||
List<WineryCompanyRecord> list = iWineryCompanyRecordService.list(lqw);
|
||||
ExcelUtil<WineryCompanyRecord> util = new ExcelUtil<WineryCompanyRecord>(WineryCompanyRecord.class);
|
||||
return util.exportExcel(list, "winery_company_record");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取酒庄厂家登记记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return AjaxResult.success(iWineryCompanyRecordService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增酒庄厂家登记记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:add')")
|
||||
@Log(title = "酒庄厂家登记记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryCompanyRecord wineryCompanyRecord) {
|
||||
return toAjax(iWineryCompanyRecordService.save(wineryCompanyRecord) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改酒庄厂家登记记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:edit')")
|
||||
@Log(title = "酒庄厂家登记记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryCompanyRecord wineryCompanyRecord) {
|
||||
return toAjax(iWineryCompanyRecordService.updateById(wineryCompanyRecord) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除酒庄厂家登记记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_company_record:remove')")
|
||||
@Log(title = "酒庄厂家登记记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(iWineryCompanyRecordService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.winery.enums.IrrigationTypeEnum;
|
||||
import com.ruoyi.winery.enums.SoilTypeEnum;
|
||||
import com.ruoyi.winery.enums.WineryStatusEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 酒庄厂家登记记录对象 winery_company_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-18
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_company_record")
|
||||
public class WineryCompanyRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** id */
|
||||
@TableId(value = "id")
|
||||
private String id;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/** 创建者openid */
|
||||
@Excel(name = "创建者openid")
|
||||
private String openid;
|
||||
|
||||
/** 联系邮箱 */
|
||||
@Excel(name = "联系邮箱")
|
||||
private String email;
|
||||
|
||||
/** 联系人姓名 */
|
||||
@Excel(name = "联系人姓名")
|
||||
private String personName;
|
||||
|
||||
/** 手机号码 */
|
||||
@Excel(name = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
/** 酒庄名称 */
|
||||
@Excel(name = "酒庄名称")
|
||||
private String wineryName;
|
||||
|
||||
/** 建立时间 */
|
||||
@Excel(name = "建立时间")
|
||||
private String buildTime;
|
||||
|
||||
/** 酒庄地址(区) */
|
||||
@Excel(name = "酒庄地址" , readConverterExp = "区=")
|
||||
private String region;
|
||||
|
||||
/** 酒庄地址(具体) */
|
||||
@Excel(name = "酒庄地址" , readConverterExp = "具=体")
|
||||
private String address;
|
||||
|
||||
/** 总面积 */
|
||||
@Excel(name = "总面积")
|
||||
private Long wineryArea;
|
||||
|
||||
/** 建筑面积 */
|
||||
@Excel(name = "建筑面积")
|
||||
private Long buildArea;
|
||||
|
||||
/** 酒庄现状 */
|
||||
@Excel(name = "酒庄现状")
|
||||
private WineryStatusEnum wineryStatus;
|
||||
|
||||
/** 面积(亩) */
|
||||
@Excel(name = "面积" , readConverterExp = "亩=")
|
||||
private Long plantArea;
|
||||
|
||||
/** 产量(斤) */
|
||||
@Excel(name = "产量" , readConverterExp = "斤=")
|
||||
private Long plantWeight;
|
||||
|
||||
/** 土壤类型 */
|
||||
@Excel(name = "土壤类型")
|
||||
private SoilTypeEnum soilType;
|
||||
|
||||
/** 红葡萄品种 */
|
||||
@Excel(name = "红葡萄品种")
|
||||
private String redVariety;
|
||||
|
||||
/** 白葡萄品种 */
|
||||
@Excel(name = "白葡萄品种")
|
||||
private String whiteVariety;
|
||||
|
||||
/** 灌溉方式 */
|
||||
@Excel(name = "灌溉方式")
|
||||
private IrrigationTypeEnum irrigationType;
|
||||
|
||||
/** 发酵工艺 */
|
||||
@Excel(name = "发酵工艺")
|
||||
private String fermentationProcess;
|
||||
|
||||
/** 热化容器 */
|
||||
@Excel(name = "热化容器")
|
||||
private String container;
|
||||
|
||||
/** 澄清方式 */
|
||||
@Excel(name = "澄清方式")
|
||||
private String clarificationMethod;
|
||||
|
||||
/** 年产量 */
|
||||
@Excel(name = "年产量")
|
||||
private Long annualOutput;
|
||||
|
||||
/** 库存 */
|
||||
@Excel(name = "库存")
|
||||
private Long stock;
|
||||
|
||||
/** 酒桶数量 */
|
||||
@Excel(name = "酒桶数量")
|
||||
private Long bucketCount;
|
||||
|
||||
/** 主要产品定价 */
|
||||
@Excel(name = "主要产品定价")
|
||||
private String mainPrice;
|
||||
|
||||
/** 销售方式 */
|
||||
@Excel(name = "销售方式")
|
||||
private String salesMode;
|
||||
|
||||
/** 获奖种类 */
|
||||
@Excel(name = "获奖种类")
|
||||
private String awards;
|
||||
|
||||
/** 获奖信息 */
|
||||
@Excel(name = "获奖信息")
|
||||
private String awardInformation;
|
||||
|
||||
/** 征集口号 */
|
||||
@Excel(name = "征集口号")
|
||||
private String slogan;
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.ruoyi.winery.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 灌溉方式状态枚举
|
||||
*
|
||||
* @author tottimctj
|
||||
*/
|
||||
@Getter
|
||||
public enum IrrigationTypeEnum {
|
||||
|
||||
/**
|
||||
* 数据当前状态
|
||||
*/
|
||||
OVERFLOWING("OVERFLOWING", "漫灌"),
|
||||
SPRINKLER("SPRINKLER", "喷灌"),
|
||||
DRIP("DRIP", "滴灌");
|
||||
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
|
||||
@JsonValue
|
||||
private final String desc;
|
||||
|
||||
IrrigationTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static IrrigationTypeEnum parseEnum(String desc) {
|
||||
|
||||
if (desc.equals(OVERFLOWING.desc)) {
|
||||
return OVERFLOWING;
|
||||
} else if (desc.equals(SPRINKLER.desc)) {
|
||||
return SPRINKLER;
|
||||
} else {
|
||||
return DRIP;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.ruoyi.winery.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 土壤类型状态枚举
|
||||
*
|
||||
* @author tottimctj
|
||||
*/
|
||||
@Getter
|
||||
public enum SoilTypeEnum {
|
||||
|
||||
/**
|
||||
* 数据当前状态
|
||||
*/
|
||||
SAND("SAND", "沙石"),
|
||||
STONE("STONE", "砾石"),
|
||||
LIMESTONE("LIMESTONE", "石灰岩"),
|
||||
MIXING("MIXING", "混合");
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
|
||||
@JsonValue
|
||||
private final String desc;
|
||||
|
||||
SoilTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static SoilTypeEnum parseEnum(String desc) {
|
||||
|
||||
if (desc.equals(SAND.desc)) {
|
||||
return SAND;
|
||||
} else if (desc.equals(STONE.desc)) {
|
||||
return STONE;
|
||||
} else if (desc.equals(LIMESTONE.desc)) {
|
||||
return LIMESTONE;
|
||||
} else {
|
||||
return MIXING;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.winery.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据状态枚举
|
||||
*
|
||||
* @author zyArcher
|
||||
*/
|
||||
@Getter
|
||||
public enum StateEnum {
|
||||
|
||||
/**
|
||||
* 数据当前状态
|
||||
*/
|
||||
OFF("OFF", "停用"),
|
||||
ON("ON", "启用"),
|
||||
DEL("DEL", "删除");
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
|
||||
@JsonValue
|
||||
private final String desc;
|
||||
|
||||
StateEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.ruoyi.winery.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 酒庄状态枚举
|
||||
*
|
||||
* @author tottimctj
|
||||
*/
|
||||
@Getter
|
||||
public enum WineryStatusEnum {
|
||||
|
||||
/**
|
||||
* 数据当前状态
|
||||
*/
|
||||
PRODUCE("PRODUCE", "已建成投产"),
|
||||
BUILDING_PRODUCE("BUILDING_PRODUCE", "在建已投产"),
|
||||
BUILDING("BUILDING", "在建未投产"),
|
||||
STOP("STOP", "已停产");
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
|
||||
@JsonValue
|
||||
private final String desc;
|
||||
|
||||
WineryStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static WineryStatusEnum parseEnum(String desc) {
|
||||
|
||||
if (desc.equals(BUILDING.desc)) {
|
||||
return BUILDING;
|
||||
} else if (desc.equals(BUILDING_PRODUCE.desc)) {
|
||||
return BUILDING_PRODUCE;
|
||||
} else if (desc.equals(PRODUCE.desc)) {
|
||||
return PRODUCE;
|
||||
} else {
|
||||
return STOP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryCompanyRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 酒庄厂家登记记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-18
|
||||
*/
|
||||
public interface WineryCompanyRecordMapper extends BaseMapper<WineryCompanyRecord> {
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryCompanyRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 酒庄厂家登记记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-18
|
||||
*/
|
||||
public interface IWineryCompanyRecordService extends IService<WineryCompanyRecord> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.winery.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.winery.mapper.WineryCompanyRecordMapper;
|
||||
import com.ruoyi.winery.domain.WineryCompanyRecord;
|
||||
import com.ruoyi.winery.service.IWineryCompanyRecordService;
|
||||
|
||||
/**
|
||||
* 酒庄厂家登记记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-18
|
||||
*/
|
||||
@Service
|
||||
public class WineryCompanyRecordServiceImpl extends ServiceImpl<WineryCompanyRecordMapper, WineryCompanyRecord> implements IWineryCompanyRecordService {
|
||||
|
||||
}
|
53
ruoyi-ui/src/api/winery/winery_company_record.js
Normal file
53
ruoyi-ui/src/api/winery/winery_company_record.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询酒庄厂家登记记录列表
|
||||
export function listWinery_company_record(query) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询酒庄厂家登记记录详细
|
||||
export function getWinery_company_record(id) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增酒庄厂家登记记录
|
||||
export function addWinery_company_record(data) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改酒庄厂家登记记录
|
||||
export function updateWinery_company_record(data) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除酒庄厂家登记记录
|
||||
export function delWinery_company_record(id) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出酒庄厂家登记记录
|
||||
export function exportWinery_company_record(query) {
|
||||
return request({
|
||||
url: '/winery/winery_company_record/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
750
ruoyi-ui/src/views/winery/winery_company_record/index.vue
Normal file
750
ruoyi-ui/src/views/winery/winery_company_record/index.vue
Normal file
@ -0,0 +1,750 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="创建者openid" prop="openid">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.openid"-->
|
||||
<!-- placeholder="请输入创建者openid"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="联系邮箱" prop="email">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.email"-->
|
||||
<!-- placeholder="请输入联系邮箱"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="联系人" prop="personName" >
|
||||
<el-input
|
||||
v-model="queryParams.personName"
|
||||
placeholder="请输入联系人姓名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒庄名称" prop="wineryName">
|
||||
<el-input
|
||||
v-model="queryParams.wineryName"
|
||||
placeholder="请输入酒庄名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="建立时间" prop="buildTime">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.buildTime"-->
|
||||
<!-- placeholder="请输入建立时间"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="酒庄地址" prop="region">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.region"-->
|
||||
<!-- placeholder="请输入酒庄地址"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="酒庄地址" prop="address">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.address"-->
|
||||
<!-- placeholder="请输入酒庄地址"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="总面积" prop="wineryArea">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.wineryArea"-->
|
||||
<!-- placeholder="请输入总面积"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="建筑面积" prop="buildArea">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.buildArea"-->
|
||||
<!-- placeholder="请输入建筑面积"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="酒庄现状" prop="wineryStatus">
|
||||
<el-select v-model="queryParams.wineryStatus" placeholder="请选择酒庄现状" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in wineryStatusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="面积" prop="plantArea">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.plantArea"-->
|
||||
<!-- placeholder="请输入面积"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="产量" prop="plantWeight">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.plantWeight"-->
|
||||
<!-- placeholder="请输入产量"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="土壤类型" prop="soilType">-->
|
||||
<!-- <el-select v-model="queryParams.soilType" placeholder="请选择土壤类型" clearable size="small">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in soilTypeOptions"-->
|
||||
<!-- :key="dict.dictValue"-->
|
||||
<!-- :label="dict.dictLabel"-->
|
||||
<!-- :value="dict.dictValue"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="红葡萄品种" prop="redVariety">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.redVariety"-->
|
||||
<!-- placeholder="请输入红葡萄品种"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="白葡萄品种" prop="whiteVariety">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.whiteVariety"-->
|
||||
<!-- placeholder="请输入白葡萄品种"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="灌溉方式" prop="irrigationType">-->
|
||||
<!-- <el-select v-model="queryParams.irrigationType" placeholder="请选择灌溉方式" clearable size="small">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in irrigationTypeOptions"-->
|
||||
<!-- :key="dict.dictValue"-->
|
||||
<!-- :label="dict.dictLabel"-->
|
||||
<!-- :value="dict.dictValue"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="发酵工艺" prop="fermentationProcess">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.fermentationProcess"-->
|
||||
<!-- placeholder="请输入发酵工艺"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="热化容器" prop="container">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.container"-->
|
||||
<!-- placeholder="请输入热化容器"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="澄清方式" prop="clarificationMethod">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.clarificationMethod"-->
|
||||
<!-- placeholder="请输入澄清方式"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="年产量" prop="annualOutput">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.annualOutput"-->
|
||||
<!-- placeholder="请输入年产量"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="库存" prop="stock">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.stock"-->
|
||||
<!-- placeholder="请输入库存"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="酒桶数量" prop="bucketCount">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.bucketCount"-->
|
||||
<!-- placeholder="请输入酒桶数量"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="销售方式" prop="salesMode">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.salesMode"-->
|
||||
<!-- placeholder="请输入销售方式"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="获奖信息" prop="awardInformation">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.awardInformation"-->
|
||||
<!-- placeholder="请输入获奖信息"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="征集口号" prop="slogan">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.slogan"-->
|
||||
<!-- placeholder="请输入征集口号"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['winery:winery_company_record:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['winery:winery_company_record:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['winery:winery_company_record:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['winery:winery_company_record:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="winery_company_recordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="id" align="center" prop="id" v-if="false"/>
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat"/>
|
||||
<el-table-column label="酒庄名称" align="center" prop="wineryName"/>
|
||||
<el-table-column label="联系人姓名" align="center" prop="personName"/>
|
||||
|
||||
<el-table-column label="酒庄地址" align="center" prop="region" :formatter="addressFormat" width="180"/>
|
||||
<!-- <el-table-column label="创建者openid" align="center" prop="openid" />-->
|
||||
<el-table-column label="联系邮箱" align="center" prop="email" width="180"/>
|
||||
|
||||
<el-table-column label="手机号码" align="center" prop="mobile" width="120"/>
|
||||
|
||||
<el-table-column label="建立时间" align="center" prop="buildTime" width="120"/>
|
||||
|
||||
<el-table-column label="总面积" align="center" prop="wineryArea"/>
|
||||
<el-table-column label="建筑面积" align="center" prop="buildArea"/>
|
||||
<el-table-column label="酒庄现状" align="center" prop="wineryStatus" :formatter="wineryStatusFormat" width="120"/>
|
||||
<el-table-column label="面积" align="center" prop="plantArea"/>
|
||||
<el-table-column label="产量" align="center" prop="plantWeight"/>
|
||||
<el-table-column label="土壤类型" align="center" prop="soilType" :formatter="soilTypeFormat"/>
|
||||
<!-- <el-table-column label="红葡萄品种" align="center" prop="redVariety" />-->
|
||||
<!-- <el-table-column label="白葡萄品种" align="center" prop="whiteVariety" />-->
|
||||
<!-- <el-table-column label="灌溉方式" align="center" prop="irrigationType" :formatter="irrigationTypeFormat" />-->
|
||||
<!-- <el-table-column label="发酵工艺" align="center" prop="fermentationProcess" />-->
|
||||
<!-- <el-table-column label="热化容器" align="center" prop="container" />-->
|
||||
<!-- <el-table-column label="澄清方式" align="center" prop="clarificationMethod" />-->
|
||||
<el-table-column label="年产量" align="center" prop="annualOutput"/>
|
||||
<el-table-column label="库存" align="center" prop="stock"/>
|
||||
<el-table-column label="酒桶数量" align="center" prop="bucketCount"/>
|
||||
<!-- <el-table-column label="主要产品定价" align="center" prop="mainPrice" />-->
|
||||
<!-- <el-table-column label="销售方式" align="center" prop="salesMode" />-->
|
||||
<!-- <el-table-column label="获奖种类" align="center" prop="awards" />-->
|
||||
<!-- <el-table-column label="获奖信息" align="center" prop="awardInformation" />-->
|
||||
<!-- <el-table-column label="征集口号" align="center" prop="slogan" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['winery:winery_company_record:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:winery_company_record:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改酒庄厂家登记记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者openid" prop="openid">
|
||||
<el-input v-model="form.openid" placeholder="请输入创建者openid"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入联系邮箱"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人姓名" prop="personName">
|
||||
<el-input v-model="form.personName" placeholder="请输入联系人姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入手机号码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒庄名称" prop="wineryName">
|
||||
<el-input v-model="form.wineryName" placeholder="请输入酒庄名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建立时间" prop="buildTime">
|
||||
<el-input v-model="form.buildTime" placeholder="请输入建立时间"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒庄地址" prop="region">
|
||||
<el-input v-model="form.region" placeholder="请输入酒庄地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒庄地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入酒庄地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总面积" prop="wineryArea">
|
||||
<el-input v-model="form.wineryArea" placeholder="请输入总面积"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑面积" prop="buildArea">
|
||||
<el-input v-model="form.buildArea" placeholder="请输入建筑面积"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒庄现状">
|
||||
<el-radio-group v-model="form.wineryStatus">
|
||||
<el-radio
|
||||
v-for="dict in wineryStatusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="面积" prop="plantArea">
|
||||
<el-input v-model="form.plantArea" placeholder="请输入面积"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产量" prop="plantWeight">
|
||||
<el-input v-model="form.plantWeight" placeholder="请输入产量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="土壤类型" prop="soilType">
|
||||
<el-select v-model="form.soilType" placeholder="请选择土壤类型">
|
||||
<el-option
|
||||
v-for="dict in soilTypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="红葡萄品种" prop="redVariety">
|
||||
<el-input v-model="form.redVariety" placeholder="请输入红葡萄品种"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="白葡萄品种" prop="whiteVariety">
|
||||
<el-input v-model="form.whiteVariety" placeholder="请输入白葡萄品种"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="灌溉方式" prop="irrigationType">
|
||||
<el-select v-model="form.irrigationType" placeholder="请选择灌溉方式">
|
||||
<el-option
|
||||
v-for="dict in irrigationTypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发酵工艺" prop="fermentationProcess">
|
||||
<el-input v-model="form.fermentationProcess" placeholder="请输入发酵工艺"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="热化容器" prop="container">
|
||||
<el-input v-model="form.container" placeholder="请输入热化容器"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="澄清方式" prop="clarificationMethod">
|
||||
<el-input v-model="form.clarificationMethod" placeholder="请输入澄清方式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="年产量" prop="annualOutput">
|
||||
<el-input v-model="form.annualOutput" placeholder="请输入年产量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存" prop="stock">
|
||||
<el-input v-model="form.stock" placeholder="请输入库存"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒桶数量" prop="bucketCount">
|
||||
<el-input v-model="form.bucketCount" placeholder="请输入酒桶数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要产品定价" prop="mainPrice">
|
||||
<el-input v-model="form.mainPrice" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售方式" prop="salesMode">
|
||||
<el-input v-model="form.salesMode" placeholder="请输入销售方式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="获奖种类" prop="awards">
|
||||
<el-input v-model="form.awards" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="获奖信息" prop="awardInformation">
|
||||
<el-input v-model="form.awardInformation" placeholder="请输入获奖信息"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="征集口号" prop="slogan">
|
||||
<el-input v-model="form.slogan" placeholder="请输入征集口号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listWinery_company_record,
|
||||
getWinery_company_record,
|
||||
delWinery_company_record,
|
||||
addWinery_company_record,
|
||||
updateWinery_company_record,
|
||||
exportWinery_company_record
|
||||
} from "@/api/winery/winery_company_record";
|
||||
|
||||
export default {
|
||||
name: "Winery_company_record",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 酒庄厂家登记记录表格数据
|
||||
winery_company_recordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 状态字典
|
||||
statusOptions: [],
|
||||
// 酒庄现状字典
|
||||
wineryStatusOptions: [],
|
||||
// 土壤类型字典
|
||||
soilTypeOptions: [],
|
||||
// 灌溉方式字典
|
||||
irrigationTypeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
openid: undefined,
|
||||
email: undefined,
|
||||
personName: undefined,
|
||||
mobile: undefined,
|
||||
wineryName: undefined,
|
||||
buildTime: undefined,
|
||||
region: undefined,
|
||||
address: undefined,
|
||||
wineryArea: undefined,
|
||||
buildArea: undefined,
|
||||
wineryStatus: undefined,
|
||||
plantArea: undefined,
|
||||
plantWeight: undefined,
|
||||
soilType: undefined,
|
||||
redVariety: undefined,
|
||||
whiteVariety: undefined,
|
||||
irrigationType: undefined,
|
||||
fermentationProcess: undefined,
|
||||
container: undefined,
|
||||
clarificationMethod: undefined,
|
||||
annualOutput: undefined,
|
||||
stock: undefined,
|
||||
bucketCount: undefined,
|
||||
mainPrice: undefined,
|
||||
salesMode: undefined,
|
||||
awards: undefined,
|
||||
awardInformation: undefined,
|
||||
slogan: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
openid: [
|
||||
{required: true, message: "创建者openid不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("winery_company_status").then(response => {
|
||||
this.wineryStatusOptions = response.data;
|
||||
});
|
||||
this.getDicts("winery_soil_types").then(response => {
|
||||
this.soilTypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("winery_irrigation_type").then(response => {
|
||||
this.irrigationTypeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询酒庄厂家登记记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWinery_company_record(this.queryParams).then(response => {
|
||||
this.winery_company_recordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
},
|
||||
// 酒庄现状字典翻译
|
||||
wineryStatusFormat(row, column) {
|
||||
|
||||
return row.wineryStatus;
|
||||
},
|
||||
// 土壤类型字典翻译
|
||||
soilTypeFormat(row, column) {
|
||||
return row.soilType;
|
||||
},
|
||||
// 灌溉方式字典翻译
|
||||
irrigationTypeFormat(row, column) {
|
||||
return row.irrigationType;
|
||||
},
|
||||
|
||||
addressFormat(row, column) {
|
||||
return row.region + row.address
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
status: "0",
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
openid: undefined,
|
||||
email: undefined,
|
||||
personName: undefined,
|
||||
mobile: undefined,
|
||||
wineryName: undefined,
|
||||
buildTime: undefined,
|
||||
region: undefined,
|
||||
address: undefined,
|
||||
wineryArea: undefined,
|
||||
buildArea: undefined,
|
||||
wineryStatus: "0",
|
||||
plantArea: undefined,
|
||||
plantWeight: undefined,
|
||||
soilType: undefined,
|
||||
redVariety: undefined,
|
||||
whiteVariety: undefined,
|
||||
irrigationType: undefined,
|
||||
fermentationProcess: undefined,
|
||||
container: undefined,
|
||||
clarificationMethod: undefined,
|
||||
annualOutput: undefined,
|
||||
stock: undefined,
|
||||
bucketCount: undefined,
|
||||
mainPrice: undefined,
|
||||
salesMode: undefined,
|
||||
awards: undefined,
|
||||
awardInformation: undefined,
|
||||
slogan: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加酒庄厂家登记记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWinery_company_record(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改酒庄厂家登记记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateWinery_company_record(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWinery_company_record(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除酒庄厂家登记记录编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return delWinery_company_record(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有酒庄厂家登记记录数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return exportWinery_company_record(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user