出入窑缓存区
This commit is contained in:
@@ -70,6 +70,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
|||||||
String cust_id = MapUtil.getStr(whereJson, "cust_id");
|
String cust_id = MapUtil.getStr(whereJson, "cust_id");
|
||||||
String workprocedure_id = MapUtil.getStr(whereJson, "workprocedure_id");
|
String workprocedure_id = MapUtil.getStr(whereJson, "workprocedure_id");
|
||||||
String producetask_status = MapUtil.getStr(whereJson, "producetask_status");
|
String producetask_status = MapUtil.getStr(whereJson, "producetask_status");
|
||||||
|
String material_name = MapUtil.getStr(whereJson, "material_name");
|
||||||
|
String device_name = MapUtil.getStr(whereJson, "device_name");
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
map.put("material_id", material_id);
|
map.put("material_id", material_id);
|
||||||
@@ -78,6 +80,12 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
|||||||
map.put("cust_id", cust_id);
|
map.put("cust_id", cust_id);
|
||||||
map.put("workprocedure_id", workprocedure_id);
|
map.put("workprocedure_id", workprocedure_id);
|
||||||
map.put("producetask_status", producetask_status);
|
map.put("producetask_status", producetask_status);
|
||||||
|
if (ObjectUtil.isNotEmpty(material_name)) {
|
||||||
|
map.put("material_name", "%" + material_name + "%");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(device_name)) {
|
||||||
|
map.put("device_name", "%" + device_name + "%");
|
||||||
|
}
|
||||||
if (ObjectUtil.isNotEmpty(search)) {
|
if (ObjectUtil.isNotEmpty(search)) {
|
||||||
map.put("search", "%" + search + "%");
|
map.put("search", "%" + search + "%");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,11 @@
|
|||||||
输入.device_id TYPEAS s_string
|
输入.device_id TYPEAS s_string
|
||||||
输入.produceline_id TYPEAS s_string
|
输入.produceline_id TYPEAS s_string
|
||||||
输入.cust_id TYPEAS s_string
|
输入.cust_id TYPEAS s_string
|
||||||
输入.workprocedure_id TYPEAS s_string
|
输入.workprocedure_id TYPEAS s_string
|
||||||
输入.producetask_id TYPEAS s_string
|
输入.producetask_id TYPEAS s_string
|
||||||
输入.producetask_status TYPEAS s_string
|
输入.producetask_status TYPEAS s_string
|
||||||
|
输入.material_name TYPEAS s_string
|
||||||
|
输入.device_name TYPEAS s_string
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
@@ -52,7 +54,7 @@
|
|||||||
device.workprocedure_id,
|
device.workprocedure_id,
|
||||||
device.device_name,
|
device.device_name,
|
||||||
material.material_name,
|
material.material_name,
|
||||||
|
material.material_code,
|
||||||
produceline.produceline_name
|
produceline.produceline_name
|
||||||
FROM
|
FROM
|
||||||
PDM_MG_produceTask task
|
PDM_MG_produceTask task
|
||||||
@@ -77,6 +79,12 @@
|
|||||||
OPTION 输入.produceline_id <> ""
|
OPTION 输入.produceline_id <> ""
|
||||||
(task.produceline_id = 输入.produceline_id)
|
(task.produceline_id = 输入.produceline_id)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.material_name <> ""
|
||||||
|
(material.material_name like 输入.material_name)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.device_name <> ""
|
||||||
|
(device.device_name like 输入.device_name)
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.producetask_status <> ""
|
OPTION 输入.producetask_status <> ""
|
||||||
(task.producetask_status = 输入.producetask_status)
|
(task.producetask_status = 输入.producetask_status)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package org.nl.wms.st.basedata.rest;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.annotation.Log;
|
||||||
|
import org.nl.wms.st.basedata.service.InKilnService;
|
||||||
|
import org.nl.wms.st.basedata.service.dto.StructattrDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: lyd
|
||||||
|
* @description: 入窑缓存库
|
||||||
|
* @Date: 2022/11/1
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "入窑缓存库")
|
||||||
|
@RequestMapping("/api/inkilncache")
|
||||||
|
@Slf4j
|
||||||
|
public class KilnController {
|
||||||
|
|
||||||
|
private final InKilnService inKilnService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询出/入窑缓存库仓位")
|
||||||
|
@ApiOperation("查询出/入窑缓存库仓位")
|
||||||
|
public ResponseEntity<Object> inKilnCacheQuery(@RequestParam Map whereJson, Pageable page){
|
||||||
|
return new ResponseEntity<>(inKilnService.kilnCacheQuery(whereJson,page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("修改出/入窑缓存库仓位")
|
||||||
|
@ApiOperation("修改出/入窑缓存库仓位")
|
||||||
|
public ResponseEntity<Object> update(@RequestBody JSONObject dto){
|
||||||
|
inKilnService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.nl.wms.st.basedata.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: lyd
|
||||||
|
* @description: 入窑缓存库
|
||||||
|
* @Date: 2022/11/1
|
||||||
|
*/
|
||||||
|
public interface InKilnService {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param whereJson
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String,Object> kilnCacheQuery(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改入窑库存
|
||||||
|
* @param dto
|
||||||
|
*/
|
||||||
|
void update(JSONObject dto);
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package org.nl.wms.st.basedata.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.st.basedata.service.InKilnService;
|
||||||
|
import org.nl.wql.WQL;
|
||||||
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wql.util.WqlUtil;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: lyd
|
||||||
|
* @description: 出/入窑缓存库
|
||||||
|
* @Date: 2022/11/1
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class KilnServiceImpl implements InKilnService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> kilnCacheQuery(Map whereJson, Pageable page) {
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "1");
|
||||||
|
if (ObjectUtil.isNotEmpty(whereJson.get("point_code")))
|
||||||
|
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
||||||
|
map.put("point_status", whereJson.get("point_status"));
|
||||||
|
map.put("lock_type", whereJson.get("lock_type"));
|
||||||
|
map.put("is_used", whereJson.get("is_used"));
|
||||||
|
map.put("area_type", whereJson.get("area_type"));
|
||||||
|
JSONObject json = WQL.getWO("SCH_Base_Kiln01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point.point_code");
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(JSONObject jsonObject) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
String stockrecordId = jsonObject.getString("stockrecord_id");
|
||||||
|
String material_id = jsonObject.getString("material_id");
|
||||||
|
String vehicle_code = jsonObject.getString("vehicle_code");
|
||||||
|
String point_status = jsonObject.getString("point_status");
|
||||||
|
String ivt_qty = jsonObject.getString("ivt_qty");
|
||||||
|
|
||||||
|
WQLObject structIvtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
|
||||||
|
WQLObject vehicleGroupTab = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||||
|
WQLObject materialTab = WQLObject.getWQLObject("MD_ME_Material");
|
||||||
|
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||||
|
|
||||||
|
JSONObject vehicleGroupObj = null;
|
||||||
|
if (ObjectUtil.isNotEmpty(vehicle_code)) {
|
||||||
|
vehicleGroupObj = vehicleGroupTab.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (point_status.equals("00")) { // 空位
|
||||||
|
// 删除仓位库存
|
||||||
|
structIvtTab.delete("struct_id = '" + jsonObject.getString("struct_id") + "'");
|
||||||
|
} else if (point_status.equals("01")) { // 空载具
|
||||||
|
// 删除组盘
|
||||||
|
if (ObjectUtil.isNotEmpty(vehicleGroupObj))
|
||||||
|
vehicleGroupTab.delete(vehicleGroupObj);
|
||||||
|
} else {
|
||||||
|
if (ObjectUtil.isEmpty(stockrecordId)) { // 仓位库存id为空,就插入
|
||||||
|
JSONObject structIvt = new JSONObject();
|
||||||
|
structIvt.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
structIvt.put("struct_id", jsonObject.getString("struct_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(vehicle_code))
|
||||||
|
structIvt.put("vehicle_code", jsonObject.getString("vehicle_code"));
|
||||||
|
structIvt.put("workprocedure_id", jsonObject.getString("workprocedure_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(material_id))
|
||||||
|
structIvt.put("material_id", jsonObject.getString("material_id"));
|
||||||
|
structIvt.put("producetask_id", jsonObject.getString("producetask_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject.getString("ivt_qty"))) {
|
||||||
|
structIvt.put("canuse_qty", ivt_qty);
|
||||||
|
structIvt.put("ivt_qty", ivt_qty);
|
||||||
|
}
|
||||||
|
structIvt.put("frozen_qty", 0);
|
||||||
|
structIvt.put("warehousing_qty", 0);
|
||||||
|
structIvt.put("is_full", 0);
|
||||||
|
structIvtTab.insert(structIvt);
|
||||||
|
} else { // 不为空就修改
|
||||||
|
JSONObject structIvt = structIvtTab.query("stockrecord_id = '" + stockrecordId + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(vehicle_code))
|
||||||
|
structIvt.put("vehicle_code", jsonObject.getString("vehicle_code"));
|
||||||
|
if (ObjectUtil.isNotEmpty(material_id))
|
||||||
|
structIvt.put("material_id", jsonObject.getString("material_id"));
|
||||||
|
structIvt.put("producetask_id", jsonObject.getString("producetask_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject.getString("ivt_qty"))) {
|
||||||
|
structIvt.put("canuse_qty", ivt_qty);
|
||||||
|
structIvt.put("ivt_qty", ivt_qty);
|
||||||
|
}
|
||||||
|
structIvtTab.update(structIvt);
|
||||||
|
}
|
||||||
|
// 组盘表
|
||||||
|
// 存在相应载具的话删掉在存
|
||||||
|
if (ObjectUtil.isNotEmpty(vehicleGroupObj)) vehicleGroupTab.delete(vehicleGroupObj);
|
||||||
|
JSONObject vehicleGroup = new JSONObject();
|
||||||
|
vehicleGroup.put("group_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
vehicleGroup.put("vehicle_code", vehicle_code);
|
||||||
|
vehicleGroup.put("is_autopackage", 1);
|
||||||
|
if (ObjectUtil.isNotEmpty(material_id)) {
|
||||||
|
vehicleGroup.put("material_id", jsonObject.getString("material_id"));
|
||||||
|
JSONObject material = materialTab.query("material_id = '" + jsonObject.getString("material_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(material)) {
|
||||||
|
vehicleGroup.put("material_code", material.getString("material_code"));
|
||||||
|
vehicleGroup.put("material_name", material.getString("material_name"));
|
||||||
|
vehicleGroup.put("material_spec", material.getString("material_spec"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vehicleGroup.put("task_id", IdUtil.simpleUUID());
|
||||||
|
vehicleGroup.put("create_id", currentUserId);
|
||||||
|
vehicleGroup.put("create_name", nickName);
|
||||||
|
vehicleGroup.put("create_time", now);
|
||||||
|
vehicleGroup.put("update_optid", currentUserId);
|
||||||
|
vehicleGroup.put("update_optname", nickName);
|
||||||
|
vehicleGroup.put("update_time", now);
|
||||||
|
vehicleGroup.put("producetask_id", jsonObject.getString("producetask_id"));
|
||||||
|
vehicleGroup.put("device_id", jsonObject.getString("device_id"));
|
||||||
|
vehicleGroup.put("qty", ivt_qty);
|
||||||
|
vehicleGroup.put("is_full", "1");
|
||||||
|
vehicleGroup.put("material_move_id", IdUtil.simpleUUID());
|
||||||
|
vehicleGroupTab.insert(vehicleGroup);
|
||||||
|
}
|
||||||
|
// 点位修改
|
||||||
|
JSONObject point = pointTab.query("point_id = '" + jsonObject.getString("point_id") + "'").uniqueResult(0);
|
||||||
|
point.put("point_status", point_status);
|
||||||
|
point.put("lock_type", jsonObject.getString("lock_type"));
|
||||||
|
pointTab.update(point);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 入窑缓存库
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.point_code TYPEAS s_string
|
||||||
|
输入.point_status TYPEAS s_string
|
||||||
|
输入.lock_type TYPEAS s_string
|
||||||
|
输入.is_used TYPEAS s_string
|
||||||
|
输入.area_type TYPEAS s_string
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
point.*,
|
||||||
|
structattr.struct_id,
|
||||||
|
structivt.stockrecord_id,
|
||||||
|
structivt.material_id,
|
||||||
|
material.material_name
|
||||||
|
FROM
|
||||||
|
sch_base_point point
|
||||||
|
LEFT JOIN st_ivt_structattr structattr ON structattr.struct_code = point.point_code
|
||||||
|
LEFT JOIN st_ivt_structivt structivt ON structivt.struct_id = structattr.struct_id
|
||||||
|
LEFT JOIN md_me_material material ON material.material_id = structivt.material_id
|
||||||
|
WHERE
|
||||||
|
area_type = 输入.area_type
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
point.point_code LIKE 输入.point_code
|
||||||
|
OR
|
||||||
|
point.point_name LIKE 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.point_status <> ""
|
||||||
|
point.point_status = 输入.point_status
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.lock_type <> ""
|
||||||
|
point.lock_type = 输入.lock_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.is_used <> ""
|
||||||
|
point.is_used = 输入.is_used
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
183
wms/qd/src/views/wms/st/basedata/inkilncache/WorkDialog.vue
Normal file
183
wms/qd/src/views/wms/st/basedata/inkilncache/WorkDialog.vue
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
<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.material_name"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备名称">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_name"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="设备名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生产状态">
|
||||||
|
<el-select v-model="query.producetask_status" style="width: 185px;" filterable clearable class="filter-item" placeholder="请选择状态" @change="crud.toQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.PRODUCETASK_STATUS"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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="producetask_code" label="生产任务编码" width="120" />
|
||||||
|
<el-table-column prop="producetask_status" label="生产任务状态" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.PRODUCETASK_STATUS[scope.row.producetask_status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="device_name" label="设备名称" width="120" />
|
||||||
|
<el-table-column prop="vehicle_type" label="载具类型" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.MD_MTPVEHICLE_TYPE[scope.row.vehicle_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="fasle" prop="stewing_time" label="静置时间" />
|
||||||
|
<el-table-column prop="plan_qty" label="计划生产数量" width="120" />
|
||||||
|
<el-table-column prop="real_qty" label="实际生产数量" width="120" />
|
||||||
|
<el-table-column prop="plan_date" label="计划日期" width="150" />
|
||||||
|
<el-table-column prop="classes" label="班次" width="150" />
|
||||||
|
</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'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WorkDialog',
|
||||||
|
components: { rrOperation, pagination },
|
||||||
|
dicts: ['PRODUCETASK_STATUS', 'PRODUCETASK_STATUS_TYPE', 'MD_MTPVEHICLE_TYPE'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({ title: '生产任务', url: 'api/producetask', optShow: {}})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
isSingle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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('tableChanged3', 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('tableChanged3', this.rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
11
wms/qd/src/views/wms/st/basedata/inkilncache/crudKiln.js
Normal file
11
wms/qd/src/views/wms/st/basedata/inkilncache/crudKiln.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/inkilncache',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { edit }
|
||||||
264
wms/qd/src/views/wms/st/basedata/inkilncache/index.vue
Normal file
264
wms/qd/src/views/wms/st/basedata/inkilncache/index.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<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="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="点位编码">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入点位编码或名称"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-select
|
||||||
|
v-model="query.point_status"
|
||||||
|
style="width: 185px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
placeholder="点位状态"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_point_status"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="锁定类型">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.lock_type"
|
||||||
|
active-value="01"
|
||||||
|
inactive-value="00"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#C0CCDA"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.is_used"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="1"
|
||||||
|
active-color="#C0CCDA"
|
||||||
|
inactive-color="#409EFF"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
|
<el-form-item label="点位状态" prop="point_status">
|
||||||
|
<el-select v-model="form.point_status" filterable placeholder="请选择" style="width: 370px;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_point_status"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.producetask_id" style="width: 370px;" @focus="getWork"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.material_id" style="width: 370px;" @focus="getWork"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.workprocedure_id" style="width: 370px;" @focus="getWork"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.device_id" style="width: 370px;" @focus="getWork"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status=='02'" label="生产任务" prop="producetask_code">
|
||||||
|
<el-input v-model="form.producetask_code" style="width: 370px;" @focus="getWork"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位编码" prop="point_code">
|
||||||
|
<el-input v-model="form.point_code" style="width: 370px;" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位名称" prop="point_name">
|
||||||
|
<el-input v-model="form.point_name" style="width: 370px;" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status=='01' || form.point_status=='02'" label="载具编码">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库存数" prop="ivt_qty" v-if="form.point_status=='02'">
|
||||||
|
<el-input v-model="form.ivt_qty" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="锁定类型" prop="lock_type">
|
||||||
|
<el-select v-model="form.lock_type" filterable placeholder="请选择" style="width: 370px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_lock_type"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @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 prop="point_code" label="点位编码" />
|
||||||
|
<el-table-column prop="point_name" label="点位名称" min-width="120" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="area_type" label="所属区域" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_area_type[scope.row.area_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_type" label="点位类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_point_type[scope.row.point_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_status" label="点位状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_point_status[scope.row.point_status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lock_type" label="锁定类型" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_lock_type[scope.row.lock_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" min-width="120" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="remark" label="备注" />
|
||||||
|
<el-table-column prop="is_used" label="是否启用" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.is_used?'是':'否'}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="update_optname" label="修改人" />
|
||||||
|
<el-table-column prop="update_time" label="修改时间" min-width="120" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="vehicle_qty" label="载具数量" />
|
||||||
|
<el-table-column prop="device_id" label="设备标识" />
|
||||||
|
<el-table-column prop="device_point_type" label="设备点位类型" min-width="120"/>
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
:is-visiable-del="false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<WorkDialog :dialog-show.sync="workDialog" @tableChanged3="tableChanged"/>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudKiln from './crudKiln'
|
||||||
|
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 WorkDialog from '@/views/wms/st/basedata/inkilncache/WorkDialog'
|
||||||
|
|
||||||
|
const defaultForm = { point_id: null, point_code: null, point_name: null, area_type: null, point_type: null, point_status: null, lock_type: null, vehicle_code: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, vehicle_qty: null, device_id: null, device_point_type: null, producetask_id: null, producetask_code: null, material_id: null, workprocedure_id: null }
|
||||||
|
export default {
|
||||||
|
name: 'InKiln',
|
||||||
|
components: { WorkDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
dicts: ['sch_area_type', 'sch_point_type', 'sch_point_status', 'sch_lock_type'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '入窑缓存库区',
|
||||||
|
url: 'api/inkilncache',
|
||||||
|
idField: 'point_id',
|
||||||
|
sort: 'point_id,desc',
|
||||||
|
crudMethod: { ...crudKiln },
|
||||||
|
query: {
|
||||||
|
area_type: '01'
|
||||||
|
},
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: true,
|
||||||
|
del: false,
|
||||||
|
reset: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
workDialog: false,
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
point_code: [
|
||||||
|
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_name: [
|
||||||
|
{ required: true, message: '点位名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
area_type: [
|
||||||
|
{ required: true, message: '所属区域不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_type: [
|
||||||
|
{ required: true, message: '点位类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_status: [
|
||||||
|
{ required: true, message: '点位状态不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
lock_type: [
|
||||||
|
{ required: true, message: '锁定类型不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
getWork() {
|
||||||
|
this.workDialog = true
|
||||||
|
},
|
||||||
|
tableChanged(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.form.producetask_id = row.producetask_id
|
||||||
|
this.form.producetask_code = row.producetask_code
|
||||||
|
this.form.material_id = row.material_id
|
||||||
|
this.form.workprocedure_id = row.workprocedure_id
|
||||||
|
this.form.device_id = row.device_id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
264
wms/qd/src/views/wms/st/basedata/outkilncache/index.vue
Normal file
264
wms/qd/src/views/wms/st/basedata/outkilncache/index.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<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="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="点位编码">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入点位编码或名称"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-select
|
||||||
|
v-model="query.point_status"
|
||||||
|
style="width: 185px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
placeholder="点位状态"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_point_status"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="锁定类型">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.lock_type"
|
||||||
|
active-value="01"
|
||||||
|
inactive-value="00"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#C0CCDA"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.is_used"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="1"
|
||||||
|
active-color="#C0CCDA"
|
||||||
|
inactive-color="#409EFF"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
|
<el-form-item label="点位状态" prop="point_status">
|
||||||
|
<el-select v-model="form.point_status" filterable placeholder="请选择" style="width: 370px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_point_status"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.producetask_id" style="width: 370px;" @focus="getWork" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.material_id" style="width: 370px;" @focus="getWork" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.workprocedure_id" style="width: 370px;" @focus="getWork" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="false" label="生产任务">
|
||||||
|
<el-input v-model="form.device_id" style="width: 370px;" @focus="getWork" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status=='02'" label="生产任务" prop="producetask_code">
|
||||||
|
<el-input v-model="form.producetask_code" style="width: 370px;" @focus="getWork" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位编码" prop="point_code">
|
||||||
|
<el-input v-model="form.point_code" style="width: 370px;" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位名称" prop="point_name">
|
||||||
|
<el-input v-model="form.point_name" style="width: 370px;" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status=='01' || form.point_status=='02'" label="载具编码">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.point_status=='02'" label="库存数" prop="ivt_qty">
|
||||||
|
<el-input v-model="form.ivt_qty" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="锁定类型" prop="lock_type">
|
||||||
|
<el-select v-model="form.lock_type" filterable placeholder="请选择" style="width: 370px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.sch_lock_type"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @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 prop="point_code" label="点位编码" />
|
||||||
|
<el-table-column prop="point_name" label="点位名称" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="area_type" label="所属区域" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_area_type[scope.row.area_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_type" label="点位类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_point_type[scope.row.point_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_status" label="点位状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_point_status[scope.row.point_status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lock_type" label="锁定类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.sch_lock_type[scope.row.lock_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" min-width="120" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="remark" label="备注" />
|
||||||
|
<el-table-column prop="is_used" label="是否启用">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.is_used?'是':'否' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="update_optname" label="修改人" />
|
||||||
|
<el-table-column prop="update_time" label="修改时间" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicle_qty" label="载具数量" />
|
||||||
|
<el-table-column prop="device_id" label="设备标识" />
|
||||||
|
<el-table-column prop="device_point_type" label="设备点位类型" min-width="120" />
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
:is-visiable-del="false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<WorkDialog :dialog-show.sync="workDialog" @tableChanged3="tableChanged" />
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudKiln from '../inkilncache/crudKiln'
|
||||||
|
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 WorkDialog from '@/views/wms/st/basedata/inkilncache/WorkDialog'
|
||||||
|
|
||||||
|
const defaultForm = { point_id: null, point_code: null, point_name: null, area_type: null, point_type: null, point_status: null, lock_type: null, vehicle_code: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, vehicle_qty: null, device_id: null, device_point_type: null, producetask_id: null, producetask_code: null, material_id: null, workprocedure_id: null }
|
||||||
|
export default {
|
||||||
|
name: 'OutKiln',
|
||||||
|
components: { WorkDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
dicts: ['sch_area_type', 'sch_point_type', 'sch_point_status', 'sch_lock_type'],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '出窑缓存库区',
|
||||||
|
url: 'api/inkilncache',
|
||||||
|
idField: 'point_id',
|
||||||
|
sort: 'point_id,desc',
|
||||||
|
crudMethod: { ...crudKiln },
|
||||||
|
query: {
|
||||||
|
area_type: '02'
|
||||||
|
},
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: true,
|
||||||
|
del: false,
|
||||||
|
reset: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
workDialog: false,
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
point_code: [
|
||||||
|
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_name: [
|
||||||
|
{ required: true, message: '点位名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
area_type: [
|
||||||
|
{ required: true, message: '所属区域不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_type: [
|
||||||
|
{ required: true, message: '点位类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_status: [
|
||||||
|
{ required: true, message: '点位状态不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
lock_type: [
|
||||||
|
{ required: true, message: '锁定类型不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
getWork() {
|
||||||
|
this.workDialog = true
|
||||||
|
},
|
||||||
|
tableChanged(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.form.producetask_id = row.producetask_id
|
||||||
|
this.form.producetask_code = row.producetask_code
|
||||||
|
this.form.material_id = row.material_id
|
||||||
|
this.form.workprocedure_id = row.workprocedure_id
|
||||||
|
this.form.device_id = row.device_id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user