Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
package org.nl.wms.dispatch_manage.point.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.dispatch_manage.point.service.ISchBasePointService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.dispatch_manage.point.service.dto.SchBasePointQuery;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/point")
|
||||
public class SchBasePointController {
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private ISchBaseRegionService regionService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> query(SchBasePointQuery whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pointService.page(page.build(SchBasePoint.class), whereJson.build())), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBasePoint entity) {
|
||||
entity.setId(IdUtil.getStringId());
|
||||
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setCreate_time(DateUtil.now());
|
||||
pointService.save(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) {
|
||||
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setUpdate_time(DateUtil.now());
|
||||
pointService.updateById(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
pointService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getRegion")
|
||||
public ResponseEntity<Object> getRegion() {
|
||||
return new ResponseEntity<>(regionService.list(), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.point.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_point")
|
||||
public class SchBasePoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 点位id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 点位编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 点位名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 生产区域
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String region_code;
|
||||
|
||||
/**
|
||||
* 点位类型
|
||||
*/
|
||||
private String point_type;
|
||||
|
||||
/**
|
||||
* 锁定类型
|
||||
*/
|
||||
private String lock_type;
|
||||
|
||||
/**
|
||||
* 点位组编码
|
||||
*/
|
||||
private String group_code;
|
||||
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
private String point_location;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
private String form_data;
|
||||
|
||||
private String priority;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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="org.nl.wms.dispatch_manage.point.service.dao.mapper.SchBasePointMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.entity.BaseQuery;
|
||||
import org.nl.common.domain.entity.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBasePointQuery extends BaseQuery<SchBasePoint> {
|
||||
private String search;
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("search", QParam.builder().k(new String[]{"point_code", "point_name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.dispatch_manage.point.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.dispatch_manage.point.service.ISchBasePointService;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.dispatch_manage.point.service.dao.mapper.SchBasePointMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位基础表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, SchBasePoint> implements ISchBasePointService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.nl.wms.dispatch_manage.region.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
import org.nl.wms.dispatch_manage.region.service.dto.SchBaseRegionQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/region")
|
||||
public class SchBaseRegionController {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseRegionService regionService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> query(SchBaseRegionQuery whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(regionService.page(page.build(SchBaseRegion.class), whereJson.build())), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseRegion entity) {
|
||||
entity.setId(IdUtil.getStringId());
|
||||
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setCreate_time(DateUtil.now());
|
||||
regionService.save(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseRegion entity) {
|
||||
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
entity.setUpdate_time(DateUtil.now());
|
||||
regionService.updateById(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
regionService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.nl.wms.dispatch_manage.region.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface ISchBaseRegionService extends IService<SchBaseRegion> {
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_region")
|
||||
public class SchBaseRegion implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 是否合并下发任务0否1是
|
||||
*/
|
||||
private String is_merge;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
private String form_data;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 点位类型说明
|
||||
*/
|
||||
private String type_explain;
|
||||
|
||||
/**
|
||||
* 点位状态说明
|
||||
*/
|
||||
private String status_explain;
|
||||
|
||||
/**
|
||||
* 生产区域
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
public interface SchBaseRegionMapper extends BaseMapper<SchBaseRegion> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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="org.nl.wms.dispatch_manage.region.service.dao.mapper.SchBaseRegionMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.entity.BaseQuery;
|
||||
import org.nl.common.domain.entity.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBaseRegionQuery extends BaseQuery<SchBaseRegion> {
|
||||
private String search;
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("search", QParam.builder().k(new String[]{"code","name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.dispatch_manage.region.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.dispatch_manage.region.service.ISchBaseRegionService;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.SchBaseRegion;
|
||||
import org.nl.wms.dispatch_manage.region.service.dao.mapper.SchBaseRegionMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 区域基础表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, SchBaseRegion> implements ISchBaseRegionService {
|
||||
|
||||
|
||||
}
|
||||
430
wms_pro/qd/src/views/wms/dispatch_manage/point/index.vue
Normal file
430
wms_pro/qd/src/views/wms/dispatch_manage/point/index.vue
Normal file
@@ -0,0 +1,430 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="区域类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型">
|
||||
<el-select
|
||||
v-model="query.region_code"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="区域类型"
|
||||
class="filter-item"
|
||||
@change="getPointStatusAndTypeList(query.region_code, 1)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位类型">
|
||||
<el-select
|
||||
v-model="query.point_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="点位类型"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointTypesList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否锁定">
|
||||
<el-switch
|
||||
v-model="query.lock_type"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
@change="hand"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch
|
||||
v-model="query.is_used"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
active-color="#C0CCDA"
|
||||
inactive-color="#409EFF"
|
||||
@change="hand"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
v-if="crud.query.is_used == 0"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 1)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.query.is_used == 1"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-close"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 0)"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.query.lock_type == 0"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-check"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeLock(crud.selections, 1)"
|
||||
>
|
||||
锁定
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.query.lock_type == 1"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeLock(crud.selections, 0)"
|
||||
>
|
||||
解锁
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="540px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="生产车间" prop="product_area">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
placeholder=""
|
||||
style="width: 370px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="region_code">
|
||||
<el-select
|
||||
v-model="form.region_code"
|
||||
placeholder="请选择"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位编码" prop="code">
|
||||
<el-input v-model="form.code" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定类型" prop="lock_type">
|
||||
<el-select
|
||||
v-model="form.lock_type"
|
||||
size="mini"
|
||||
placeholder="锁定类型"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.d_lock_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="pointTypesDialogList.length > 0" label="点位类型" prop="device_point_type">
|
||||
<el-select
|
||||
v-model="form.point_type"
|
||||
size="mini"
|
||||
placeholder="设备点位类型"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointTypesDialogList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="point_location">
|
||||
<el-input v-model="form.point_location" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-input v-model="form.priority" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="表单数据" prop="form_data">
|
||||
<el-input type="textarea" v-model="form.form_data" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea"/>
|
||||
</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="code" label="点位编码" sortable width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="点位名称" width="150" sortable show-overflow-tooltip/>
|
||||
<el-table-column prop="region_code" label="区域编码" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="group_code" label="点位组编码" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="point_location" label="位置" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="point_type_name" label="点位类型"/>
|
||||
<el-table-column prop="lock_type_name" label="锁定类型"/>
|
||||
<el-table-column prop="priority" label="优先级"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="form_data" label="表单数据" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="is_used" label="是否启用">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_used == '1' ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人"/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="150"/>
|
||||
<el-table-column prop="update_name" label="修改人"/>
|
||||
<el-table-column prop="update_time" label="修改时间" width="150"/>
|
||||
<el-table-column
|
||||
v-permission="[]"
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="120px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPoint, {changeActive} from './point'
|
||||
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 = {
|
||||
point_id: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
product_area: null,
|
||||
region_code: null,
|
||||
point_type: null,
|
||||
lock_type: '0',
|
||||
group_code: null,
|
||||
point_location: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
form_data: null,
|
||||
priority: null,
|
||||
vehicle_code: null
|
||||
}
|
||||
export default {
|
||||
name: 'Point',
|
||||
dicts: ['storagevehicle_type', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'point_location', 'product_area'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '点位',
|
||||
url: 'api/point',
|
||||
idField: 'point_id',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
del: true,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: {...crudPoint},
|
||||
query: {
|
||||
product_area: 'A1'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
syncLoading: false,
|
||||
pointTypesList: [],
|
||||
pointTypesDialogList: [],
|
||||
options: [],
|
||||
regionList: [],
|
||||
permission: {},
|
||||
rules: {
|
||||
code: [
|
||||
{required: true, message: '点位编码不能为空', trigger: 'blur'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: '点位名称不能为空', trigger: 'blur'}
|
||||
],
|
||||
point_type: [
|
||||
{required: true, message: '点位类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
lock_type: [
|
||||
{required: true, message: '锁定类型不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.regionList = res
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU]() {
|
||||
},
|
||||
hand() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用点位,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用点位,是否继续!'
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
changeUsed(data, flag) { // 更改启用状态
|
||||
const param = {}
|
||||
param.data = data
|
||||
param.used = flag
|
||||
crudPoint.changeUsed(param).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
changeLock(data, flag) { // 更改锁定状态
|
||||
const param = {}
|
||||
param.data = data
|
||||
param.lock_type = flag
|
||||
crudPoint.changeLock(param).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
80
wms_pro/qd/src/views/wms/dispatch_manage/point/point.js
Normal file
80
wms_pro/qd/src/views/wms/dispatch_manage/point/point.js
Normal file
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/point',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/point/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/point',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function findPoints(area_type) {
|
||||
return request({
|
||||
url: 'api/point/area_type/' + area_type
|
||||
})
|
||||
}
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: 'api/point/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPoint(data) {
|
||||
return request({
|
||||
url: '/api/point/getPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function changeUsed(data) {
|
||||
return request({
|
||||
url: 'api/point/changeUsed',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function changeLock(data) {
|
||||
return request({
|
||||
url: 'api/point/changeLock',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function outUnLock(data) {
|
||||
return request({
|
||||
url: 'api/point/outUnLock',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRegion() {
|
||||
return request({
|
||||
url: '/api/point/getRegion',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default {add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, changeLock, outUnLock}
|
||||
214
wms_pro/qd/src/views/wms/dispatch_manage/region/index.vue
Normal file
214
wms_pro/qd/src/views/wms/dispatch_manage/region/index.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="区域类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码/名称">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
placeholder="输入编码或名称"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, 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="550px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="生产区域" prop="product_area">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
placeholder=""
|
||||
style="width: 370px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域编码" prop="code">
|
||||
<el-input v-model="form.code" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否合并任务" prop="is_merge">
|
||||
<el-select
|
||||
v-model="form.is_merge"
|
||||
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-item label="点位类型说明">
|
||||
<el-input v-model="form.type_explain" type="textarea" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态说明">
|
||||
<el-input v-model="form.status_explain" type="textarea" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="表单数据">
|
||||
<el-input v-model="form.form_data" type="textarea" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 370px;"/>
|
||||
</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 prop="code" label="区域编码" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="name" label="区域名称" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="product_area" label="生产区域" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="is_merge" label="是否合并任务" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.IS_OR_NOT[scope.row.is_merge] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type_explain" label="点位类型说明" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="status_explain" label="点位状态说明" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="form_data" label="表单数据" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="create_name" label="创建人" width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="120" show-overflow-tooltip/>
|
||||
<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 crudRegion from './region'
|
||||
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 = {
|
||||
id: null,
|
||||
code: null,
|
||||
name: null,
|
||||
is_merge: '1',
|
||||
remark: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
form_data: null,
|
||||
type_explain: null,
|
||||
status_explain: null,
|
||||
product_area: null,
|
||||
}
|
||||
export default {
|
||||
name: 'Region',
|
||||
dicts: ['product_area', 'IS_OR_NOT'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域管理',
|
||||
url: 'api/region',
|
||||
idField: 'code',
|
||||
sort: 'code,desc',
|
||||
crudMethod: {...crudRegion},
|
||||
query: {
|
||||
product_area: 'A1'
|
||||
},
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
code: [
|
||||
{required: true, message: '区域编码不能为空', trigger: 'blur'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: '区域名称不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
69
wms_pro/qd/src/views/wms/dispatch_manage/region/region.js
Normal file
69
wms_pro/qd/src/views/wms/dispatch_manage/region/region.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/region',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/region/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/region',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: 'api/region/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPointStatusSelectByCode(code) {
|
||||
return request({
|
||||
url: 'api/region/getPointStatusSelectByCode',
|
||||
method: 'post',
|
||||
data: code
|
||||
})
|
||||
}
|
||||
|
||||
export function getPointTypeSelectByCode(code) {
|
||||
return request({
|
||||
url: 'api/region/getPointTypeSelectByCode',
|
||||
method: 'post',
|
||||
data: code
|
||||
})
|
||||
}
|
||||
|
||||
export function getRegionSelect(data) {
|
||||
return request({
|
||||
url: 'api/region/getRegionSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
changeActive,
|
||||
getPointStatusSelectByCode,
|
||||
getPointTypeSelectByCode,
|
||||
getRegionSelect
|
||||
}
|
||||
Reference in New Issue
Block a user