Merge branch 'master' of http://121.40.234.130:8899/root/yongYuJiaJu
This commit is contained in:
@@ -66,4 +66,20 @@ public class RegionController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getPointStatusSelectById")
|
||||||
|
@Log("获取点位状态下拉框")
|
||||||
|
@ApiOperation("获取点位状态下拉框")
|
||||||
|
//@SaCheckPermission("region:add")
|
||||||
|
public ResponseEntity<Object> getPointStatusSelectById(@RequestBody Long region_id) {
|
||||||
|
return new ResponseEntity<>(regionService.getPointStatusSelectById(region_id), HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getPointTypeSelectById")
|
||||||
|
@Log("获取点位类型下拉框")
|
||||||
|
@ApiOperation("获取点位类型下拉框")
|
||||||
|
//@SaCheckPermission("region:add")
|
||||||
|
public ResponseEntity<Object> getPointTypeSelectById(@RequestBody Long region_id) {
|
||||||
|
return new ResponseEntity<>(regionService.getPointTypeSelectById(region_id), HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
package org.nl.wms.sch.service;
|
package org.nl.wms.sch.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import org.nl.wms.sch.service.dto.RegionDto;
|
import org.nl.wms.sch.service.dto.RegionDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
@@ -69,4 +70,17 @@ public interface RegionService {
|
|||||||
*/
|
*/
|
||||||
void deleteAll(Long[] ids);
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取点位状态下拉框
|
||||||
|
* @param region_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONArray getPointStatusSelectById(Long region_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取点位类型下拉框
|
||||||
|
* @param region_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONArray getPointTypeSelectById(Long region_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,128 +1,111 @@
|
|||||||
package org.nl.wms.sch.service.dto;
|
package org.nl.wms.sch.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.io.Serializable;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ldjun
|
|
||||||
* @description /
|
* @description /
|
||||||
* @date 2021-12-07
|
* @author 1
|
||||||
|
* @date 2022-10-19
|
||||||
**/
|
**/
|
||||||
@Data
|
@Data
|
||||||
public class PointDto implements Serializable {
|
public class PointDto implements Serializable {
|
||||||
|
|
||||||
/** 点位标识 */
|
/** 点位标识 */
|
||||||
/**
|
/** 防止精度丢失 */
|
||||||
* 防止精度丢失
|
@JsonSerialize(using= ToStringSerializer.class)
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
private Long point_id;
|
private Long point_id;
|
||||||
|
|
||||||
/**
|
/** 点位编码 */
|
||||||
* 点位编码
|
|
||||||
*/
|
|
||||||
private String point_code;
|
private String point_code;
|
||||||
|
|
||||||
/**
|
/** 点位名称 */
|
||||||
* 点位名称
|
|
||||||
*/
|
|
||||||
private String point_name;
|
private String point_name;
|
||||||
|
|
||||||
/**
|
/** 所属区域 */
|
||||||
* 所属区域
|
|
||||||
*/
|
|
||||||
private Long region_id;
|
private Long region_id;
|
||||||
|
|
||||||
/**
|
/** 区域编码 */
|
||||||
* 点位类型
|
private String region_code;
|
||||||
*/
|
|
||||||
|
/** 区域名称 */
|
||||||
|
private String region_name;
|
||||||
|
|
||||||
|
/** 点位类型 */
|
||||||
private String point_type;
|
private String point_type;
|
||||||
|
|
||||||
/**
|
/** 点位状态 */
|
||||||
* 点位状态
|
|
||||||
*/
|
|
||||||
private String point_status;
|
private String point_status;
|
||||||
|
|
||||||
/**
|
/** 锁定类型 */
|
||||||
* 锁定类型
|
|
||||||
*/
|
|
||||||
private String lock_type;
|
private String lock_type;
|
||||||
|
|
||||||
/**
|
/** 设备编码 */
|
||||||
* 载具编码
|
private String device_code;
|
||||||
*/
|
|
||||||
private String vehicle_code;
|
|
||||||
|
|
||||||
/**
|
/** MES设备编码 */
|
||||||
* 载具数量
|
private String mes_device_code;
|
||||||
*/
|
|
||||||
private Integer vehicle_qty;
|
|
||||||
|
|
||||||
/**
|
/** 允许的载具类型 */
|
||||||
* 载具类型
|
private String can_vehicle_type;
|
||||||
*/
|
|
||||||
|
/** 载具类型 */
|
||||||
private String vehicle_type;
|
private String vehicle_type;
|
||||||
|
|
||||||
/**
|
/** 载具编码 */
|
||||||
* 是否专机
|
private String vehicle_code;
|
||||||
*/
|
|
||||||
private String is_host;
|
|
||||||
|
|
||||||
/**
|
/** 载具数量 */
|
||||||
* 来源标识
|
private BigDecimal vehicle_qty;
|
||||||
*/
|
|
||||||
private Long source_id;
|
|
||||||
|
|
||||||
/**
|
/** 块 */
|
||||||
* 备注
|
private BigDecimal block_num;
|
||||||
*/
|
|
||||||
|
/** 排 */
|
||||||
|
private BigDecimal row_num;
|
||||||
|
|
||||||
|
/** 列 */
|
||||||
|
private BigDecimal col_num;
|
||||||
|
|
||||||
|
/** 层 */
|
||||||
|
private BigDecimal layer_num;
|
||||||
|
|
||||||
|
/** 点位组编码 */
|
||||||
|
private String point_group_code;
|
||||||
|
|
||||||
|
/** 是否建工单 */
|
||||||
|
private String is_have_workder;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/** 来源标识 */
|
||||||
* 是否启用
|
private Long source_id;
|
||||||
*/
|
|
||||||
|
/** 是否启用 */
|
||||||
private String is_used;
|
private String is_used;
|
||||||
|
|
||||||
/**
|
/** 是否删除 */
|
||||||
* 是否删除
|
|
||||||
*/
|
|
||||||
private String is_delete;
|
private String is_delete;
|
||||||
|
|
||||||
/**
|
/** 创建人 */
|
||||||
* 创建人
|
|
||||||
*/
|
|
||||||
private Long create_id;
|
private Long create_id;
|
||||||
|
|
||||||
/**
|
/** 创建人 */
|
||||||
* 创建人姓名
|
|
||||||
*/
|
|
||||||
private String create_name;
|
private String create_name;
|
||||||
|
|
||||||
/**
|
/** 创建时间 */
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private String create_time;
|
private String create_time;
|
||||||
|
|
||||||
/**
|
/** 修改人 */
|
||||||
* 修改人
|
|
||||||
*/
|
|
||||||
private Long update_optid;
|
private Long update_optid;
|
||||||
|
|
||||||
/**
|
/** 修改人 */
|
||||||
* 修改人姓名
|
|
||||||
*/
|
|
||||||
private String update_optname;
|
private String update_optname;
|
||||||
|
|
||||||
/**
|
/** 修改时间 */
|
||||||
* 修改时间
|
|
||||||
*/
|
|
||||||
private String update_time;
|
private String update_time;
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备点位类型
|
|
||||||
*/
|
|
||||||
private String device_point_type;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ import org.nl.modules.wql.WQL;
|
|||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
|
import org.nl.wms.sch.service.RegionService;
|
||||||
import org.nl.wms.sch.service.dto.PointDto;
|
import org.nl.wms.sch.service.dto.PointDto;
|
||||||
|
import org.nl.wms.sch.service.dto.RegionDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -34,6 +36,9 @@ import java.util.Map;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class PointServiceImpl implements PointService {
|
public class PointServiceImpl implements PointService {
|
||||||
|
|
||||||
|
private final RegionService regionService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
@@ -46,6 +51,39 @@ public class PointServiceImpl implements PointService {
|
|||||||
map.put("point_type", whereJson.get("point_type"));
|
map.put("point_type", whereJson.get("point_type"));
|
||||||
map.put("name", whereJson.get("name"));
|
map.put("name", whereJson.get("name"));
|
||||||
JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc");
|
JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc");
|
||||||
|
JSONArray content = json.getJSONArray("content");
|
||||||
|
JSONArray res = new JSONArray();
|
||||||
|
for (int i = 0; i < content.size(); i++) {
|
||||||
|
JSONObject object = content.getJSONObject(i);
|
||||||
|
Long region_id = object.getLong("region_id");
|
||||||
|
String point_status = object.getString("point_status");
|
||||||
|
String point_type = object.getString("point_type");
|
||||||
|
RegionDto regionDto = regionService.findById(region_id);
|
||||||
|
String point_status_explain = regionDto.getPoint_status_explain();
|
||||||
|
String point_type_explain = regionDto.getPoint_type_explain();
|
||||||
|
// 获取点位状态名称
|
||||||
|
if (!ObjectUtil.isEmpty(point_status)) {
|
||||||
|
JSONObject statusArr = new JSONObject();
|
||||||
|
String[] split = point_status_explain.split(",");
|
||||||
|
for ( int j = 0; j < split.length; j++) {
|
||||||
|
String[] status = split[j].split("-");
|
||||||
|
statusArr.put(status[0], status[1]);
|
||||||
|
}
|
||||||
|
object.put("point_status_name", statusArr.getString(point_status));
|
||||||
|
}
|
||||||
|
// 获取点位类型
|
||||||
|
if (!ObjectUtil.isEmpty(point_type)) {
|
||||||
|
JSONObject typeArr = new JSONObject();
|
||||||
|
String[] split = point_type_explain.split(",");
|
||||||
|
for ( int j = 0; j < split.length; j++) {
|
||||||
|
String[] types = split[j].split("-");
|
||||||
|
typeArr.put(types[0], types[1]);
|
||||||
|
}
|
||||||
|
object.put("point_status_name", typeArr.getString(point_type));
|
||||||
|
}
|
||||||
|
res.add(object);
|
||||||
|
}
|
||||||
|
json.put("content", res);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,6 +129,9 @@ public class PointServiceImpl implements PointService {
|
|||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
RegionDto regionDto = regionService.findById(dto.getRegion_id());
|
||||||
|
dto.setRegion_code(regionDto.getRegion_code());
|
||||||
|
dto.setRegion_name(regionDto.getRegion_name());
|
||||||
dto.setPoint_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setPoint_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setCreate_id(currentUserId);
|
dto.setCreate_id(currentUserId);
|
||||||
dto.setCreate_name(nickName);
|
dto.setCreate_name(nickName);
|
||||||
@@ -212,7 +253,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getRegion() {
|
public JSONArray getRegion() {
|
||||||
JSONArray resultJSONArray = WQLObject.getWQLObject("SCH_BASE_Region").query("is_used = '1'").getResultJSONArray(0);
|
JSONArray resultJSONArray = WQLObject.getWQLObject("SCH_BASE_Region").query().getResultJSONArray(0);
|
||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
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;
|
||||||
@@ -129,4 +130,55 @@ public class RegionServiceImpl implements RegionService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取点位状态下拉框
|
||||||
|
*
|
||||||
|
* @param region_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JSONArray getPointStatusSelectById(Long region_id) {
|
||||||
|
/**
|
||||||
|
* label,value
|
||||||
|
*/
|
||||||
|
JSONArray res = new JSONArray();
|
||||||
|
String point_status_explain = findById(region_id).getPoint_status_explain();
|
||||||
|
if (ObjectUtil.isEmpty(point_status_explain)) return res;
|
||||||
|
String[] explain = point_status_explain.split(",");
|
||||||
|
for (int i = 0; i < explain.length; i++) {
|
||||||
|
String[] status = explain[i].split("-");
|
||||||
|
JSONObject point_status = new JSONObject();
|
||||||
|
point_status.put("label", status[1]);
|
||||||
|
point_status.put("value", status[0]);
|
||||||
|
res.add(point_status);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取点位类型下拉框
|
||||||
|
*
|
||||||
|
* @param region_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JSONArray getPointTypeSelectById(Long region_id) {
|
||||||
|
/**
|
||||||
|
* label,value
|
||||||
|
*/
|
||||||
|
JSONArray res = new JSONArray();
|
||||||
|
String point_type_explain = findById(region_id).getPoint_type_explain();
|
||||||
|
if (ObjectUtil.isEmpty(point_type_explain)) return res;
|
||||||
|
String[] explain = point_type_explain.split(",");
|
||||||
|
for (int i = 0; i < explain.length; i++) {
|
||||||
|
String[] types = explain[i].split("-");
|
||||||
|
JSONObject point_type = new JSONObject();
|
||||||
|
point_type.put("label", types[1]);
|
||||||
|
point_type.put("value", types[0]);
|
||||||
|
res.add(point_type);
|
||||||
|
res.add(point_type);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class CallEmpVehicleTask extends AbstractAcsTask {
|
|||||||
int vehicle_qty = JSONObject.parseObject(JSON.toJSONString(point_code1)).getIntValue("vehicle_qty");
|
int vehicle_qty = JSONObject.parseObject(JSON.toJSONString(point_code1)).getIntValue("vehicle_qty");
|
||||||
BigDecimal vehicle_qty_point = NumberUtil.sub(String.valueOf(vehicle_qty), String.valueOf(1));
|
BigDecimal vehicle_qty_point = NumberUtil.sub(String.valueOf(vehicle_qty), String.valueOf(1));
|
||||||
|
|
||||||
point_code1.setVehicle_qty(Integer.valueOf(vehicle_qty_point.toString()));
|
point_code1.setVehicle_qty(vehicle_qty_point);
|
||||||
if (StrUtil.equals(vehicle_qty_point.toString(), "0")) {
|
if (StrUtil.equals(vehicle_qty_point.toString(), "0")) {
|
||||||
point_code1.setPoint_status("00");
|
point_code1.setPoint_status("00");
|
||||||
point_code1.setVehicle_type("");
|
point_code1.setVehicle_type("");
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class SendEmpVehicleTask extends AbstractAcsTask {
|
|||||||
int vehicle_qty = JSONObject.parseObject(JSON.toJSONString(nextDto)).getIntValue("vehicle_qty");
|
int vehicle_qty = JSONObject.parseObject(JSON.toJSONString(nextDto)).getIntValue("vehicle_qty");
|
||||||
BigDecimal vehicle_qty_point = NumberUtil.add(String.valueOf(vehicle_qty), String.valueOf(jsonEmp.getIntValue("vehicle_qty")));
|
BigDecimal vehicle_qty_point = NumberUtil.add(String.valueOf(vehicle_qty), String.valueOf(jsonEmp.getIntValue("vehicle_qty")));
|
||||||
|
|
||||||
nextDto.setVehicle_qty(Integer.valueOf(vehicle_qty_point.toString()));
|
nextDto.setVehicle_qty(vehicle_qty_point);
|
||||||
nextDto.setPoint_status("01");
|
nextDto.setPoint_status("01");
|
||||||
nextDto.setLock_type("00");
|
nextDto.setLock_type("00");
|
||||||
nextDto.setVehicle_type(jsonTask.getString("vehicle_type"));
|
nextDto.setVehicle_type(jsonTask.getString("vehicle_type"));
|
||||||
|
|||||||
@@ -48,42 +48,12 @@
|
|||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
point.point_id,
|
point.*,
|
||||||
point.point_code,
|
d3.label as lock_type_name
|
||||||
point.point_name,
|
|
||||||
point.region_id,
|
|
||||||
region.region_name,
|
|
||||||
point.point_type,
|
|
||||||
point.point_status,
|
|
||||||
point.lock_type,
|
|
||||||
d1.label as point_type_name,
|
|
||||||
d4.label as point_status_name,
|
|
||||||
d3.label as lock_type_name,
|
|
||||||
point.vehicle_code,
|
|
||||||
point.source_id,
|
|
||||||
point.remark,
|
|
||||||
point.taskdtl_type,
|
|
||||||
point.taskdtl_id,
|
|
||||||
point.task_code,
|
|
||||||
point.inv_type,
|
|
||||||
point.inv_id,
|
|
||||||
point.inv_code,
|
|
||||||
point.is_used,
|
|
||||||
point.is_delete,
|
|
||||||
point.vehicle_qty,
|
|
||||||
point.create_name,
|
|
||||||
point.create_time,
|
|
||||||
point.update_optname,
|
|
||||||
point.update_time,
|
|
||||||
point.vehicle_type,
|
|
||||||
point.is_host,
|
|
||||||
point.device_point_type
|
|
||||||
FROM
|
FROM
|
||||||
sch_base_point point
|
sch_base_point point
|
||||||
LEFT JOIN SCH_BASE_Region region ON point.region_id = region.region_id
|
LEFT JOIN SCH_BASE_Region region ON point.region_id = region.region_id
|
||||||
LEFT JOIN sys_dict_detail d1 ON point.point_type = d1.value and d1.name='sch_point_type'
|
|
||||||
LEFT JOIN sys_dict_detail d3 ON point.lock_type = d3.value and d3.name='d_lock_type'
|
LEFT JOIN sys_dict_detail d3 ON point.lock_type = d3.value and d3.name='d_lock_type'
|
||||||
LEFT JOIN sys_dict_detail d4 ON point.point_status = d4.value and d4.name='sch_point_status'
|
|
||||||
WHERE
|
WHERE
|
||||||
point.is_delete = '0'
|
point.is_delete = '0'
|
||||||
OPTION 输入.region_id <> ""
|
OPTION 输入.region_id <> ""
|
||||||
|
|||||||
@@ -32,4 +32,20 @@ export function changeActive(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, changeActive }
|
export function getPointStatusSelectById(id) {
|
||||||
|
return request({
|
||||||
|
url: 'api/region/getPointStatusSelectById',
|
||||||
|
method: 'post',
|
||||||
|
data: id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPointTypeSelectById(id) {
|
||||||
|
return request({
|
||||||
|
url: 'api/region/getPointTypeSelectById',
|
||||||
|
method: 'post',
|
||||||
|
data: id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, changeActive, getPointStatusSelectById, getPointTypeSelectById }
|
||||||
|
|||||||
@@ -123,6 +123,20 @@
|
|||||||
<el-form-item v-if="false" label="点位标识" prop="point_id">
|
<el-form-item v-if="false" label="点位标识" prop="point_id">
|
||||||
<el-input v-model="form.point_id" style="width: 370px;" />
|
<el-input v-model="form.point_id" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所属区域" prop="region_id">
|
||||||
|
<el-select
|
||||||
|
v-model="form.region_id"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 370px;"
|
||||||
|
@change="getPointStatusAndTypeList"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in reginoList"
|
||||||
|
:label="item.region_name"
|
||||||
|
:value="item.region_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="点位编码" prop="point_code">
|
<el-form-item label="点位编码" prop="point_code">
|
||||||
<el-input v-model="form.point_code" style="width: 370px;" :disabled="this.form.point_type==='01'" />
|
<el-input v-model="form.point_code" style="width: 370px;" :disabled="this.form.point_type==='01'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -136,9 +150,10 @@
|
|||||||
placeholder="点位状态"
|
placeholder="点位状态"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 370px;"
|
style="width: 370px;"
|
||||||
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.sch_point_status"
|
v-for="item in pointStatusList"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -159,16 +174,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备点位类型" prop="device_point_type">
|
<el-form-item label="点位类型" prop="device_point_type">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.device_point_type"
|
v-model="form.point_type"
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="设备点位类型"
|
placeholder="设备点位类型"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 370px;"
|
style="width: 370px;"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.device_point_type"
|
v-for="item in pointTypesList"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -177,37 +192,6 @@
|
|||||||
<el-form-item label="载具编码" prop="vehicle_code">
|
<el-form-item label="载具编码" prop="vehicle_code">
|
||||||
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
|
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否专机" prop="is_host">
|
|
||||||
<el-radio-group v-model="form.is_host">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_HOST"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="点位类型" prop="point_type">
|
|
||||||
<el-radio-group v-model="form.point_type">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.sch_point_type"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属区域" prop="region_id">
|
|
||||||
<el-select
|
|
||||||
v-model="form.region_id"
|
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 370px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in reginoList"
|
|
||||||
:label="item.region_name"
|
|
||||||
:value="item.region_id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
||||||
@@ -230,33 +214,20 @@
|
|||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="point_code" label="点位编码" sortable width="100" />
|
<el-table-column prop="point_code" label="点位编码" sortable width="100" />
|
||||||
<el-table-column prop="point_name" label="点位名称" width="120" sortable show-overflow-tooltip />
|
<el-table-column prop="point_name" label="点位名称" width="120" sortable show-overflow-tooltip />
|
||||||
|
<el-table-column prop="region_name" label="区域名称" />
|
||||||
<el-table-column prop="point_type_name" label="点位类型" />
|
<el-table-column prop="point_type_name" label="点位类型" />
|
||||||
<el-table-column prop="point_status_name" label="点位状态" />
|
<el-table-column prop="point_status_name" label="点位状态" />
|
||||||
<el-table-column prop="lock_type_name" label="锁定类型" />
|
<el-table-column prop="lock_type_name" label="锁定类型" />
|
||||||
<el-table-column prop="region_name" label="所属区域" width="110" />
|
<el-table-column prop="vehicle_type" label="载具类型" />
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-switch
|
|
||||||
:value="format_is_used(scope.row.is_used)"
|
|
||||||
active-color="#409EFF"
|
|
||||||
inactive-color="#F56C6C"
|
|
||||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="vehicle_type" label="托盘类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="vehicle_qty" label="载具数量" />
|
<el-table-column prop="vehicle_qty" label="载具数量" />
|
||||||
<el-table-column prop="vehicle_type" label="是否专机">
|
<el-table-column prop="remark" label="备注" />
|
||||||
|
<el-table-column prop="is_used" label="是否启用" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.IS_HOST[scope.row.is_host] }}
|
{{ scope.row.is_used=='1' ? '是' : '否' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="update_optname" label="修改者" />
|
<el-table-column prop="update_optname" label="修改人" />
|
||||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="[]"
|
v-permission="[]"
|
||||||
@@ -280,6 +251,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudRegion from '@/api/wms/sch/region'
|
||||||
import crudPoint, { changeActive } from '@/api/wms/sch/point'
|
import crudPoint, { changeActive } from '@/api/wms/sch/point'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
@@ -288,7 +260,7 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
/* import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'*/
|
/* import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'*/
|
||||||
|
|
||||||
const defaultForm = { device_point_type: null, point_id: null, is_host: null, point_code: null, point_name: null, area_type: null, point_type: '00', point_status: '00', lock_type: '00', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
const defaultForm = { point_id: null, is_host: null, point_code: null, point_name: null, area_type: null, point_type: null, point_status: null, lock_type: '00', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Point',
|
name: 'Point',
|
||||||
dicts: ['sch_point_type', 'sch_area_type', 'sch_point_status', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'vehicle_type', 'IS_HOST', 'device_point_type'],
|
dicts: ['sch_point_type', 'sch_area_type', 'sch_point_status', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'vehicle_type', 'IS_HOST', 'device_point_type'],
|
||||||
@@ -315,6 +287,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
invtypelist: [],
|
invtypelist: [],
|
||||||
|
pointStatusList: [],
|
||||||
|
pointTypesList: [],
|
||||||
options: [],
|
options: [],
|
||||||
reginoList: [],
|
reginoList: [],
|
||||||
permission: {},
|
permission: {},
|
||||||
@@ -331,14 +305,8 @@ export default {
|
|||||||
region_id: [
|
region_id: [
|
||||||
{ required: true, message: '区域类型不能为空', trigger: 'blur' }
|
{ required: true, message: '区域类型不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
point_status: [
|
|
||||||
{ required: true, message: '点位状态不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
lock_type: [
|
lock_type: [
|
||||||
{ required: true, message: '锁定类型不能为空', trigger: 'blur' }
|
{ required: true, message: '锁定类型不能为空', trigger: 'blur' }
|
||||||
],
|
|
||||||
is_host: [
|
|
||||||
{ required: true, message: '是否专机不能为空', trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -388,6 +356,20 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getPointStatusAndTypeList(id) {
|
||||||
|
this.getPointStatusList(id)
|
||||||
|
this.getPointTypeList(id)
|
||||||
|
},
|
||||||
|
getPointStatusList(id) {
|
||||||
|
crudRegion.getPointStatusSelectById(id).then(res => {
|
||||||
|
this.pointStatusList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPointTypeList(id) {
|
||||||
|
crudRegion.getPointTypeSelectById(id).then(res => {
|
||||||
|
this.pointTypesList = res
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user