Browse Source

代码更新

master
李永德 2 years ago
parent
commit
036499cc09
  1. 2
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java
  2. 40
      lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/PointEnum.java
  3. 44
      lms/nladmin-system/src/main/java/org/nl/wms/sch/rest/PointController.java
  4. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/callMaterial/YzjCallMaterialTask.java
  5. 15
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/callMaterial/wql/QSCH_yzjCallMaterial_01.wql
  6. 59
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java
  7. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  8. 26
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

2
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java

@ -47,7 +47,7 @@ public class DeviceServiceImpl implements DeviceService {
if (!StrUtil.isEmpty(search)) { if (!StrUtil.isEmpty(search)) {
map.put("search", "%" + search + "%"); map.put("search", "%" + search + "%");
} }
JSONObject json = WQL.getWO("PDM_BI_DEVICE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "device.create_time DESC"); JSONObject json = WQL.getWO("PDM_BI_DEVICE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "device.device_model, device.device_code");
return json; return json;
} }

40
lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/PointEnum.java

@ -0,0 +1,40 @@
package org.nl.wms.sch.manage;
/**
* @author: lyd
* @description: 点位相关的枚举
* @Date: 2022/11/19
*/
public enum PointEnum {
// 是否鎖定
LOCK_TYPE_FALSE("1", "未锁定"),
LOCK_TYPE_TRUE("2", "锁定"),
VEHICLE_TYPE_NEW_BUCKET("1", "新料盅"),
VEHICLE_TYPE_OLD_BUCKET("2", "旧料盅"),
VEHICLE_TYPE_STEEL_TRAY("3", "钢托盘"),
VEHICLE_TYPE_WOOL_TRAY("4", "木托盘"),
// 点位状态
POINT_STATUS_EMPTY_POSITION("1", "空位"),
POINT_STATUS_EMPTY_VEHICLE("2", "空载具"),
POINT_STATUS_HAVE_MATERIAL("3", "有料")
;
private final String code;
private final String name;
PointEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}

44
lms/nladmin-system/src/main/java/org/nl/wms/sch/rest/PointController.java

@ -2,13 +2,18 @@
package org.nl.wms.sch.rest; package org.nl.wms.sch.rest;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.logging.annotation.Log; import org.nl.modules.logging.annotation.Log;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.sch.service.PointService; import org.nl.wms.sch.service.PointService;
import org.nl.wms.sch.service.dto.PointDto; import org.nl.wms.sch.service.dto.PointDto;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
@ -112,4 +117,43 @@ public class PointController {
pointService.changeLock(jsonObject); pointService.changeLock(jsonObject);
return new ResponseEntity<>(HttpStatus.NO_CONTENT); return new ResponseEntity<>(HttpStatus.NO_CONTENT);
} }
// @GetMapping("/add")
// @SaIgnore
// public ResponseEntity<Object> add() {
// WQLObject sch_base_point = WQLObject.getWQLObject("SCH_BASE_Point");
// String code = "FMJDJW";
// String name = "困料货架";
// for (int i = 1; i <= 4; i++) {
// JSONObject object = new JSONObject();
// object.put("point_id", IdUtil.getSnowflake(1, 1).nextId());
// if (i == 1) {
// object.put("point_code", "FMJDJW0101");
// object.put("point_name", "覆膜机对接位101");
// } else if (i == 2) {
// object.put("point_code", "FMJDJW0102");
// object.put("point_name", "覆膜机对接位102");
// } else if (i == 3) {
// object.put("point_code", "FMJDJW0201");
// object.put("point_name", "覆膜机对接位201");
// } else if (i == 4) {
// object.put("point_code", "FMJDJW0202");
// object.put("point_name", "覆膜机对接位202");
// }
// object.put("region_id", "1593073159588941824");
// object.put("region_code", "FMQ");
// object.put("region_name", "覆膜区");
// object.put("lock_type", "1");
// object.put("vehicle_max_qty", "0");
// object.put("vehicle_qty", "0");
// object.put("create_id", SecurityUtils.getCurrentUserId());
// object.put("update_optid", SecurityUtils.getCurrentUserId());
// object.put("create_name", SecurityUtils.getCurrentNickName());
// object.put("update_optname", SecurityUtils.getCurrentNickName());
// object.put("create_time", DateUtil.now());
// object.put("update_time", DateUtil.now());
// sch_base_point.insert(object);
// }
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
// }
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/callMaterial/YzjCallMaterialTask.java

@ -239,9 +239,7 @@ public class YzjCallMaterialTask extends AbstractAcsTask {
queryParam.put("flag", "1"); queryParam.put("flag", "1");
queryParam.put("material_id", material_id); queryParam.put("material_id", material_id);
queryParam.put("region_code", "KLHJ"); queryParam.put("region_code", "KLHJ");
queryParam.put("vehicle_type", "%" + vehicle_type + "%");
queryParam.put("is_new", workOrderObj.getString("is_new")); queryParam.put("is_new", workOrderObj.getString("is_new"));
//TODO: 如果点位表载具类型没有维护新旧盅,就从载具表关联
JSONObject json1 = WQL.getWO("QSCH_yzjCallMaterial_01").addParamMap(queryParam).process().uniqueResult(0); JSONObject json1 = WQL.getWO("QSCH_yzjCallMaterial_01").addParamMap(queryParam).process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(json1)) { if (ObjectUtil.isNotEmpty(json1)) {
// 拿到点位 // 拿到点位

15
lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/callMaterial/wql/QSCH_yzjCallMaterial_01.wql

@ -45,17 +45,13 @@
SELECT SELECT
p.point_id, p.point_id,
p.point_code, p.point_code,
p.point_name, p.point_name
p.block_num,
p.col_num,
p.row_num
FROM FROM
SCH_BASE_Point p SCH_BASE_Point p
LEFT JOIN md_pb_vehicle veh ON p.vehicle_code = veh.vehicle_code
WHERE WHERE
p.is_used = '1' p.is_used = '1'
AND standing_time is not null AND standing_time is not null
AND now()> DATE_ADD(standing_time,INTERVAL s_datetime MINUTE) AND now() > DATE_ADD(instorage_time,INTERVAL standing_time MINUTE)
AND is_delete = '0' AND is_delete = '0'
AND lock_type='1' AND lock_type='1'
AND point_status = '3' AND point_status = '3'
@ -66,12 +62,9 @@
p.region_code = 输入.region_code p.region_code = 输入.region_code
ENDOPTION ENDOPTION
OPTION 输入.vehicle_type <> "" OPTION 输入.vehicle_type <> ""
p.can_vehicle_type like 输入.vehicle_type p.vehicle_type like 输入.is_new
ENDOPTION ENDOPTION
OPTION 输入.is_new <> "" ORDER BY p.instorage_time
vehicle.vehicle_type = 输入.is_new
ENDOPTION
ORDER BY col_num desc,row_num,layer_num
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

59
lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java

@ -14,9 +14,7 @@ import org.nl.modules.system.util.CodeUtil;
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.SchTaskDto; import org.nl.wms.sch.SchTaskDto;
import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.*;
import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.manage.UpdateTaskStatusEnum;
import org.nl.wms.sch.tasks.AcsTaskDto; import org.nl.wms.sch.tasks.AcsTaskDto;
import org.nl.wms.util.IdUtil; import org.nl.wms.util.IdUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -77,9 +75,13 @@ public class HnSendMaterialTask extends AbstractAcsTask {
*/ */
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
/**
* 工单没有载具类型混碾下料根据工单新旧物料区分
*/
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
WQLObject materialTab = WQLObject.getWQLObject("MD_ME_MaterialBase"); WQLObject materialTab = WQLObject.getWQLObject("MD_ME_MaterialBase");
WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); //生产工单表【PDM_BD_WorkOrder】
String task_id = task.getString("task_id"); String task_id = task.getString("task_id");
JSONObject taskObj = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0); JSONObject taskObj = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
@ -91,9 +93,9 @@ public class HnSendMaterialTask extends AbstractAcsTask {
throw new BadRequestException("已完成不能取消!"); throw new BadRequestException("已完成不能取消!");
} }
String point_code2 = taskObj.getString("point_code2"); String point_code2 = taskObj.getString("point_code2");
if (ObjectUtil.isEmpty(point_code2)) { if (ObjectUtil.isNotEmpty(point_code2)) { // 防止未找到终点而取消任务空指针
JSONObject endPoint = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0); JSONObject endPoint = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
endPoint.put("lock_type", "1"); endPoint.put("lock_type", PointEnum.LOCK_TYPE_FALSE.getCode());
pointTab.update(endPoint); pointTab.update(endPoint);
} }
taskObj.put("task_status", TaskStatusEnum.FINISHED.getCode()); taskObj.put("task_status", TaskStatusEnum.FINISHED.getCode());
@ -118,13 +120,17 @@ public class HnSendMaterialTask extends AbstractAcsTask {
taskTab.update(taskObj); taskTab.update(taskObj);
String point_code2 = taskObj.getString("point_code2"); String point_code2 = taskObj.getString("point_code2");
if (ObjectUtil.isEmpty(point_code2)) return; // 防止未找到终点而完成任务空指针
JSONObject point2Obj = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0); JSONObject point2Obj = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
JSONObject requestObj = task.getJSONObject("request_param"); JSONObject requestObj = task.getJSONObject("request_param");
// 工单标识 // 工单标识
String workorder_id = requestObj.getString("material_info_id"); String workorder_id = taskObj.getString("material_info_id");
//生产工单表【PDM_BD_WorkOrder】 JSONObject workorderObj = workOrderTab.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); // 物料
JSONObject workorderObj = workOrderTab.query("workorder_id", workorder_id).uniqueResult(0); JSONObject materialObj = materialTab.query("material_id = '" + workorderObj.getString("material_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(materialObj)) throw new BadRequestException("物料不存在!");
// 区域出入表【st_ivt_regionIO】 // 区域出入表【st_ivt_regionIO】
WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO"); WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO");
@ -132,40 +138,39 @@ public class HnSendMaterialTask extends AbstractAcsTask {
regionIoObj.put("iostorinv_id", IdUtil.getLongId()); regionIoObj.put("iostorinv_id", IdUtil.getLongId());
regionIoObj.put("bill_code", CodeUtil.getNewCode("IN_STORE_CODE")); regionIoObj.put("bill_code", CodeUtil.getNewCode("IN_STORE_CODE"));
regionIoObj.put("buss_date", DateUtil.today()); regionIoObj.put("buss_date", DateUtil.today());
regionIoObj.put("io_type", "1"); regionIoObj.put("io_type", RegionIOEnum.IO_TYPE_IN.getCode());
regionIoObj.put("region_id", point2Obj.getString("region_id")); regionIoObj.put("region_id", point2Obj.getString("region_id"));
regionIoObj.put("region_code", point2Obj.getString("region_code")); regionIoObj.put("region_code", point2Obj.getString("region_code"));
regionIoObj.put("region_name", point2Obj.getString("region_name")); regionIoObj.put("region_name", point2Obj.getString("region_name"));
regionIoObj.put("material_id", taskObj.getString("material_id")); regionIoObj.put("material_id", taskObj.getString("material_id"));
regionIoObj.put("vehicle_code", taskObj.getString("vehicle_code")); regionIoObj.put("vehicle_code", taskObj.getString("vehicle_code"));
regionIoObj.put("qty", requestObj.getString("qty")); regionIoObj.put("qty", requestObj.getString("qty"));
regionIoObj.put("bill_status", "3"); regionIoObj.put("is_new", workorderObj.getString("is_new"));
regionIoObj.put("bill_status", RegionIOEnum.BILL_STATUS_FINISH.getCode());
regionIoObj.put("start_point_code", taskObj.getString("point_code1")); regionIoObj.put("start_point_code", taskObj.getString("point_code1"));
regionIoObj.put("end_point_code", taskObj.getString("point_code3")); regionIoObj.put("end_point_code", taskObj.getString("point_code2"));
regionIoObj.put("create_mode", "2"); regionIoObj.put("create_mode", RegionIOEnum.CREATE_MODE_ACS.getCode());
regionIoObj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd")); regionIoObj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
regionIoObj.put("create_id", SecurityUtils.getCurrentUserId()); regionIoObj.put("create_id", SecurityUtils.getCurrentUserId());
regionIoObj.put("create_name", SecurityUtils.getCurrentNickName()); regionIoObj.put("create_name", SecurityUtils.getCurrentNickName());
regionIoObj.put("create_time", DateUtil.now()); regionIoObj.put("create_time", DateUtil.now());
regionIoTab.insert(regionIoObj); regionIoTab.insert(regionIoObj);
JSONObject materialObj = materialTab.query("material_id = '" + workorderObj.getString("material_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(materialObj)) throw new BadRequestException("物料不存在!");
//完成后入库 //完成后入库
point2Obj.put("instorage_time", taskObj.getString("create_time")); // 入库时间为任务生成的时间 point2Obj.put("instorage_time", taskObj.getString("create_time")); // 入库时间为任务生成的时间
point2Obj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd")); point2Obj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
point2Obj.put("ivt_qty", requestObj.getString("qty")); point2Obj.put("ivt_qty", requestObj.getString("qty"));
point2Obj.put("standing_time", materialObj.getString("standing_time")); point2Obj.put("standing_time", materialObj.getString("standing_time"));
point2Obj.put("warn_time", materialObj.getString("standing_time")); point2Obj.put("warn_time", materialObj.getString("warn_time"));
point2Obj.put("material_id", workorderObj.getString("material_id")); point2Obj.put("material_id", workorderObj.getString("material_id"));
point2Obj.put("vehicle_type", workorderObj.getString("vehicle_type")); point2Obj.put("vehicle_type", workorderObj.getString("is_new")); // 工单的新旧物料
point2Obj.put("vehicle_code", taskObj.getString("vehicle_code")); point2Obj.put("vehicle_code", taskObj.getString("vehicle_code"));
point2Obj.put("vehicle_qty", "1"); // 入库为1个载具
point2Obj.put("is_full", requestObj.getString("is_full")); point2Obj.put("is_full", requestObj.getString("is_full"));
// 终点解锁 // 终点解锁
point2Obj.put("lock_type", "1"); point2Obj.put("lock_type", PointEnum.LOCK_TYPE_FALSE.getCode());
point2Obj.put("point_status", "3"); point2Obj.put("point_status", PointEnum.POINT_STATUS_HAVE_MATERIAL.getCode());
pointTab.update(point2Obj); pointTab.update(point2Obj);
} }
} }
@ -181,7 +186,7 @@ public class HnSendMaterialTask extends AbstractAcsTask {
String vehicle_code = form.getString("vehicle_code"); String vehicle_code = form.getString("vehicle_code");
String qty = form.getString("qty"); String qty = form.getString("qty");
String is_full = form.getString("is_full"); String is_full = form.getString("is_full");
String weight = form.getString("weight"); String weight = form.getString("weight"); // 未存
//任务表【SCH_BASE_Task】 //任务表【SCH_BASE_Task】
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
//判断当前点是否有未完成的任务 //判断当前点是否有未完成的任务
@ -230,13 +235,15 @@ public class HnSendMaterialTask extends AbstractAcsTask {
public void findNextPoint() { public void findNextPoint() {
/** /**
* 根据业务找到相应的终点 * 根据业务找到相应的终点
* 高速混碾机下料先找高速压制机旁边的三个困料位没有位置则去公共货架
* 普通混碾机下料直接送到公共困料货架
*/ */
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
JSONArray taskArr = taskTab.query("handle_class = '" + THIS_CLASS + "'and is_delete = '0' and task_status = '2'").getResultJSONArray(0); JSONArray taskArr = taskTab.query("handle_class = '" + THIS_CLASS + "'and is_delete = '0' and task_status = '2'").getResultJSONArray(0);
for (int i = 0; i < taskArr.size(); i++) { for (int i = 0; i < taskArr.size(); i++) {
JSONObject taskObj = taskArr.getJSONObject(i); JSONObject taskObj = taskArr.getJSONObject(i);
String vehicle_type = taskObj.getString("vehicle_type");//混碾载具类型新旧料? String vehicle_type = taskObj.getString("vehicle_type");//混碾载具类型新旧料? 工單不提供载具类型
JSONObject param1 = new JSONObject(); JSONObject param1 = new JSONObject();
param1.put("flag", "1"); param1.put("flag", "1");
param1.put("region_code", "KLHJ"); param1.put("region_code", "KLHJ");
@ -255,11 +262,9 @@ public class HnSendMaterialTask extends AbstractAcsTask {
//锁住终点 //锁住终点
endPoint.put("task_id", taskObj.getString("task_id")); endPoint.put("task_id", taskObj.getString("task_id"));
endPoint.put("lock_type", "2"); endPoint.put("lock_type", PointEnum.LOCK_TYPE_TRUE.getCode());
pointTab.update(endPoint); pointTab.update(endPoint);
} }
} }
} }
@ -278,7 +283,7 @@ public class HnSendMaterialTask extends AbstractAcsTask {
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0); JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0);
if (ObjectUtil.isNotEmpty(taskObj)) if (ObjectUtil.isNotEmpty(taskObj))
this.updateTaskStatus(taskObj,"2"); this.updateTaskStatus(taskObj, UpdateTaskStatusEnum.FORCEFINISH.getCode());
else { else {
throw new BadRequestException("未找到该任务或者任务已完成!"); throw new BadRequestException("未找到该任务或者任务已完成!");
} }
@ -294,7 +299,7 @@ public class HnSendMaterialTask extends AbstractAcsTask {
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0); JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0);
if (ObjectUtil.isNotEmpty(taskObj)) if (ObjectUtil.isNotEmpty(taskObj))
this.updateTaskStatus(taskObj,"0"); this.updateTaskStatus(taskObj,UpdateTaskStatusEnum.CANCEL.getCode());
else { else {
throw new BadRequestException("未找到该任务或者任务已完成!"); throw new BadRequestException("未找到该任务或者任务已完成!");
} }

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

Binary file not shown.

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

@ -159,10 +159,10 @@
<el-form-item label="计划数量" prop="plan_qty"> <el-form-item label="计划数量" prop="plan_qty">
<el-input v-model="form.plan_qty" style="width: 200px;" /> <el-input v-model="form.plan_qty" style="width: 200px;" />
</el-form-item> </el-form-item>
<el-form-item label="载具类型" prop="vehicle_type"> <el-form-item label="物料类型" prop="vehicle_type">
<el-select v-model="form.vehicle_type" style="width: 200px" filterable placeholder="请选择"> <el-select v-model="form.is_new" style="width: 200px" filterable placeholder="请选择">
<el-option <el-option
v-for="item in dict.vehicle_type" v-for="item in dict.material_type"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
@ -261,15 +261,20 @@
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip /> <el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip /> <el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip /> <el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
<el-table-column prop="vehicle_type" label="物料类型" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.material_type[scope.row.is_new] }}
</template>
</el-table-column>
<el-table-column prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip /> <el-table-column prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="planproduceend_date" label="计划结束时间" min-width="150" show-overflow-tooltip /> <el-table-column prop="planproduceend_date" label="计划结束时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="realproducestart_date" label="实际开始时间" min-width="150" show-overflow-tooltip /> <el-table-column prop="realproducestart_date" label="实际开始时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="realproduceend_date" label="实际结束时间" min-width="150" show-overflow-tooltip /> <el-table-column prop="realproduceend_date" label="实际结束时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip> <!-- <el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} <!-- {{ dict.label.vehicle_type[scope.row.vehicle_type] }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column prop="is_needmove" label="是否搬运"> <el-table-column prop="is_needmove" label="是否搬运">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.is_or_not[scope.row.is_needmove] }} {{ dict.label.is_or_not[scope.row.is_needmove] }}
@ -342,13 +347,14 @@ const defaultForm = {
device_code: null, device_code: null,
is_canupdate_update: '1', is_canupdate_update: '1',
material_spec: null, material_spec: null,
sale_id: null sale_id: null,
is_new: '1'
} }
export default { export default {
name: 'Produceshiftorder', name: 'Produceshiftorder',
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog }, components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['pdm_workorder_status', 'is_used', 'is_or_not', 'vehicle_type', 'workorder_procedure'], dicts: ['pdm_workorder_status', 'is_used', 'is_or_not', 'material_type', 'vehicle_type', 'workorder_procedure'],
cruds() { cruds() {
return CRUD({ return CRUD({
title: '工单', url: 'api/workorder', idField: 'workorder_id', sort: 'workorder_id,desc', title: '工单', url: 'api/workorder', idField: 'workorder_id', sort: 'workorder_id,desc',

Loading…
Cancel
Save