缓存线区域
This commit is contained in:
@@ -24,7 +24,7 @@ public class CachelinePositionDto implements Serializable {
|
|||||||
private BigDecimal positionOrder_no;
|
private BigDecimal positionOrder_no;
|
||||||
|
|
||||||
/** 缓存线编码 */
|
/** 缓存线编码 */
|
||||||
private String cacheLine_code;
|
private String cacheline_code;
|
||||||
|
|
||||||
/** 缓存线层数 */
|
/** 缓存线层数 */
|
||||||
private BigDecimal layer_num;
|
private BigDecimal layer_num;
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package org.nl.wms.cacheline.region.rest;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.anno.Log;
|
||||||
|
import org.nl.wms.cacheline.region.service.CachelineRegionRelationService;
|
||||||
|
import org.nl.wms.cacheline.region.service.dto.CachelineRegionRelationDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2023-03-24
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "个缓存线区域关系管理")
|
||||||
|
@RequestMapping("/api/cachelineRegionRelation")
|
||||||
|
@Slf4j
|
||||||
|
public class CachelineRegionRelationController {
|
||||||
|
|
||||||
|
private final CachelineRegionRelationService cachelineRegionRelationService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询个缓存线区域关系")
|
||||||
|
@ApiOperation("查询个缓存线区域关系")
|
||||||
|
//@PreAuthorize("@el.check('cachelineRegionRelation:list')")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||||
|
return new ResponseEntity<>(cachelineRegionRelationService.queryAll(whereJson,page),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增个缓存线区域关系")
|
||||||
|
@ApiOperation("新增个缓存线区域关系")
|
||||||
|
//@PreAuthorize("@el.check('cachelineRegionRelation:add')")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody CachelineRegionRelationDto dto){
|
||||||
|
cachelineRegionRelationService.create(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改个缓存线区域关系")
|
||||||
|
@ApiOperation("修改个缓存线区域关系")
|
||||||
|
//@PreAuthorize("@el.check('cachelineRegionRelation:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody CachelineRegionRelationDto dto){
|
||||||
|
cachelineRegionRelationService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除个缓存线区域关系")
|
||||||
|
@ApiOperation("删除个缓存线区域关系")
|
||||||
|
//@PreAuthorize("@el.check('cachelineRegionRelation:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||||
|
cachelineRegionRelationService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.nl.wms.cacheline.region.service;
|
||||||
|
|
||||||
|
import org.nl.wms.cacheline.region.service.dto.CachelineRegionRelationDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author lyd
|
||||||
|
* @date 2023-03-24
|
||||||
|
**/
|
||||||
|
public interface CachelineRegionRelationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param page 分页参数
|
||||||
|
* @return Map<String,Object>
|
||||||
|
*/
|
||||||
|
Map<String,Object> queryAll(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据不分页
|
||||||
|
* @param whereJson 条件参数
|
||||||
|
* @return List<CachelineRegionRelationDto>
|
||||||
|
*/
|
||||||
|
List<CachelineRegionRelationDto> queryAll(Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param relation_id ID
|
||||||
|
* @return CachelineRegionRelation
|
||||||
|
*/
|
||||||
|
CachelineRegionRelationDto findById(String relation_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编码查询
|
||||||
|
* @param code code
|
||||||
|
* @return CachelineRegionRelation
|
||||||
|
*/
|
||||||
|
CachelineRegionRelationDto findByCode(String code);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void create(CachelineRegionRelationDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void update(CachelineRegionRelationDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(String[] ids);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package org.nl.wms.cacheline.region.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @description /
|
||||||
|
* @date 2023-03-24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class CachelineRegionRelationDto implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键标识
|
||||||
|
*/
|
||||||
|
private String relation_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域编码
|
||||||
|
*/
|
||||||
|
private String region_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存线编码
|
||||||
|
*/
|
||||||
|
private String cacheline_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可用
|
||||||
|
*/
|
||||||
|
private String is_active;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private String is_delete;
|
||||||
|
}
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
package org.nl.wms.cacheline.region.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
import org.nl.wms.cacheline.region.service.CachelineRegionRelationService;
|
||||||
|
import org.nl.wms.cacheline.region.service.dto.CachelineRegionRelationDto;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务实现
|
||||||
|
* @author lyd
|
||||||
|
* @date 2023-03-24
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class CachelineRegionRelationServiceImpl implements CachelineRegionRelationService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String,Object> queryAll(Map whereJson, Pageable page){
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
String where = "1 = 1";
|
||||||
|
if (ObjectUtil.isNotEmpty(whereJson.get("search"))){
|
||||||
|
String search = whereJson.get("search").toString();
|
||||||
|
where = "region_code like '%" + search + "%' " +
|
||||||
|
"OR cacheline_code like '%" + search + "%'";
|
||||||
|
}
|
||||||
|
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "region_code, cacheline_code");
|
||||||
|
final JSONObject json = rb.pageResult();
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CachelineRegionRelationDto> queryAll(Map whereJson){
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(CachelineRegionRelationDto.class);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CachelineRegionRelationDto findById(String relation_id) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
JSONObject json = wo.query("relation_id = '" + relation_id + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(json)){
|
||||||
|
return json.toJavaObject( CachelineRegionRelationDto.class);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CachelineRegionRelationDto findByCode(String code) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(json)){
|
||||||
|
return json.toJavaObject( CachelineRegionRelationDto.class);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void create(CachelineRegionRelationDto dto) {
|
||||||
|
dto.setRelation_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
dto.setUpdate_time(DateUtil.now());
|
||||||
|
dto.setCreate_time(DateUtil.now());
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
|
wo.insert(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(CachelineRegionRelationDto dto) {
|
||||||
|
CachelineRegionRelationDto entity = this.findById(dto.getRelation_id());
|
||||||
|
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
|
|
||||||
|
dto.setUpdate_time(DateUtil.now());
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
|
wo.update(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteAll(String[] ids) {
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_cacheline_region_relation");
|
||||||
|
for (String relation_id: ids) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("relation_id", String.valueOf(relation_id));
|
||||||
|
param.put("is_delete", "1");
|
||||||
|
param.put("update_optid", currentUserId);
|
||||||
|
param.put("update_optname", nickName);
|
||||||
|
param.put("update_time", DateUtil.now());
|
||||||
|
wo.update(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ import cn.hutool.poi.excel.ExcelUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -71,8 +72,10 @@ public class ProduceWorkorderServiceImpl implements ProduceWorkorderService {
|
|||||||
String product_area = MapUtil.getStr(whereJson, "product_area");
|
String product_area = MapUtil.getStr(whereJson, "product_area");
|
||||||
String product_series = "";
|
String product_series = "";
|
||||||
// 员工只能看到自己创建的工单
|
// 员工只能看到自己创建的工单
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
SysUser one = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, currentUsername));
|
||||||
String currentUserId = "";
|
String currentUserId = "";
|
||||||
if (!SecurityUtils.getCurrentUsername().equals("admin")) currentUserId = SecurityUtils.getCurrentUserId();
|
if (!one.getIsAdmin()) currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
//map.put("order_status", order_status);
|
//map.put("order_status", order_status);
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/cachelineRegionRelation',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/cachelineRegionRelation/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/cachelineRegionRelation',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="50px"
|
width="100px"
|
||||||
align="center"
|
align="center"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -69,8 +69,8 @@
|
|||||||
<el-form-item label="位置顺序号" prop="positionOrder_no">
|
<el-form-item label="位置顺序号" prop="positionOrder_no">
|
||||||
<el-input v-model="form.positionOrder_no" style="width: 200px;" />
|
<el-input v-model="form.positionOrder_no" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="缓存线编码" prop="cacheLine_code">
|
<el-form-item label="缓存线编码" prop="cacheline_code">
|
||||||
<el-input v-model="form.cacheLine_code" style="width: 200px;" />
|
<el-input v-model="form.cacheline_code" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="缓存线层数" prop="layer_num">
|
<el-form-item label="缓存线层数" prop="layer_num">
|
||||||
<el-input v-model="form.layer_num" style="width: 200px;" />
|
<el-input v-model="form.layer_num" style="width: 200px;" />
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
<el-table-column prop="position_code" label="位置编码" width="120"/>
|
<el-table-column prop="position_code" label="位置编码" width="120"/>
|
||||||
<el-table-column prop="position_name" label="名字" width="120"/>
|
<el-table-column prop="position_name" label="名字" width="120"/>
|
||||||
<el-table-column prop="positionOrder_no" label="顺序号" />
|
<el-table-column prop="positionOrder_no" label="顺序号" />
|
||||||
<el-table-column prop="cacheLine_code" label="缓存线编码" />
|
<el-table-column prop="cacheline_code" label="缓存线编码" />
|
||||||
<el-table-column prop="layer_num" label="层数" />
|
<el-table-column prop="layer_num" label="层数" />
|
||||||
<el-table-column prop="priority_layer_no" label="优先层顺序" />
|
<el-table-column prop="priority_layer_no" label="优先层顺序" />
|
||||||
<el-table-column prop="order_no" label="料箱展示顺序号" width="120"/>
|
<el-table-column prop="order_no" label="料箱展示顺序号" width="120"/>
|
||||||
@@ -161,7 +161,6 @@
|
|||||||
<el-table-column prop="is_empty" label="是否空位" />
|
<el-table-column prop="is_empty" label="是否空位" />
|
||||||
<el-table-column prop="is_show" label="是否展示" />
|
<el-table-column prop="is_show" label="是否展示" />
|
||||||
<el-table-column prop="is_active" label="是否可用" />
|
<el-table-column prop="is_active" label="是否可用" />
|
||||||
<el-table-column prop="is_delete" label="是否删除" />
|
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
@@ -189,7 +188,7 @@ const defaultForm = {
|
|||||||
position_code: null,
|
position_code: null,
|
||||||
position_name: null,
|
position_name: null,
|
||||||
positionOrder_no: null,
|
positionOrder_no: null,
|
||||||
cacheLine_code: null,
|
cacheline_code: null,
|
||||||
layer_num: null,
|
layer_num: null,
|
||||||
priority_layer_no: null,
|
priority_layer_no: null,
|
||||||
order_no: null,
|
order_no: null,
|
||||||
@@ -231,7 +230,7 @@ export default {
|
|||||||
positionOrder_no: [
|
positionOrder_no: [
|
||||||
{ required: true, message: '位置顺序号不能为空', trigger: 'blur' }
|
{ required: true, message: '位置顺序号不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
cacheLine_code: [
|
cacheline_code: [
|
||||||
{ required: true, message: '缓存线编码不能为空', trigger: 'blur' }
|
{ required: true, message: '缓存线编码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
layer_num: [
|
layer_num: [
|
||||||
|
|||||||
136
mes/qd/src/views/wms/cacheline/region/index.vue
Normal file
136
mes/qd/src/views/wms/cacheline/region/index.vue
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="90px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="模糊搜索">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入位置编码或名称"
|
||||||
|
class="filter-item"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation :crud="crud" />
|
||||||
|
</el-form>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||||
|
<el-form-item label="区域编码" prop="region_code">
|
||||||
|
<el-input v-model="form.region_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="缓存线编码" prop="cacheline_code">
|
||||||
|
<el-input v-model="form.cacheline_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否可用" prop="is_active">
|
||||||
|
<el-select
|
||||||
|
v-model="form.is_active"
|
||||||
|
placeholder=""
|
||||||
|
style="width: 370px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="region_code" label="区域编码" />
|
||||||
|
<el-table-column prop="cacheline_code" label="缓存线编码" />
|
||||||
|
<el-table-column prop="create_time" label="创建时间" />
|
||||||
|
<el-table-column prop="update_time" label="更新时间" />
|
||||||
|
<el-table-column prop="is_active" label="是否可用" >
|
||||||
|
<template slot-scope="scop">
|
||||||
|
{{scop.row.is_active ? '是' : '否'}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudCachelineRegionRelation from '@/api/wms/cacheline/region/cachelineRegionRelation'
|
||||||
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
relation_id: null,
|
||||||
|
region_code: null,
|
||||||
|
cacheline_code: null,
|
||||||
|
create_time: null,
|
||||||
|
update_time: null,
|
||||||
|
is_active: null,
|
||||||
|
is_delete: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'CachelineRegionRelation',
|
||||||
|
dicts: ['IS_OR_NOT'],
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({ title: '个缓存线区域关系', url: 'api/cachelineRegionRelation', idField: 'relation_id', sort: 'relation_id,desc', crudMethod: { ...crudCachelineRegionRelation }})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
region_code: [
|
||||||
|
{ required: true, message: '区域编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
cacheline_code: [
|
||||||
|
{ required: true, message: '缓存线编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
is_active: [
|
||||||
|
{ required: true, message: '是否可用不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
is_delete: [
|
||||||
|
{ required: true, message: '是否删除不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
} }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user