add:手工排产功能上线;出库单设置
This commit is contained in:
@@ -65,6 +65,11 @@ public class PdmProduceWorkorderController{
|
||||
public ResponseEntity<Object> query(WorkorderQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(iPdmProduceWorkorderService.queryAll(query, page), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/queryByAps")
|
||||
@Log("查询工单管理")
|
||||
public ResponseEntity<Object> queryByAps(WorkorderQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(iPdmProduceWorkorderService.queryAllByAps(query, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("查询工单管理")
|
||||
|
||||
@@ -41,6 +41,7 @@ public interface IPdmProduceWorkorderService extends IService<PdmProduceWorkorde
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
TableDataInfo queryAll(WorkorderQuery whereJson, PageQuery page);
|
||||
TableDataInfo queryAllByAps(WorkorderQuery whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.Map;
|
||||
public interface PdmProduceWorkorderMapper extends BaseMapper<PdmProduceWorkorder>{
|
||||
List<Map> pageQuery(@Param("query") WorkorderQuery query);
|
||||
|
||||
List<Map> pageQueryByAps(@Param("query") WorkorderQuery query);
|
||||
|
||||
List<Map> getworkOrderDtl(String workorder_id);
|
||||
|
||||
int batchUpdateByParam(@Param("event") List<Map> event, @Param("workorder_id") String workorder_id);
|
||||
|
||||
@@ -3,6 +3,91 @@
|
||||
<mapper namespace="org.nl.wms.product_manage.service.workorder.dao.mapper.PdmProduceWorkorderMapper">
|
||||
|
||||
<select id="pageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
DATE_FORMAT(ShiftOrder.planproducestart_date, '%Y-%m-%d %H:%i:%s' ) AS planproducestart_date,
|
||||
DATE_FORMAT(ShiftOrder.planproduceend_date, '%Y-%m-%d %H:%i:%s' ) AS planproduceend_date,
|
||||
DATE_FORMAT(ShiftOrder.realproducestart_date, '%Y-%m-%d %H:%i:%s' ) AS realproducestart_date,
|
||||
DATE_FORMAT(ShiftOrder.realproduceend_date, '%Y-%m-%d %H:%i:%s' ) AS realproduceend_date,
|
||||
ShiftOrder.*,
|
||||
material.material_name,
|
||||
material.material_code,
|
||||
material.material_spec,
|
||||
material.net_weight AS material_weight,
|
||||
IF(material.limit_qty=0,device.outupperlimit_qty,material.limit_qty) as outupperlimit_qty,
|
||||
pro.workprocedure_code,
|
||||
pro.workprocedure_name,
|
||||
users.person_name AS current_produce_person_name
|
||||
FROM PDM_produce_workOrder ShiftOrder
|
||||
LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id
|
||||
LEFT JOIN PDM_BI_WorkProcedure pro ON pro.workprocedure_id = ShiftOrder.workprocedure_id
|
||||
LEFT JOIN sys_user users ON users.user_id = ShiftOrder.current_produce_person_id
|
||||
LEFT JOIN pdm_bi_device device ON ShiftOrder.device_code = device.device_code
|
||||
WHERE
|
||||
ShiftOrder.device_code is not null and ShiftOrder.current_produce_person_id is not null and
|
||||
ShiftOrder.is_delete = '0' AND ShiftOrder.aps_work_type != 'S'
|
||||
<if test="query.workorder_code != null and query.workorder_code != ''">
|
||||
and ShiftOrder.workorder_code like concat('%',#{query.workorder_code},'%')
|
||||
</if>
|
||||
<if test="query.filter_order_code == null or query.filter_order_code == ''">
|
||||
and ShiftOrder.workorder_code !=0 and ShiftOrder.device_code IS NOT NULL
|
||||
</if>
|
||||
<if test="query.order_status != null and query.order_status != ''">
|
||||
and find_in_set(ShiftOrder.workorder_status, #{query.order_status})
|
||||
</if>
|
||||
<if test="query.device_code != null and query.device_code != ''">
|
||||
and ShiftOrder.device_code like '%${query.device_code}%'
|
||||
</if>
|
||||
<if test="query.create_type != null and query.create_type != ''">
|
||||
and ShiftOrder.create_type = #{query.create_type}
|
||||
</if>
|
||||
<if test="query.shift_type_scode != null and query.shift_type_scode != ''">
|
||||
and ShiftOrder.shift_type_scode = #{query.shift_type_scode}
|
||||
</if>
|
||||
<if test="query.workprocedure_id != null and query.workprocedure_id != ''">
|
||||
and pro.workprocedure_id = #{query.workprocedure_id}
|
||||
</if>
|
||||
<if test="query.workprocedure_code != null and query.workprocedure_code != ''">
|
||||
and pro.workprocedure_code = #{query.workprocedure_code}
|
||||
</if>
|
||||
<if test="query.workprocedure_codes != null and query.workprocedure_codes != ''">
|
||||
and pro.workprocedure_code IN #{query.workprocedure_codes}
|
||||
</if>
|
||||
<if test="query.product_area != null and query.product_area != ''">
|
||||
and ShiftOrder.product_area = #{query.product_area}
|
||||
</if>
|
||||
<if test="query.is_error != null and query.is_error != ''">
|
||||
and ShiftOrder.is_error = #{query.is_error}
|
||||
</if>
|
||||
<if test="query.product_series != null and query.product_series != ''">
|
||||
and ShiftOrder.materialprocess_series in ${query.product_series}
|
||||
</if>
|
||||
<if test="query.start_time != null and query.start_time != ''">
|
||||
and ShiftOrder.realproducestart_date >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time != null and query.end_time != ''">
|
||||
and ShiftOrder.realproduceend_date <= #{query.end_time}
|
||||
</if>
|
||||
<if test="query.plan_start_time != null and query.plan_start_time != ''">
|
||||
and ShiftOrder.planproducestart_date >= #{query.plan_start_time}
|
||||
</if>
|
||||
<if test="query.plan_end_time != null and query.plan_end_time != ''">
|
||||
and ShiftOrder.planproducestart_date <= #{query.plan_end_time}
|
||||
</if>
|
||||
<if test="query.sale_id != null and query.sale_id != ''">
|
||||
and ShiftOrder.sale_id like '%${query.sale_id}%'
|
||||
</if>
|
||||
<if test="query.material_code != null and query.material_code != ''">
|
||||
and material.material_code = #{query.material_code}
|
||||
</if>
|
||||
<if test="query.material != null and query.material != ''">
|
||||
and (
|
||||
material.material_code like '%${query.material}%' or
|
||||
material.material_name like '%${query.material}%' or
|
||||
material.material_spec like '%${query.material}%'
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
<select id="pageQueryByAps" resultType="java.util.Map">
|
||||
SELECT
|
||||
DATE_FORMAT(ShiftOrder.planproducestart_date, '%Y-%m-%d %H:%i:%s' ) AS planproducestart_date,
|
||||
DATE_FORMAT(ShiftOrder.planproduceend_date, '%Y-%m-%d %H:%i:%s' ) AS planproduceend_date,
|
||||
|
||||
@@ -120,7 +120,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
|
||||
@Override
|
||||
public TableDataInfo queryAll(WorkorderQuery query, PageQuery pageQuery) {
|
||||
String orderBy = "ShiftOrder.workorder_code";
|
||||
String orderBy = "ShiftOrder.workorder_status desc,ShiftOrder.device_code desc,ShiftOrder.aps_workorder_no asc";
|
||||
if (!StringUtils.isEmpty(query.getProduct_series())) {
|
||||
String collect = classstandardService.getChildIdStr(query.getProduct_series()).stream().collect(Collectors.joining("','"));
|
||||
query.setProduct_series("('" + collect + "')");
|
||||
@@ -128,9 +128,6 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (!StringUtils.isEmpty(query.getOrder_status()) && query.getOrder_status().contains("-1")) {
|
||||
query.setOrder_status(query.getOrder_status().replaceAll("-1", "1,2,3,4"));
|
||||
}
|
||||
if (!StringUtils.isEmpty(query.getFilter_order_code())) {
|
||||
orderBy = "ShiftOrder.aps_workorder_no desc";
|
||||
}
|
||||
if (!StringUtils.isEmpty(query.getTitleSort())) {
|
||||
orderBy = query.getTitleSort();
|
||||
}
|
||||
@@ -141,6 +138,28 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
return build;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo queryAllByAps(WorkorderQuery query, PageQuery pageQuery) {
|
||||
String orderBy = "ShiftOrder.workprocedure_id asc,ShiftOrder.aps_workorder_no asc,ShiftOrder.workorder_code desc";
|
||||
if (!StringUtils.isEmpty(query.getProduct_series())) {
|
||||
String collect = classstandardService.getChildIdStr(query.getProduct_series()).stream().collect(Collectors.joining("','"));
|
||||
query.setProduct_series("('" + collect + "')");
|
||||
}
|
||||
if (!StringUtils.isEmpty(query.getOrder_status()) && query.getOrder_status().contains("-1")) {
|
||||
query.setOrder_status(query.getOrder_status().replaceAll("-1", "1,2,3,4"));
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(query.getTitleSort())) {
|
||||
orderBy = query.getTitleSort();
|
||||
}
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize()).setOrderBy(orderBy);
|
||||
List<Map> result = pdmProduceWorkorderMapper.pageQueryByAps(query);
|
||||
TableDataInfo build = TableDataInfo.build(result);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object queryAll(Map whereJson) {
|
||||
return this.list();
|
||||
@@ -582,7 +601,10 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
}
|
||||
if(j == 4) {
|
||||
//设备 A1_TW_
|
||||
workorder.setDevice_code("A1_TW_" + col.replaceAll("-", "_"));
|
||||
String s = col.replaceAll("-", "_");
|
||||
if (StringUtils.isNotEmpty(s)){
|
||||
workorder.setDevice_code("A1_TW_" + s);
|
||||
}
|
||||
}
|
||||
if(j == 7) {
|
||||
//单重
|
||||
@@ -618,7 +640,8 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
PdmProduceWorkorder workorder = data.get(i);
|
||||
SysUser sysUser = users.get(workorder.getCurrent_produce_person_id());
|
||||
if(sysUser == null) {
|
||||
errorMap.put("第" + (i + 1) + "行:", "账号:" + workorder.getCurrent_produce_person_id() + "不存在");
|
||||
//errorMap.put("第" + (i + 1) + "行:", "账号:" + workorder.getCurrent_produce_person_id() + "不存在");
|
||||
workorder.setCurrent_produce_person_id(null);
|
||||
}
|
||||
else{
|
||||
workorder.setCurrent_produce_person_id(sysUser.getUser_id());
|
||||
@@ -744,7 +767,8 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
PdmProduceWorkorder workorder = data.get(i);
|
||||
SysUser sysUser = users.get(workorder.getCurrent_produce_person_id());
|
||||
if(sysUser == null) {
|
||||
errorMap.put("第" + (i + 1) + "行:", "账号:" + workorder.getCurrent_produce_person_id() + "不存在");
|
||||
//errorMap.put("第" + (i + 1) + "行:", "账号:" + workorder.getCurrent_produce_person_id() + "不存在");
|
||||
workorder.setCurrent_produce_person_id(null);
|
||||
}
|
||||
else{
|
||||
workorder.setCurrent_produce_person_id(sysUser.getUser_id());
|
||||
@@ -785,26 +809,30 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
for(int i = 0; i < data.size(); i++) {
|
||||
PdmProduceWorkorder item = data.get(i);
|
||||
List<PdmBiDevice> devices = listMap.get(item.getWorkprocedure_id());
|
||||
if("1535144356586165920".equals(item.getWorkprocedure_id())) {
|
||||
item.setDevice_code("A1_DC_" + item.getDevice_code().replaceAll("-", "_"));
|
||||
}
|
||||
else if("1535143882327724032".equals(item.getWorkprocedure_id())) {
|
||||
item.setDevice_code("A1_XY_" + item.getDevice_code().replaceAll("-", "_"));
|
||||
}
|
||||
else{
|
||||
List<PdmBiDevice> deviceCollect = devices.stream().filter(pdmBiDevice ->
|
||||
{
|
||||
String device_code = pdmBiDevice.getDevice_code();
|
||||
int indexOf = device_code.lastIndexOf("_");
|
||||
String substring = device_code.substring(indexOf + 1);
|
||||
return Integer.valueOf(substring).equals(Integer.valueOf(item.getDevice_code()));
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(deviceCollect) || deviceCollect.size() > 1) {
|
||||
errorMap.put("第" + (i + 1) + "行:", "设备名称:" + item.getDevice_code() + "不存在了!!");
|
||||
}
|
||||
else{
|
||||
item.setDevice_code(deviceCollect.get(0).getDevice_code());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getDevice_code())){
|
||||
if("1535144356586165920".equals(item.getWorkprocedure_id())) {
|
||||
item.setDevice_code("A1_DC_" + item.getDevice_code().replaceAll("-", "_"));
|
||||
}
|
||||
else if("1535143882327724032".equals(item.getWorkprocedure_id())) {
|
||||
item.setDevice_code("A1_XY_" + item.getDevice_code().replaceAll("-", "_"));
|
||||
}
|
||||
else{
|
||||
List<PdmBiDevice> deviceCollect = devices.stream().filter(pdmBiDevice ->
|
||||
{
|
||||
String device_code = pdmBiDevice.getDevice_code();
|
||||
int indexOf = device_code.lastIndexOf("_");
|
||||
String substring = device_code.substring(indexOf + 1);
|
||||
return Integer.valueOf(substring).equals(Integer.valueOf(item.getDevice_code()));
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(deviceCollect) || deviceCollect.size() > 1) {
|
||||
errorMap.put("第" + (i + 1) + "行:", "设备名称:" + item.getDevice_code() + "不存在了!!");
|
||||
}
|
||||
else{
|
||||
item.setDevice_code(deviceCollect.get(0).getDevice_code());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
item.setDevice_code(null);
|
||||
}
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(errorMap)) {
|
||||
@@ -838,7 +866,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
//1-创建、2-下发、3-生产中、4-暂停、6-完成
|
||||
//判断该工单状态
|
||||
try {
|
||||
PdmProduceWorkorder result = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("device_code", param.getString("device_code")).in("workorder_status", "3", "4").eq("is_delete", false).ne("workorder_id", param.getString("workorder_id")));
|
||||
PdmProduceWorkorder result = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("device_code", param.getString("device_code")).in("workorder_status", "3").eq("is_delete", false).ne("workorder_id", param.getString("workorder_id")));
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
throw new BadRequestException("已有工单选择该设备开工,请更换开工设备!");
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@ public class StIvtStructivtCpController {
|
||||
return new ResponseEntity<>(iStIvtStructivtCpService.packageQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/queryGroup")
|
||||
@Log("成品库存查询")
|
||||
//("成品库存查询")
|
||||
public ResponseEntity<Object> queryGroup(CpIvtQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(iStIvtStructivtCpService.groupQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getStructIvt")
|
||||
@Log("查询库存")
|
||||
//("查询库存")
|
||||
|
||||
@@ -27,6 +27,14 @@ public interface IStIvtStructivtCpService extends IService<StIvtStructivtCp> {
|
||||
*/
|
||||
Object packageQuery(CpIvtQuery query, PageQuery page);
|
||||
|
||||
/**
|
||||
* 出库查询(合并)
|
||||
* @param query
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
Object groupQuery(CpIvtQuery query, PageQuery page);
|
||||
|
||||
/**
|
||||
* 成品库存更新
|
||||
* @param json
|
||||
|
||||
@@ -31,6 +31,8 @@ public interface StIvtStructivtCpMapper extends BaseMapper<StIvtStructivtCp> {
|
||||
|
||||
List<Map> packageQuery(@Param("query") CpIvtQuery query);
|
||||
|
||||
List<Map> groupQuery(@Param("query") CpIvtQuery query);
|
||||
|
||||
List<Map> getStructAll(@Param("chanList") List<String> list);
|
||||
|
||||
List<JSONObject> getIvtPor();
|
||||
|
||||
@@ -198,6 +198,65 @@
|
||||
</where>
|
||||
order by ivt.instorage_time DESC,attr.struct_code ASC
|
||||
</select>
|
||||
<select id="groupQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
attr.stor_name,
|
||||
attr.sect_name,
|
||||
ivt.struct_code,
|
||||
ivt.struct_name,
|
||||
GROUP_CONCAT(mater.material_id) as material_id,
|
||||
GROUP_CONCAT(mater.material_name) as material_name,
|
||||
GROUP_CONCAT(mater.material_spec) as material_spec,
|
||||
GROUP_CONCAT(mater.material_code) as material_code,
|
||||
attr.storagevehicle_code,
|
||||
sum(ivt.canuse_qty) canuse_qty,
|
||||
sum(ivt.frozen_qty) frozen_qty,
|
||||
sum(ivt.ivt_qty) ivt_qty,
|
||||
sum(ivt.warehousing_qty) warehousing_qty,
|
||||
ivt.bill_type,
|
||||
unit.unit_name,
|
||||
unit.measure_unit_id,
|
||||
ivt.instorage_time,
|
||||
sale.sale_code,
|
||||
GROUP_CONCAT(sale.seq_no) as seq_no,
|
||||
sale.sale_id,
|
||||
sale.sale_type
|
||||
FROM
|
||||
st_ivt_structivt_cp ivt
|
||||
LEFT JOIN md_me_materialbase mater ON ivt.material_id = mater.material_id
|
||||
LEFT JOIN st_ivt_structattr attr ON attr.struct_id = ivt.struct_id
|
||||
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id
|
||||
LEFT JOIN mps_sale_order sale ON sale.sale_id = ivt.sale_id
|
||||
<where>
|
||||
1=1
|
||||
<if test="query.material_code!= null and query.material_code != ''">
|
||||
and mater.material_code LIKE #{query.material_code} or
|
||||
(mater.material_name LIKE #{query.material_code}) or
|
||||
(mater.material_spec LIKE #{query.material_code})
|
||||
</if>
|
||||
<if test="query.struct_code!= null and query.struct_code != ''">
|
||||
and attr.struct_code LIKE #{query.struct_code} or
|
||||
(attr.struct_name LIKE #{query.struct_code})
|
||||
</if>
|
||||
<if test="query.sale_code!= null and query.sale_code != ''">
|
||||
and sale.sale_code LIKE #{query.sale_code}
|
||||
</if>
|
||||
<if test="query.seq_no!= null and query.seq_no != ''">
|
||||
and sale.seq_no LIKE #{query.seq_no}
|
||||
</if>
|
||||
<if test="query.lock_type!= null and query.lock_type != ''">
|
||||
and attr.lock_type = #{query.lock_type}
|
||||
</if>
|
||||
<if test="query.start_time!= null and query.start_time != ''">
|
||||
and ivt.instorage_time >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time!= null and query.end_time != ''">
|
||||
and ivt.instorage_time <= #{query.end_time}
|
||||
</if>
|
||||
</where>
|
||||
group by attr.struct_code
|
||||
order by ivt.instorage_time DESC,attr.struct_code ASC
|
||||
</select>
|
||||
|
||||
<select id="getStructAll" resultType="java.util.Map">
|
||||
SELECT
|
||||
|
||||
@@ -70,6 +70,15 @@ public class StIvtStructivtCpServiceImpl extends ServiceImpl<StIvtStructivtCpMap
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object groupQuery(CpIvtQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
TableDataInfo build = TableDataInfo.build(this.baseMapper.groupQuery(query));
|
||||
build.setTotalElements(page.getTotal());
|
||||
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void UpdateIvt(JSONObject json) {
|
||||
|
||||
@@ -172,11 +172,11 @@
|
||||
<template slot-scope="{ row }">
|
||||
<span
|
||||
:style="{
|
||||
color: row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? '' : 'orange',
|
||||
fontWeight: row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? 'normal' : 'bold'
|
||||
color: row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? '' : 'orange',
|
||||
fontWeight: row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? 'normal' : 'bold'
|
||||
}"
|
||||
>
|
||||
{{ row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? '未调整' : row.aps_workorder_no }}
|
||||
{{ row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? '未调整' : row.aps_workorder_no }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -425,7 +425,7 @@ export default {
|
||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'WORKORDER_CREATE_TYPE', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT', 'product_area'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工单调整', url: 'api/produceWorkorder', idField: 'workorder_id', sort: 'workorder_id,desc',
|
||||
title: '工单调整', url: 'api/produceWorkorder/queryByAps', idField: 'workorder_id', sort: 'workorder_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
|
||||
@@ -954,7 +954,7 @@ export default {
|
||||
query: {
|
||||
order_status: '-1',
|
||||
product_area: 'A1',
|
||||
titleSort: 'ShiftOrder.workorder_code desc',
|
||||
titleSort: 'ShiftOrder.device_code,ShiftOrder.aps_workorder_no',
|
||||
is_error: '0'
|
||||
},
|
||||
crudMethod: { ...crudProduceshiftorder }
|
||||
@@ -969,7 +969,7 @@ export default {
|
||||
statisticsSpecOptions: [],
|
||||
workprocedureListArea: [],
|
||||
sortTitileList: [{ value: 'ShiftOrder.device_code,ShiftOrder.aps_workorder_no', label: '设备编号' }, {
|
||||
value: 'ShiftOrder.workorder_code desc',
|
||||
value: 'ShiftOrder.workorder_status desc,ShiftOrder.workorder_code desc',
|
||||
label: '工单编号'
|
||||
}],
|
||||
zxj: [{ value: 'A1_ZXJ_1', label: '一线1号装箱机' }, { value: 'A1_ZXJ_2', label: '一线2号装箱机' }],
|
||||
@@ -1068,6 +1068,7 @@ export default {
|
||||
rows[0].report_qty = this.reportForm.report_qty
|
||||
crudProduceshiftorder.report(rows[0]).then(res => {
|
||||
this.crud.notify('报工成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.reportVisible = false
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
@@ -1315,7 +1316,6 @@ export default {
|
||||
},
|
||||
// 新增编辑给form表单物料相关信息赋值
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
@@ -1327,7 +1327,6 @@ export default {
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_spec = row.material_spec
|
||||
debugger
|
||||
const params = {
|
||||
'sale_id': row.sale_id,
|
||||
'sale_code': row.sale_code + '-' + row.seq_no,
|
||||
@@ -1339,7 +1338,6 @@ export default {
|
||||
async queryWorkOrderplanQty(params) {
|
||||
try {
|
||||
const res = await crudProduceshiftorder.getWorkOrderplanQty(params)
|
||||
debugger
|
||||
if (!isNaN(res) && res > 0) {
|
||||
this.form.plan_qty = res
|
||||
}
|
||||
@@ -1354,7 +1352,6 @@ export default {
|
||||
})
|
||||
},
|
||||
getworkprocedureByarea(area) {
|
||||
debugger
|
||||
const params = { product_area: area }
|
||||
crudWorkProcedure.downSelect(params).then(res => {
|
||||
this.workprocedureList = res
|
||||
|
||||
@@ -8,6 +8,14 @@ export function add(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function queryIvt(params) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/delete',
|
||||
@@ -27,5 +35,6 @@ export function edit(data) {
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del
|
||||
del,
|
||||
queryIvt
|
||||
}
|
||||
|
||||
@@ -87,15 +87,17 @@
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="stor_name" label="仓库名称" />
|
||||
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.struct_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="struct_name" label="仓位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column show-overflow-tooltip prop="sale_code" label="销售单号" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="sale_code" label="销售单号" />
|
||||
<el-table-column show-overflow-tooltip min-width="110" prop="seq_no" label="销售单行号" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
|
||||
@@ -107,11 +109,40 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<el-dialog
|
||||
:visible.sync="viewShow"
|
||||
title="仓位明细"
|
||||
width="740px"
|
||||
@close="viewCancel()"
|
||||
append-to-body
|
||||
>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="mstrow"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip min-width="110" prop="seq_no" label="销售单行号" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="ivt_qty" label="库存数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="viewCancel()">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button slot="left" type="primary" @click="submit">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -121,13 +152,15 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import productOut from '@/views/wms/storage_manage/product/productOut/productout'
|
||||
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { rrOperation, pagination, crudOperation },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户', url: 'api/stIvtStructivtCp',
|
||||
title: '用户', url: 'api/stIvtStructivtCp/queryGroup',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
@@ -158,6 +191,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mstrow: [],
|
||||
viewShow: false,
|
||||
dialogVisible: false,
|
||||
opendtlParam: '',
|
||||
rows: [],
|
||||
@@ -181,6 +216,16 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
toView(row) {
|
||||
ProductIvt.queryIvt({"struct_code": row.struct_code,"page":0,"size":999}).then(res => {
|
||||
this.mstrow = res.content
|
||||
})
|
||||
this.viewShow = true
|
||||
},
|
||||
viewCancel(){
|
||||
this.mstrow = {}
|
||||
this.viewShow = false
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
// 清空grid数据
|
||||
|
||||
Reference in New Issue
Block a user