更改生产任务表单,添加托盘类型,修改涉及托盘类型的代码。
This commit is contained in:
@@ -0,0 +1 @@
|
||||
,DESKTOP-BT6HP4E/zhang,DESKTOP-BT6HP4E,29.08.2022 16:51,file:///C:/Users/zhang/AppData/Roaming/LibreOffice/4;
|
||||
@@ -38,6 +38,7 @@ public class StructFindUtil {
|
||||
String area_type = jsonObject.getString("area_type");
|
||||
String is_full = jsonObject.getString("is_full");
|
||||
String workprocedure_id = jsonObject.getString("workprocedure_id");
|
||||
String vehicle_type = jsonObject.getString("vehicle_type");
|
||||
|
||||
if (StrUtil.isEmpty(material_id)) {
|
||||
throw new BadRequestException("物料不能为空!");
|
||||
@@ -53,6 +54,7 @@ public class StructFindUtil {
|
||||
}
|
||||
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3")
|
||||
.addParam("material_id", material_id).addParam("area_type", area_type)
|
||||
.addParam("vehicle_type", vehicle_type)
|
||||
.addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id)
|
||||
.process().uniqueResult(0);
|
||||
return result;
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.code TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.area_type TYPEAS s_string
|
||||
输入.vehicle_type TYPEAS s_string
|
||||
输入.workprocedure_id TYPEAS s_string
|
||||
输入.is_full TYPEAS s_string
|
||||
输入.vehicle_type TYPEAS s_string
|
||||
输入.workprocedure_id TYPEAS s_string
|
||||
输入.is_full TYPEAS s_string
|
||||
输入.vehicle_type TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -103,28 +104,32 @@ ENDIF
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT DISTINCT
|
||||
point.point_code AS struct_code,
|
||||
point.point_id AS struct_id,
|
||||
point.point_name AS struct_name,
|
||||
point.vehicle_code,
|
||||
ivt.canuse_qty,
|
||||
ivt.workprocedure_id,
|
||||
ivt.qty_unit_id,
|
||||
ivt.pcsn,
|
||||
ivt.qty_unit_id,
|
||||
ruledis.out_seq_no
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN sch_base_point point ON point.point_id = ivt.struct_id
|
||||
left join st_rule_IOdisStruct ruledis on ruledis.struct_uuid = ivt.struct_id
|
||||
WHERE
|
||||
ivt.canuse_qty > 0
|
||||
AND point.point_status = '02'
|
||||
AND point.lock_type = '00'
|
||||
AND point.is_used ='1'
|
||||
and TIME_TO_SEC(timediff(now(),ivt.instorage_time)) >=ivt.stewing_time*60
|
||||
OPTION 输入.material_id <> ""
|
||||
ivt.material_id = 输入.material_id
|
||||
point.point_code AS struct_code,
|
||||
point.point_id AS struct_id,
|
||||
point.point_name AS struct_name,
|
||||
point.vehicle_code,
|
||||
ivt.canuse_qty,
|
||||
ivt.workprocedure_id,
|
||||
ivt.qty_unit_id,
|
||||
ivt.pcsn,
|
||||
ivt.qty_unit_id,
|
||||
ruledis.out_seq_no
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN sch_base_point point ON point.point_id = ivt.struct_id
|
||||
left join st_rule_IOdisStruct ruledis on ruledis.struct_uuid = ivt.struct_id
|
||||
left join md_pb_vehicle vehicle on vehicle.vehicle_code =ivt.vehicle_code
|
||||
WHERE
|
||||
ivt.canuse_qty > 0
|
||||
AND point.point_status = '02'
|
||||
AND point.lock_type = '00'
|
||||
AND point.is_used ='1'
|
||||
and TIME_TO_SEC(timediff(now(),ivt.instorage_time)) >=ivt.stewing_time*60
|
||||
OPTION 输入.material_id <> ""
|
||||
ivt.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
OPTION 输入.vehicle_type <> ""
|
||||
vehicle.vehicle_type = 输入.vehicle_type
|
||||
ENDOPTION
|
||||
OPTION 输入.area_type <> ""
|
||||
point.area_type = 输入.area_type
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.ext.acs.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -34,7 +35,10 @@ public class AcsToWmsController {
|
||||
@ApiOperation("ACS给WMS发送任务")
|
||||
public ResponseEntity<Object> receiveTaskFromAcs(@RequestBody Map whereJson) {
|
||||
acsToWmsService.receiveTaskFromAcs(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "200");
|
||||
result.put("message", "发送任务成功");
|
||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/manipulatorApply")
|
||||
@@ -42,7 +46,10 @@ public class AcsToWmsController {
|
||||
@ApiOperation("ACS机械手给WMS发送任务")
|
||||
public ResponseEntity<Object> manipulatorApply(@RequestBody Map whereJson) {
|
||||
acsToWmsService.manipulatorApply(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "200");
|
||||
result.put("message", "发送任务成功");
|
||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
produceInfoByCode = this.getProduceInfoByCode(device_code);
|
||||
//批次 物料,客户要从排产单里面去取
|
||||
jsonObject.put("pcsn", "pcsn");
|
||||
jsonObject.put("material_id", "1515940603542769664");
|
||||
jsonObject.put("material_id", produceInfoByCode.getString("material_id"));
|
||||
jsonObject.put("cust_id", "1516368197694132224");
|
||||
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||
break;
|
||||
@@ -324,6 +324,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("未找到工单号为'" + producetask_code + "'的工单信息!");
|
||||
}
|
||||
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_code = '" + material_code + "'").uniqueResult(0);
|
||||
//1为确认
|
||||
//2为生产中
|
||||
//3为完成
|
||||
@@ -338,15 +339,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
throw new BadRequestException("物料编码不能为空!");
|
||||
}
|
||||
|
||||
//根据设备去找设备id
|
||||
JSONObject deviceObj = WQLObject.getWQLObject("PDM_BASE_DEVICE").query("device_code='" + device_code + "'").uniqueResult(0);
|
||||
//根据物料code 去找物料id
|
||||
JSONObject materiObj = WQLObject.getWQLObject("MD_ME_Material").query("material_code='" + material_code + "'").uniqueResult(0);
|
||||
if (!StrUtil.equals(deviceObj.getString("device_id"), taskObj.getString("device_id"))) {
|
||||
throw new BadRequestException("设备标识不一样!");
|
||||
}
|
||||
if (!StrUtil.equals(materiObj.getString("material_id"), taskObj.getString("material_id"))) {
|
||||
throw new BadRequestException("物料标识不一样!");
|
||||
if (!StrUtil.equals(materialObj.getString("material_id"), taskObj.getString("material_id"))) {
|
||||
throw new BadRequestException("物料标识不一样!");
|
||||
}
|
||||
taskObj.put("producetask_status", "04");
|
||||
|
||||
|
||||
@@ -6,9 +6,15 @@ package org.nl.wms.sch.manage;
|
||||
* 24 窑区域 25 空钢托堆叠区 26 自动柴垛线
|
||||
*/
|
||||
public enum VehicleTypeEnum {
|
||||
LZ("01", "料盅"),
|
||||
DLZ("01", "大料盅"),
|
||||
GTP("02", "钢托盘"),
|
||||
MTP("03", "木托盘");
|
||||
MTP1("03", "类型一木托盘"),
|
||||
MTP2("04", "类型二木托盘"),
|
||||
MTP3("05", "类型三木托盘"),
|
||||
MTP4("06", "类型四木托盘"),
|
||||
MTP5("07", "类型五木托盘"),
|
||||
TP6("08", "类型六托盘"),
|
||||
XLZ("09", "小料盅");
|
||||
|
||||
private final String name;
|
||||
private final String code;
|
||||
|
||||
@@ -112,25 +112,36 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
|
||||
switch (workProcedureEnum) {
|
||||
//混黏工序
|
||||
case HNGX:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
vehicle_type = VehicleTypeEnum.XLZ.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
break;
|
||||
// 压制工序
|
||||
case YZGX:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
vehicle_type = VehicleTypeEnum.GTP.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
break;
|
||||
//烧制工序
|
||||
case SZGX:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
vehicle_type = VehicleTypeEnum.GTP.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
break;
|
||||
//分拣工序
|
||||
case FJGX:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
// 根据点位code查找对应设备,根据设备查找对应工单,从工单中取托盘类型
|
||||
vehicle_type = WQL.getWO("BUSSTASK_001")
|
||||
.addParam("flag", "1")
|
||||
.addParam("point_code", next_point_code)
|
||||
.process()
|
||||
.uniqueResult(0)
|
||||
.getString("vehicle_type");
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
break;
|
||||
default:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
vehicle_type = VehicleTypeEnum.XLZ.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
}
|
||||
//寻找一个合适的仓位
|
||||
param.put("vehicle_type",vehicle_type);
|
||||
JSONObject outStructObj = StructFindUtil.getEmptyVehicleOutStruct(param);
|
||||
if (ObjectUtil.isEmpty(outStructObj)) {
|
||||
continue;
|
||||
@@ -194,9 +205,9 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
|
||||
switch (workProcedureEnum) {
|
||||
//混黏工序
|
||||
case HNGX:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
|
||||
//托盘类型取当前工单生产的托盘类型
|
||||
vehicle_type = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0).getString("vehicle_type");
|
||||
break;
|
||||
// 压制工序
|
||||
case YZGX:
|
||||
@@ -211,13 +222,12 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
|
||||
//分拣工序
|
||||
case FJGX:
|
||||
//托盘类型取当前工单生产的托盘类型
|
||||
JSONObject produceObj = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0);
|
||||
vehicle_type = produceObj.getString("vehicle_type");
|
||||
vehicle_type = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0).getString("vehicle_type");
|
||||
start_area = AreaEnum.CYZC.getCode();
|
||||
is_auto_issue = "0";
|
||||
break;
|
||||
default:
|
||||
vehicle_type = VehicleTypeEnum.LZ.getCode();
|
||||
vehicle_type = VehicleTypeEnum.DLZ.getCode();
|
||||
start_area = AreaEnum.KLHJ.getCode();
|
||||
}
|
||||
JSONObject param = new JSONObject();
|
||||
|
||||
@@ -15,10 +15,7 @@ import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.BussConstant;
|
||||
import org.nl.wms.WorkProcedureEnum;
|
||||
import org.nl.wms.common.StructFindUtil;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.AreaEnum;
|
||||
import org.nl.wms.sch.manage.BillTypeEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.manage.*;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wms.sch.service.impl.PointServiceImpl;
|
||||
@@ -236,6 +233,7 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
.process().uniqueResult(0);
|
||||
String workprocedure_id = workInfo.getString("workprocedure_id");
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
|
||||
String vehilce_type="";
|
||||
|
||||
switch (workProcedureEnum) {
|
||||
//混黏工序
|
||||
@@ -243,6 +241,7 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
endArea_type = AreaEnum.KLHJ.getCode();
|
||||
bill_type = BillTypeEnum.HNRK.getCode();
|
||||
vehilce_type = VehicleTypeEnum.XLZ.getCode();
|
||||
break;
|
||||
// 压制工序
|
||||
case YZGX:
|
||||
@@ -270,6 +269,7 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
param.put("material_id", material_id);
|
||||
param.put("area_type", endArea_type);
|
||||
param.put("vehicle_code", vehicle_code);
|
||||
param.put("vehilce_type", vehilce_type);
|
||||
JSONObject inStructObj = StructFindUtil.getInStruct(param);
|
||||
if (ObjectUtil.isEmpty(inStructObj)) {
|
||||
throw new BadRequestException("未找到合适的入库仓位!");
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
[交易说明]
|
||||
交易名: ACS发送请求给mes
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.workprocedure_id TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
task.vehicle_type
|
||||
FROM
|
||||
pdm_mg_producetask task
|
||||
right JOIN sch_base_point point ON task.device_id = point.device_id
|
||||
WHERE
|
||||
task.producetask_status IN ('03', '04')
|
||||
OPTION 输入.point_code <> ""
|
||||
point.point_code = 输入.point_code
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -205,7 +205,7 @@ public class SectattrServiceImpl implements SectattrService {
|
||||
JSONArray sect_ja = new JSONArray();
|
||||
for (int j = 0; j < sect_arr.size(); j++) {
|
||||
JSONObject sect_jo = sect_arr.getJSONObject(j);
|
||||
net.sf.json.JSONObject sect_cas = new net.sf.json.JSONObject();
|
||||
JSONObject sect_cas = new JSONObject();
|
||||
sect_cas.put("value", sect_jo.getString("sect_id"));
|
||||
sect_cas.put("label", sect_jo.getString("sect_name"));
|
||||
sect_ja.add(sect_cas);
|
||||
|
||||
155
wms/qd/src/views/wms/pdm/produceTask/MaterDialog.vue
Normal file
155
wms/qd/src/views/wms/pdm/produceTask/MaterDialog.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="规格" show-overflow-tooltip />
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="english_name" label="外文名称" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudWorkprocedureios from '@/api/wms/st/in/workprocedureios'
|
||||
|
||||
export default {
|
||||
name: 'MaterDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/workprocedureiosIn/getMaterial', crudMethod: { ...crudWorkprocedureios }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
materOptCode: {
|
||||
type: String,
|
||||
default: '00'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
open() {
|
||||
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged4', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged4', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -128,15 +128,9 @@
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="780px">
|
||||
<el-form ref="form" inline :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
<el-form-item label="物料名称" prop="material_id">
|
||||
<el-select v-model="form.material_id" filterable clearable style="width: 200px;" placeholder="请选择物料">
|
||||
<el-option
|
||||
v-for="item in materialList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<label slot="label">物 料</label>
|
||||
<el-input v-model="form.material_name" style="width: 200px;" @focus="getMater" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="device_id">
|
||||
<el-select v-model="form.device_id" filterable clearable style="width: 200px" placeholder="请选择设备">
|
||||
@@ -148,7 +142,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产线名称" prop="produceline_id">
|
||||
<el-form-item v-if="false" label="产线名称" prop="produceline_id">
|
||||
<el-select v-model="form.produceline_id" filterable clearable class="filter-item" style="width: 200px" placeholder="请选择产线">
|
||||
<el-option
|
||||
v-for="item in producelineList"
|
||||
@@ -254,7 +248,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="物料名称" />
|
||||
<el-table-column prop="device_name" label="设备名称" width="120" />
|
||||
<el-table-column prop="produceline_name" label="产线名称" />
|
||||
<el-table-column v-if="false" prop="produceline_name" label="产线名称" />
|
||||
<el-table-column prop="cust_name" label="客户名称" />
|
||||
<el-table-column prop="seq_no" label="生产顺序" />
|
||||
<el-table-column prop="plan_qty" label="计划生产数量" width="120" />
|
||||
@@ -298,6 +292,7 @@
|
||||
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="tableChanged3" />
|
||||
<CopyDialog ref="copyChiled" :open-param="openParam" :dialog-show.sync="copyShow" @tableChanged2="tableChanged2" />
|
||||
<SortDialog :open-param="openParam" :dialog-show.sync="sortShow" @tableChanged1="tableChanged1" />
|
||||
<MaterDialog :dialog-show.sync="materDialog" :dialog-matertype="materType" @tableChanged4="tableChanged4" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -311,12 +306,13 @@ import pagination from '@crud/Pagination'
|
||||
import UploadDialog from '@/views/wms/pdm/produceTask/UploadDialog'
|
||||
import CopyDialog from '@/views/wms/pdm/produceTask/CopyDialog'
|
||||
import SortDialog from '@/views/wms/pdm/produceTask/SortDialog'
|
||||
import MaterDialog from './MaterDialog.vue'
|
||||
|
||||
const defaultForm = { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, device_id: null, produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null }
|
||||
const defaultForm = { producetask_id: null, producetask_code: null, producetask_status: null, material_id: null, material_name: null, device_id: null, produceline_id: null, cust_id: null, seq_no: null, plan_qty: null, real_qty: null, plan_start_time: null, real_start_time: null, plan_end_time: null, real_end_time: null, producetask_finish_type: null, stand_hour: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, model: null, molten_pool: null, is_package: '0' }
|
||||
export default {
|
||||
name: 'Producetask',
|
||||
dicts: ['PRODUCETASK_STATUS', 'PRODUCETASK_STATUS_TYPE', 'MD_EVEHICLE_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog, CopyDialog, SortDialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog, CopyDialog, SortDialog, MaterDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '生产任务', url: 'api/producetask', idField: 'producetask_id', sort: 'producetask_id,desc', optShow: { add: true, edit: false, del: false, download: false, reset: true }, crudMethod: { ...crudProducetask }})
|
||||
@@ -340,16 +336,15 @@ export default {
|
||||
sort_update: false,
|
||||
openParam: {},
|
||||
currentRow: null,
|
||||
materDialog: false,
|
||||
materType: '',
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '物料标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
device_id: [
|
||||
{ required: true, message: '设备标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
produceline_id: [
|
||||
{ required: true, message: '产线标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
// produceline_id: [
|
||||
// { required: true, message: '产线标识不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
seq_no: [
|
||||
{ required: true, message: '生产顺序不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -364,6 +359,9 @@ export default {
|
||||
],
|
||||
stand_hour: [
|
||||
{ required: true, message: '静置时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_name: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
@@ -499,6 +497,14 @@ export default {
|
||||
},
|
||||
tableChanged1() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
},
|
||||
tableChanged4(row) {
|
||||
console.log(row)
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user