add: 基础架构创建
This commit is contained in:
@@ -0,0 +1,89 @@
|
|||||||
|
package com.boge.modules.car.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.boge.modules.car.entity.CarEntity;
|
||||||
|
import com.boge.modules.car.service.CarService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:51:45
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("car/car")
|
||||||
|
public class CarController {
|
||||||
|
@Autowired
|
||||||
|
private CarService carService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
//@RequiresPermissions("car:car:list")
|
||||||
|
public R list(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = carService.queryPage(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/info/{carId}")
|
||||||
|
//@RequiresPermissions("car:car:info")
|
||||||
|
public R info(@PathVariable("carId") Long carId){
|
||||||
|
CarEntity car = carService.getById(carId);
|
||||||
|
|
||||||
|
return R.ok().put("car", car);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@RequestMapping("/save")
|
||||||
|
//@RequiresPermissions("car:car:save")
|
||||||
|
public R save(@RequestBody CarEntity car){
|
||||||
|
carService.save(car);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/update")
|
||||||
|
//@RequiresPermissions("car:car:update")
|
||||||
|
public R update(@RequestBody CarEntity car){
|
||||||
|
carService.updateById(car);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
//@RequiresPermissions("car:car:delete")
|
||||||
|
public R delete(@RequestBody Long[] carIds){
|
||||||
|
carService.removeByIds(Arrays.asList(carIds));
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
17
base-fast/src/main/java/com/boge/modules/car/dao/CarDao.java
Normal file
17
base-fast/src/main/java/com/boge/modules/car/dao/CarDao.java
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package com.boge.modules.car.dao;
|
||||||
|
|
||||||
|
import com.boge.modules.car.entity.CarEntity;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:51:45
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CarDao extends BaseMapper<CarEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.boge.modules.car.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:51:45
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("sys_car")
|
||||||
|
public class CarEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long carId;
|
||||||
|
/**
|
||||||
|
* 车型名称
|
||||||
|
*/
|
||||||
|
private String carName;
|
||||||
|
/**
|
||||||
|
* 导航类型
|
||||||
|
*/
|
||||||
|
private Integer navigationType;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remarks;
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private Integer isOn;
|
||||||
|
/**
|
||||||
|
* 创建者ID
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.boge.modules.car.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.modules.car.entity.CarEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:51:45
|
||||||
|
*/
|
||||||
|
public interface CarService extends IService<CarEntity> {
|
||||||
|
|
||||||
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.boge.modules.car.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.Map;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.Query;
|
||||||
|
|
||||||
|
import com.boge.modules.car.dao.CarDao;
|
||||||
|
import com.boge.modules.car.entity.CarEntity;
|
||||||
|
import com.boge.modules.car.service.CarService;
|
||||||
|
|
||||||
|
|
||||||
|
@Service("carService")
|
||||||
|
public class CarServiceImpl extends ServiceImpl<CarDao, CarEntity> implements CarService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
IPage<CarEntity> page = this.page(
|
||||||
|
new Query<CarEntity>().getPage(params),
|
||||||
|
new QueryWrapper<CarEntity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.boge.modules.client.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.boge.modules.client.entity.ClientEntity;
|
||||||
|
import com.boge.modules.client.service.ClientService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:46:19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("client/client")
|
||||||
|
public class ClientController {
|
||||||
|
@Autowired
|
||||||
|
private ClientService clientService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
//@RequiresPermissions("client:client:list")
|
||||||
|
public R list(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = clientService.queryPage(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/info/{clientId}")
|
||||||
|
//@RequiresPermissions("client:client:info")
|
||||||
|
public R info(@PathVariable("clientId") Long clientId){
|
||||||
|
ClientEntity client = clientService.getById(clientId);
|
||||||
|
|
||||||
|
return R.ok().put("client", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@RequestMapping("/save")
|
||||||
|
//@RequiresPermissions("client:client:save")
|
||||||
|
public R save(@RequestBody ClientEntity client){
|
||||||
|
clientService.save(client);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/update")
|
||||||
|
//@RequiresPermissions("client:client:update")
|
||||||
|
public R update(@RequestBody ClientEntity client){
|
||||||
|
clientService.updateById(client);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
//@RequiresPermissions("client:client:delete")
|
||||||
|
public R delete(@RequestBody Long[] clientIds){
|
||||||
|
clientService.removeByIds(Arrays.asList(clientIds));
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.boge.modules.client.dao;
|
||||||
|
|
||||||
|
import com.boge.modules.client.entity.ClientEntity;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:46:19
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ClientDao extends BaseMapper<ClientEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.boge.modules.client.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:46:19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("sys_client")
|
||||||
|
public class ClientEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long clientId;
|
||||||
|
/**
|
||||||
|
* 客户名称
|
||||||
|
*/
|
||||||
|
private String clientName;
|
||||||
|
/**
|
||||||
|
* 法人代表
|
||||||
|
*/
|
||||||
|
private String juridicalPerson;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 行业
|
||||||
|
*/
|
||||||
|
private String industry;
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private Integer isOn;
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.boge.modules.client.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.modules.client.entity.ClientEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:46:19
|
||||||
|
*/
|
||||||
|
public interface ClientService extends IService<ClientEntity> {
|
||||||
|
|
||||||
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.boge.modules.client.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.Map;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.Query;
|
||||||
|
|
||||||
|
import com.boge.modules.client.dao.ClientDao;
|
||||||
|
import com.boge.modules.client.entity.ClientEntity;
|
||||||
|
import com.boge.modules.client.service.ClientService;
|
||||||
|
|
||||||
|
|
||||||
|
@Service("clientService")
|
||||||
|
public class ClientServiceImpl extends ServiceImpl<ClientDao, ClientEntity> implements ClientService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
IPage<ClientEntity> page = this.page(
|
||||||
|
new Query<ClientEntity>().getPage(params),
|
||||||
|
new QueryWrapper<ClientEntity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.boge.modules.contract.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.boge.modules.contract.entity.ContractEntity;
|
||||||
|
import com.boge.modules.contract.service.ContractService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:33:35
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("flow/contract")
|
||||||
|
public class ContractController {
|
||||||
|
@Autowired
|
||||||
|
private ContractService contractService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
//@RequiresPermissions("flow:contract:list")
|
||||||
|
public R list(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = contractService.queryPage(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/info/{contractId}")
|
||||||
|
//@RequiresPermissions("flow:contract:info")
|
||||||
|
public R info(@PathVariable("contractId") Integer contractId){
|
||||||
|
ContractEntity contract = contractService.getById(contractId);
|
||||||
|
|
||||||
|
return R.ok().put("contract", contract);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@RequestMapping("/save")
|
||||||
|
//@RequiresPermissions("flow:contract:save")
|
||||||
|
public R save(@RequestBody ContractEntity contract){
|
||||||
|
contractService.save(contract);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/update")
|
||||||
|
//@RequiresPermissions("flow:contract:update")
|
||||||
|
public R update(@RequestBody ContractEntity contract){
|
||||||
|
contractService.updateById(contract);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
//@RequiresPermissions("flow:contract:delete")
|
||||||
|
public R delete(@RequestBody Integer[] contractIds){
|
||||||
|
contractService.removeByIds(Arrays.asList(contractIds));
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.boge.modules.contract.dao;
|
||||||
|
|
||||||
|
import com.boge.modules.contract.entity.ContractEntity;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:33:35
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ContractDao extends BaseMapper<ContractEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.boge.modules.contract.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:33:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("sys_contract")
|
||||||
|
public class ContractEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Integer contractId;
|
||||||
|
/**
|
||||||
|
* 合同类型
|
||||||
|
*/
|
||||||
|
private Integer contractType;
|
||||||
|
/**
|
||||||
|
* 是否是主合同
|
||||||
|
*/
|
||||||
|
private Integer isMaster;
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
private String contractNumber;
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long clientId;
|
||||||
|
/**
|
||||||
|
* 物料信息
|
||||||
|
*/
|
||||||
|
private String materialJson;
|
||||||
|
/**
|
||||||
|
* 是否验收
|
||||||
|
*/
|
||||||
|
private Integer isAcceptance;
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
private Date acceptanceTime;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.boge.modules.contract.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.modules.contract.entity.ContractEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:33:35
|
||||||
|
*/
|
||||||
|
public interface ContractService extends IService<ContractEntity> {
|
||||||
|
|
||||||
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.boge.modules.contract.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.Map;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.Query;
|
||||||
|
|
||||||
|
import com.boge.modules.contract.dao.ContractDao;
|
||||||
|
import com.boge.modules.contract.entity.ContractEntity;
|
||||||
|
import com.boge.modules.contract.service.ContractService;
|
||||||
|
|
||||||
|
|
||||||
|
@Service("contractService")
|
||||||
|
public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity> implements ContractService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
IPage<ContractEntity> page = this.page(
|
||||||
|
new Query<ContractEntity>().getPage(params),
|
||||||
|
new QueryWrapper<ContractEntity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ import com.boge.common.utils.R;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-01-09 13:56:25
|
* @date 2025-01-09 13:56:25
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-01-09 13:56:25
|
* @date 2025-01-09 13:56:25
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-01-09 13:56:25
|
* @date 2025-01-09 13:56:25
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-01-09 13:56:25
|
* @date 2025-01-09 13:56:25
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.boge.modules.material.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.boge.modules.material.entity.MaterialEntity;
|
||||||
|
import com.boge.modules.material.service.MaterialService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 20:06:39
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("material/material")
|
||||||
|
public class MaterialController {
|
||||||
|
@Autowired
|
||||||
|
private MaterialService materialService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
//@RequiresPermissions("material:material:list")
|
||||||
|
public R list(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = materialService.queryPage(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/info/{materialId}")
|
||||||
|
//@RequiresPermissions("material:material:info")
|
||||||
|
public R info(@PathVariable("materialId") Long materialId){
|
||||||
|
MaterialEntity material = materialService.getById(materialId);
|
||||||
|
|
||||||
|
return R.ok().put("material", material);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@RequestMapping("/save")
|
||||||
|
//@RequiresPermissions("material:material:save")
|
||||||
|
public R save(@RequestBody MaterialEntity material){
|
||||||
|
materialService.save(material);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/update")
|
||||||
|
//@RequiresPermissions("material:material:update")
|
||||||
|
public R update(@RequestBody MaterialEntity material){
|
||||||
|
materialService.updateById(material);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
//@RequiresPermissions("material:material:delete")
|
||||||
|
public R delete(@RequestBody Long[] materialIds){
|
||||||
|
materialService.removeByIds(Arrays.asList(materialIds));
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.boge.modules.material.dao;
|
||||||
|
|
||||||
|
import com.boge.modules.material.entity.MaterialEntity;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 20:06:39
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MaterialDao extends BaseMapper<MaterialEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.boge.modules.material.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 20:06:39
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("sys_material")
|
||||||
|
public class MaterialEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long materialId;
|
||||||
|
/**
|
||||||
|
* 物料编码
|
||||||
|
*/
|
||||||
|
private String materialCode;
|
||||||
|
/**
|
||||||
|
* 物料名称
|
||||||
|
*/
|
||||||
|
private String materialName;
|
||||||
|
/**
|
||||||
|
* 物料类型
|
||||||
|
*/
|
||||||
|
private Integer materialType;
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private Integer isOn;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.boge.modules.material.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.modules.material.entity.MaterialEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 20:06:39
|
||||||
|
*/
|
||||||
|
public interface MaterialService extends IService<MaterialEntity> {
|
||||||
|
|
||||||
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.boge.modules.material.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.Map;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.Query;
|
||||||
|
|
||||||
|
import com.boge.modules.material.dao.MaterialDao;
|
||||||
|
import com.boge.modules.material.entity.MaterialEntity;
|
||||||
|
import com.boge.modules.material.service.MaterialService;
|
||||||
|
|
||||||
|
|
||||||
|
@Service("materialService")
|
||||||
|
public class MaterialServiceImpl extends ServiceImpl<MaterialDao, MaterialEntity> implements MaterialService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
IPage<MaterialEntity> page = this.page(
|
||||||
|
new Query<MaterialEntity>().getPage(params),
|
||||||
|
new QueryWrapper<MaterialEntity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ import com.boge.common.utils.R;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2023-05-31 23:44:03
|
* @date 2023-05-31 23:44:03
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2023-05-31 23:44:03
|
* @date 2023-05-31 23:44:03
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2023-05-31 23:44:03
|
* @date 2023-05-31 23:44:03
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author boge
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2023-05-31 23:44:03
|
* @date 2023-05-31 23:44:03
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.boge.modules.tickets.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||||
|
import com.boge.modules.tickets.service.TicketsService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:56:28
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("tickets/tickets")
|
||||||
|
public class TicketsController {
|
||||||
|
@Autowired
|
||||||
|
private TicketsService ticketsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
//@RequiresPermissions("tickets:tickets:list")
|
||||||
|
public R list(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = ticketsService.queryPage(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/info/{ticketsId}")
|
||||||
|
//@RequiresPermissions("tickets:tickets:info")
|
||||||
|
public R info(@PathVariable("ticketsId") String ticketsId){
|
||||||
|
TicketsEntity tickets = ticketsService.getById(ticketsId);
|
||||||
|
|
||||||
|
return R.ok().put("tickets", tickets);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@RequestMapping("/save")
|
||||||
|
//@RequiresPermissions("tickets:tickets:save")
|
||||||
|
public R save(@RequestBody TicketsEntity tickets){
|
||||||
|
ticketsService.save(tickets);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/update")
|
||||||
|
//@RequiresPermissions("tickets:tickets:update")
|
||||||
|
public R update(@RequestBody TicketsEntity tickets){
|
||||||
|
ticketsService.updateById(tickets);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
//@RequiresPermissions("tickets:tickets:delete")
|
||||||
|
public R delete(@RequestBody String[] ticketsIds){
|
||||||
|
ticketsService.removeByIds(Arrays.asList(ticketsIds));
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.boge.modules.tickets.dao;
|
||||||
|
|
||||||
|
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:56:28
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TicketsDao extends BaseMapper<TicketsEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.boge.modules.tickets.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:56:28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("sys_tickets")
|
||||||
|
public class TicketsEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private String ticketsId;
|
||||||
|
/**
|
||||||
|
* 小车类型
|
||||||
|
*/
|
||||||
|
private Integer carType;
|
||||||
|
/**
|
||||||
|
* 异常类型
|
||||||
|
*/
|
||||||
|
private Integer errorType;
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
private String contractNumber;
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long clientId;
|
||||||
|
/**
|
||||||
|
* 故障描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
/**
|
||||||
|
* 部门对接人
|
||||||
|
*/
|
||||||
|
private String deptPeople;
|
||||||
|
/**
|
||||||
|
* 客户联系电话
|
||||||
|
*/
|
||||||
|
private String deptPhone;
|
||||||
|
/**
|
||||||
|
* 创建者ID
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.boge.modules.tickets.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author ls
|
||||||
|
* @email dengpbs@163.com
|
||||||
|
* @date 2025-02-26 19:56:28
|
||||||
|
*/
|
||||||
|
public interface TicketsService extends IService<TicketsEntity> {
|
||||||
|
|
||||||
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.boge.modules.tickets.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.Map;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.boge.common.utils.PageUtils;
|
||||||
|
import com.boge.common.utils.Query;
|
||||||
|
|
||||||
|
import com.boge.modules.tickets.dao.TicketsDao;
|
||||||
|
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||||
|
import com.boge.modules.tickets.service.TicketsService;
|
||||||
|
|
||||||
|
|
||||||
|
@Service("ticketsService")
|
||||||
|
public class TicketsServiceImpl extends ServiceImpl<TicketsDao, TicketsEntity> implements TicketsService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
|
IPage<TicketsEntity> page = this.page(
|
||||||
|
new Query<TicketsEntity>().getPage(params),
|
||||||
|
new QueryWrapper<TicketsEntity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
18
base-fast/src/main/resources/mapper/car/CarDao.xml
Normal file
18
base-fast/src/main/resources/mapper/car/CarDao.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?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.boge.modules.car.dao.CarDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.car.entity.CarEntity" id="carMap">
|
||||||
|
<result property="carId" column="car_id"/>
|
||||||
|
<result property="carName" column="car_name"/>
|
||||||
|
<result property="navigationType" column="navigation_type"/>
|
||||||
|
<result property="remarks" column="remarks"/>
|
||||||
|
<result property="isOn" column="is_on"/>
|
||||||
|
<result property="createUserId" column="create_user_id"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
18
base-fast/src/main/resources/mapper/client/ClientDao.xml
Normal file
18
base-fast/src/main/resources/mapper/client/ClientDao.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?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.boge.modules.client.dao.ClientDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.client.entity.ClientEntity" id="clientMap">
|
||||||
|
<result property="clientId" column="client_id"/>
|
||||||
|
<result property="clientName" column="client_name"/>
|
||||||
|
<result property="juridicalPerson" column="juridical_person"/>
|
||||||
|
<result property="address" column="address"/>
|
||||||
|
<result property="industry" column="industry"/>
|
||||||
|
<result property="isOn" column="is_on"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
21
base-fast/src/main/resources/mapper/contract/ContractDao.xml
Normal file
21
base-fast/src/main/resources/mapper/contract/ContractDao.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.boge.modules.contract.dao.ContractDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.contract.entity.ContractEntity" id="contractMap">
|
||||||
|
<result property="contractId" column="contract_id"/>
|
||||||
|
<result property="contractType" column="contract_type"/>
|
||||||
|
<result property="isMaster" column="is_master"/>
|
||||||
|
<result property="contractNumber" column="contract_number"/>
|
||||||
|
<result property="clientId" column="client_id"/>
|
||||||
|
<result property="materialJson" column="material_json"/>
|
||||||
|
<result property="isAcceptance" column="is_acceptance"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="acceptanceTime" column="acceptance_time"/>
|
||||||
|
<result property="remarks" column="remarks"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
17
base-fast/src/main/resources/mapper/material/MaterialDao.xml
Normal file
17
base-fast/src/main/resources/mapper/material/MaterialDao.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?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.boge.modules.material.dao.MaterialDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.material.entity.MaterialEntity" id="materialMap">
|
||||||
|
<result property="materialId" column="material_id"/>
|
||||||
|
<result property="materialCode" column="material_code"/>
|
||||||
|
<result property="materialName" column="material_name"/>
|
||||||
|
<result property="materialType" column="material_type"/>
|
||||||
|
<result property="isOn" column="is_on"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
21
base-fast/src/main/resources/mapper/tickets/TicketsDao.xml
Normal file
21
base-fast/src/main/resources/mapper/tickets/TicketsDao.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.boge.modules.tickets.dao.TicketsDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.tickets.entity.TicketsEntity" id="ticketsMap">
|
||||||
|
<result property="ticketsId" column="tickets_id"/>
|
||||||
|
<result property="carType" column="car_type"/>
|
||||||
|
<result property="errorType" column="error_type"/>
|
||||||
|
<result property="contractNumber" column="contract_number"/>
|
||||||
|
<result property="clientId" column="client_id"/>
|
||||||
|
<result property="description" column="description"/>
|
||||||
|
<result property="deptPeople" column="dept_people"/>
|
||||||
|
<result property="deptPhone" column="dept_phone"/>
|
||||||
|
<result property="createUserId" column="create_user_id"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
18
base-vue/src/views/modules/car/CarDao.xml
Normal file
18
base-vue/src/views/modules/car/CarDao.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?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.boge.modules.car.dao.CarDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.car.entity.CarEntity" id="carMap">
|
||||||
|
<result property="carId" column="car_id"/>
|
||||||
|
<result property="carName" column="car_name"/>
|
||||||
|
<result property="navigationType" column="navigation_type"/>
|
||||||
|
<result property="remarks" column="remarks"/>
|
||||||
|
<result property="isOn" column="is_on"/>
|
||||||
|
<result property="createUserId" column="create_user_id"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
129
base-vue/src/views/modules/client/client-add-or-update.vue
Normal file
129
base-vue/src/views/modules/client/client-add-or-update.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="!dataForm.clientId ? '新增' : '修改'"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="visible">
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
|
<el-form-item label="客户名称" prop="clientName">
|
||||||
|
<el-input v-model="dataForm.clientName" placeholder="客户名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="法人代表" prop="juridicalPerson">
|
||||||
|
<el-input v-model="dataForm.juridicalPerson" placeholder="法人代表"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址" prop="address">
|
||||||
|
<el-input v-model="dataForm.address" placeholder="地址"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="行业" prop="industry">
|
||||||
|
<el-input v-model="dataForm.industry" placeholder="行业"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="isOn">
|
||||||
|
<el-input v-model="dataForm.isOn" placeholder="是否启用"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建日期" prop="createTime">
|
||||||
|
<el-input v-model="dataForm.createTime" placeholder="创建日期"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
clientId: 0,
|
||||||
|
clientName: '',
|
||||||
|
juridicalPerson: '',
|
||||||
|
address: '',
|
||||||
|
industry: '',
|
||||||
|
isOn: '',
|
||||||
|
createTime: ''
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
clientName: [
|
||||||
|
{ required: true, message: '客户名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
juridicalPerson: [
|
||||||
|
{ required: true, message: '法人代表不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
address: [
|
||||||
|
{ required: true, message: '地址不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
industry: [
|
||||||
|
{ required: true, message: '行业不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
isOn: [
|
||||||
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
createTime: [
|
||||||
|
{ required: true, message: '创建日期不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.dataForm.clientId = id || 0
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.clientId) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/client/client/info/${this.dataForm.clientId}`),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataForm.clientName = data.client.clientName
|
||||||
|
this.dataForm.juridicalPerson = data.client.juridicalPerson
|
||||||
|
this.dataForm.address = data.client.address
|
||||||
|
this.dataForm.industry = data.client.industry
|
||||||
|
this.dataForm.isOn = data.client.isOn
|
||||||
|
this.dataForm.createTime = data.client.createTime
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit () {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/client/client/${!this.dataForm.clientId ? 'save' : 'update'}`),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'clientId': this.dataForm.clientId || undefined,
|
||||||
|
'clientName': this.dataForm.clientName,
|
||||||
|
'juridicalPerson': this.dataForm.juridicalPerson,
|
||||||
|
'address': this.dataForm.address,
|
||||||
|
'industry': this.dataForm.industry,
|
||||||
|
'isOn': this.dataForm.isOn,
|
||||||
|
'createTime': this.dataForm.createTime
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
193
base-vue/src/views/modules/client/client.vue
Normal file
193
base-vue/src/views/modules/client/client.vue
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
|
<el-button v-if="isAuth('client:client:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
|
<el-button v-if="isAuth('client:client:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
@selection-change="selectionChangeHandle"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="clientId"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="id">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="clientName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="客户名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="juridicalPerson"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="法人代表">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="地址">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="industry"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="行业">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="isOn"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="是否启用">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="创建日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.clientId)">修改</el-button>
|
||||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.clientId)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './client-add-or-update'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
dataForm: {
|
||||||
|
key: ''
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
addOrUpdateVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate
|
||||||
|
},
|
||||||
|
activated () {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList () {
|
||||||
|
this.dataListLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/client/client/list'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
'page': this.pageIndex,
|
||||||
|
'limit': this.pageSize,
|
||||||
|
'key': this.dataForm.key
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataList = data.page.list
|
||||||
|
this.totalPage = data.page.totalCount
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.totalPage = 0
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle (val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageIndex = 1
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle (val) {
|
||||||
|
this.pageIndex = val
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addOrUpdateHandle (id) {
|
||||||
|
this.addOrUpdateVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle (id) {
|
||||||
|
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||||
|
return item.clientId
|
||||||
|
})
|
||||||
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/client/client/delete'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData(ids, false)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
21
base-vue/src/views/modules/contract/ContractDao.xml
Normal file
21
base-vue/src/views/modules/contract/ContractDao.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.boge.modules.contract.dao.ContractDao">
|
||||||
|
|
||||||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
|
<resultMap type="com.boge.modules.contract.entity.ContractEntity" id="contractMap">
|
||||||
|
<result property="contractId" column="contract_id"/>
|
||||||
|
<result property="contractType" column="contract_type"/>
|
||||||
|
<result property="isMaster" column="is_master"/>
|
||||||
|
<result property="contractNumber" column="contract_number"/>
|
||||||
|
<result property="clientId" column="client_id"/>
|
||||||
|
<result property="materialJson" column="material_json"/>
|
||||||
|
<result property="isAcceptance" column="is_acceptance"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="acceptanceTime" column="acceptance_time"/>
|
||||||
|
<result property="remarks" column="remarks"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
120
base-vue/src/views/modules/material/material-add-or-update.vue
Normal file
120
base-vue/src/views/modules/material/material-add-or-update.vue
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="!dataForm.materialId ? '新增' : '修改'"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="visible">
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input v-model="dataForm.materialCode" placeholder="物料编码"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称" prop="materialName">
|
||||||
|
<el-input v-model="dataForm.materialName" placeholder="物料名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料类型" prop="materialType">
|
||||||
|
<el-input v-model="dataForm.materialType" placeholder="物料类型"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="isOn">
|
||||||
|
<el-input v-model="dataForm.isOn" placeholder="是否启用"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
materialId: 0,
|
||||||
|
materialCode: '',
|
||||||
|
materialName: '',
|
||||||
|
materialType: '',
|
||||||
|
isOn: '',
|
||||||
|
createTime: ''
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
materialName: [
|
||||||
|
{ required: true, message: '物料名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
materialType: [
|
||||||
|
{ required: true, message: '物料类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
isOn: [
|
||||||
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
createTime: [
|
||||||
|
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.dataForm.materialId = id || 0
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.materialId) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/material/material/info/${this.dataForm.materialId}`),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataForm.materialCode = data.material.materialCode
|
||||||
|
this.dataForm.materialName = data.material.materialName
|
||||||
|
this.dataForm.materialType = data.material.materialType
|
||||||
|
this.dataForm.isOn = data.material.isOn
|
||||||
|
this.dataForm.createTime = data.material.createTime
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit () {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/material/material/${!this.dataForm.materialId ? 'save' : 'update'}`),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'materialId': this.dataForm.materialId || undefined,
|
||||||
|
'materialCode': this.dataForm.materialCode,
|
||||||
|
'materialName': this.dataForm.materialName,
|
||||||
|
'materialType': this.dataForm.materialType,
|
||||||
|
'isOn': this.dataForm.isOn,
|
||||||
|
'createTime': this.dataForm.createTime
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
187
base-vue/src/views/modules/material/material.vue
Normal file
187
base-vue/src/views/modules/material/material.vue
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
|
<el-button v-if="isAuth('material:material:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
|
<el-button v-if="isAuth('material:material:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
@selection-change="selectionChangeHandle"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialId"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="id">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialCode"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="物料编码">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="物料名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialType"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="物料类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="isOn"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="是否启用">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="创建时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.materialId)">修改</el-button>
|
||||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.materialId)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './material-add-or-update'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
dataForm: {
|
||||||
|
key: ''
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
addOrUpdateVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate
|
||||||
|
},
|
||||||
|
activated () {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList () {
|
||||||
|
this.dataListLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/material/material/list'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
'page': this.pageIndex,
|
||||||
|
'limit': this.pageSize,
|
||||||
|
'key': this.dataForm.key
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataList = data.page.list
|
||||||
|
this.totalPage = data.page.totalCount
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.totalPage = 0
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle (val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageIndex = 1
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle (val) {
|
||||||
|
this.pageIndex = val
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addOrUpdateHandle (id) {
|
||||||
|
this.addOrUpdateVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle (id) {
|
||||||
|
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||||
|
return item.materialId
|
||||||
|
})
|
||||||
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/material/material/delete'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData(ids, false)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
156
base-vue/src/views/modules/tickets/tickets-add-or-update.vue
Normal file
156
base-vue/src/views/modules/tickets/tickets-add-or-update.vue
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="!dataForm.ticketsId ? '新增' : '修改'"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="visible">
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
|
<el-form-item label="小车类型" prop="carType">
|
||||||
|
<el-input v-model="dataForm.carType" placeholder="小车类型"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="异常类型" prop="errorType">
|
||||||
|
<el-input v-model="dataForm.errorType" placeholder="异常类型"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合同编号" prop="contractNumber">
|
||||||
|
<el-input v-model="dataForm.contractNumber" placeholder="合同编号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户id" prop="clientId">
|
||||||
|
<el-input v-model="dataForm.clientId" placeholder="客户id"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="故障描述" prop="description">
|
||||||
|
<el-input v-model="dataForm.description" placeholder="故障描述"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门对接人" prop="deptPeople">
|
||||||
|
<el-input v-model="dataForm.deptPeople" placeholder="部门对接人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户联系电话" prop="deptPhone">
|
||||||
|
<el-input v-model="dataForm.deptPhone" placeholder="客户联系电话"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建者ID" prop="createUserId">
|
||||||
|
<el-input v-model="dataForm.createUserId" placeholder="创建者ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
ticketsId: 0,
|
||||||
|
carType: '',
|
||||||
|
errorType: '',
|
||||||
|
contractNumber: '',
|
||||||
|
clientId: '',
|
||||||
|
description: '',
|
||||||
|
deptPeople: '',
|
||||||
|
deptPhone: '',
|
||||||
|
createUserId: '',
|
||||||
|
createTime: ''
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
carType: [
|
||||||
|
{ required: true, message: '小车类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
errorType: [
|
||||||
|
{ required: true, message: '异常类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
contractNumber: [
|
||||||
|
{ required: true, message: '合同编号不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
clientId: [
|
||||||
|
{ required: true, message: '客户id不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
description: [
|
||||||
|
{ required: true, message: '故障描述不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
deptPeople: [
|
||||||
|
{ required: true, message: '部门对接人不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
deptPhone: [
|
||||||
|
{ required: true, message: '客户联系电话不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
createUserId: [
|
||||||
|
{ required: true, message: '创建者ID不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
createTime: [
|
||||||
|
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.dataForm.ticketsId = id || 0
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.ticketsId) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/tickets/tickets/info/${this.dataForm.ticketsId}`),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataForm.carType = data.tickets.carType
|
||||||
|
this.dataForm.errorType = data.tickets.errorType
|
||||||
|
this.dataForm.contractNumber = data.tickets.contractNumber
|
||||||
|
this.dataForm.clientId = data.tickets.clientId
|
||||||
|
this.dataForm.description = data.tickets.description
|
||||||
|
this.dataForm.deptPeople = data.tickets.deptPeople
|
||||||
|
this.dataForm.deptPhone = data.tickets.deptPhone
|
||||||
|
this.dataForm.createUserId = data.tickets.createUserId
|
||||||
|
this.dataForm.createTime = data.tickets.createTime
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit () {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/tickets/tickets/${!this.dataForm.ticketsId ? 'save' : 'update'}`),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'ticketsId': this.dataForm.ticketsId || undefined,
|
||||||
|
'carType': this.dataForm.carType,
|
||||||
|
'errorType': this.dataForm.errorType,
|
||||||
|
'contractNumber': this.dataForm.contractNumber,
|
||||||
|
'clientId': this.dataForm.clientId,
|
||||||
|
'description': this.dataForm.description,
|
||||||
|
'deptPeople': this.dataForm.deptPeople,
|
||||||
|
'deptPhone': this.dataForm.deptPhone,
|
||||||
|
'createUserId': this.dataForm.createUserId,
|
||||||
|
'createTime': this.dataForm.createTime
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
211
base-vue/src/views/modules/tickets/tickets.vue
Normal file
211
base-vue/src/views/modules/tickets/tickets.vue
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
|
<el-button v-if="isAuth('tickets:tickets:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
|
<el-button v-if="isAuth('tickets:tickets:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
@selection-change="selectionChangeHandle"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ticketsId"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="工单id">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="carType"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="小车类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="errorType"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="异常类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="contractNumber"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="合同编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="clientId"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="客户id">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="description"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="故障描述">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="deptPeople"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="部门对接人">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="deptPhone"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="客户联系电话">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createUserId"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="创建者ID">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="创建时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.ticketsId)">修改</el-button>
|
||||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.ticketsId)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './tickets-add-or-update'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
dataForm: {
|
||||||
|
key: ''
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
addOrUpdateVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate
|
||||||
|
},
|
||||||
|
activated () {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList () {
|
||||||
|
this.dataListLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/tickets/tickets/list'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
'page': this.pageIndex,
|
||||||
|
'limit': this.pageSize,
|
||||||
|
'key': this.dataForm.key
|
||||||
|
})
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataList = data.page.list
|
||||||
|
this.totalPage = data.page.totalCount
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.totalPage = 0
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle (val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageIndex = 1
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle (val) {
|
||||||
|
this.pageIndex = val
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addOrUpdateHandle (id) {
|
||||||
|
this.addOrUpdateVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle (id) {
|
||||||
|
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||||
|
return item.ticketsId
|
||||||
|
})
|
||||||
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/tickets/tickets/delete'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData(ids, false)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user