mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 09:35:29 +08:00
增加一些商品管理内容
This commit is contained in:
parent
b3e000c255
commit
241de49166
@ -0,0 +1,143 @@
|
||||
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.WineryFoodSafety;
|
||||
import com.ruoyi.winery.service.IWineryFoodSafetyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 食品安全详情Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/food_safety" )
|
||||
public class WineryFoodSafetyController extends BaseController {
|
||||
|
||||
private final IWineryFoodSafetyService iWineryFoodSafetyService;
|
||||
|
||||
/**
|
||||
* 查询食品安全详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryFoodSafety wineryFoodSafety)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryFoodSafety> lqw = Wrappers.lambdaQuery(wineryFoodSafety);
|
||||
if (wineryFoodSafety.getDeptId() != null){
|
||||
lqw.eq(WineryFoodSafety::getDeptId ,wineryFoodSafety.getDeptId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getProdLicense())){
|
||||
lqw.eq(WineryFoodSafety::getProdLicense ,wineryFoodSafety.getProdLicense());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getStandardId())){
|
||||
lqw.eq(WineryFoodSafety::getStandardId ,wineryFoodSafety.getStandardId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getMakerName())){
|
||||
lqw.like(WineryFoodSafety::getMakerName ,wineryFoodSafety.getMakerName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getMakerAddress())){
|
||||
lqw.eq(WineryFoodSafety::getMakerAddress ,wineryFoodSafety.getMakerAddress());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getMakerContact())){
|
||||
lqw.eq(WineryFoodSafety::getMakerContact ,wineryFoodSafety.getMakerContact());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getIngredients())){
|
||||
lqw.eq(WineryFoodSafety::getIngredients ,wineryFoodSafety.getIngredients());
|
||||
}
|
||||
if (wineryFoodSafety.getPeriod() != null){
|
||||
lqw.eq(WineryFoodSafety::getPeriod ,wineryFoodSafety.getPeriod());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getWineLevel())){
|
||||
lqw.eq(WineryFoodSafety::getWineLevel ,wineryFoodSafety.getWineLevel());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getStorageMode())){
|
||||
lqw.eq(WineryFoodSafety::getStorageMode ,wineryFoodSafety.getStorageMode());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryFoodSafety.getSupplier())){
|
||||
lqw.eq(WineryFoodSafety::getSupplier ,wineryFoodSafety.getSupplier());
|
||||
}
|
||||
if (wineryFoodSafety.getMakeDate() != null){
|
||||
lqw.eq(WineryFoodSafety::getMakeDate ,wineryFoodSafety.getMakeDate());
|
||||
}
|
||||
List<WineryFoodSafety> list = iWineryFoodSafetyService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出食品安全详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:export')" )
|
||||
@Log(title = "食品安全详情" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(WineryFoodSafety wineryFoodSafety) {
|
||||
LambdaQueryWrapper<WineryFoodSafety> lqw = new LambdaQueryWrapper<WineryFoodSafety>(wineryFoodSafety);
|
||||
List<WineryFoodSafety> list = iWineryFoodSafetyService.list(lqw);
|
||||
ExcelUtil<WineryFoodSafety> util = new ExcelUtil<WineryFoodSafety>(WineryFoodSafety. class);
|
||||
return util.exportExcel(list, "food_safety" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取食品安全详情详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iWineryFoodSafetyService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增食品安全详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:add')" )
|
||||
@Log(title = "食品安全详情" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryFoodSafety wineryFoodSafety) {
|
||||
return toAjax(iWineryFoodSafetyService.save(wineryFoodSafety) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改食品安全详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:edit')" )
|
||||
@Log(title = "食品安全详情" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryFoodSafety wineryFoodSafety) {
|
||||
return toAjax(iWineryFoodSafetyService.updateById(wineryFoodSafety) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除食品安全详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:food_safety:remove')" )
|
||||
@Log(title = "食品安全详情" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iWineryFoodSafetyService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
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.WineryGoods;
|
||||
import com.ruoyi.winery.service.IWineryGoodsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/winery_goods" )
|
||||
public class WineryGoodsController extends BaseController {
|
||||
|
||||
private final IWineryGoodsService iWineryGoodsService;
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryGoods wineryGoods)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryGoods> lqw = Wrappers.lambdaQuery(wineryGoods);
|
||||
if (wineryGoods.getDeptId() != null){
|
||||
lqw.eq(WineryGoods::getDeptId ,wineryGoods.getDeptId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodsName())){
|
||||
lqw.like(WineryGoods::getGoodsName ,wineryGoods.getGoodsName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodsAlias())){
|
||||
lqw.eq(WineryGoods::getGoodsAlias ,wineryGoods.getGoodsAlias());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodsType())){
|
||||
lqw.eq(WineryGoods::getGoodsType ,wineryGoods.getGoodsType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodsSpec())){
|
||||
lqw.eq(WineryGoods::getGoodsSpec ,wineryGoods.getGoodsSpec());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodDesc())){
|
||||
lqw.eq(WineryGoods::getGoodDesc ,wineryGoods.getGoodDesc());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodFaceImg())){
|
||||
lqw.eq(WineryGoods::getGoodFaceImg ,wineryGoods.getGoodFaceImg());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoods.getGoodImg())){
|
||||
lqw.eq(WineryGoods::getGoodImg ,wineryGoods.getGoodImg());
|
||||
}
|
||||
List<WineryGoods> list = iWineryGoodsService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:export')" )
|
||||
@Log(title = "商品信息" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(WineryGoods wineryGoods) {
|
||||
LambdaQueryWrapper<WineryGoods> lqw = new LambdaQueryWrapper<WineryGoods>(wineryGoods);
|
||||
List<WineryGoods> list = iWineryGoodsService.list(lqw);
|
||||
ExcelUtil<WineryGoods> util = new ExcelUtil<WineryGoods>(WineryGoods. class);
|
||||
return util.exportExcel(list, "winery_goods" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iWineryGoodsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:add')" )
|
||||
@Log(title = "商品信息" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryGoods wineryGoods) {
|
||||
return toAjax(iWineryGoodsService.save(wineryGoods) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:edit')" )
|
||||
@Log(title = "商品信息" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryGoods wineryGoods) {
|
||||
return toAjax(iWineryGoodsService.updateById(wineryGoods) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:winery_goods:remove')" )
|
||||
@Log(title = "商品信息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iWineryGoodsService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
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.WineryGoodsSpec;
|
||||
import com.ruoyi.winery.service.IWineryGoodsSpecService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品规格Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/spec" )
|
||||
public class WineryGoodsSpecController extends BaseController {
|
||||
|
||||
private final IWineryGoodsSpecService iWineryGoodsSpecService;
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryGoodsSpec wineryGoodsSpec)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryGoodsSpec> lqw = Wrappers.lambdaQuery(wineryGoodsSpec);
|
||||
if (wineryGoodsSpec.getDeptId() != null){
|
||||
lqw.eq(WineryGoodsSpec::getDeptId ,wineryGoodsSpec.getDeptId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecName())){
|
||||
lqw.like(WineryGoodsSpec::getSpecName ,wineryGoodsSpec.getSpecName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecDesc())){
|
||||
lqw.eq(WineryGoodsSpec::getSpecDesc ,wineryGoodsSpec.getSpecDesc());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecImg())){
|
||||
lqw.eq(WineryGoodsSpec::getSpecImg ,wineryGoodsSpec.getSpecImg());
|
||||
}
|
||||
if (wineryGoodsSpec.getSpecPrice() != null){
|
||||
lqw.eq(WineryGoodsSpec::getSpecPrice ,wineryGoodsSpec.getSpecPrice());
|
||||
}
|
||||
if (wineryGoodsSpec.getDetailSpec() != null){
|
||||
lqw.eq(WineryGoodsSpec::getDetailSpec ,wineryGoodsSpec.getDetailSpec());
|
||||
}
|
||||
List<WineryGoodsSpec> list = iWineryGoodsSpecService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品规格列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:export')" )
|
||||
@Log(title = "商品规格" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(WineryGoodsSpec wineryGoodsSpec) {
|
||||
LambdaQueryWrapper<WineryGoodsSpec> lqw = new LambdaQueryWrapper<WineryGoodsSpec>(wineryGoodsSpec);
|
||||
List<WineryGoodsSpec> list = iWineryGoodsSpecService.list(lqw);
|
||||
ExcelUtil<WineryGoodsSpec> util = new ExcelUtil<WineryGoodsSpec>(WineryGoodsSpec. class);
|
||||
return util.exportExcel(list, "spec" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品规格详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iWineryGoodsSpecService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品规格
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:add')" )
|
||||
@Log(title = "商品规格" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryGoodsSpec wineryGoodsSpec) {
|
||||
return toAjax(iWineryGoodsSpecService.save(wineryGoodsSpec) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:edit')" )
|
||||
@Log(title = "商品规格" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryGoodsSpec wineryGoodsSpec) {
|
||||
return toAjax(iWineryGoodsSpecService.updateById(wineryGoodsSpec) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:spec:remove')" )
|
||||
@Log(title = "商品规格" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iWineryGoodsSpecService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
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.WineryOrders;
|
||||
import com.ruoyi.winery.service.IWineryOrdersService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 客户订单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/user_orders" )
|
||||
public class WineryOrdersController extends BaseController {
|
||||
|
||||
private final IWineryOrdersService iWineryOrdersService;
|
||||
|
||||
/**
|
||||
* 查询客户订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryOrders wineryOrders)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryOrders> lqw = Wrappers.lambdaQuery(wineryOrders);
|
||||
if (wineryOrders.getDeptId() != null){
|
||||
lqw.eq(WineryOrders::getDeptId ,wineryOrders.getDeptId());
|
||||
}
|
||||
if (wineryOrders.getGoodsId() != null){
|
||||
lqw.eq(WineryOrders::getGoodsId ,wineryOrders.getGoodsId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryOrders.getGoodsName())){
|
||||
lqw.like(WineryOrders::getGoodsName ,wineryOrders.getGoodsName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryOrders.getGoodsType())){
|
||||
lqw.eq(WineryOrders::getGoodsType ,wineryOrders.getGoodsType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryOrders.getGoodsSpec())){
|
||||
lqw.eq(WineryOrders::getGoodsSpec ,wineryOrders.getGoodsSpec());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryOrders.getGoodsFaceImg())){
|
||||
lqw.eq(WineryOrders::getGoodsFaceImg ,wineryOrders.getGoodsFaceImg());
|
||||
}
|
||||
if (wineryOrders.getGoodsPrice() != null){
|
||||
lqw.eq(WineryOrders::getGoodsPrice ,wineryOrders.getGoodsPrice());
|
||||
}
|
||||
if (wineryOrders.getGoodsCount() != null){
|
||||
lqw.eq(WineryOrders::getGoodsCount ,wineryOrders.getGoodsCount());
|
||||
}
|
||||
if (wineryOrders.getOrderStatus() != null){
|
||||
lqw.eq(WineryOrders::getOrderStatus ,wineryOrders.getOrderStatus());
|
||||
}
|
||||
List<WineryOrders> list = iWineryOrdersService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:export')" )
|
||||
@Log(title = "客户订单" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(WineryOrders wineryOrders) {
|
||||
LambdaQueryWrapper<WineryOrders> lqw = new LambdaQueryWrapper<WineryOrders>(wineryOrders);
|
||||
List<WineryOrders> list = iWineryOrdersService.list(lqw);
|
||||
ExcelUtil<WineryOrders> util = new ExcelUtil<WineryOrders>(WineryOrders. class);
|
||||
return util.exportExcel(list, "user_orders" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户订单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iWineryOrdersService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:add')" )
|
||||
@Log(title = "客户订单" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryOrders wineryOrders) {
|
||||
return toAjax(iWineryOrdersService.save(wineryOrders) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:edit')" )
|
||||
@Log(title = "客户订单" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryOrders wineryOrders) {
|
||||
return toAjax(iWineryOrdersService.updateById(wineryOrders) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:user_orders:remove')" )
|
||||
@Log(title = "客户订单" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iWineryOrdersService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,146 @@
|
||||
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.WineryWineSpecDetail;
|
||||
import com.ruoyi.winery.service.IWineryWineSpecDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 葡萄酒规格详情Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/winery/wine_detail" )
|
||||
public class WineryWineSpecDetailController extends BaseController {
|
||||
|
||||
private final IWineryWineSpecDetailService iWineryWineSpecDetailService;
|
||||
|
||||
/**
|
||||
* 查询葡萄酒规格详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WineryWineSpecDetail wineryWineSpecDetail)
|
||||
{
|
||||
startPage();
|
||||
LambdaQueryWrapper<WineryWineSpecDetail> lqw = Wrappers.lambdaQuery(wineryWineSpecDetail);
|
||||
if (wineryWineSpecDetail.getDeptId() != null){
|
||||
lqw.eq(WineryWineSpecDetail::getDeptId ,wineryWineSpecDetail.getDeptId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getBrand())){
|
||||
lqw.eq(WineryWineSpecDetail::getBrand ,wineryWineSpecDetail.getBrand());
|
||||
}
|
||||
if (wineryWineSpecDetail.getCapacity() != null){
|
||||
lqw.eq(WineryWineSpecDetail::getCapacity ,wineryWineSpecDetail.getCapacity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getYear())){
|
||||
lqw.eq(WineryWineSpecDetail::getYear ,wineryWineSpecDetail.getYear());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getAlcohol())){
|
||||
lqw.eq(WineryWineSpecDetail::getAlcohol ,wineryWineSpecDetail.getAlcohol());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getWineType())){
|
||||
lqw.eq(WineryWineSpecDetail::getWineType ,wineryWineSpecDetail.getWineType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getWineLevel())){
|
||||
lqw.eq(WineryWineSpecDetail::getWineLevel ,wineryWineSpecDetail.getWineLevel());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getGrape())){
|
||||
lqw.eq(WineryWineSpecDetail::getGrape ,wineryWineSpecDetail.getGrape());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getSugarContent())){
|
||||
lqw.eq(WineryWineSpecDetail::getSugarContent ,wineryWineSpecDetail.getSugarContent());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getPackingType())){
|
||||
lqw.eq(WineryWineSpecDetail::getPackingType ,wineryWineSpecDetail.getPackingType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getDecanteDuration())){
|
||||
lqw.eq(WineryWineSpecDetail::getDecanteDuration ,wineryWineSpecDetail.getDecanteDuration());
|
||||
}
|
||||
if (wineryWineSpecDetail.getCount() != null){
|
||||
lqw.eq(WineryWineSpecDetail::getCount ,wineryWineSpecDetail.getCount());
|
||||
}
|
||||
if (StringUtils.isNotBlank(wineryWineSpecDetail.getAroma())){
|
||||
lqw.eq(WineryWineSpecDetail::getAroma ,wineryWineSpecDetail.getAroma());
|
||||
}
|
||||
List<WineryWineSpecDetail> list = iWineryWineSpecDetailService.list(lqw);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出葡萄酒规格详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:export')" )
|
||||
@Log(title = "葡萄酒规格详情" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(WineryWineSpecDetail wineryWineSpecDetail) {
|
||||
LambdaQueryWrapper<WineryWineSpecDetail> lqw = new LambdaQueryWrapper<WineryWineSpecDetail>(wineryWineSpecDetail);
|
||||
List<WineryWineSpecDetail> list = iWineryWineSpecDetailService.list(lqw);
|
||||
ExcelUtil<WineryWineSpecDetail> util = new ExcelUtil<WineryWineSpecDetail>(WineryWineSpecDetail. class);
|
||||
return util.exportExcel(list, "wine_detail" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取葡萄酒规格详情详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iWineryWineSpecDetailService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增葡萄酒规格详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:add')" )
|
||||
@Log(title = "葡萄酒规格详情" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WineryWineSpecDetail wineryWineSpecDetail) {
|
||||
return toAjax(iWineryWineSpecDetailService.save(wineryWineSpecDetail) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改葡萄酒规格详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:edit')" )
|
||||
@Log(title = "葡萄酒规格详情" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WineryWineSpecDetail wineryWineSpecDetail) {
|
||||
return toAjax(iWineryWineSpecDetailService.updateById(wineryWineSpecDetail) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除葡萄酒规格详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('winery:wine_detail:remove')" )
|
||||
@Log(title = "葡萄酒规格详情" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iWineryWineSpecDetailService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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_food_safety
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_food_safety")
|
||||
public class WineryFoodSafety implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** 规格ID */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/** 生产许可证编号 */
|
||||
@Excel(name = "生产许可证编号")
|
||||
private String prodLicense;
|
||||
|
||||
/** 产品标准号 */
|
||||
@Excel(name = "产品标准号")
|
||||
private String standardId;
|
||||
|
||||
/** 厂名 */
|
||||
@Excel(name = "厂名")
|
||||
private String makerName;
|
||||
|
||||
/** 厂址 */
|
||||
@Excel(name = "厂址")
|
||||
private String makerAddress;
|
||||
|
||||
/** 厂家联系方式 */
|
||||
@Excel(name = "厂家联系方式")
|
||||
private String makerContact;
|
||||
|
||||
/** 配料表 */
|
||||
@Excel(name = "配料表")
|
||||
private String ingredients;
|
||||
|
||||
/** 保质期 */
|
||||
@Excel(name = "保质期")
|
||||
private Integer period;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 葡萄酒等级 */
|
||||
@Excel(name = "葡萄酒等级")
|
||||
private String wineLevel;
|
||||
|
||||
/** 储藏方法
|
||||
*/
|
||||
@Excel(name = "储藏方法")
|
||||
private String storageMode;
|
||||
|
||||
/** 供应商
|
||||
*/
|
||||
@Excel(name = "供应商")
|
||||
private String supplier;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date makeDate;
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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_goods
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_goods")
|
||||
public class WineryGoods implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** 商品ID */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String goodsName;
|
||||
|
||||
/** 商品简称 */
|
||||
@Excel(name = "商品简称")
|
||||
private String goodsAlias;
|
||||
|
||||
/** 商品类型 */
|
||||
@Excel(name = "商品类型")
|
||||
private String goodsType;
|
||||
|
||||
/** 关联规格 */
|
||||
@Excel(name = "关联规格")
|
||||
private String goodsSpec;
|
||||
|
||||
/** 商品说明 */
|
||||
@Excel(name = "商品说明")
|
||||
private String goodDesc;
|
||||
|
||||
/** 商品封面 */
|
||||
@Excel(name = "商品封面")
|
||||
private String goodFaceImg;
|
||||
|
||||
/** 商品图片 */
|
||||
@Excel(name = "商品图片")
|
||||
private String goodImg;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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_goods_spec
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_goods_spec")
|
||||
public class WineryGoodsSpec implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** 规格ID */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 规格名称 */
|
||||
@Excel(name = "规格名称")
|
||||
private String specName;
|
||||
|
||||
/** 规格说明 */
|
||||
@Excel(name = "规格说明")
|
||||
private String specDesc;
|
||||
|
||||
/** 规格图片 */
|
||||
@Excel(name = "规格图片")
|
||||
private String specImg;
|
||||
|
||||
/** 规格单价 */
|
||||
@Excel(name = "规格单价")
|
||||
private Long specPrice;
|
||||
|
||||
/** 规格详细 */
|
||||
@Excel(name = "规格详细")
|
||||
private Long detailSpec;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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_orders
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_orders")
|
||||
public class WineryOrders implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
@Excel(name = "商品ID")
|
||||
private Long goodsId;
|
||||
|
||||
/**
|
||||
* 商品简称
|
||||
*/
|
||||
@Excel(name = "商品简称")
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品类型
|
||||
*/
|
||||
@Excel(name = "商品类型")
|
||||
private String goodsType;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
*/
|
||||
@Excel(name = "商品规格")
|
||||
private String goodsSpec;
|
||||
|
||||
/**
|
||||
* 商品封面
|
||||
*/
|
||||
@Excel(name = "商品封面")
|
||||
private String goodsFaceImg;
|
||||
|
||||
/**
|
||||
* 商品基准单价
|
||||
*/
|
||||
@Excel(name = "商品基准单价")
|
||||
private Long goodsPrice;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
@Excel(name = "商品数量")
|
||||
private Integer goodsCount;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单状态:
|
||||
* 0.未支付
|
||||
* 1.已取消
|
||||
* 2.支付成功,等待发货
|
||||
* 3.支付成功,已发货
|
||||
* 4.已收货
|
||||
* 5.退款申请
|
||||
* 6.退款中
|
||||
* 7.退款成功
|
||||
*/
|
||||
@Excel(name = "订单状态: 0.未支付 1.已取消 2.支付成功,等待发货 3.支付成功,已发货 4.已收货 5.退款申请 6.退款中 7.退款成功")
|
||||
private Integer orderStatus;
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.winery.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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_wine_spec_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("winery_wine_spec_detail")
|
||||
public class WineryWineSpecDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** 规格ID */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String brand;
|
||||
|
||||
/** 净含量 */
|
||||
@Excel(name = "净含量")
|
||||
private Integer capacity;
|
||||
|
||||
/** 采摘年份
|
||||
*/
|
||||
@Excel(name = "采摘年份")
|
||||
private String year;
|
||||
|
||||
/** 酒精度 */
|
||||
@Excel(name = "酒精度")
|
||||
private String alcohol;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 葡萄酒种类 */
|
||||
@Excel(name = "葡萄酒种类")
|
||||
private String wineType;
|
||||
|
||||
/** 葡萄酒等级 */
|
||||
@Excel(name = "葡萄酒等级")
|
||||
private String wineLevel;
|
||||
|
||||
/** 葡萄种类 */
|
||||
@Excel(name = "葡萄种类")
|
||||
private String grape;
|
||||
|
||||
/** 糖分 */
|
||||
@Excel(name = "糖分")
|
||||
private String sugarContent;
|
||||
|
||||
/** 包装方式 */
|
||||
@Excel(name = "包装方式")
|
||||
private String packingType;
|
||||
|
||||
/** 醒酒时间 */
|
||||
@Excel(name = "醒酒时间")
|
||||
private String decanteDuration;
|
||||
|
||||
/** 支数 */
|
||||
@Excel(name = "支数")
|
||||
private Integer count;
|
||||
|
||||
/** 香味 */
|
||||
@Excel(name = "香味")
|
||||
private String aroma;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryFoodSafety;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 食品安全详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface WineryFoodSafetyMapper extends BaseMapper<WineryFoodSafety> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryGoods;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 商品信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface WineryGoodsMapper extends BaseMapper<WineryGoods> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryGoodsSpec;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 商品规格Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface WineryGoodsSpecMapper extends BaseMapper<WineryGoodsSpec> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryOrders;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 客户订单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface WineryOrdersMapper extends BaseMapper<WineryOrders> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.mapper;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryWineSpecDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 葡萄酒规格详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface WineryWineSpecDetailMapper extends BaseMapper<WineryWineSpecDetail> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryFoodSafety;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 食品安全详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface IWineryFoodSafetyService extends IService<WineryFoodSafety> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryGoods;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 商品信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface IWineryGoodsService extends IService<WineryGoods> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryGoodsSpec;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 商品规格Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface IWineryGoodsSpecService extends IService<WineryGoodsSpec> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryOrders;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 客户订单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface IWineryOrdersService extends IService<WineryOrders> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.winery.service;
|
||||
|
||||
import com.ruoyi.winery.domain.WineryWineSpecDetail;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 葡萄酒规格详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface IWineryWineSpecDetailService extends IService<WineryWineSpecDetail> {
|
||||
|
||||
}
|
||||
@ -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.WineryFoodSafetyMapper;
|
||||
import com.ruoyi.winery.domain.WineryFoodSafety;
|
||||
import com.ruoyi.winery.service.IWineryFoodSafetyService;
|
||||
|
||||
/**
|
||||
* 食品安全详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class WineryFoodSafetyServiceImpl extends ServiceImpl<WineryFoodSafetyMapper, WineryFoodSafety> implements IWineryFoodSafetyService {
|
||||
|
||||
}
|
||||
@ -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.WineryGoodsMapper;
|
||||
import com.ruoyi.winery.domain.WineryGoods;
|
||||
import com.ruoyi.winery.service.IWineryGoodsService;
|
||||
|
||||
/**
|
||||
* 商品信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class WineryGoodsServiceImpl extends ServiceImpl<WineryGoodsMapper, WineryGoods> implements IWineryGoodsService {
|
||||
|
||||
}
|
||||
@ -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.WineryGoodsSpecMapper;
|
||||
import com.ruoyi.winery.domain.WineryGoodsSpec;
|
||||
import com.ruoyi.winery.service.IWineryGoodsSpecService;
|
||||
|
||||
/**
|
||||
* 商品规格Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class WineryGoodsSpecServiceImpl extends ServiceImpl<WineryGoodsSpecMapper, WineryGoodsSpec> implements IWineryGoodsSpecService {
|
||||
|
||||
}
|
||||
@ -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.WineryOrdersMapper;
|
||||
import com.ruoyi.winery.domain.WineryOrders;
|
||||
import com.ruoyi.winery.service.IWineryOrdersService;
|
||||
|
||||
/**
|
||||
* 客户订单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class WineryOrdersServiceImpl extends ServiceImpl<WineryOrdersMapper, WineryOrders> implements IWineryOrdersService {
|
||||
|
||||
}
|
||||
@ -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.WineryWineSpecDetailMapper;
|
||||
import com.ruoyi.winery.domain.WineryWineSpecDetail;
|
||||
import com.ruoyi.winery.service.IWineryWineSpecDetailService;
|
||||
|
||||
/**
|
||||
* 葡萄酒规格详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class WineryWineSpecDetailServiceImpl extends ServiceImpl<WineryWineSpecDetailMapper, WineryWineSpecDetail> implements IWineryWineSpecDetailService {
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
<?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.winery.mapper.WineryFoodSafetyMapper">
|
||||
|
||||
<resultMap type="WineryFoodSafety" id="WineryFoodSafetyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<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="prodLicense" column="prod_license" />
|
||||
<result property="standardId" column="standard_id" />
|
||||
<result property="makerName" column="maker_name" />
|
||||
<result property="makerAddress" column="maker_address" />
|
||||
<result property="makerContact" column="maker_contact" />
|
||||
<result property="ingredients" column="ingredients" />
|
||||
<result property="period" column="period" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="wineLevel" column="wine_level" />
|
||||
<result property="storageMode" column="storage_mode" />
|
||||
<result property="supplier" column="supplier" />
|
||||
<result property="makeDate" column="make_date" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,25 @@
|
||||
<?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.winery.mapper.WineryGoodsMapper">
|
||||
|
||||
<resultMap type="WineryGoods" id="WineryGoodsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsAlias" column="goods_alias" />
|
||||
<result property="goodsType" column="goods_type" />
|
||||
<result property="goodsSpec" column="goods_spec" />
|
||||
<result property="goodDesc" column="good_desc" />
|
||||
<result property="goodFaceImg" column="good_face_img" />
|
||||
<result property="goodImg" column="good_img" />
|
||||
<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="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,23 @@
|
||||
<?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.winery.mapper.WineryGoodsSpecMapper">
|
||||
|
||||
<resultMap type="WineryGoodsSpec" id="WineryGoodsSpecResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="specName" column="spec_name" />
|
||||
<result property="specDesc" column="spec_desc" />
|
||||
<result property="specImg" column="spec_img" />
|
||||
<result property="specPrice" column="spec_price" />
|
||||
<result property="detailSpec" column="detail_spec" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,26 @@
|
||||
<?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.winery.mapper.WineryOrdersMapper">
|
||||
|
||||
<resultMap type="WineryOrders" id="WineryOrdersResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsType" column="goods_type" />
|
||||
<result property="goodsSpec" column="goods_spec" />
|
||||
<result property="goodsFaceImg" column="goods_face_img" />
|
||||
<result property="goodsPrice" column="goods_price" />
|
||||
<result property="goodsCount" column="goods_count" />
|
||||
<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="remark" column="remark" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,30 @@
|
||||
<?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.winery.mapper.WineryWineSpecDetailMapper">
|
||||
|
||||
<resultMap type="WineryWineSpecDetail" id="WineryWineSpecDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<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="brand" column="brand" />
|
||||
<result property="capacity" column="capacity" />
|
||||
<result property="year" column="year" />
|
||||
<result property="alcohol" column="alcohol" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="wineType" column="wine_type" />
|
||||
<result property="wineLevel" column="wine_level" />
|
||||
<result property="grape" column="grape" />
|
||||
<result property="sugarContent" column="sugar_content" />
|
||||
<result property="packingType" column="packing_type" />
|
||||
<result property="decanteDuration" column="decante_duration" />
|
||||
<result property="count" column="count" />
|
||||
<result property="aroma" column="aroma" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -53,13 +53,13 @@ public class CaptchaConfig
|
||||
// 边框颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90");
|
||||
// 验证码文本字符颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue");
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "red");
|
||||
// 验证码图片宽度 默认为200
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "180");
|
||||
// 验证码图片高度 默认为50
|
||||
properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
|
||||
// 验证码文本字符大小 默认为40
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "40");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
|
||||
// 验证码文本生成器
|
||||
|
||||
53
ruoyi-ui/src/api/winery/food_safety.js
Normal file
53
ruoyi-ui/src/api/winery/food_safety.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询食品安全详情列表
|
||||
export function listFood_safety(query) {
|
||||
return request({
|
||||
url: '/winery/food_safety/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询食品安全详情详细
|
||||
export function getFood_safety(id) {
|
||||
return request({
|
||||
url: '/winery/food_safety/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增食品安全详情
|
||||
export function addFood_safety(data) {
|
||||
return request({
|
||||
url: '/winery/food_safety',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改食品安全详情
|
||||
export function updateFood_safety(data) {
|
||||
return request({
|
||||
url: '/winery/food_safety',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除食品安全详情
|
||||
export function delFood_safety(id) {
|
||||
return request({
|
||||
url: '/winery/food_safety/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出食品安全详情
|
||||
export function exportFood_safety(query) {
|
||||
return request({
|
||||
url: '/winery/food_safety/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/winery/spec.js
Normal file
53
ruoyi-ui/src/api/winery/spec.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品规格列表
|
||||
export function listSpec(query) {
|
||||
return request({
|
||||
url: '/winery/spec/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品规格详细
|
||||
export function getSpec(id) {
|
||||
return request({
|
||||
url: '/winery/spec/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品规格
|
||||
export function addSpec(data) {
|
||||
return request({
|
||||
url: '/winery/spec',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商品规格
|
||||
export function updateSpec(data) {
|
||||
return request({
|
||||
url: '/winery/spec',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品规格
|
||||
export function delSpec(id) {
|
||||
return request({
|
||||
url: '/winery/spec/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出商品规格
|
||||
export function exportSpec(query) {
|
||||
return request({
|
||||
url: '/winery/spec/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/winery/user_orders.js
Normal file
53
ruoyi-ui/src/api/winery/user_orders.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询客户订单列表
|
||||
export function listUser_orders(query) {
|
||||
return request({
|
||||
url: '/winery/user_orders/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询客户订单详细
|
||||
export function getUser_orders(id) {
|
||||
return request({
|
||||
url: '/winery/user_orders/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增客户订单
|
||||
export function addUser_orders(data) {
|
||||
return request({
|
||||
url: '/winery/user_orders',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改客户订单
|
||||
export function updateUser_orders(data) {
|
||||
return request({
|
||||
url: '/winery/user_orders',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除客户订单
|
||||
export function delUser_orders(id) {
|
||||
return request({
|
||||
url: '/winery/user_orders/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出客户订单
|
||||
export function exportUser_orders(query) {
|
||||
return request({
|
||||
url: '/winery/user_orders/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/winery/wine_detail.js
Normal file
53
ruoyi-ui/src/api/winery/wine_detail.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询葡萄酒规格详情列表
|
||||
export function listWine_detail(query) {
|
||||
return request({
|
||||
url: '/winery/wine_detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询葡萄酒规格详情详细
|
||||
export function getWine_detail(id) {
|
||||
return request({
|
||||
url: '/winery/wine_detail/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增葡萄酒规格详情
|
||||
export function addWine_detail(data) {
|
||||
return request({
|
||||
url: '/winery/wine_detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改葡萄酒规格详情
|
||||
export function updateWine_detail(data) {
|
||||
return request({
|
||||
url: '/winery/wine_detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除葡萄酒规格详情
|
||||
export function delWine_detail(id) {
|
||||
return request({
|
||||
url: '/winery/wine_detail/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出葡萄酒规格详情
|
||||
export function exportWine_detail(query) {
|
||||
return request({
|
||||
url: '/winery/wine_detail/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/winery/winery_goods.js
Normal file
53
ruoyi-ui/src/api/winery/winery_goods.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品信息列表
|
||||
export function listWinery_goods(query) {
|
||||
return request({
|
||||
url: '/winery/winery_goods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品信息详细
|
||||
export function getWinery_goods(id) {
|
||||
return request({
|
||||
url: '/winery/winery_goods/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品信息
|
||||
export function addWinery_goods(data) {
|
||||
return request({
|
||||
url: '/winery/winery_goods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商品信息
|
||||
export function updateWinery_goods(data) {
|
||||
return request({
|
||||
url: '/winery/winery_goods',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品信息
|
||||
export function delWinery_goods(id) {
|
||||
return request({
|
||||
url: '/winery/winery_goods/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出商品信息
|
||||
export function exportWinery_goods(query) {
|
||||
return request({
|
||||
url: '/winery/winery_goods/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">若依后台管理系统</h3>
|
||||
<h3 class="title">贺兰山酒庄管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
|
||||
459
ruoyi-ui/src/views/winery/food_safety/index.vue
Normal file
459
ruoyi-ui/src/views/winery/food_safety/index.vue
Normal file
@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="部门ID" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产许可证编号" prop="prodLicense">
|
||||
<el-input
|
||||
v-model="queryParams.prodLicense"
|
||||
placeholder="请输入生产许可证编号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品标准号" prop="standardId">
|
||||
<el-input
|
||||
v-model="queryParams.standardId"
|
||||
placeholder="请输入产品标准号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂名" prop="makerName">
|
||||
<el-input
|
||||
v-model="queryParams.makerName"
|
||||
placeholder="请输入厂名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂址" prop="makerAddress">
|
||||
<el-input
|
||||
v-model="queryParams.makerAddress"
|
||||
placeholder="请输入厂址"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家联系方式" prop="makerContact">
|
||||
<el-input
|
||||
v-model="queryParams.makerContact"
|
||||
placeholder="请输入厂家联系方式"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配料表" prop="ingredients">
|
||||
<el-input
|
||||
v-model="queryParams.ingredients"
|
||||
placeholder="请输入配料表"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保质期" prop="period">
|
||||
<el-input
|
||||
v-model="queryParams.period"
|
||||
placeholder="请输入保质期"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒等级" prop="wineLevel">
|
||||
<el-input
|
||||
v-model="queryParams.wineLevel"
|
||||
placeholder="请输入葡萄酒等级"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="储藏方法
|
||||
" prop="storageMode">
|
||||
<el-input
|
||||
v-model="queryParams.storageMode"
|
||||
placeholder="请输入储藏方法
|
||||
"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商
|
||||
" prop="supplier">
|
||||
<el-input
|
||||
v-model="queryParams.supplier"
|
||||
placeholder="请输入供应商
|
||||
"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="makeDate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.makeDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择生产日期">
|
||||
</el-date-picker>
|
||||
</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:food_safety: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:food_safety: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:food_safety: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:food_safety:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="food_safetyList" @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="部门ID" align="center" prop="deptId" />
|
||||
<el-table-column label="生产许可证编号" align="center" prop="prodLicense" />
|
||||
<el-table-column label="产品标准号" align="center" prop="standardId" />
|
||||
<el-table-column label="厂名" align="center" prop="makerName" />
|
||||
<el-table-column label="厂址" align="center" prop="makerAddress" />
|
||||
<el-table-column label="厂家联系方式" align="center" prop="makerContact" />
|
||||
<el-table-column label="配料表" align="center" prop="ingredients" />
|
||||
<el-table-column label="保质期" align="center" prop="period" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="葡萄酒等级" align="center" prop="wineLevel" />
|
||||
<el-table-column label="储藏方法
|
||||
" align="center" prop="storageMode" />
|
||||
<el-table-column label="供应商
|
||||
" align="center" prop="supplier" />
|
||||
<el-table-column label="生产日期" align="center" prop="makeDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.makeDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:food_safety:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:food_safety: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="部门ID" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产许可证编号" prop="prodLicense">
|
||||
<el-input v-model="form.prodLicense" placeholder="请输入生产许可证编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品标准号" prop="standardId">
|
||||
<el-input v-model="form.standardId" placeholder="请输入产品标准号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂名" prop="makerName">
|
||||
<el-input v-model="form.makerName" placeholder="请输入厂名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂址" prop="makerAddress">
|
||||
<el-input v-model="form.makerAddress" placeholder="请输入厂址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家联系方式" prop="makerContact">
|
||||
<el-input v-model="form.makerContact" placeholder="请输入厂家联系方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="配料表" prop="ingredients">
|
||||
<el-input v-model="form.ingredients" placeholder="请输入配料表" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保质期" prop="period">
|
||||
<el-input v-model="form.period" placeholder="请输入保质期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒等级" prop="wineLevel">
|
||||
<el-input v-model="form.wineLevel" placeholder="请输入葡萄酒等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="储藏方法
|
||||
" prop="storageMode">
|
||||
<el-input v-model="form.storageMode" placeholder="请输入储藏方法
|
||||
" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商
|
||||
" prop="supplier">
|
||||
<el-input v-model="form.supplier" placeholder="请输入供应商
|
||||
" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="makeDate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.makeDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择生产日期">
|
||||
</el-date-picker>
|
||||
</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 { listFood_safety, getFood_safety, delFood_safety, addFood_safety, updateFood_safety, exportFood_safety } from "@/api/winery/food_safety";
|
||||
|
||||
export default {
|
||||
name: "Food_safety",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 食品安全详情表格数据
|
||||
food_safetyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: undefined,
|
||||
prodLicense: undefined,
|
||||
standardId: undefined,
|
||||
makerName: undefined,
|
||||
makerAddress: undefined,
|
||||
makerContact: undefined,
|
||||
ingredients: undefined,
|
||||
period: undefined,
|
||||
wineLevel: undefined,
|
||||
storageMode: undefined,
|
||||
supplier: undefined,
|
||||
makeDate: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
deptId: [
|
||||
{ required: true, message: "部门ID不能为空", trigger: "blur" }
|
||||
],
|
||||
createBy: [
|
||||
{ required: true, message: "创建者不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
standardId: [
|
||||
{ required: true, message: "产品标准号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询食品安全详情列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listFood_safety(this.queryParams).then(response => {
|
||||
this.food_safetyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
deptId: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
prodLicense: undefined,
|
||||
standardId: undefined,
|
||||
makerName: undefined,
|
||||
makerAddress: undefined,
|
||||
makerContact: undefined,
|
||||
ingredients: undefined,
|
||||
period: undefined,
|
||||
remark: undefined,
|
||||
wineLevel: undefined,
|
||||
storageMode: undefined,
|
||||
supplier: undefined,
|
||||
makeDate: 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
|
||||
getFood_safety(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) {
|
||||
updateFood_safety(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addFood_safety(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 delFood_safety(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有食品安全详情数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportFood_safety(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
339
ruoyi-ui/src/views/winery/spec/index.vue
Normal file
339
ruoyi-ui/src/views/winery/spec/index.vue
Normal file
@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="部门ID" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格名称" prop="specName">
|
||||
<el-input
|
||||
v-model="queryParams.specName"
|
||||
placeholder="请输入规格名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格说明" prop="specDesc">
|
||||
<el-input
|
||||
v-model="queryParams.specDesc"
|
||||
placeholder="请输入规格说明"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格图片" prop="specImg">
|
||||
<el-input
|
||||
v-model="queryParams.specImg"
|
||||
placeholder="请输入规格图片"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格单价" prop="specPrice">
|
||||
<el-input
|
||||
v-model="queryParams.specPrice"
|
||||
placeholder="请输入规格单价"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格详细" prop="detailSpec">
|
||||
<el-input
|
||||
v-model="queryParams.detailSpec"
|
||||
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:spec: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:spec: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:spec: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:spec:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="specList" @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="部门ID" align="center" prop="deptId" />
|
||||
<el-table-column label="规格名称" align="center" prop="specName" />
|
||||
<el-table-column label="规格说明" align="center" prop="specDesc" />
|
||||
<el-table-column label="规格图片" align="center" prop="specImg" />
|
||||
<el-table-column label="规格单价" align="center" prop="specPrice" />
|
||||
<el-table-column label="规格详细" align="center" prop="detailSpec" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<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:spec:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:spec: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="部门ID" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格名称" prop="specName">
|
||||
<el-input v-model="form.specName" placeholder="请输入规格名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格说明" prop="specDesc">
|
||||
<el-input v-model="form.specDesc" placeholder="请输入规格说明" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格图片" prop="specImg">
|
||||
<el-input v-model="form.specImg" placeholder="请输入规格图片" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格单价" prop="specPrice">
|
||||
<el-input v-model="form.specPrice" placeholder="请输入规格单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格详细" prop="detailSpec">
|
||||
<el-input v-model="form.detailSpec" placeholder="请输入规格详细" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listSpec, getSpec, delSpec, addSpec, updateSpec, exportSpec } from "@/api/winery/spec";
|
||||
|
||||
export default {
|
||||
name: "Spec",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品规格表格数据
|
||||
specList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: undefined,
|
||||
specName: undefined,
|
||||
specDesc: undefined,
|
||||
specImg: undefined,
|
||||
specPrice: undefined,
|
||||
detailSpec: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品规格列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSpec(this.queryParams).then(response => {
|
||||
this.specList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
deptId: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
updateBy: undefined,
|
||||
specName: undefined,
|
||||
specDesc: undefined,
|
||||
specImg: undefined,
|
||||
specPrice: undefined,
|
||||
detailSpec: undefined,
|
||||
remark: 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
|
||||
getSpec(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) {
|
||||
updateSpec(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSpec(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 delSpec(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有商品规格数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportSpec(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
383
ruoyi-ui/src/views/winery/user_orders/index.vue
Normal file
383
ruoyi-ui/src/views/winery/user_orders/index.vue
Normal file
@ -0,0 +1,383 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="部门ID" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品ID" prop="goodsId">
|
||||
<el-input
|
||||
v-model="queryParams.goodsId"
|
||||
placeholder="请输入商品ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品简称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsName"
|
||||
placeholder="请输入商品简称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品类型" prop="goodsType">
|
||||
<el-select v-model="queryParams.goodsType" placeholder="请选择商品类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品规格" prop="goodsSpec">
|
||||
<el-input
|
||||
v-model="queryParams.goodsSpec"
|
||||
placeholder="请输入商品规格"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品封面" prop="goodsFaceImg">
|
||||
<el-input
|
||||
v-model="queryParams.goodsFaceImg"
|
||||
placeholder="请输入商品封面"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品基准单价" prop="goodsPrice">
|
||||
<el-input
|
||||
v-model="queryParams.goodsPrice"
|
||||
placeholder="请输入商品基准单价"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="goodsCount">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCount"
|
||||
placeholder="请输入商品数量"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</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:user_orders: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:user_orders: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:user_orders: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:user_orders:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="user_ordersList" @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="部门ID" align="center" prop="deptId" />
|
||||
<el-table-column label="商品ID" align="center" prop="goodsId" />
|
||||
<el-table-column label="商品简称" align="center" prop="goodsName" />
|
||||
<el-table-column label="商品类型" align="center" prop="goodsType" />
|
||||
<el-table-column label="商品规格" align="center" prop="goodsSpec" />
|
||||
<el-table-column label="商品封面" align="center" prop="goodsFaceImg" />
|
||||
<el-table-column label="商品基准单价" align="center" prop="goodsPrice" />
|
||||
<el-table-column label="商品数量" align="center" prop="goodsCount" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus" />
|
||||
<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:user_orders:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:user_orders: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="部门ID" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品ID" prop="goodsId">
|
||||
<el-input v-model="form.goodsId" placeholder="请输入商品ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品简称" prop="goodsName">
|
||||
<el-input v-model="form.goodsName" placeholder="请输入商品简称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品类型" prop="goodsType">
|
||||
<el-select v-model="form.goodsType" placeholder="请选择商品类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品规格" prop="goodsSpec">
|
||||
<el-input v-model="form.goodsSpec" placeholder="请输入商品规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品封面" prop="goodsFaceImg">
|
||||
<el-input v-model="form.goodsFaceImg" placeholder="请输入商品封面" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品基准单价" prop="goodsPrice">
|
||||
<el-input v-model="form.goodsPrice" placeholder="请输入商品基准单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="goodsCount">
|
||||
<el-input v-model="form.goodsCount" placeholder="请输入商品数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态">
|
||||
<el-radio-group v-model="form.orderStatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</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 { listUser_orders, getUser_orders, delUser_orders, addUser_orders, updateUser_orders, exportUser_orders } from "@/api/winery/user_orders";
|
||||
|
||||
export default {
|
||||
name: "User_orders",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户订单表格数据
|
||||
user_ordersList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: undefined,
|
||||
goodsId: undefined,
|
||||
goodsName: undefined,
|
||||
goodsType: undefined,
|
||||
goodsSpec: undefined,
|
||||
goodsFaceImg: undefined,
|
||||
goodsPrice: undefined,
|
||||
goodsCount: undefined,
|
||||
orderStatus: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsId: [
|
||||
{ required: true, message: "商品ID不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询客户订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUser_orders(this.queryParams).then(response => {
|
||||
this.user_ordersList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
deptId: undefined,
|
||||
goodsId: undefined,
|
||||
goodsName: undefined,
|
||||
goodsType: undefined,
|
||||
goodsSpec: undefined,
|
||||
goodsFaceImg: undefined,
|
||||
goodsPrice: undefined,
|
||||
goodsCount: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
remark: undefined,
|
||||
orderStatus: 0
|
||||
};
|
||||
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
|
||||
getUser_orders(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) {
|
||||
updateUser_orders(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addUser_orders(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 delUser_orders(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有客户订单数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportUser_orders(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
433
ruoyi-ui/src/views/winery/wine_detail/index.vue
Normal file
433
ruoyi-ui/src/views/winery/wine_detail/index.vue
Normal file
@ -0,0 +1,433 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="品牌" prop="brand">
|
||||
<el-input
|
||||
v-model="queryParams.brand"
|
||||
placeholder="请输入品牌"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="净含量" prop="capacity">
|
||||
<el-input
|
||||
v-model="queryParams.capacity"
|
||||
placeholder="请输入净含量"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采摘年份" prop="year">
|
||||
<el-input
|
||||
v-model="queryParams.year"
|
||||
placeholder="请输入采摘年份"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="酒精度" prop="alcohol">
|
||||
<el-input
|
||||
v-model="queryParams.alcohol"
|
||||
placeholder="请输入酒精度"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒种类" prop="wineType">
|
||||
<el-select v-model="queryParams.wineType" placeholder="请选择葡萄酒种类" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒等级" prop="wineLevel">
|
||||
<el-input
|
||||
v-model="queryParams.wineLevel"
|
||||
placeholder="请输入葡萄酒等级"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄种类" prop="grape">
|
||||
<el-input
|
||||
v-model="queryParams.grape"
|
||||
placeholder="请输入葡萄种类"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="包装方式" prop="packingType">
|
||||
<el-select v-model="queryParams.packingType" placeholder="请选择包装方式" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="醒酒时间" prop="decanteDuration">
|
||||
<el-input
|
||||
v-model="queryParams.decanteDuration"
|
||||
placeholder="请输入醒酒时间"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支数" prop="count">
|
||||
<el-input
|
||||
v-model="queryParams.count"
|
||||
placeholder="请输入支数"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="香味" prop="aroma">
|
||||
<el-input
|
||||
v-model="queryParams.aroma"
|
||||
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:wine_detail: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:wine_detail: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:wine_detail: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:wine_detail:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wine_detailList" @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="brand" />
|
||||
<el-table-column label="净含量" align="center" prop="capacity" />
|
||||
<el-table-column label="采摘年份
|
||||
" align="center" prop="year" />
|
||||
<el-table-column label="酒精度" align="center" prop="alcohol" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="葡萄酒种类" align="center" prop="wineType" />
|
||||
<el-table-column label="葡萄酒等级" align="center" prop="wineLevel" />
|
||||
<el-table-column label="葡萄种类" align="center" prop="grape" />
|
||||
<el-table-column label="糖分" align="center" prop="sugarContent" />
|
||||
<el-table-column label="包装方式" align="center" prop="packingType" />
|
||||
<el-table-column label="醒酒时间" align="center" prop="decanteDuration" />
|
||||
<el-table-column label="支数" align="center" prop="count" />
|
||||
<el-table-column label="香味" align="center" prop="aroma" />
|
||||
<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:wine_detail:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:wine_detail: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="品牌" prop="brand">
|
||||
<el-input v-model="form.brand" placeholder="请输入品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="净含量" prop="capacity">
|
||||
<el-input v-model="form.capacity" placeholder="请输入净含量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采摘年份" prop="year">
|
||||
<el-input v-model="form.year" placeholder="请输入采摘年份" />
|
||||
</el-form-item>
|
||||
<el-form-item label="酒精度" prop="alcohol">
|
||||
<el-input v-model="form.alcohol" placeholder="请输入酒精度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒种类" prop="wineType">
|
||||
<el-select v-model="form.wineType" placeholder="请选择葡萄酒种类">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄酒等级" prop="wineLevel">
|
||||
<el-input v-model="form.wineLevel" placeholder="请输入葡萄酒等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="葡萄种类" prop="grape">
|
||||
<el-input v-model="form.grape" placeholder="请输入葡萄种类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="糖分">
|
||||
<editor v-model="form.sugarContent" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="包装方式" prop="packingType">
|
||||
<el-select v-model="form.packingType" placeholder="请选择包装方式">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="醒酒时间" prop="decanteDuration">
|
||||
<el-input v-model="form.decanteDuration" placeholder="请输入醒酒时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支数" prop="count">
|
||||
<el-input v-model="form.count" placeholder="请输入支数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="香味" prop="aroma">
|
||||
<el-input v-model="form.aroma" 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 { listWine_detail, getWine_detail, delWine_detail, addWine_detail, updateWine_detail, exportWine_detail } from "@/api/winery/wine_detail";
|
||||
import Editor from '@/components/Editor';
|
||||
|
||||
export default {
|
||||
name: "Wine_detail",
|
||||
components: {
|
||||
Editor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 葡萄酒规格详情表格数据
|
||||
wine_detailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: undefined,
|
||||
brand: undefined,
|
||||
capacity: undefined,
|
||||
year: undefined,
|
||||
alcohol: undefined,
|
||||
wineType: undefined,
|
||||
wineLevel: undefined,
|
||||
grape: undefined,
|
||||
sugarContent: undefined,
|
||||
packingType: undefined,
|
||||
decanteDuration: undefined,
|
||||
count: undefined,
|
||||
aroma: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
capacity: [
|
||||
{ required: true, message: "净含量不能为空", trigger: "blur" }
|
||||
],
|
||||
alcohol: [
|
||||
{ required: true, message: "酒精度不能为空", trigger: "blur" }
|
||||
],
|
||||
count: [
|
||||
{ required: true, message: "支数不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询葡萄酒规格详情列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWine_detail(this.queryParams).then(response => {
|
||||
this.wine_detailList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
deptId: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
brand: undefined,
|
||||
capacity: undefined,
|
||||
year: undefined,
|
||||
alcohol: undefined,
|
||||
remark: undefined,
|
||||
wineType: undefined,
|
||||
wineLevel: undefined,
|
||||
grape: undefined,
|
||||
sugarContent: undefined,
|
||||
packingType: undefined,
|
||||
decanteDuration: undefined,
|
||||
count: undefined,
|
||||
aroma: 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
|
||||
getWine_detail(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) {
|
||||
updateWine_detail(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWine_detail(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 delWine_detail(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有葡萄酒规格详情数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportWine_detail(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
335
ruoyi-ui/src/views/winery/winery_goods/index.vue
Normal file
335
ruoyi-ui/src/views/winery/winery_goods/index.vue
Normal file
@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品简称" prop="goodsAlias">
|
||||
<el-input
|
||||
v-model="queryParams.goodsAlias"
|
||||
placeholder="请输入商品简称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品类型" prop="goodsType">
|
||||
<el-select v-model="queryParams.goodsType" placeholder="请选择商品类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品说明" prop="goodDesc">
|
||||
<el-input
|
||||
v-model="queryParams.goodDesc"
|
||||
placeholder="请输入商品说明"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品封面" prop="goodFaceImg">
|
||||
<el-input
|
||||
v-model="queryParams.goodFaceImg"
|
||||
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_goods: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_goods: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_goods: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_goods:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="winery_goodsList" @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="goodsName" />
|
||||
<el-table-column label="商品简称" align="center" prop="goodsAlias" />
|
||||
<el-table-column label="商品类型" align="center" prop="goodsType" />
|
||||
<el-table-column label="关联规格" align="center" prop="goodsSpec" />
|
||||
<el-table-column label="商品说明" align="center" prop="goodDesc" />
|
||||
<el-table-column label="商品封面" align="center" prop="goodFaceImg" />
|
||||
<el-table-column label="商品图片" align="center" prop="goodImg" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<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_goods:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['winery:winery_goods: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="商品名称" prop="goodsName">
|
||||
<el-input v-model="form.goodsName" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品简称" prop="goodsAlias">
|
||||
<el-input v-model="form.goodsAlias" placeholder="请输入商品简称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品类型" prop="goodsType">
|
||||
<el-select v-model="form.goodsType" placeholder="请选择商品类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联规格" prop="goodsSpec">
|
||||
<el-input v-model="form.goodsSpec" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品说明" prop="goodDesc">
|
||||
<el-input v-model="form.goodDesc" placeholder="请输入商品说明" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品封面" prop="goodFaceImg">
|
||||
<el-input v-model="form.goodFaceImg" placeholder="请输入商品封面" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodImg">
|
||||
<el-input v-model="form.goodImg" placeholder="请输入商品图片" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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_goods, getWinery_goods, delWinery_goods, addWinery_goods, updateWinery_goods, exportWinery_goods } from "@/api/winery/winery_goods";
|
||||
|
||||
export default {
|
||||
name: "Winery_goods",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品信息表格数据
|
||||
winery_goodsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
goodsName: undefined,
|
||||
goodsAlias: undefined,
|
||||
goodsType: undefined,
|
||||
goodsSpec: undefined,
|
||||
goodDesc: undefined,
|
||||
goodFaceImg: undefined,
|
||||
goodImg: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWinery_goods(this.queryParams).then(response => {
|
||||
this.winery_goodsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
goodsName: undefined,
|
||||
goodsAlias: undefined,
|
||||
goodsType: undefined,
|
||||
goodsSpec: undefined,
|
||||
goodDesc: undefined,
|
||||
goodFaceImg: undefined,
|
||||
goodImg: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
remark: 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_goods(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_goods(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWinery_goods(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_goods(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有商品信息数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportWinery_goods(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -34,7 +34,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:18989`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user