代码更新
This commit is contained in:
@@ -100,4 +100,6 @@ public class MaterialbaseDto implements Serializable {
|
||||
private Long ass_unit_id;
|
||||
|
||||
private Long product_series;
|
||||
|
||||
private Integer standing_time;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||
|
||||
String storagevehicle_code_begin = (String) whereJson.get("storagevehicle_code_begin");
|
||||
String storagevehicle_code_end = (String) whereJson.get("storagevehicle_code_end");
|
||||
String storagevehicle_type = (String) whereJson.get("storagevehicle_type");
|
||||
@@ -51,6 +53,19 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
map.put("storagevehicle_type", storagevehicle_type);
|
||||
map.put("flag", "1");
|
||||
JSONObject json = WQL.getWO("QMD_PB_STORAGEVEHICLEINFO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "s.storagevehicle_code ASC");
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
JSONObject jsonTask = taskTab.query("vehicle_code = '" + jsonObject.getString("storagevehicle_code") + "' and task_status <> '99' and is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonTask)) {
|
||||
jsonObject.put("start_point_code", jsonTask.getString("start_point_code"));
|
||||
jsonObject.put("next_point_code", jsonTask.getString("next_point_code"));
|
||||
jsonObject.put("is_task", "1");
|
||||
jsonObject.put("point_code", "");
|
||||
} else {
|
||||
jsonObject.put("is_task", "0");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,17 @@
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
s.*,
|
||||
d.label AS storagevehicle_type_name
|
||||
d.label AS storagevehicle_type_name,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
point.point_code,
|
||||
point.point_name
|
||||
FROM
|
||||
md_pb_storagevehicleinfo s
|
||||
left JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32'
|
||||
LEFT JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32'
|
||||
LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code
|
||||
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
|
||||
WHERE
|
||||
s.is_delete = '0'
|
||||
ENDOPTION
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -87,8 +87,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||
Long deptId = currentUser.getUser().getDept().getId();
|
||||
|
||||
dto.setWorkprocedure_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setCreate_id(currentUserId);
|
||||
@@ -97,8 +95,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setSyscompanyid(deptId);
|
||||
dto.setSysdeptid(deptId);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -159,7 +155,7 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
public List<WorkprocedureDto> queryWorkprocedure() {
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||
//只查清洗 跟仓储
|
||||
JSONArray arr = wo.query(" is_delete = '0' and workprocedure_code in ('12','08')").getResultJSONArray(0);
|
||||
JSONArray arr = wo.query(" is_delete = '0' and is_used = '1'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(WorkprocedureDto.class);
|
||||
return null;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ import org.nl.exception.BadRequestException;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wms.st.in.WorkProcedureEnum;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.util.WqlUtil;
|
||||
@@ -229,33 +230,23 @@ public class PointServiceImpl implements PointService {
|
||||
@Override
|
||||
public Map<String, Object> getEndPoint(Map whereJson, Pageable page) {
|
||||
String search = MapUtil.getStr(whereJson, "search");
|
||||
//String material_id = MapUtil.getStr(whereJson, "material_id");
|
||||
String area_type = MapUtil.getStr(whereJson, "area_type");
|
||||
String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
|
||||
String qty = MapUtil.getStr(whereJson, "qty");
|
||||
String loadSeries = "4";
|
||||
//根据重量去找最小的级数在哪个范围
|
||||
if (StrUtil.isNotEmpty(qty) && Double.valueOf(qty) > 0) {
|
||||
loadSeries = this.getLoadSeriesByqty(Double.valueOf(qty));
|
||||
}
|
||||
String workprocedure_id = MapUtil.getStr(whereJson, "workprocedure_id");
|
||||
|
||||
|
||||
WQLObject wo_vehicle = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
||||
String vehicle_type = "";
|
||||
if (StrUtil.isNotEmpty(vehicle_code)) {
|
||||
JSONObject jsonObject = wo_vehicle.query("is_delete = '0' and storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
vehicle_type = jsonObject.getString("storagevehicle_type");
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
|
||||
if (StrUtil.equals(workprocedure_id, WorkProcedureEnum.GJGX.getId())) {
|
||||
map.put("point_code", "YSZCW%");
|
||||
}
|
||||
|
||||
if (StrUtil.equals(workprocedure_id, WorkProcedureEnum.HKGX.getId())) {
|
||||
map.put("point_code", "CPZCW%");
|
||||
}
|
||||
|
||||
map.put("flag", "3");
|
||||
map.put("area_type", area_type);
|
||||
map.put("vehicle_type", vehicle_type);
|
||||
map.put("loadSeries", loadSeries);
|
||||
//map.put("material_id",material_id);
|
||||
if (ObjectUtil.isNotEmpty(search)) {
|
||||
map.put("search", "%" + search + "%");
|
||||
}
|
||||
JSONObject json = WQL.getWO("SCH_Point_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "struct_code");
|
||||
JSONObject json = WQL.getWO("SCH_Point_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point.point_code");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
输入.flag TYPEAS s_string
|
||||
输入.search TYPEAS s_string
|
||||
输入.point_type TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.area_type TYPEAS s_string
|
||||
输入.point_status TYPEAS s_string
|
||||
输入.lock_type TYPEAS s_string
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.vehicle_type TYPEAS s_string
|
||||
输入.loadSeries TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -93,32 +93,27 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
structattr.struct_id,
|
||||
structattr.struct_code,
|
||||
structattr.struct_name,
|
||||
point.area_type,
|
||||
point.point_type
|
||||
FROM
|
||||
st_ivt_structattr structattr
|
||||
LEFT JOIN sch_base_point point ON point.point_id = structattr.struct_id
|
||||
LEFT JOIN ST_IVT_StructRelaVehicleType rulevehicle ON rulevehicle.struct_id = structattr.struct_id
|
||||
LEFT JOIN ST_IVT_StructAttributeRules ruledis ON ruledis.struct_id = structattr.struct_id
|
||||
WHERE
|
||||
point.lock_type = '00'
|
||||
AND (point.vehicle_code = '' or point.vehicle_code is null)
|
||||
AND point.point_status = '00'
|
||||
AND point.area_type = 输入.area_type
|
||||
AND rulevehicle.vehicle_type = 输入.vehicle_type
|
||||
OPTION 输入.search <> ""
|
||||
(structattr.struct_code like 输入.search or
|
||||
structattr.struct_name like 输入.search)
|
||||
ENDOPTION
|
||||
OPTION 输入.loadSeries <> ""
|
||||
ruledis.load_series >= 输入.loadSeries
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
point.*
|
||||
FROM
|
||||
sch_base_point point
|
||||
WHERE
|
||||
point.lock_type = '00'
|
||||
AND point.is_used = '1'
|
||||
AND point.is_delete = '0'
|
||||
AND point.area_type = 'ZCQ01'
|
||||
|
||||
OPTION 输入.search <> ""
|
||||
(point.point_code like 输入.search or
|
||||
point.point_name like 输入.search)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.point_code <> ""
|
||||
point.point_code like 输入.point_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@ import cn.hutool.core.util.StrUtil;
|
||||
*/
|
||||
public enum WorkProcedureEnum {
|
||||
|
||||
BZGX(1, "1535144822984282112", "01", "包装工序", ""),
|
||||
QXGX(2, "1535144552481034240", "02", "清洗工序", ""),
|
||||
CCGX(2, "1535144934791843840", "02", "仓储工序", "");
|
||||
GJGX(1, "1556829396462080000", "01", "共挤工序", ""),
|
||||
HKGX(2, "1556829712439971840", "02", "豪凯工序", "");
|
||||
//顺序号
|
||||
private int index;
|
||||
//工序标识
|
||||
|
||||
@@ -114,4 +114,11 @@ public class WorkprocedureiosController {
|
||||
return new ResponseEntity<>(workprocedureiosService.getEndAareaByworkprocedureId(param.getString("workprocedure_id")),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getWorkProce")
|
||||
@Log("跟据单据类型获取工序")
|
||||
@ApiOperation("跟据单据类型获取工序")
|
||||
public ResponseEntity<Object> getWorkProce(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(workprocedureiosService.getWorkProce(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,4 +100,6 @@ public interface WorkprocedureiosService {
|
||||
* 根据工序获取终点区域
|
||||
*/
|
||||
Map<String,Object> getEndAareaByworkprocedureId(String workprocedure_id);
|
||||
|
||||
JSONObject getWorkProce(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -90,6 +91,17 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(WorkprocedureiosDto dto) {
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
WQLObject vehicleTab = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + dto.getMaterial_id() + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(dto.getVehicle_code())) {
|
||||
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + dto.getVehicle_code() + "' and is_delete = '0' and is_used= '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在");
|
||||
}
|
||||
}
|
||||
|
||||
String bill_code = CodeUtil.getNewCode("IN_STORE_CODE");
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
@@ -98,25 +110,6 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
dto.setBill_code(bill_code);
|
||||
dto.setIo_type("0");
|
||||
dto.setBill_status("10");
|
||||
|
||||
Map<String, Object> endMap = this.getEndAareaByworkprocedureId(dto.getWorkprocedure_id().toString());
|
||||
String end_area = dto.getEnd_area();
|
||||
if (StrUtil.isEmpty(end_area)) {
|
||||
String endArea = MapUtil.getStr(endMap, "end_area");
|
||||
if (StrUtil.isEmpty(endArea)) {
|
||||
throw new BadRequestException("终点区域为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
dto.setEnd_area(endArea);
|
||||
}
|
||||
Long qty_unit_id = dto.getQty_unit_id();
|
||||
if (ObjectUtil.isNull(qty_unit_id)) {
|
||||
String unit_id = MapUtil.getStr(endMap, "qty_unit_id");
|
||||
if (StrUtil.isEmpty(unit_id)) {
|
||||
throw new BadRequestException("数量单位为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
qty_unit_id = Long.valueOf(unit_id);
|
||||
dto.setQty_unit_id(qty_unit_id);
|
||||
}
|
||||
dto.setCreate_mode("01");
|
||||
dto.setCreate_id(currentUserId);
|
||||
dto.setCreate_name(nickName);
|
||||
@@ -124,6 +117,7 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setQty_unit_id(jsonMater.getLongValue("base_unit_id"));
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -136,33 +130,25 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
WorkprocedureiosDto entity = this.findById(dto.getIostorinv_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
WQLObject vehicleTab = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + dto.getMaterial_id() + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(dto.getVehicle_code())) {
|
||||
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + dto.getVehicle_code() + "' and is_delete = '0' and is_used= '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在");
|
||||
}
|
||||
}
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
dto.setBill_status("10");
|
||||
|
||||
Map<String, Object> endMap = this.getEndAareaByworkprocedureId(dto.getWorkprocedure_id().toString());
|
||||
String end_area = dto.getEnd_area();
|
||||
if (StrUtil.isEmpty(end_area)) {
|
||||
String endArea = MapUtil.getStr(endMap, "end_area");
|
||||
if (StrUtil.isEmpty(endArea)) {
|
||||
throw new BadRequestException("终点区域为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
dto.setEnd_area(endArea);
|
||||
}
|
||||
Long qty_unit_id = dto.getQty_unit_id();
|
||||
if (ObjectUtil.isNull(qty_unit_id)) {
|
||||
String unit_id = MapUtil.getStr(endMap, "qty_unit_id");
|
||||
if (StrUtil.isEmpty(unit_id)) {
|
||||
throw new BadRequestException("数量单位为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
qty_unit_id = Long.valueOf(unit_id);
|
||||
dto.setQty_unit_id(qty_unit_id);
|
||||
}
|
||||
|
||||
dto.setUpdate_time(now);
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setQty_unit_id(jsonMater.getLongValue("base_unit_id"));
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -196,35 +182,19 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
|
||||
@Override
|
||||
public JSONArray selectStartPoint(String workprocedureid) {
|
||||
/* WQLObject woDevice = WQLObject.getWQLObject("pdm_base_device");*/
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
WQLObject woPoint = WQLObject.getWQLObject("sch_base_point");
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'CPRKW%'").getResultJSONArray(0);
|
||||
// 共挤工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.GJGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'GJX%'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'CPRKW%'").getResultJSONArray(0);
|
||||
// 豪凯工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.HKGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'HK%'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//清洗工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
JSONArray arrDevice = woDevice.query("is_delete = '0' and workprocedure_id = '" + workprocedureid + "'", "device_code").getResultJSONArray(0);
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
for (int i = 0; i < arrDevice.size(); i++) {
|
||||
JSONObject jsonDevice = arrDevice.getJSONObject(i);
|
||||
JSONArray arrPoints = woPoint.query("is_delete = '0' and device_point_type = '02' and device_id = '" + jsonDevice.getString("device_id") + "'", "point_code").getResultJSONArray(0);
|
||||
for (int j = 0; j < arrPoints.size(); j++) {
|
||||
JSONObject jsonPoint = arrPoints.getJSONObject(j);
|
||||
arrPoint.add(jsonPoint);
|
||||
}
|
||||
}*/
|
||||
return arrPoint;
|
||||
}
|
||||
|
||||
@@ -294,33 +264,47 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
String endArea = "";
|
||||
String qty_unit_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
//包装工序
|
||||
case CCGX:
|
||||
endArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
|
||||
//包装工序
|
||||
case BZGX:
|
||||
endArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
// 清洗工序
|
||||
case QXGX:
|
||||
endArea = AreaEnum.BCPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
default:
|
||||
endArea = null;
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// //包装工序
|
||||
// case CCGX:
|
||||
// endArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
//
|
||||
// //包装工序
|
||||
// case BZGX:
|
||||
// endArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
// // 清洗工序
|
||||
// case QXGX:
|
||||
// endArea = AreaEnum.BCPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
// default:
|
||||
// endArea = null;
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("end_area", endArea);
|
||||
map.put("qty_unit_id", qty_unit_id);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getWorkProce(JSONObject param) {
|
||||
String type = param.getString("type");
|
||||
|
||||
WQLObject tab = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||
|
||||
String workprocedure = "";
|
||||
if (StrUtil.equals(type, "001001")) workprocedure = "HK01";
|
||||
if (StrUtil.equals(type, "001002")) workprocedure = "GJ001";
|
||||
|
||||
JSONObject json = tab.query("workprocedure_code = '" + workprocedure + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -199,19 +199,19 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
/*WQLObject woDevice = WQLObject.getWQLObject("pdm_base_device");*/
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
WQLObject woPoint = WQLObject.getWQLObject("sch_base_point");
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//清洗工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
|
||||
}
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
// arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
// return arrPoint;
|
||||
// }
|
||||
// //包装工序
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
// arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
// return arrPoint;
|
||||
// }
|
||||
// //清洗工序
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
//
|
||||
// }
|
||||
/* for (int i = 0; i < arrDevice.size(); i++) {
|
||||
JSONObject jsonDevice = arrDevice.getJSONObject(i);
|
||||
JSONArray arrPoints = woPoint.query("is_delete = '0' and device_point_type = '01' and device_id = '" + jsonDevice.getString("device_id") + "'").getResultJSONArray(0);
|
||||
@@ -305,27 +305,27 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
String qty_unit_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
//包装工序
|
||||
case CCGX:
|
||||
startArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
break;
|
||||
//包装工序
|
||||
case BZGX:
|
||||
startArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
// 清洗工序
|
||||
case QXGX:
|
||||
startArea = AreaEnum.BCPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
break;
|
||||
default:
|
||||
startArea = null;
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// //包装工序
|
||||
// case CCGX:
|
||||
// startArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
// break;
|
||||
// //包装工序
|
||||
// case BZGX:
|
||||
// startArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// // 清洗工序
|
||||
// case QXGX:
|
||||
// startArea = AreaEnum.BCPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
// break;
|
||||
// default:
|
||||
// startArea = null;
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("start_area", startArea);
|
||||
map.put("qty_unit_id", qty_unit_id);
|
||||
@@ -346,14 +346,14 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
String ivt_workprocedure_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(param.getString("workprocedureid"));
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
case BZGX:
|
||||
ivt_workprocedure_id = WorkProcedureEnum.BZGX.getId();
|
||||
break;
|
||||
case QXGX:
|
||||
ivt_workprocedure_id = WorkProcedureEnum.QXGX.getId();
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// case BZGX:
|
||||
// ivt_workprocedure_id = WorkProcedureEnum.BZGX.getId();
|
||||
// break;
|
||||
// case QXGX:
|
||||
// ivt_workprocedure_id = WorkProcedureEnum.QXGX.getId();
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("ivt_workprocedure_id", ivt_workprocedure_id);
|
||||
return map;
|
||||
|
||||
@@ -70,4 +70,12 @@ export function getEndAareaByworkprocedureId(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getBillTypes, selectStartPoint, getStartArea, getEndArea, genTask, getEndAareaByworkprocedureId }
|
||||
|
||||
export function getWorkProce(data) {
|
||||
return request({
|
||||
url: 'api/workprocedureiosIn/getWorkProce',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getBillTypes, selectStartPoint, getStartArea, getEndArea, genTask, getEndAareaByworkprocedureId, getWorkProce }
|
||||
|
||||
@@ -113,7 +113,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="静置时间" prop="standing_time">
|
||||
<el-input-number v-model="form.standing_time" :controls="false" :min="0" label="分钟" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_used" label="1">是</el-radio>
|
||||
@@ -141,6 +146,7 @@
|
||||
<el-table-column prop="material_model" label="物料型号" />
|
||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
<el-table-column prop="standing_time" label="静置时间(分钟)" width="130px"/>
|
||||
<el-table-column prop="product_series_name" label="系列" />
|
||||
<el-table-column label="启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -125,6 +125,12 @@
|
||||
<el-table-column prop="storagevehicle_type_name" label="载具类型" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具编码" />
|
||||
<el-table-column prop="storagevehicle_name" label="载具名称" />
|
||||
<el-table-column prop="is_task" label="是否搬运中" :formatter="formatIsTask"/>
|
||||
<el-table-column prop="point_code" label="当前点位" width="120px"/>
|
||||
<el-table-column prop="start_point_code" label="起点" width="120px"/>
|
||||
<el-table-column prop="next_point_code" label="终点" width="120px"/>
|
||||
<el-table-column prop="material_code" label="物料编码" />
|
||||
<el-table-column prop="material_name" label="物料名称" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -136,11 +142,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
||||
<el-table-column
|
||||
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
||||
label="操作"
|
||||
width="50px"
|
||||
width="100px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -343,6 +349,13 @@ export default {
|
||||
crudStoragevehicleinfo.getVehicle(code).then(res => {
|
||||
this.form.storagevehicle_code = res.value
|
||||
})
|
||||
},
|
||||
formatIsTask(row) {
|
||||
if (row.is_task === '1') {
|
||||
return '是'
|
||||
} else {
|
||||
return '否'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,52 +32,6 @@
|
||||
<el-form-item label="工序名称" prop="workprocedure_name">
|
||||
<el-input v-model="form.workprocedure_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对应工段" prop="worksection_type_scode">
|
||||
<el-select
|
||||
v-model="form.worksection_type_scode"
|
||||
placeholder=""
|
||||
style="width: 370px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PDM_BI_SECTION"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分段计算类型" prop="burst_type_scode">
|
||||
<el-select
|
||||
v-model="form.burst_type_scode"
|
||||
placeholder=""
|
||||
style="width: 370px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PDM_BI_BURSTTYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关键工序" prop="is_keyworkprocedure">
|
||||
<el-switch
|
||||
v-model="form.is_keyworkprocedure"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否首道工序" prop="is_first">
|
||||
<el-switch
|
||||
v-model="form.is_first"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-switch
|
||||
v-model="form.is_used"
|
||||
@@ -109,18 +63,6 @@
|
||||
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识" />
|
||||
<el-table-column prop="workprocedure_code" sortable label="工序编码" />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="worksection_type_scode" label="对应工段">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PDM_BI_SECTION[scope.row.worksection_type_scode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="burst_type_scode" label="分段计算类型" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PDM_BI_BURSTTYPE[scope.row.burst_type_scode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="is_keyworkprocedure" label="是否关键工序" width="110" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="is_first" label="是否首道工序" width="110" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="is_used" label="是否启用" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="请选择终点点位"
|
||||
title="请选择暂存点位"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
@@ -39,8 +39,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="struct_code" label="终点点位编码" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_name" label="终点点位名称" show-overflow-tooltip />
|
||||
<el-table-column prop="point_code" label="终点点位编码" show-overflow-tooltip />
|
||||
<el-table-column prop="point_name" label="终点点位名称" show-overflow-tooltip />
|
||||
<el-table-column prop="area_type" label="所属区域" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_area_type[scope.row.area_type] }}
|
||||
@@ -106,7 +106,6 @@ export default {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.material = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -121,11 +120,8 @@ export default {
|
||||
},
|
||||
open() {
|
||||
console.log(this.openParam)
|
||||
debugger
|
||||
this.query.material_id = this.openParam.material_id
|
||||
this.query.area_type = this.openParam.area_type
|
||||
this.query.vehicle_code = this.openParam.vehicle_code
|
||||
this.query.qty = this.openParam.qty
|
||||
// this.query.area_type = 'ZCQ01'
|
||||
this.query.workprocedure_id = this.openParam.workprocedure_id
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
v-model="form.bill_type"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
@change="getWorkProce"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bill_types"
|
||||
@@ -62,7 +63,8 @@
|
||||
v-model="form.workprocedure_id"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
@change="selectStartPoint(form.workprocedure_id)"
|
||||
@change="selectStartPoint"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workprocedures"
|
||||
@@ -92,7 +94,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<label slot="label">数 量</label>
|
||||
<el-input v-model="form.qty" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
@@ -124,11 +126,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="终点点位">
|
||||
<el-input v-model="form.end_point_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位" prop="end_point_name">
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" @focus="getEndPoint(form.material_id,form.end_area,form.vehicle_code,form.qty)" />
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" @focus="getEndPoint" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -168,46 +167,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称">
|
||||
<el-select v-model="form.cust_id" filterable clearable class="filter-item" style="width: 200px" placeholder="请选择客户">
|
||||
<el-option
|
||||
v-for="item in custList"
|
||||
:key="item.cust_id"
|
||||
:label="item.cust_name"
|
||||
:value="item.cust_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="黏次">
|
||||
<label slot="label">黏 次</label>
|
||||
<el-input v-model="form.mix_seq" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="是否满托" prop="is_full">
|
||||
<el-radio v-model="form.is_full" label="1">是</el-radio>
|
||||
<el-radio v-model="form.is_full" label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="物料工序">
|
||||
<el-select v-model="form.ivt_workprocedure_id" disabled filterable clearable class="filter-item" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in workprocedures"
|
||||
:key="item.workprocedure_id"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
@@ -222,195 +181,6 @@
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--工序入库单详情查看-->
|
||||
<el-dialog
|
||||
:visible.sync="lookDialog"
|
||||
title="工序入库单详情查看"
|
||||
width="800px"
|
||||
>
|
||||
<el-form ref="form1" disabled :model="form1" :rules="rules" size="mini" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单据类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form1.bill_type"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bill_types"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工序" prop="workprocedure_id">
|
||||
<el-select
|
||||
v-model="form1.workprocedure_id"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
@change="selectStartPoint(form.workprocedure_id)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workprocedures"
|
||||
:key="item.workprocedure_id"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="物料id">
|
||||
<el-input v-model="form1.material_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<label slot="label">物 料</label>
|
||||
<el-input v-model="form1.material_name" style="width: 200px;" @focus="getMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="form1.vehicle_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量">
|
||||
<label slot="label">数 量</label>
|
||||
<el-input v-model="form1.qty" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次</label>
|
||||
<el-input v-model="form1.pcsn" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始点位">
|
||||
<el-select
|
||||
v-model="form1.start_point_code"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
clearable
|
||||
@change="getStartArea(form.start_point_code)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in startPoints"
|
||||
:key="item.point_code"
|
||||
:label="item.point_name"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="终点点位">
|
||||
<el-input v-model="form1.end_point_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位">
|
||||
<el-input v-model="form1.end_point_name" style="width: 200px;" @focus="getEndPoint" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始区域">
|
||||
<el-select
|
||||
v-model="form1.start_area"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_area_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点区域">
|
||||
<el-select
|
||||
v-model="form1.end_area"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_area_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称">
|
||||
<el-select v-model="form1.cust_id" filterable clearable class="filter-item" style="width: 200px" placeholder="请选择客户">
|
||||
<el-option
|
||||
v-for="item in custList"
|
||||
:key="item.cust_id"
|
||||
:label="item.cust_name"
|
||||
:value="item.cust_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="黏次">
|
||||
<label slot="label">黏 次</label>
|
||||
<el-input v-model="form1.mix_seq" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否满托">
|
||||
<el-radio v-model="form1.is_full" label="1">是</el-radio>
|
||||
<el-radio v-model="form1.is_full" label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="false" label="物料工序">
|
||||
<el-select v-model="form1.ivt_workprocedure_id" disabled filterable clearable class="filter-item" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in workprocedures"
|
||||
:key="item.workprocedure_id"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<label slot="label">备 注</label>
|
||||
<el-input v-model="form1.remark" :rows="3" type="textarea" style="width: 600px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="lookDialog=false">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -426,7 +196,7 @@
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column prop="bill_code" label="单据编号" width="120">
|
||||
<el-table-column prop="bill_code" label="单据编号" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="lookUp(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
@@ -592,9 +362,6 @@ export default {
|
||||
material_name: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'change' }
|
||||
],
|
||||
vehicle_code: [
|
||||
{ required: true, message: '载具编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -603,6 +370,9 @@ export default {
|
||||
],
|
||||
is_full: [
|
||||
{ required: true, message: '是否满托不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
@@ -653,26 +423,12 @@ export default {
|
||||
})
|
||||
},
|
||||
async selectStartPoint(workprocedureid) {
|
||||
this.form.start_point_code = null
|
||||
this.form.start_area = null
|
||||
this.form.end_area = null
|
||||
this.form.end_point_code = null
|
||||
this.form.end_point_name = null
|
||||
this.form.ivt_workprocedure_id = workprocedureid
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const end_area = this.form.end_area
|
||||
const queryData = { // eslint-disable-line no-unused-vars
|
||||
const queryData = {
|
||||
workprocedureid: workprocedureid
|
||||
}
|
||||
await crudWorkprocedureios.selectStartPoint(queryData).then(res => {
|
||||
this.startPoints = res
|
||||
})
|
||||
await crudWorkprocedureios.getEndAareaByworkprocedureId({ workprocedure_id: this.form.workprocedure_id }).then(res => {
|
||||
if (end_area === '' || end_area === null || end_area === undefined) {
|
||||
this.form.end_area = res.end_area
|
||||
}
|
||||
this.form.qty_unit_id = res.qty_unit_id
|
||||
})
|
||||
},
|
||||
getStartArea(start_point_code) {
|
||||
const queryData = { // eslint-disable-line no-unused-vars
|
||||
@@ -682,11 +438,10 @@ export default {
|
||||
this.form.start_area = res.area_type
|
||||
})
|
||||
},
|
||||
getEndPoint(material_id, end_area, vehicle_code, qty) {
|
||||
debugger
|
||||
const material = { material_id: material_id, area_type: end_area, vehicle_code: vehicle_code, qty: qty }
|
||||
this.openParam = material
|
||||
console.log(this.openParam)
|
||||
getEndPoint() {
|
||||
this.openParam = {
|
||||
'workprocedure_id': this.form.workprocedure_id
|
||||
}
|
||||
this.endPointDialog = true
|
||||
},
|
||||
getMater() {
|
||||
@@ -698,8 +453,8 @@ export default {
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
tableChanged2(row) {
|
||||
this.form.end_point_code = row.struct_code
|
||||
this.form.end_point_name = row.struct_name
|
||||
this.form.end_point_code = row.point_code
|
||||
this.form.end_point_name = row.point_name
|
||||
this.getEndArea(this.form.end_point_code)
|
||||
},
|
||||
getEndArea(end_point_code) {
|
||||
@@ -710,6 +465,21 @@ export default {
|
||||
this.form.end_area = res.area_type
|
||||
})
|
||||
},
|
||||
getWorkProce(value) {
|
||||
debugger
|
||||
this.form.start_point_code = ''
|
||||
this.form.start_area = ''
|
||||
this.form.end_area = ''
|
||||
this.form.end_point_code = ''
|
||||
this.form.end_point_name = ''
|
||||
const data = {
|
||||
'type': value
|
||||
}
|
||||
crudWorkprocedureios.getWorkProce(data).then(res => {
|
||||
this.form.workprocedure_id = res.workprocedure_id
|
||||
this.selectStartPoint(res.workprocedure_id)
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
|
||||
Reference in New Issue
Block a user