Browse Source

fix 拆码垛业务

master
张江玮 2 years ago
parent
commit
b5d9419757
  1. 3
      lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 3
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
  3. 8
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql
  4. 61
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/FJCallEmptyTask.java
  5. 23
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/wql/CALL_EMPTY_TASK.wql
  6. 76
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java
  7. 78
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java
  8. 16
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/YZCallMaterialTask.java
  9. 5
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/wql/CALL_MATERIAL_TASK.wql
  10. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/FJSendMaterialTask.java
  11. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/wql/SEND_MATERIAL_TASK.wql
  12. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/TaskUtils.java
  13. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/wql/TASK_UTILS.wql
  14. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  15. 56
      lms/nladmin-system/src/test/java/org/nl/test/TempTest.java
  16. 16
      lms/nladmin-ui/src/views/wms/basedata/material/index.vue
  17. 543
      lms/nladmin-ui/src/views/wms/pdm/workerorder/fj/index.vue
  18. 5
      lms/nladmin-ui/src/views/wms/pdm/workerorder/hl/index.vue
  19. 32
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

3
lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -704,7 +704,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String unqualified_qty = jsonObject.getString("unqualified_qty"); String unqualified_qty = jsonObject.getString("unqualified_qty");
if (StrUtil.isNotBlank(unqualified_qty) && !"0".equals(unqualified_qty)) { if (StrUtil.isNotBlank(unqualified_qty) && !"0".equals(unqualified_qty)) {
workorder.put("unqualified_qty", unqualified_qty); workorder.put("unqualified_qty", unqualified_qty);
}
if (!"0".equals(workorder.getString("unqualified_qty"))) {
JSONObject regionIn = TaskUtils.buildRegionInFromWorkorder(workorder, RegionInType.FPRK); JSONObject regionIn = TaskUtils.buildRegionInFromWorkorder(workorder, RegionInType.FPRK);
WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn); WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn);
} }

3
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java

@ -438,10 +438,13 @@ public class WorkorderServiceImpl implements WorkordeService {
String unqualified_qty = row.getString("unqualified_qty"); String unqualified_qty = row.getString("unqualified_qty");
if (StrUtil.isNotBlank(unqualified_qty) && !"0".equals(unqualified_qty)) { if (StrUtil.isNotBlank(unqualified_qty) && !"0".equals(unqualified_qty)) {
workorder.put("unqualified_qty", unqualified_qty); workorder.put("unqualified_qty", unqualified_qty);
}
if (!"0".equals(workorder.getString("unqualified_qty"))) {
JSONObject regionIn = TaskUtils.buildRegionInFromWorkorder(workorder, RegionInType.FPRK); JSONObject regionIn = TaskUtils.buildRegionInFromWorkorder(workorder, RegionInType.FPRK);
WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn); WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn);
} }
String qualified_qty = row.getString("qualified_qty"); String qualified_qty = row.getString("qualified_qty");
if (StrUtil.isNotBlank(qualified_qty) && !"0".equals(qualified_qty)) { if (StrUtil.isNotBlank(qualified_qty) && !"0".equals(qualified_qty)) {
workorder.put("qualified_qty", qualified_qty); workorder.put("qualified_qty", qualified_qty);

8
lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql

@ -84,11 +84,8 @@
) )
ENDOPTION ENDOPTION
OPTION 输入.region_code <> "" OPTION 输入.region_code <> ""
device.region_code = 'HL' device.region_code = 输入.region_code
ENDOPTION ENDOPTION
OPTION 输入.region_code = ""
device.region_code IN ('YZ', 'FJ')
ENDOPTION
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY
ENDIF ENDIF
@ -177,7 +174,8 @@
material.b, material.b,
material.h, material.h,
material.w, material.w,
device.region_code device.region_code,
workorder.vehicle_type
FROM FROM
pdm_bd_workorder workorder pdm_bd_workorder workorder
LEFT JOIN md_me_materialbase material ON workorder.material_id = material.material_id LEFT JOIN md_me_materialbase material ON workorder.material_id = material.material_id

61
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/FJCallEmptyTask.java

@ -49,7 +49,7 @@ public class FJCallEmptyTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null, work_order.getString("material_id"),
work_order.getString("vehicle_type"), work_order.getString("vehicle_type"),
null, null,
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1, TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1,
@ -82,24 +82,18 @@ public class FJCallEmptyTask extends AbstractAcsTask {
for (int i = 0; i < tasks.size(); i++) { for (int i = 0; i < tasks.size(); i++) {
JSONObject task = tasks.getJSONObject(i); JSONObject task = tasks.getJSONObject(i);
JSONObject point = WQL JSONObject bthc_point = WQL
.getWO("CALL_EMPTY_TASK") .getWO("CALL_EMPTY_TASK")
.addParam("flag", "4") .addParam("flag", "6")
.addParam("vehicle_type", task.getString("vehicle_type")) .addParam("vehicle_type", task.getString("vehicle_type"))
.addParam("material_id", task.getString("material_id"))
.process() .process()
.uniqueResult(0); .uniqueResult(0);
if (ObjectUtil.isNotEmpty(bthc_point)) {
if (ObjectUtil.isNotEmpty(point)) {
JSONArray request_param = new JSONArray();
request_param.add(point.getString("point_code"));
JSONObject result = wmsToAcsService.getTray(request_param);
if (!"200".equals(result.getString("status"))) {
continue;
}
task.put("task_status", TaskStatus.START_AND_END.value()); task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point.getString("device_code")); task.put("point_code1", bthc_point.getString("device_code"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); task.put("vehicle_code", TaskUtils.formatVehicleCode(bthc_point.getString("vehicle_code")));
task.put("group_id", bthc_point.getLongValue("vd_id"));
task.put("remark", ""); task.put("remark", "");
TaskUtils.addAutoUpdateColum(task); TaskUtils.addAutoUpdateColum(task);
task_table.update(task); task_table.update(task);
@ -108,7 +102,38 @@ public class FJCallEmptyTask extends AbstractAcsTask {
update_point.put("lock_type", LockType.TASK_LOCKED.value()); update_point.put("lock_type", LockType.TASK_LOCKED.value());
update_point.put("task_code", task.getString("task_code")); update_point.put("task_code", task.getString("task_code"));
TaskUtils.addAutoUpdateColum(update_point); TaskUtils.addAutoUpdateColum(update_point);
point_table.update(update_point, "point_code = '" + point.getString("device_code") + "'"); point_table.update(update_point, "point_code = '" + bthc_point.getString("device_code") + "'");
} else {
JSONObject point = WQL
.getWO("CALL_EMPTY_TASK")
.addParam("flag", "4")
.addParam("vehicle_type", task.getString("vehicle_type"))
.process()
.uniqueResult(0);
if (ObjectUtil.isNotEmpty(point)) {
JSONArray request_param = new JSONArray();
request_param.add(point.getString("point_code"));
JSONObject result = wmsToAcsService.getTray(request_param);
if (!"200".equals(result.getString("status"))) {
continue;
}
task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point.getString("device_code"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("material_id", "");
task.put("remark", "");
TaskUtils.addAutoUpdateColum(task);
task_table.update(task);
JSONObject update_point = new JSONObject();
update_point.put("lock_type", LockType.TASK_LOCKED.value());
update_point.put("task_code", task.getString("task_code"));
TaskUtils.addAutoUpdateColum(update_point);
point_table.update(update_point, "point_code = '" + point.getString("device_code") + "'");
}
} }
} }
} }
@ -177,14 +202,14 @@ public class FJCallEmptyTask extends AbstractAcsTask {
} }
} }
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
int current_task_status = task.getIntValue("task_status"); int current_task_status = task.getIntValue("task_status");
if (current_task_status < Integer.parseInt(TaskStatus.FINISHED.value())) { if (current_task_status < Integer.parseInt(TaskStatus.FINISHED.value())) {
if (operation_type == OperationType.MANUAL if (operation_type == OperationType.MANUAL
&& current_task_status < Integer.parseInt(TaskStatus.START_AND_END.value())) { && current_task_status < Integer.parseInt(TaskStatus.START_AND_END.value())) {
throw new BadRequestException("只能手动完成 [确认起点和终点] 之后的任务!"); throw new BadRequestException("只能手动完成 [确认起点和终点] 之后的任务!");
} }
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task); TaskUtils.addACSUpdateColum(task);

23
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/wql/CALL_EMPTY_TASK.wql

@ -16,6 +16,7 @@
输入.flag TYPEAS s_string 输入.flag TYPEAS s_string
输入.point_code TYPEAS s_string 输入.point_code TYPEAS s_string
输入.vehicle_type TYPEAS s_string 输入.vehicle_type TYPEAS s_string
输入.material_id TYPEAS f_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@ -135,3 +136,25 @@
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF
IF 输入.flag = "6"
QUERY
SELECT
point.*,
vd.vd_id
FROM
sch_base_point point
LEFT JOIN st_ivt_vehicle_detail vd ON point.vehicle_type = vd.vehicle_type
AND point.vehicle_code = vd.vehicle_code
AND vd.is_delete = '0'
WHERE
point.is_used = '1'
AND point.lock_type = '1'
AND point.region_code = 'BTHC'
AND point.point_type = '1'
AND point.point_status = '1'
AND point.vehicle_type = 输入.vehicle_type
AND vd.material_id = 输入.material_id
ENDSELECT
ENDQUERY
ENDIF

76
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java

@ -59,53 +59,39 @@ public class FJCallMaterialTask extends AbstractAcsTask {
form.getString("create_id"), form.getString("create_id"),
form.getString("create_name") form.getString("create_name")
); );
WQLObject.getWQLObject("sch_base_task").insert(task);
point.put("lock_type", LockType.TASK_LOCKED.value()); JSONObject point1 = WQL
point.put("task_code", task.getString("task_code")); .getWO("CALL_MATERIAL_TASK")
TaskUtils.addFormUpdateColum(point, form); .addParam("flag", "3")
WQLObject.getWQLObject("sch_base_point").update(point); .addParam("material_id", task.getString("material_id"))
.process()
return task.getString("task_code"); .uniqueResult(0);
}
if (ObjectUtil.isNotEmpty(point1)) {
point.put("lock_type", LockType.TASK_LOCKED.value());
@Override point.put("task_code", task.getString("task_code"));
public void findStartPoint() { TaskUtils.addFormUpdateColum(point, form);
WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
JSONArray tasks = task_table
.query("is_delete = '0' AND task_status = '" + TaskStatus.SURE_END.value() + "' AND handle_class = '" + FJCallMaterialTask.class.getName() + "'", "priority DESC, create_time ASC")
.getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(tasks)) {
WQLObject point_table = WQLObject.getWQLObject("sch_base_point"); WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
point_table.update(point);
for (int i = 0; i < tasks.size(); i++) {
JSONObject task = tasks.getJSONObject(i); task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point1.getString("point_code"));
JSONObject point = WQL task.put("vehicle_code", TaskUtils.formatVehicleCode(point1.getString("vehicle_code")));
.getWO("CALL_MATERIAL_TASK") task.put("material_id", point1.getString("material_id"));
.addParam("flag", "3") task.put("group_id", point1.getString("vd_id"));
.addParam("material_id", task.getString("material_id")) task.put("remark", "");
.process()
.uniqueResult(0); JSONObject point_update = new JSONObject();
point_update.put("lock_type", LockType.TASK_LOCKED.value());
if (ObjectUtil.isNotEmpty(point)) { point_update.put("task_code", task.getString("task_code"));
task.put("task_status", TaskStatus.START_AND_END.value()); TaskUtils.addFormUpdateColum(point_update, form);
task.put("point_code1", point.getString("point_code")); point_table.update(point_update, "point_id = " + point1.getLongValue("point_id"));
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code")));
task.put("material_id", point.getString("material_id")); WQLObject.getWQLObject("sch_base_task").insert(task);
task.put("group_id", point.getString("vd_id"));
task.put("remark", ""); return task.getString("task_code");
TaskUtils.addAutoUpdateColum(task); } else {
task_table.update(task); throw new BadRequestException("[" + point.get("point_code") + "] 的叫料任务未找到起点!");
JSONObject point_update = new JSONObject();
point_update.put("lock_type", LockType.TASK_LOCKED.value());
point_update.put("task_code", task.getString("task_code"));
TaskUtils.addAutoUpdateColum(point_update);
point_table.update(point_update, "point_id = " + point.getLongValue("point_id"));
}
}
} }
} }

78
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java

@ -57,52 +57,38 @@ public class SZCallMaterialTask extends AbstractAcsTask {
form.getString("create_id"), form.getString("create_id"),
form.getString("create_name") form.getString("create_name")
); );
WQLObject.getWQLObject("sch_base_task").insert(task);
point.put("lock_type", LockType.TASK_LOCKED.value()); JSONObject point1 = WQL
point.put("task_code", task.getString("task_code")); .getWO("CALL_MATERIAL_TASK")
TaskUtils.addFormUpdateColum(point, form); .addParam("flag", "1")
WQLObject.getWQLObject("sch_base_point").update(point); .process()
.uniqueResult(0);
return task.getString("task_code"); if (ObjectUtil.isNotEmpty(point1)) {
}
@Override
public void findStartPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
JSONArray tasks = task_table
.query("is_delete = '0' AND task_status = '" + TaskStatus.SURE_END.value() + "' AND handle_class = '" + SZCallMaterialTask.class.getName() + "'", "priority DESC, create_time ASC")
.getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(tasks)) {
WQLObject point_table = WQLObject.getWQLObject("sch_base_point"); WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
point.put("lock_type", LockType.TASK_LOCKED.value());
for (int i = 0; i < tasks.size(); i++) { point.put("task_code", task.getString("task_code"));
JSONObject task = tasks.getJSONObject(i); TaskUtils.addFormUpdateColum(point, form);
WQLObject.getWQLObject("sch_base_point").update(point);
JSONObject point = WQL
.getWO("CALL_MATERIAL_TASK") task.put("task_status", TaskStatus.START_AND_END.value());
.addParam("flag", "1") task.put("point_code1", point1.getString("point_code"));
.process() task.put("material_id", point1.getString("material_id"));
.uniqueResult(0); task.put("vehicle_code", TaskUtils.formatVehicleCode(point1.getString("vehicle_code")));
task.put("group_id", point1.getString("vd_id"));
if (ObjectUtil.isNotEmpty(point)) { task.put("remark", "");
task.put("task_status", TaskStatus.START_AND_END.value());
task.put("point_code1", point.getString("point_code")); JSONObject point_update = new JSONObject();
task.put("material_id", point.getString("material_id")); point_update.put("lock_type", LockType.TASK_LOCKED.value());
task.put("vehicle_code", TaskUtils.formatVehicleCode(point.getString("vehicle_code"))); point_update.put("task_code", task.getString("task_code"));
task.put("group_id", point.getString("vd_id")); TaskUtils.addFormUpdateColum(point_update, form);
task.put("remark", ""); point_table.update(point_update, "point_id = " + point1.getLongValue("point_id"));
TaskUtils.addAutoUpdateColum(task);
task_table.update(task); WQLObject.getWQLObject("sch_base_task").insert(task);
JSONObject point_update = new JSONObject(); return task.getString("task_code");
point_update.put("lock_type", LockType.TASK_LOCKED.value()); } else {
point_update.put("task_code", task.getString("task_code")); throw new BadRequestException("[" + point.get("point_code") + "] 的叫料任务未找到起点!");
TaskUtils.addAutoUpdateColum(point_update);
point_table.update(point_update, "point_id = " + point.getLongValue("point_id"));
}
}
} }
} }
@ -172,14 +158,14 @@ public class SZCallMaterialTask extends AbstractAcsTask {
} }
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
int current_task_status = task.getIntValue("task_status"); int current_task_status = task.getIntValue("task_status");
if (current_task_status < Integer.parseInt(TaskStatus.FINISHED.value())) { if (current_task_status < Integer.parseInt(TaskStatus.FINISHED.value())) {
if (operation_type == OperationType.MANUAL if (operation_type == OperationType.MANUAL
&& current_task_status < Integer.parseInt(TaskStatus.START_AND_END.value())) { && current_task_status < Integer.parseInt(TaskStatus.START_AND_END.value())) {
throw new BadRequestException("只能手动完成 [确认起点和终点] 之后的任务!"); throw new BadRequestException("只能手动完成 [确认起点和终点] 之后的任务!");
} }
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) { if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task); TaskUtils.addACSUpdateColum(task);

16
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/YZCallMaterialTask.java

@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; 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.core.engine.object.WO;
import org.nl.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.basedata.eum.VehicleType; import org.nl.wms.basedata.eum.VehicleType;
import org.nl.wms.sch.manage.*; import org.nl.wms.sch.manage.*;
@ -82,12 +83,19 @@ public class YZCallMaterialTask extends AbstractAcsTask {
for (int i = 0; i < tasks.size(); i++) { for (int i = 0; i < tasks.size(); i++) {
JSONObject task = tasks.getJSONObject(i); JSONObject task = tasks.getJSONObject(i);
JSONObject point = WQL WO wo = WQL
.getWO("CALL_MATERIAL_TASK") .getWO("CALL_MATERIAL_TASK")
.addParam("flag", "4") .addParam("flag", "4")
.addParam("material_id", task.getString("material_id")) .addParam("material_id", task.getString("material_id"));
.process()
.uniqueResult(0); JSONObject point2 = point_table.query("point_code = '" + task.getString("point_code2") + "'").uniqueResult(0);
if ("2".equals(point2.getString("point_type"))) {
wo.addParam("is_new", TrueOrFalse.TRUE.value());
} else if ("3".equals(point2.getString("point_type"))) {
wo.addParam("is_new", TrueOrFalse.FALSE.value());
}
JSONObject point = wo.process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(point)) { if (ObjectUtil.isNotEmpty(point)) {
task.put("task_status", TaskStatus.START_AND_END.value()); task.put("task_status", TaskStatus.START_AND_END.value());

5
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/wql/CALL_MATERIAL_TASK.wql

@ -15,6 +15,7 @@
################################################# #################################################
输入.flag TYPEAS s_string 输入.flag TYPEAS s_string
输入.material_id TYPEAS f_string 输入.material_id TYPEAS f_string
输入.is_new TYPEAS s_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@ -118,6 +119,7 @@
AND point.vehicle_code = vd.vehicle_code AND point.vehicle_code = vd.vehicle_code
AND vd.is_delete = '0' AND vd.is_delete = '0'
LEFT JOIN md_me_materialbase mb1 ON vd.material_id = mb1.material_id LEFT JOIN md_me_materialbase mb1 ON vd.material_id = mb1.material_id
LEFT JOIN pdm_bd_workorder workorder ON vd.workorder_id = workorder.workorder_id
WHERE WHERE
point.is_used = '1' point.is_used = '1'
AND point.lock_type = '1' AND point.lock_type = '1'
@ -127,6 +129,9 @@
AND point.vehicle_type = '1' AND point.vehicle_type = '1'
AND mb1.material_id = 输入.material_id AND mb1.material_id = 输入.material_id
AND vd.stand_status IN ('3', '4') AND vd.stand_status IN ('3', '4')
OPTION 输入.is_new <> ""
workorder.is_new = 输入.is_new
ENDOPTION
ORDER BY ORDER BY
vd.create_time ASC vd.create_time ASC
ENDSELECT ENDSELECT

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/FJSendMaterialTask.java

@ -86,7 +86,7 @@ public class FJSendMaterialTask extends AbstractAcsTask {
form.getString("create_id"), form.getString("create_id"),
form.getString("create_name") form.getString("create_name")
); );
empty_task.put("table_fk_id", material_task.getLongValue("task_id")); empty_task.put("task_group_id", material_task.getLongValue("task_id"));
WQLObject.getWQLObject("sch_base_task").insert(empty_task); WQLObject.getWQLObject("sch_base_task").insert(empty_task);
} }
@ -163,7 +163,7 @@ public class FJSendMaterialTask extends AbstractAcsTask {
JSONObject update_point = new JSONObject(); JSONObject update_point = new JSONObject();
update_point.put("lock_type", LockType.TASK_LOCKED.value()); update_point.put("lock_type", LockType.TASK_LOCKED.value());
update_point.put("task_code", material_task.getString("task_code")); update_point.put("task_code", empty_task.getString("task_code"));
TaskUtils.addAutoUpdateColum(update_point); TaskUtils.addAutoUpdateColum(update_point);
task_table.update(material_task); task_table.update(material_task);

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/wql/SEND_MATERIAL_TASK.wql

@ -53,6 +53,8 @@
AND region_code = 'BCPHJ' AND region_code = 'BCPHJ'
AND point_type = '1' AND point_type = '1'
AND point_status = '0' AND point_status = '0'
ORDER BY
point_code ASC
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/TaskUtils.java

@ -182,7 +182,7 @@ public class TaskUtils {
regionIn.put("cInvCode", regionInType.value() + material_code); regionIn.put("cInvCode", regionInType.value() + material_code);
regionIn.put("iQuantity", String.format("%.3f", detail.getDoubleValue("vd_weight") / 1000)); regionIn.put("iQuantity", String.format("%.3f", detail.getDoubleValue("vd_weight") / 1000));
regionIn.put("iNum", detail.getString("qty")); regionIn.put("iNum", detail.getString("qty"));
regionIn.put("iinvexchrate", String.format("%.3f", detail.getDoubleValue("material_weight") / 1000)); regionIn.put("iinvexchrate", String.format("%.5f", detail.getDoubleValue("material_weight") / 1000));
regionIn.put("cBatch", cMocode); regionIn.put("cBatch", cMocode);
return regionIn; return regionIn;
} }
@ -192,16 +192,16 @@ public class TaskUtils {
JSONObject regionIn = new JSONObject(); JSONObject regionIn = new JSONObject();
regionIn.put("id", IdUtil.getSnowflake(1L, 1L).nextId()); regionIn.put("id", IdUtil.getSnowflake(1L, 1L).nextId());
regionIn.put("cCode", CodeUtil.getNewCode("IN_STORE_CODE")); regionIn.put("cCode", CodeUtil.getNewCode("IN_STORE_CODE"));
regionIn.put("dDate", DateUtil.today()); regionIn.put("dDate", DateUtil.now());
regionIn.put("cVouchType", regionInType.label()); regionIn.put("cVouchType", regionInType.label());
String material_code = detail.getString("material_code"); String material_code = detail.getString("material_code");
String cMocode = material_code.substring(11, 16); String cMocode = material_code.substring(11, 16);
regionIn.put("cMocode", cMocode); regionIn.put("cMocode", cMocode);
regionIn.put("cInvCode", regionInType.value() + material_code); regionIn.put("cInvCode", regionInType.value() + material_code);
int qty = detail.getIntValue("qty"); int qty = workorder.getIntValue("unqualified_qty");
regionIn.put("iNum", qty); regionIn.put("iNum", qty);
double material_weight = detail.getDoubleValue("material_weight") / 1000; double material_weight = detail.getDoubleValue("material_weight");
regionIn.put("iinvexchrate", String.format("%.3f", material_weight)); regionIn.put("iinvexchrate", String.format("%.5f", material_weight / 1000));
regionIn.put("iQuantity", String.format("%.3f", qty * material_weight / 1000)); regionIn.put("iQuantity", String.format("%.3f", qty * material_weight / 1000));
regionIn.put("cBatch", cMocode); regionIn.put("cBatch", cMocode);
return regionIn; return regionIn;
@ -212,14 +212,14 @@ public class TaskUtils {
JSONObject regionIn = new JSONObject(); JSONObject regionIn = new JSONObject();
regionIn.put("id", IdUtil.getSnowflake(1L, 1L).nextId()); regionIn.put("id", IdUtil.getSnowflake(1L, 1L).nextId());
regionIn.put("cCode", CodeUtil.getNewCode("IN_STORE_CODE")); regionIn.put("cCode", CodeUtil.getNewCode("IN_STORE_CODE"));
regionIn.put("dDate", DateUtil.today()); regionIn.put("dDate", DateUtil.now());
String material_code = detail.getString("material_code"); String material_code = detail.getString("material_code");
String cMocode = material_code.substring(11, 16); String cMocode = material_code.substring(11, 16);
regionIn.put("cMocode", cMocode); regionIn.put("cMocode", cMocode);
regionIn.put("cInvCode", regionOutType.value() + material_code); regionIn.put("cInvCode", regionOutType.value() + material_code);
regionIn.put("iQuantity", String.format("%.3f", detail.getDoubleValue("vd_weight") / 1000)); regionIn.put("iQuantity", String.format("%.3f", detail.getDoubleValue("vd_weight") / 1000));
regionIn.put("iNum", detail.getString("qty")); regionIn.put("iNum", detail.getString("qty"));
regionIn.put("iinvexchrate", String.format("%.3f", detail.getDoubleValue("material_weight") / 1000)); regionIn.put("iinvexchrate", String.format("%.5f", detail.getDoubleValue("material_weight") / 1000));
regionIn.put("cBatch", cMocode); regionIn.put("cBatch", cMocode);
return regionIn; return regionIn;
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/util/wql/TASK_UTILS.wql

@ -65,7 +65,7 @@
pdm_bd_workorder workorder pdm_bd_workorder workorder
LEFT JOIN md_me_materialbase material ON workorder.material_id = material.material_id LEFT JOIN md_me_materialbase material ON workorder.material_id = material.material_id
WHERE WHERE
workorder.vd_id = 输入.workorder_id workorder.workorder_id = 输入.workorder_id
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

BIN
lms/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.

56
lms/nladmin-system/src/test/java/org/nl/test/TempTest.java

@ -10,6 +10,8 @@ import org.junit.runner.RunWith;
import org.nl.modules.common.utils.SecurityUtils; import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.wql.WQL; 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.wms.sch.manage.RegionInType;
import org.nl.wms.sch.task.util.TaskUtils;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@ -26,58 +28,6 @@ public class TempTest {
@Test @Test
public void test01() { public void test01() {
JSONArray erp_materials = WQL.getWO("QMD_ME_MATERIAL").setDbname("dataSource1").addParam("flag", "2").process().getResultJSONArray(0); System.out.println(8.94 / 1000);
if (ObjectUtil.isNotEmpty(erp_materials)) {
WQLObject material_table = WQLObject.getWQLObject("md_me_materialbase");
List<String> material_codes = material_table.query().getResultJSONArray(0).stream().map(o -> ((JSONObject) o).getString("material_code")).collect(Collectors.toList());
WQLObject dict_detail_table = WQLObject.getWQLObject("sys_dict_detail");
Long user_id = 1L;
String nick_name = "管理员";
String now = DateUtil.now();
erp_materials.forEach(o -> {
JSONObject erp_material = (JSONObject) o;
String material_code = erp_material.getString("cinvcode").substring(1);
if (!material_codes.contains(material_code)) {
JSONObject material = new JSONObject();
long id = IdUtil.getSnowflake(1L, 1L).nextId();
material.put("material_id", id);
material.put("material_code", material_code);
material.put("material_name", erp_material.getString("cinvname"));
material.put("weight", String.format("%.2f", erp_material.getDoubleValue("changerate") * 1000));
String qty = String.format("%.0f", erp_material.getDoubleValue("qty") * 1000);
material.put("qty", qty);
material.put("surplus_qty", qty);
String aux_qty = String.format("%.0f", erp_material.getDoubleValue("auxqty"));
material.put("aux_qty", aux_qty);
material.put("surplus_aux_qty", aux_qty);
material.put("order_code", erp_material.getString("free1"));
String furnace_code = material_code.substring(0, 2);
JSONObject furnace_name = dict_detail_table.query("name = 'furnace' AND value = '" + furnace_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(furnace_name)) {
material.put("furnace", furnace_name.getString("label"));
} else {
material.put("furnace", furnace_code);
}
String material_brick_code = material_code.substring(2, 5);
JSONObject material_brick_type = dict_detail_table.query("name = 'material_brick_type' AND value = '" + material_brick_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(material_brick_type)) {
material.put("material_brick_type", material_brick_type.getString("label"));
} else {
material.put("material_brick_type", material_brick_code);
}
material.put("product_grade", erp_material.getString("free3"));
material.put("brick_type", erp_material.getString("free4"));
material.put("create_id", user_id);
material.put("create_name", nick_name);
material.put("create_time", now);
material_table.insert(material);
}
});
}
} }
} }

16
lms/nladmin-ui/src/views/wms/basedata/material/index.vue

@ -18,6 +18,22 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="订单编码">
<el-input
v-model="query.order_code"
clearable
placeholder="订单编码"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="部位">
<el-input
v-model="query.product_grade"
clearable
placeholder="部位"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation /> <rrOperation />
</el-form> </el-form>
</div> </div>

543
lms/nladmin-ui/src/views/wms/pdm/workerorder/fj/index.vue

@ -0,0 +1,543 @@
<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-input
v-model="query.produceorder_code"
clearable
placeholder="工单编号"
style="width: 200px;"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料编码">
<el-input
v-model="query.material"
clearable
placeholder="物料编码"
style="width: 200px;"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="工单状态">
<el-select
v-model="order_status"
style="width: 200px"
clearable
multiple
placeholder="请选择"
@change="handTaskStatus"
>
<el-option
label="未完成"
value="-1"
/>
<el-option
v-for="item in dict.pdm_workorder_status"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00','23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
<rrOperation :crud="crud" />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="!(crud.selections[0]) || crud.selections[1]"
@click="submits(crud.selections[0])"
>
开工
</el-button>
<el-button
slot="right"
class="filter-item"
type="danger"
icon="el-icon-position"
size="mini"
:disabled="crud.selections.length !== 1"
@click="forceFinish(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="600px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="160px" label-suffix="">
<el-row>
<el-col :span="12">
<el-form-item label="生产设备" prop="device_name">
<el-input
v-model="form.device_name"
:disabled="crud.status.edit"
style="width: 300px"
clearable
@focus="deviceShow=true"
@clear="form.device_code=''; form.device_id=''; form.device_name=''; form.region_code = ''"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料编码" prop="material_code">
<el-input
v-model="form.material_code"
:disabled="crud.status.edit"
style="width: 300px"
clearable
@focus="materialShow=true"
@clear="form.material_id=''; form.material_code=''; form.material_name=''"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="计划数量" prop="plan_qty">
<el-input v-model="form.plan_qty" :disabled="crud.status.edit" type="number" style="width: 300px"><i
slot="suffix"
style="font-style:normal;margin-right: 10px;"
></i></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="木托盘类型"
prop="vehicle_type"
>
<el-select
v-model="form.vehicle_type"
:disabled="crud.status.edit"
style="width: 300px"
filterable
placeholder="请选择"
>
<el-option
v-for="item in dict.wood_vehicle_type"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="计划生产日期" prop="plan_date">
<el-date-picker
v-model="form.plan_date"
style="width: 300px"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否加急" prop="is_urgent">
<el-radio v-model="form.is_urgent" label="1"></el-radio>
<el-radio v-model="form.is_urgent" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="info" @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 v-if="false" prop="workorder_id" label="生产班次工单标识" />
<el-table-column
prop="workorder_code"
label="工单编码"
:min-width="flexWidth('workorder_code',crud.data,'工单编码')"
>
<!-- <template slot-scope="scope">-->
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>-->
<!-- </template>-->
</el-table-column>
<el-table-column
prop="order_status"
label="工单状态"
:min-width="flexWidth('order_status',crud.data,'工单状态')"
>
<template slot-scope="scope">
{{ dict.label.pdm_workorder_status[scope.row.order_status] }}
</template>
</el-table-column>
<el-table-column prop="device_name" label="设备" :min-width="flexWidth('device_name',crud.data,'设备')" />
<el-table-column
prop="material_code"
label="物料编码"
:min-width="flexWidth('material_code',crud.data,'物料编码')"
/>
<el-table-column
prop="vehicle_type"
label="载具类型"
:min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')"
>
<template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template>
</el-table-column>
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
<template slot-scope="scope">
{{ dict.label.true_or_false[scope.row.is_urgent] }}
</template>
</el-table-column>
<el-table-column
prop="realproducestart_date"
label="实际开始时间"
:min-width="flexWidth('realproducestart_date',crud.data,'实际开始时间')"
/>
<el-table-column
prop="realproduceend_date"
label="实际结束时间"
:min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')"
/>
<el-table-column prop="real_qty" label="实际数量" :min-width="flexWidth('real_qty',crud.data,'实际数量')" />
<el-table-column
prop="qualified_qty"
label="合格数量"
:min-width="flexWidth('qualified_qty',crud.data,'合格数量')"
/>
<el-table-column
prop="unqualified_qty"
label="不合格数量"
:min-width="flexWidth('unqualified_qty',crud.data,'不合格数量')"
/>
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
<el-table-column
prop="create_time"
label="创建时间"
:min-width="flexWidth('create_time',crud.data,'创建时间')"
/>
<el-table-column
prop="update_optname"
label="修改人"
:min-width="flexWidth('update_optname',crud.data,'修改人')"
/>
<el-table-column
prop="update_time"
label="修改时间"
:min-width="flexWidth('update_time',crud.data,'修改时间')"
/>
<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>
<MaterDtl :dialog-show.sync="materialShow" :is-single="true" @setMaterValue="setMaterValue" />
<DeviceDialog
:dialog-show.sync="deviceShow"
:is-single="true"
:region-str="'(\'FJ\')'"
@tableChanged="tableChanged"
/>
<ViewDialog ref="child3" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:visible.sync="finishShow"
title="强制完成"
width="600px"
>
<el-form ref="form" :model="orderData" :rules="rules" size="mini" label-width="160px" label-suffix="">
<el-row>
<el-col :span="12">
<el-form-item label="实际数量" prop="material_id">
<el-input-number
v-model="orderData.qty"
style="width: 150px"
:min="0"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="合格数量" prop="qualified_qty">
<el-input-number
v-model="orderData.qualified_qty"
style="width: 150px"
:min="0"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="不合格数量" prop="unqualified_qty">
<el-input-number
v-model="orderData.unqualified_qty"
style="width: 150px"
:min="0"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="info" @click="cancelFinish">取消</el-button>
<el-button type="primary" @click="toForceFinish">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import crudWorkorder from '@/api/wms/pdm/workorder'
import CRUD, { presenter, header, form, crud } 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'
import MaterDtl from '@/views/wms/pub/MaterDialog'
import ViewDialog from '@/views/wms/pdm/workerorder/ViewDialog'
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
const defaultForm = {
workorder_id: null,
produceorder_code: null,
producedeviceorder_code: null,
shift_type_scode: '01',
workprocedure_id: null,
produce_date: null,
plan_qty: null,
real_qty: null,
material_id: null,
material_code: null,
material_weight: null,
vehicle_type: '3',
planproducestart_date: null,
planproduceend_date: null,
realproducestart_date: null,
realproduceend_date: null,
order_status: '1',
is_needmove: '1',
order_type_scode: '1',
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
sysdeptid: null,
syscompanyid: null,
is_delete: null,
material_name: null,
device_id: null,
device_code: null,
device_name: null,
is_canupdate_update: '1',
material_spec: null,
sale_id: null,
is_new: '1',
is_package: '1',
warn_time: '0',
standing_time: '0',
is_urgent: '0',
is_pri: '0',
ext_code: null,
qualified_qty: '0',
unqualified_qty: '0',
region_code: null,
plan_date: null
}
export default {
name: 'FJWorkorder',
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['pdm_workorder_status', 'priority_direction', 'is_used', 'is_or_not', 'material_type', 'vehicle_type', 'workorder_procedure', 'true_or_false', 'wood_vehicle_type'],
cruds() {
return CRUD({
title: '工单', url: 'api/workorder', idField: 'workorder_id', sort: 'workorder_id,desc',
optShow: {
add: true,
edit: false,
del: false,
download: false,
reset: true
},
query: {
order_status: '-1',
region_code: 'FJ'
},
crudMethod: { ...crudWorkorder }
})
},
data() {
return {
classes3: [],
materType: '01',
materialShow: false,
deviceShow: false,
bomShow: false,
workprocedureList: [],
order_status: ['-1'],
permission: {},
orderData: {},
finishShow: false,
rules: {
plan_qty: [
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
],
material_code: [
{ required: true, message: '物料编码不能为空', trigger: 'change' }
],
vehicle_type: [
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' }
],
device_name: [
{ required: true, message: '生产设备不能为空', trigger: 'change' }
],
is_urgent: [
{ required: true, message: '是否加急不能为空', trigger: 'blur' }
],
is_pri: [
{ required: true, message: '是否优先包装不能为空', trigger: 'blur' }
],
plan_date: [
{ required: true, message: '计划生产日期不能为空', trigger: 'blur' }
]
}
}
},
created() {
},
methods: {
//
handTaskStatus(value) {
this.$forceUpdate()
if (value) {
this.order_status = JSON.parse(JSON.stringify(value))
this.query.order_status = this.order_status.toString()
}
this.crud.toQuery()
},
//
toView(row) {
console.log(row)
if (row !== null) {
this.$refs.child3.setForm(row)
}
},
clearForm() {
this.orderData = {}
},
cancelFinish() {
this.clearForm()
this.finishShow = false
},
//
forceFinish(data) {
this.orderData = data
this.finishShow = true
},
toForceFinish() {
crudWorkorder.forceFinish({ row: this.orderData }).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
this.finishShow = false
})
},
//
rounding(row, column) {
return parseFloat(row[column.property]).toFixed(2)
},
//
is_disabled(len, row) {
if (len === 1 && row.order_status === '00') {
return false
} else {
return true
}
},
// form
setMaterValue(row) {
this.form.material_id = row.material_id
this.form.material_code = row.material_code
},
tableChanged(row) {
this.form.device_code = row.device_code
this.form.device_id = row.device_id
this.form.device_name = row.device_name
this.form.region_code = row.region_code
},
setBOMValue(row) {
this.form.material_id = row.material_id
this.form.material_code = row.material_code
},
//
submits(row) {
crudWorkorder.submits({ workorder_id: row.workorder_id }).then(res => {
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
}
}
}
</script>
<style scoped>
</style>

5
lms/nladmin-ui/src/views/wms/pdm/workerorder/hl/index.vue

@ -179,7 +179,7 @@
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="workorder_id" label="生产班次工单标识" /> <el-table-column v-if="false" prop="workorder_id" label="生产班次工单标识" />
<el-table-column prop="workorder_code" label="工单编" :min-width="flexWidth('workorder_code',crud.data,'工单编')"> <el-table-column prop="workorder_code" label="工单编" :min-width="flexWidth('workorder_code',crud.data,'工单编')">
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>--> <!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>-->
<!-- </template>--> <!-- </template>-->
@ -192,12 +192,13 @@
<el-table-column prop="device_name" label="设备" :min-width="flexWidth('device_name',crud.data,'设备')" /> <el-table-column prop="device_name" label="设备" :min-width="flexWidth('device_name',crud.data,'设备')" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" /> <el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="plan_qty" label="计划重量" :min-width="flexWidth('plan_qty',crud.data,'计划数量/重量')" /> <el-table-column prop="plan_qty" label="计划重量" :min-width="flexWidth('plan_qty',crud.data,'计划数量/重量')" />
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')"> <el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.true_or_false[scope.row.is_urgent] }} {{ dict.label.true_or_false[scope.row.is_urgent] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="is_new" label="是否料" :min-width="flexWidth('is_new',crud.data,'是否料')"> <el-table-column prop="is_new" label="是否正品料" :min-width="flexWidth('is_new',crud.data,'是否正品料')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.true_or_false[scope.row.is_new] }} {{ dict.label.true_or_false[scope.row.is_new] }}
</template> </template>

32
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -136,30 +136,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item
v-show="typeof (form.region_code) === 'string' && form.region_code === 'FJ'"
label="木托盘类型"
prop="vehicle_type"
>
<el-select
v-model="form.vehicle_type"
:disabled="crud.status.edit"
style="width: 300px"
filterable
placeholder="请选择"
>
<el-option
v-for="item in dict.wood_vehicle_type"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计划生产日期" prop="plan_date"> <el-form-item label="计划生产日期" prop="plan_date">
@ -208,8 +184,8 @@
<el-table-column v-if="false" prop="workorder_id" label="生产班次工单标识" /> <el-table-column v-if="false" prop="workorder_id" label="生产班次工单标识" />
<el-table-column <el-table-column
prop="workorder_code" prop="workorder_code"
label="工单编" label="工单编"
:min-width="flexWidth('workorder_code',crud.data,'工单编')" :min-width="flexWidth('workorder_code',crud.data,'工单编')"
> >
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>--> <!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>-->
@ -240,6 +216,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" /> <el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
<el-table-column prop="plan_date" label="计划生产日期" :min-width="flexWidth('plan_date',crud.data,'计划生产日期')" />
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')"> <el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.true_or_false[scope.row.is_urgent] }} {{ dict.label.true_or_false[scope.row.is_urgent] }}
@ -432,7 +409,8 @@ export default {
reset: true reset: true
}, },
query: { query: {
order_status: '-1' order_status: '-1',
region_code: 'YZ'
}, },
crudMethod: { ...crudWorkorder } crudMethod: { ...crudWorkorder }
}) })

Loading…
Cancel
Save