增加回温报表和原料库报表
This commit is contained in:
@@ -217,30 +217,20 @@
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>2.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.17</version>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.17</version>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- fastjson -->
|
||||
|
||||
@@ -204,27 +204,31 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
public static void downloadExcel(List<Map<String, Object>> list, HttpServletResponse response) throws IOException {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
|
||||
// 一次性写出内容,使用默认样式,强制输出标题
|
||||
writer.write(list, true);
|
||||
SXSSFSheet sheet = (SXSSFSheet)writer.getSheet();
|
||||
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
||||
sheet.trackAllColumnsForAutoSizing();
|
||||
//列宽自适应
|
||||
writer.autoSizeColumnAll();
|
||||
//response为HttpServletResponse对象
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
|
||||
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
// 终止后删除临时文件
|
||||
file.deleteOnExit();
|
||||
writer.flush(out, true);
|
||||
//此处记得关闭输出Servlet流
|
||||
IoUtil.close(out);
|
||||
public static void downloadExcel(List<Map<String, Object>> list, HttpServletResponse response) {
|
||||
try {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
|
||||
// 一次性写出内容,使用默认样式,强制输出标题
|
||||
writer.write(list, true);
|
||||
SXSSFSheet sheet = (SXSSFSheet) writer.getSheet();
|
||||
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
||||
sheet.trackAllColumnsForAutoSizing();
|
||||
//列宽自适应
|
||||
writer.autoSizeColumnAll();
|
||||
//response为HttpServletResponse对象
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
|
||||
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
// 终止后删除临时文件
|
||||
file.deleteOnExit();
|
||||
writer.flush(out, true);
|
||||
//此处记得关闭输出Servlet流
|
||||
IoUtil.close(out);
|
||||
}catch(IOException e){
|
||||
log.error("下载文件失败[][]",e,e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static String getFileType(String type) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.mes.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -21,4 +22,9 @@ public class QPMES060RequestBody {
|
||||
private double incomingLength;
|
||||
private double incomingWeight;
|
||||
private double incomingchipping;
|
||||
private String ingotBatch;
|
||||
private String siliconGrade;
|
||||
private String siliconPolarity;
|
||||
private double weightCoefficientValue;
|
||||
private String lineDiameter;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,16 @@ public class Material implements Serializable {
|
||||
private String group_bind_material_status;
|
||||
@ApiModelProperty(value = "棒源等级")
|
||||
private String barLevel;
|
||||
@ApiModelProperty(value = "客户来料批次号")
|
||||
private String ingotBatch;
|
||||
@ApiModelProperty(value = "晶棒等级")
|
||||
private String siliconGrade;
|
||||
@ApiModelProperty(value = "晶棒等级")
|
||||
private String siliconPolarity;
|
||||
@ApiModelProperty(value = "重量")
|
||||
private String weightCoefficientValue;
|
||||
@ApiModelProperty(value = "线直径")
|
||||
private String lineDiameter;
|
||||
|
||||
|
||||
public void copyFrom(QPMES060RequestBody source){
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.sch.report;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -13,6 +14,8 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "报表管理")
|
||||
@@ -23,13 +26,38 @@ public class ReportController {
|
||||
private IReportService reportService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询组盘信息管理")
|
||||
@ApiOperation("查询组盘信息管理")
|
||||
@Log("查询报表管理")
|
||||
@ApiOperation("查询报表管理")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> query(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/yl/detail")
|
||||
@Log("原料库库存明细")
|
||||
@ApiOperation("原料库库存明细")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> queryYlDetail(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryYlDetail(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/hw/detail")
|
||||
@Log("回温间库存明细")
|
||||
@ApiOperation("回温间库存明细")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> queryHwDetail(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryHwDetail(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping("/yl/download")
|
||||
@Log("查询详情导出")
|
||||
@ApiOperation("查询详情导出")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public void queryDetailDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
|
||||
reportService.queryYlDownload(whereJson,page,response);
|
||||
}
|
||||
|
||||
@GetMapping("/getSupplierNameList")
|
||||
@Log("查询供应商名称列表")
|
||||
@ApiOperation("查询供应商名称列表")
|
||||
@@ -46,5 +74,12 @@ public class ReportController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.getProductDescriptionList()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getLotSNList")
|
||||
@Log("查询晶棒编号列表")
|
||||
@ApiOperation("查询晶棒编号列表")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> getLotSNList(){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.getLotSNList()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@ package org.nl.wms.sch.report.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -19,8 +23,16 @@ public interface IReportService extends IService<ReportDto> {
|
||||
*/
|
||||
IPage<ReportDto> queryAll(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<HwDto> queryHwDetail(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
IPage<YlDto> queryYlDetail(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
void queryYlDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
|
||||
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
List<String> getProductDescriptionList();
|
||||
|
||||
List<String> getLotSNList();
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package org.nl.wms.sch.report.service.dao.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
|
||||
import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -22,9 +22,20 @@ public interface ReportMapper extends BaseMapper<ReportDto> {
|
||||
*/
|
||||
IPage<ReportDto> queryReport(IPage<ReportDto> pages, ReportQuery query);
|
||||
|
||||
/**
|
||||
* 分页查找
|
||||
* @return
|
||||
*/
|
||||
IPage<YlDto> queryYlDetail(IPage<YlDto> pages, ReportQuery query);
|
||||
|
||||
IPage<HwDto> queryHwDetail(IPage<HwDto> pages, ReportQuery query);
|
||||
|
||||
@Select("select supplierName from sch_base_material group by supplierName")
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
@Select("select productDescription from sch_base_material group by productDescription")
|
||||
List<String> getProductDescriptionList();
|
||||
|
||||
@Select("select lotSN from sch_base_material")
|
||||
List<String> getLotSNList();
|
||||
}
|
||||
|
||||
@@ -33,4 +33,91 @@
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
|
||||
<select id="queryYlDetail" resultType="org.nl.wms.sch.report.service.dto.YlDto">
|
||||
SELECT
|
||||
m.lotSN,
|
||||
p.point_code as pointCode,
|
||||
p.point_name as pointName,
|
||||
p.region_code as regionCode,
|
||||
p.region_name as regionName,
|
||||
p.vehicle_code2 as subTray,
|
||||
p.vehicle_code as motherTray,
|
||||
p.update_time as updateTime,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
m.incomingLength,
|
||||
m.incomingWeight
|
||||
FROM
|
||||
sch_base_point p,sch_base_material m
|
||||
WHERE
|
||||
p.vehicle_code2 = m.PalletSN
|
||||
and
|
||||
vehicle_code2!='' AND vehicle_code2 is not null
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
|
||||
<select id="queryHwDetail" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT a.*,( SELECT count( * ) FROM sch_base_material m2 WHERE m2.PalletSN = a.subTray ) as number
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
p.point_code AS pointCode,
|
||||
p.point_name AS pointName,
|
||||
p.region_code AS regionCode,
|
||||
p.region_name AS regionName,
|
||||
p.vehicle_code2 AS subTray,
|
||||
p.vehicle_code AS motherTray,
|
||||
p.update_time AS updateTime,
|
||||
ANY_VALUE ( v.standing_time ) AS standingTime,
|
||||
ANY_VALUE ( m.productDescription ) AS productDescription,
|
||||
ANY_VALUE ( m.supplierName ) AS supplierName,
|
||||
ANY_VALUE ( m.ingotBatch ) AS ingotBatch,
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
p.update_time,
|
||||
curtime()) AS usedTime
|
||||
FROM
|
||||
sch_base_point p
|
||||
LEFT JOIN sch_base_material m ON p.vehicle_code2 = m.PalletSN
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
WHERE
|
||||
vehicle_code2 != ''
|
||||
AND vehicle_code2 IS NOT NULL
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
pointCode
|
||||
ORDER BY pointCode ASC
|
||||
) a
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.nl.wms.sch.report.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class HwDto implements Serializable {
|
||||
/** 点位编码 */
|
||||
private String pointCode;
|
||||
/** 点位名称 */
|
||||
private String pointName;
|
||||
/** 区域编码 */
|
||||
private String regionCode;
|
||||
/** 区域名称 */
|
||||
private String regionName;
|
||||
/** 子托号 */
|
||||
private String subTray;
|
||||
/** 母拖号 */
|
||||
private String motherTray;
|
||||
/** 物料名称 */
|
||||
private String productDescription;
|
||||
/** 供应商名称 */
|
||||
private String supplierName;
|
||||
/** 入库时间 */
|
||||
private String updateTime;
|
||||
/** 回温时间 */
|
||||
private String standingTime;
|
||||
/** 已回温时间 */
|
||||
private String usedTime;
|
||||
/** 数量 */
|
||||
private String number;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.nl.wms.sch.report.service.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class YlDto implements Serializable {
|
||||
/** 点位编码 */
|
||||
private String pointCode;
|
||||
/** 点位名称 */
|
||||
private String pointName;
|
||||
/** 区域编码 */
|
||||
private String regionCode;
|
||||
/** 区域名称 */
|
||||
private String regionName;
|
||||
/** 子托号 */
|
||||
private String subTray;
|
||||
/** 母拖号 */
|
||||
private String motherTray;
|
||||
/** 物料名称 */
|
||||
private String productDescription;
|
||||
/** 供应商名称 */
|
||||
private String supplierName;
|
||||
/** 入库时间 */
|
||||
private String updateTime;
|
||||
/** 棒源等级 */
|
||||
private String barLevel;
|
||||
/** 客户来料批次号 */
|
||||
private String ingotBatch;
|
||||
/** 晶棒号 */
|
||||
private String lotSN;
|
||||
/** 来料长度 */
|
||||
private String incomingLength;
|
||||
/** 来料重量 */
|
||||
private String incomingWeight;
|
||||
}
|
||||
@@ -7,19 +7,27 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
|
||||
import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery;
|
||||
import org.nl.wms.sch.material.service.dao.Material;
|
||||
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
|
||||
import org.nl.wms.sch.report.service.IReportService;
|
||||
import org.nl.wms.sch.report.service.dao.mapper.ReportMapper;
|
||||
import org.nl.wms.sch.report.service.dto.HwDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.nl.wms.sch.report.service.dto.YlDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.nl.common.utils.PageUtil;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -33,7 +41,46 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
IPage<ReportDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryReport(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<YlDto> queryYlDetail(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<YlDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryYlDetail(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
public IPage<HwDto> queryHwDetail(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<HwDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryHwDetail(pages, query);
|
||||
return pages;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void queryYlDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
|
||||
pageQuery.setSize(99999);
|
||||
IPage<YlDto> pages = this.queryYlDetail(query,pageQuery);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for(YlDto detailDto:pages.getRecords()){
|
||||
Map<String, Object> mp = new LinkedHashMap<>();
|
||||
mp.put("点位编码",detailDto.getPointCode());
|
||||
mp.put("点位名称",detailDto.getPointCode());
|
||||
mp.put("区域编码",detailDto.getRegionCode());
|
||||
mp.put("区域名称",detailDto.getRegionName());
|
||||
mp.put("子托号",detailDto.getSubTray());
|
||||
mp.put("母拖号",detailDto.getMotherTray());
|
||||
mp.put("物料名称",detailDto.getProductDescription());
|
||||
mp.put("供应商名称",detailDto.getSupplierName());
|
||||
mp.put("入库时间",detailDto.getUpdateTime());
|
||||
mp.put("棒源等级",detailDto.getBarLevel());
|
||||
mp.put("客户来料批次号",detailDto.getIngotBatch());
|
||||
mp.put("晶棒号",detailDto.getLotSN());
|
||||
mp.put("来料长度",detailDto.getIncomingLength());
|
||||
mp.put("来料重量",detailDto.getIncomingWeight());
|
||||
list.add(mp);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
public List<String> getSupplierNameList(){
|
||||
@@ -44,5 +91,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
return reportMapper.getProductDescriptionList();
|
||||
}
|
||||
|
||||
public List<String> getLotSNList(){
|
||||
return reportMapper.getLotSNList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -307,11 +307,13 @@ public class YCLCKTask extends AbstractTask {
|
||||
// 终点解锁
|
||||
if (ObjectUtil.isNotEmpty(endPointObj)) {
|
||||
endPointObj.setIng_task_code("");
|
||||
endPointObj.setUpdate_time(DateUtil.now());
|
||||
pointService.update(endPointObj);
|
||||
}
|
||||
// 起点解锁
|
||||
if (ObjectUtil.isNotEmpty(startPointObj)) {
|
||||
startPointObj.setIng_task_code("");
|
||||
startPointObj.setUpdate_time(DateUtil.now());
|
||||
pointService.update(startPointObj);
|
||||
}
|
||||
taskObj.setRemark("任务取消");
|
||||
|
||||
@@ -179,6 +179,7 @@ public class YCLRKTask extends AbstractTask {
|
||||
endPointObj.setIng_task_code("");
|
||||
endPointObj.setVehicle_code(taskObj.getVehicle_code());
|
||||
endPointObj.setVehicle_code2(taskObj.getVehicle_code2());
|
||||
endPointObj.setUpdate_time(DateUtil.now());
|
||||
endPointObj.setVehicle_qty(1);
|
||||
pointService.update(endPointObj);
|
||||
// 要把数据存到组盘表 -> 改造公共方法,返回id
|
||||
|
||||
59
lms/nladmin-ui/src/views/wms/hw/detail/detail.js
Normal file
59
lms/nladmin-ui/src/views/wms/hw/detail/detail.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/report/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getGroup(data) {
|
||||
return request({
|
||||
url: 'api/report/getGroup',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSupplierNameList(data) {
|
||||
return request({
|
||||
url: 'api/report/getSupplierNameList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductDescriptionList(data) {
|
||||
return request({
|
||||
url: 'api/report/getProductDescriptionList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getLotSNList(data) {
|
||||
return request({
|
||||
url: 'api/report/getLotSNList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList }
|
||||
413
lms/nladmin-ui/src/views/wms/hw/detail/index.vue
Normal file
413
lms/nladmin-ui/src/views/wms/hw/detail/index.vue
Normal file
@@ -0,0 +1,413 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="点位编码">
|
||||
<el-select
|
||||
v-model="query.point_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="点位编码"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getPointList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="晶体编号">
|
||||
<el-input
|
||||
v-model="query.lotSN"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="晶体编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称">
|
||||
<el-select
|
||||
v-model="query.supplierName"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商名称"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getSupplierNameList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierNameList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-select
|
||||
v-model="query.productDescription"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getProductDescriptionList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in productDescriptionList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</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="800px">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
|
||||
<el-form-item label="母托盘编码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="子托盘编码">
|
||||
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item v-if="false" label="来源载具">
|
||||
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="托盘类型">
|
||||
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||||
<el-radio label="1">子托盘</el-radio>
|
||||
<el-radio label="0">母托盘</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="回温开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.instorage_time"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 240px;"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位编码">
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 240px;"
|
||||
@change="setPointName"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.point_code"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
>
|
||||
<span style="float: left">{{ item.point_name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满托">
|
||||
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分钟)">
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
:min="1"
|
||||
:max="999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_qty"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_weight"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料来源">
|
||||
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||||
<el-radio-button label="物料" />
|
||||
<el-radio-button label="工单" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料名称">
|
||||
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘次数">
|
||||
<el-input v-model="form.group_number" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编码">
|
||||
<el-input v-model="form.task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="车间编码">
|
||||
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="组盘状态">
|
||||
<el-select
|
||||
v-model="form.group_status"
|
||||
size="mini"
|
||||
placeholder="点位状态"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.group_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="是否首个流程任务">
|
||||
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="流程编码">
|
||||
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程顺序">
|
||||
<el-input v-model="form.flow_num" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上一任务">
|
||||
<el-input v-model="form.before_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下一任务">
|
||||
<el-input v-model="form.next_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</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 prop="pointCode" label="点位编码" :min-width="flexWidth('pointCode',crud.data,'点位编码')" />
|
||||
<el-table-column prop="pointName" label="点位名称" :min-width="flexWidth('pointName',crud.data,'点位名称')" />
|
||||
<el-table-column prop="regionCode" label="区域编码" :min-width="flexWidth('regionCode',crud.data,'区域编码')" />
|
||||
<el-table-column prop="regionName" label="区域名称" :min-width="flexWidth('regionName',crud.data,'区域名称')" />
|
||||
<el-table-column prop="subTray" label="子托编码" :min-width="flexWidth('subTray',crud.data,'子托编码')" />
|
||||
<el-table-column prop="motherTray" label="母托编码" :min-width="flexWidth('motherTray',crud.data,'母托编码')" />
|
||||
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||||
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
|
||||
<el-table-column prop="batch" label="批次" :min-width="flexWidth('batch',crud.data,'批次')" />
|
||||
<el-table-column prop="barLevel" label="棒源等级" :min-width="flexWidth('barLevel',crud.data,'棒源等级')" />
|
||||
<el-table-column prop="number" label="每托数量(根)" :min-width="flexWidth('number',crud.data,'每托数量(根)')" />
|
||||
<el-table-column prop="updateTime" label="入库时间" :min-width="170" />
|
||||
<el-table-column prop="standingTime" label="回温时间H" :min-width="70" />
|
||||
<el-table-column prop="usedTime" label="已回温时间H" :min-width="70" />
|
||||
<el-table-column label="是否完成" :min-width="70">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.standingTime > scope.row.usedTime ? '未完成' : '已完成' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudMaterial from './detail'
|
||||
import CRUD, { crud, form, header, presenter } 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 crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
vehicle_code: null,
|
||||
vehicle_type: null,
|
||||
material_id: null,
|
||||
child_vehicle_code: null,
|
||||
source_vehicle_code: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
is_full: true,
|
||||
pcsn: null,
|
||||
instorage_time: null,
|
||||
standing_time: null,
|
||||
material_qty: null,
|
||||
material_weight: null,
|
||||
workorder_code: null,
|
||||
group_number: null,
|
||||
task_code: null,
|
||||
ext_data: null,
|
||||
workshop_code: null,
|
||||
group_status: null,
|
||||
table_name: null,
|
||||
table_fk: null,
|
||||
table_fk_id: null,
|
||||
buss_move_id: null,
|
||||
is_first_flow_task: true,
|
||||
flow_code: null,
|
||||
flow_num: null,
|
||||
before_task_code: null,
|
||||
next_task_code: null,
|
||||
remark: null,
|
||||
is_delete: false
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '回温间库存明细',
|
||||
url: 'api/report/hw/detail',
|
||||
idField: 'group_id',
|
||||
sort: 'pointCode,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: true,
|
||||
reset: false
|
||||
},
|
||||
query: {
|
||||
group_bind_material_status: '2',
|
||||
region_code: 'HW'
|
||||
},
|
||||
crudMethod: { ...crudMaterial }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
workShopList: [],
|
||||
pointList: [],
|
||||
regionList: [],
|
||||
supplierNameList: [],
|
||||
lotSNList: [],
|
||||
productDescriptionList: [],
|
||||
choose: '物料'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
this.getPointList()
|
||||
this.getRegionList()
|
||||
this.getSupplierNameList()
|
||||
// this.getLotSNList()
|
||||
this.getProductDescriptionList()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
getRegionList() {
|
||||
crudSchBaseRegion.getRegionList().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
},
|
||||
getPointList() { // 获取点位列表
|
||||
crudSchBasePoint.getPointList().then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
getSupplierNameList() {
|
||||
crudMaterial.getSupplierNameList().then(res => {
|
||||
this.supplierNameList = res.content
|
||||
})
|
||||
},
|
||||
getLotSNList() {
|
||||
crudMaterial.getLotSNList().then(res => {
|
||||
this.lotSNList = res.content
|
||||
})
|
||||
},
|
||||
getProductDescriptionList() {
|
||||
crudMaterial.getProductDescriptionList().then(res => {
|
||||
this.productDescriptionList = res.content
|
||||
})
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
if (this.choose === '工单') {
|
||||
this.form.workorder_code = row.workorder_code
|
||||
}
|
||||
},
|
||||
clearMaterial() {
|
||||
this.form.material_name = null
|
||||
this.form.material_id = null
|
||||
this.form.material_spec = null
|
||||
this.form.material_code = null
|
||||
},
|
||||
setPointName(data) {
|
||||
var point = this.pointList.find(item => item.point_code === data)
|
||||
this.form.point_name = point.point_name
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
59
lms/nladmin-ui/src/views/wms/ycl/detail/detail.js
Normal file
59
lms/nladmin-ui/src/views/wms/ycl/detail/detail.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/report/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getGroup(data) {
|
||||
return request({
|
||||
url: 'api/report/getGroup',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSupplierNameList(data) {
|
||||
return request({
|
||||
url: 'api/report/getSupplierNameList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductDescriptionList(data) {
|
||||
return request({
|
||||
url: 'api/report/getProductDescriptionList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getLotSNList(data) {
|
||||
return request({
|
||||
url: 'api/report/getLotSNList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup, getSupplierNameList, getProductDescriptionList, getLotSNList }
|
||||
408
lms/nladmin-ui/src/views/wms/ycl/detail/index.vue
Normal file
408
lms/nladmin-ui/src/views/wms/ycl/detail/index.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="点位编码">
|
||||
<el-select
|
||||
v-model="query.point_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="点位编码"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getPointList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="晶体编号">
|
||||
<el-input
|
||||
v-model="query.lotSN"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="晶体编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称">
|
||||
<el-select
|
||||
v-model="query.supplierName"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商名称"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getSupplierNameList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierNameList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-select
|
||||
v-model="query.productDescription"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@remote-method="getProductDescriptionList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in productDescriptionList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</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="800px">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
|
||||
<el-form-item label="母托盘编码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="子托盘编码">
|
||||
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item v-if="false" label="来源载具">
|
||||
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="托盘类型">
|
||||
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||||
<el-radio label="1">子托盘</el-radio>
|
||||
<el-radio label="0">母托盘</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="回温开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.instorage_time"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 240px;"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位编码">
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 240px;"
|
||||
@change="setPointName"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.point_code"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
>
|
||||
<span style="float: left">{{ item.point_name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满托">
|
||||
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分钟)">
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
:min="1"
|
||||
:max="999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_qty"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_weight"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料来源">
|
||||
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||||
<el-radio-button label="物料" />
|
||||
<el-radio-button label="工单" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料名称">
|
||||
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘次数">
|
||||
<el-input v-model="form.group_number" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编码">
|
||||
<el-input v-model="form.task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="车间编码">
|
||||
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="组盘状态">
|
||||
<el-select
|
||||
v-model="form.group_status"
|
||||
size="mini"
|
||||
placeholder="点位状态"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.group_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="是否首个流程任务">
|
||||
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="流程编码">
|
||||
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程顺序">
|
||||
<el-input v-model="form.flow_num" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上一任务">
|
||||
<el-input v-model="form.before_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下一任务">
|
||||
<el-input v-model="form.next_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</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 prop="pointCode" label="点位编码" :min-width="flexWidth('pointCode',crud.data,'点位编码')" />
|
||||
<el-table-column prop="pointName" label="点位名称" :min-width="flexWidth('pointName',crud.data,'点位名称')" />
|
||||
<el-table-column prop="regionCode" label="区域编码" :min-width="flexWidth('regionCode',crud.data,'区域编码')" />
|
||||
<el-table-column prop="regionName" label="区域名称" :min-width="flexWidth('regionName',crud.data,'区域名称')" />
|
||||
<el-table-column prop="subTray" label="子托编码" :min-width="flexWidth('subTray',crud.data,'子托编码')" />
|
||||
<el-table-column prop="motherTray" label="母托编码" :min-width="flexWidth('motherTray',crud.data,'母托编码')" />
|
||||
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||||
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
|
||||
<el-table-column prop="lotSN" label="晶体编号" :min-width="flexWidth('lotSN',crud.data,'晶体编号')" />
|
||||
<el-table-column prop="ingotBatch" label="批次" :min-width="flexWidth('ingotBatch',crud.data,'客户来料批次号')" />
|
||||
<el-table-column prop="barLevel" label="棒源等级" :min-width="flexWidth('barLevel',crud.data,'棒源等级')" />
|
||||
<el-table-column prop="updateTime" label="入库时间" :min-width="70" />
|
||||
<el-table-column prop="incomingWeight" label="重量KG" :min-width="70" />
|
||||
<el-table-column prop="incomingLength" label="长度mm" :min-width="flexWidth('incomingLength',crud.data,'长度mm')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudMaterial from './detail'
|
||||
import CRUD, { crud, form, header, presenter } 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 crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
vehicle_code: null,
|
||||
vehicle_type: null,
|
||||
material_id: null,
|
||||
child_vehicle_code: null,
|
||||
source_vehicle_code: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
is_full: true,
|
||||
pcsn: null,
|
||||
instorage_time: null,
|
||||
standing_time: null,
|
||||
material_qty: null,
|
||||
material_weight: null,
|
||||
workorder_code: null,
|
||||
group_number: null,
|
||||
task_code: null,
|
||||
ext_data: null,
|
||||
workshop_code: null,
|
||||
group_status: null,
|
||||
table_name: null,
|
||||
table_fk: null,
|
||||
table_fk_id: null,
|
||||
buss_move_id: null,
|
||||
is_first_flow_task: true,
|
||||
flow_code: null,
|
||||
flow_num: null,
|
||||
before_task_code: null,
|
||||
next_task_code: null,
|
||||
remark: null,
|
||||
is_delete: false
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '晶棒库库存明细',
|
||||
url: 'api/report/yl/detail',
|
||||
idField: 'group_id',
|
||||
sort: 'pointCode,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: true,
|
||||
reset: false
|
||||
},
|
||||
query: {
|
||||
group_bind_material_status: '2',
|
||||
region_code: 'YL'
|
||||
},
|
||||
crudMethod: { ...crudMaterial }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
workShopList: [],
|
||||
pointList: [],
|
||||
regionList: [],
|
||||
supplierNameList: [],
|
||||
lotSNList: [],
|
||||
productDescriptionList: [],
|
||||
choose: '物料'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
this.getPointList()
|
||||
this.getRegionList()
|
||||
this.getSupplierNameList()
|
||||
// this.getLotSNList()
|
||||
this.getProductDescriptionList()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
getRegionList() {
|
||||
crudSchBaseRegion.getRegionList().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
},
|
||||
getPointList() { // 获取点位列表
|
||||
crudSchBasePoint.getPointList().then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
getSupplierNameList() {
|
||||
crudMaterial.getSupplierNameList().then(res => {
|
||||
this.supplierNameList = res.content
|
||||
})
|
||||
},
|
||||
getLotSNList() {
|
||||
crudMaterial.getLotSNList().then(res => {
|
||||
this.lotSNList = res.content
|
||||
})
|
||||
},
|
||||
getProductDescriptionList() {
|
||||
crudMaterial.getProductDescriptionList().then(res => {
|
||||
this.productDescriptionList = res.content
|
||||
})
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
if (this.choose === '工单') {
|
||||
this.form.workorder_code = row.workorder_code
|
||||
}
|
||||
},
|
||||
clearMaterial() {
|
||||
this.form.material_name = null
|
||||
this.form.material_id = null
|
||||
this.form.material_spec = null
|
||||
this.form.material_code = null
|
||||
},
|
||||
setPointName(data) {
|
||||
var point = this.pointList.find(item => item.point_code === data)
|
||||
this.form.point_name = point.point_name
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user