rev:新增任务下发
This commit is contained in:
@@ -34,6 +34,8 @@ public enum AcsTaskEnum {
|
|||||||
TASK_WARP_EMPTY("8","包装机-送空框"),
|
TASK_WARP_EMPTY("8","包装机-送空框"),
|
||||||
TASK_STRUCT_IN("9","入库-生产入库"),
|
TASK_STRUCT_IN("9","入库-生产入库"),
|
||||||
TASK_STRUCT_OUT("10","出库-生产出库"),
|
TASK_STRUCT_OUT("10","出库-生产出库"),
|
||||||
|
TASK_STRUCT_CHECK("11","盘点任务"),
|
||||||
|
TASK_STRUCT_SHUT("12","拼盘任务"),
|
||||||
|
|
||||||
//回调状态
|
//回调状态
|
||||||
STATUS_START("1","执行中"),
|
STATUS_START("1","执行中"),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package org.nl.common.publish.event;
|
package org.nl.common.publish.event;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
@@ -22,6 +21,9 @@ public class PointEvent<T> extends PublishEvent {
|
|||||||
private String type;
|
private String type;
|
||||||
private String point_code1;
|
private String point_code1;
|
||||||
private String point_code2;
|
private String point_code2;
|
||||||
|
private String vehicle_code;
|
||||||
|
private String product_area;
|
||||||
|
private String task_group_id;
|
||||||
private Map<String,String> extParam;
|
private Map<String,String> extParam;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package org.nl.common.publish.event;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author ZZQ
|
||||||
|
* @Date 2023/4/28 13:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TaskEvent extends PublishEvent {
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
private String task_type;
|
||||||
|
private String task_id;
|
||||||
|
private Map<String,String> extParam;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,6 +10,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.common.enums.AcsTaskEnum;
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
import org.nl.common.enums.StatusEnum;
|
import org.nl.common.enums.StatusEnum;
|
||||||
import org.nl.common.enums.WorkerOrderEnum;
|
import org.nl.common.enums.WorkerOrderEnum;
|
||||||
|
import org.nl.common.publish.BussEventMulticaster;
|
||||||
|
import org.nl.common.publish.event.PointEvent;
|
||||||
|
import org.nl.common.publish.event.TaskEvent;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.MapOf;
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.common.utils.OptionRecord;
|
import org.nl.common.utils.OptionRecord;
|
||||||
@@ -25,6 +28,7 @@ import org.nl.wms.product_manage.sch.service.dto.TaskDto;
|
|||||||
import org.nl.wms.product_manage.sch.tasks.WashMachineryTask;
|
import org.nl.wms.product_manage.sch.tasks.WashMachineryTask;
|
||||||
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
|
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
|
||||||
import org.nl.wms.product_manage.service.workorder.dao.PdmProduceWorkorder;
|
import org.nl.wms.product_manage.service.workorder.dao.PdmProduceWorkorder;
|
||||||
|
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -39,6 +43,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -125,8 +130,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService{
|
|||||||
String status = row.getString("status");
|
String status = row.getString("status");
|
||||||
// 任务处理类
|
// 任务处理类
|
||||||
try {
|
try {
|
||||||
AbstractAcsTask taskHandler = (AbstractAcsTask)SpringContextHolder.getBean(Class.forName(processing_class));
|
//发布一个任务执行事件
|
||||||
taskHandler.updateTaskStatus(row,status);
|
TaskEvent event = TaskEvent.builder()
|
||||||
|
.task_id(task_id)
|
||||||
|
.task_type(taskDto.getTask_type())
|
||||||
|
.status(status)
|
||||||
|
.build();
|
||||||
|
BussEventMulticaster.Publish(event);
|
||||||
|
|
||||||
|
/*AbstractAcsTask taskHandler = (AbstractAcsTask)SpringContextHolder.getBean(Class.forName(processing_class));
|
||||||
|
taskHandler.updateTaskStatus(row,status);*/
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("任务状态更新失败:{}", e.getMessage());
|
log.info("任务状态更新失败:{}", e.getMessage());
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package org.nl.wms.product_manage.sch;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
|
import org.nl.common.publish.AbstraceListener;
|
||||||
|
import org.nl.common.publish.event.PointEvent;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.wms.product_manage.sch.manage.TaskStatusEnum;
|
||||||
|
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||||
|
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PointListener extends AbstraceListener<PointEvent> {
|
||||||
|
@Autowired
|
||||||
|
private ISchBaseTaskService taskService;
|
||||||
|
//创建任务
|
||||||
|
@Override
|
||||||
|
protected String doEvent(PointEvent event) {
|
||||||
|
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||||
|
JSONObject task = new JSONObject();
|
||||||
|
参数封装:{
|
||||||
|
task.put("task_id", task_id);
|
||||||
|
task.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
task.put("task_type", event.getType());
|
||||||
|
task.put("acs_task_type", AcsTaskEnum.AGV_SYSTEM_XC.getCode());
|
||||||
|
task.put("task_status", TaskStatusEnum.CREATED.getCode());
|
||||||
|
task.put("point_code1", event.getPoint_code1());
|
||||||
|
task.put("point_code2", event.getPoint_code2());
|
||||||
|
task.put("vehicle_code", event.getVehicle_code());
|
||||||
|
task.put("product_area",event.getProduct_area());
|
||||||
|
task.put("task_group_id",event.getTask_group_id());
|
||||||
|
task.put("finished_type", "1");
|
||||||
|
task.put("is_delete", StatusEnum.LOCK_OFF.getCode());
|
||||||
|
task.put("create_id", SecurityUtils.getCurrentUserId());
|
||||||
|
task.put("create_name", SecurityUtils.getCurrentNickName());
|
||||||
|
task.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
|
task.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
task.put("create_time", DateUtil.now());
|
||||||
|
task.put("update_time", DateUtil.now());
|
||||||
|
task.put("priority", "1");}
|
||||||
|
taskService.save(task.toJavaObject(SchBaseTask.class));
|
||||||
|
return task_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package org.nl.wms.scheduler_manage.service.point;
|
|
||||||
|
|
||||||
import org.nl.common.publish.AbstraceListener;
|
|
||||||
import org.nl.common.publish.event.PublishEvent;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2023/5/12 11:30
|
|
||||||
*/
|
|
||||||
public class PointListener extends AbstraceListener {
|
|
||||||
//返回值用于回调
|
|
||||||
@Override
|
|
||||||
protected String doEvent(PublishEvent event) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -61,6 +61,9 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
res.put("finished_type", AcsTaskEnum.MANUAL_TASK_FINISHED_TYPE.getCode()); // 手动完成
|
res.put("finished_type", AcsTaskEnum.MANUAL_TASK_FINISHED_TYPE.getCode()); // 手动完成
|
||||||
finish.add(res);
|
finish.add(res);
|
||||||
acsToWmsService.receiveTaskStatusAcs(JSON.toJSONString(finish));
|
acsToWmsService.receiveTaskStatusAcs(JSON.toJSONString(finish));
|
||||||
|
this.update(new UpdateWrapper<SchBaseTask>()
|
||||||
|
.set("task_status",StatusEnum.TASK_FINISH.getCode())
|
||||||
|
.eq("task_id", task_id));
|
||||||
break;
|
break;
|
||||||
case "cancel":
|
case "cancel":
|
||||||
JSONArray cancel = new JSONArray();
|
JSONArray cancel = new JSONArray();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public enum SHUTEnum {
|
|||||||
//单据状态
|
//单据状态
|
||||||
BILL_STATUS(MapOf.of("生成", "10", "提交", "20", "执行中", "30", "确认", "60", "完成", "99")),
|
BILL_STATUS(MapOf.of("生成", "10", "提交", "20", "执行中", "30", "确认", "60", "完成", "99")),
|
||||||
//单据状态
|
//单据状态
|
||||||
WORK_STATUS(MapOf.of("未生成", "00", "生成", "10", "执行中", "20", "确认", "30", "完成", "99")),
|
WORK_STATUS(MapOf.of("未生成", "00", "生成", "10", "移出中", "20", "移出确认", "30", "移回中", "40", "完成", "99")),
|
||||||
;
|
;
|
||||||
private Map<String, String> code;
|
private Map<String, String> code;
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ public interface IStIvtCheckmstYlService extends IService<StIvtCheckmstYl> {
|
|||||||
|
|
||||||
void process1(JSONObject jo);
|
void process1(JSONObject jo);
|
||||||
|
|
||||||
|
void taskOperate(JSONObject jo);
|
||||||
|
|
||||||
|
void issueTask(JSONObject jo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,6 +250,16 @@ public class StIvtCheckmstYlServiceImpl extends ServiceImpl<StIvtCheckmstYlMappe
|
|||||||
this.updateById(jo_mst);
|
this.updateById(jo_mst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void taskOperate(JSONObject jo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void issueTask(JSONObject jo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process1(JSONObject whereJson) {
|
public void process1(JSONObject whereJson) {
|
||||||
JSONObject form = whereJson.getJSONObject("form");
|
JSONObject form = whereJson.getJSONObject("form");
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package org.nl.wms.storage_manage.semimanage;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.common.publish.AbstraceListener;
|
||||||
|
import org.nl.common.publish.event.TaskEvent;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class BcpTaskListener extends AbstraceListener<TaskEvent> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String doEvent(TaskEvent event) {
|
||||||
|
String task_type = event.getTask_type();
|
||||||
|
JSONObject form = new JSONObject();
|
||||||
|
form.put("status", event.getStatus());
|
||||||
|
form.put("task_id", event.getTask_id());
|
||||||
|
|
||||||
|
for (TASKEnum value : TASKEnum.values()) {
|
||||||
|
if (value.predicate().test(task_type)) {
|
||||||
|
value.consumer().accept(form);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.nl.wms.storage_manage.semimanage;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
public interface FunctionStrategy<P, T> {
|
||||||
|
|
||||||
|
Predicate<P> predicate();
|
||||||
|
|
||||||
|
Consumer<T> consumer();
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package org.nl.wms.storage_manage.semimanage;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.wms.storage_manage.rawmanage.service.check.IStIvtCheckmstYlService;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpOutService;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpService;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframeinvBcpService;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum TASKEnum implements FunctionStrategy<String, JSONObject> {
|
||||||
|
IN_TASK(type -> AcsTaskEnum.TASK_STRUCT_IN.getCode().equals(type), form -> {
|
||||||
|
IStIvtIostorinvBcpService bean = SpringContextHolder.getBean(IStIvtIostorinvBcpService.class);
|
||||||
|
bean.taskOperate(form);
|
||||||
|
}),
|
||||||
|
OUT_TASK(type -> AcsTaskEnum.TASK_STRUCT_OUT.getCode().equals(type), form -> {
|
||||||
|
IStIvtIostorinvBcpOutService bean = SpringContextHolder.getBean(IStIvtIostorinvBcpOutService.class);
|
||||||
|
bean.taskOperate(form);
|
||||||
|
}),
|
||||||
|
CHECK_TASK(type -> AcsTaskEnum.TASK_STRUCT_CHECK.getCode().equals(type), form -> {
|
||||||
|
IStIvtCheckmstYlService bean = SpringContextHolder.getBean(IStIvtCheckmstYlService.class);
|
||||||
|
bean.confirm(form);
|
||||||
|
}),
|
||||||
|
SHUT_TASK(type -> AcsTaskEnum.TASK_STRUCT_SHUT.getCode().equals(type), form -> {
|
||||||
|
IStIvtShutframeinvBcpService bean = SpringContextHolder.getBean(IStIvtShutframeinvBcpService.class);
|
||||||
|
bean.confirm(form);
|
||||||
|
}),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final Predicate<String> predicate;
|
||||||
|
|
||||||
|
private final Consumer<JSONObject> consumer;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Predicate<String> predicate() {
|
||||||
|
return this.predicate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Consumer<JSONObject> consumer() {
|
||||||
|
return this.consumer;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,11 +57,7 @@ public class StIvtIostorinvBcpOutController {
|
|||||||
@ApiOperation("删除出入库单")
|
@ApiOperation("删除出入库单")
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
if (ids.length>0){
|
bcpOutService.delete(ids);
|
||||||
bcpOutService.update(new UpdateWrapper<StIvtIostorinvBcp>()
|
|
||||||
.set("is_delete","1")
|
|
||||||
.in("iostorinv_id",ids));
|
|
||||||
}
|
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,14 @@ public class StIvtShutframeinvBcpController {
|
|||||||
return new ResponseEntity<>(shutframeinvBcpService.getBillDtl(jo), HttpStatus.OK);
|
return new ResponseEntity<>(shutframeinvBcpService.getBillDtl(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/issueTask")
|
||||||
|
@Log("任务下发")
|
||||||
|
@ApiOperation("任务下发")
|
||||||
|
public ResponseEntity<Object> issueTask(@RequestBody JSONObject jo) {
|
||||||
|
shutframeinvBcpService.issueTask(jo);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
@Log("拼盘确认")
|
@Log("拼盘确认")
|
||||||
@ApiOperation("拼盘确认")
|
@ApiOperation("拼盘确认")
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ public interface IStIvtIostorinvBcpOutService extends IService<StIvtIostorinvBcp
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void create(JSONObject form);
|
void create(JSONObject form);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void delete(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成
|
* 完成
|
||||||
* @param form
|
* @param form
|
||||||
@@ -48,4 +56,6 @@ public interface IStIvtIostorinvBcpOutService extends IService<StIvtIostorinvBcp
|
|||||||
*/
|
*/
|
||||||
String updateBill(JSONObject form);
|
String updateBill(JSONObject form);
|
||||||
|
|
||||||
|
void taskOperate(JSONObject form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,4 +48,6 @@ public interface IStIvtIostorinvBcpService extends IService<StIvtIostorinvBcp> {
|
|||||||
*/
|
*/
|
||||||
String updateBill(JSONObject form);
|
String updateBill(JSONObject form);
|
||||||
|
|
||||||
|
void taskOperate(JSONObject form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -11,6 +12,7 @@ import io.jsonwebtoken.lang.Assert;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
import org.nl.common.publish.BussEventMulticaster;
|
import org.nl.common.publish.BussEventMulticaster;
|
||||||
import org.nl.common.publish.event.PointEvent;
|
import org.nl.common.publish.event.PointEvent;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
@@ -23,11 +25,14 @@ import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrServ
|
|||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||||
|
import org.nl.wms.product_manage.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||||
import org.nl.wms.storage_manage.IOSEnum;
|
import org.nl.wms.storage_manage.IOSEnum;
|
||||||
import org.nl.wms.storage_manage.basedata.service.record.service.IStIvtStructivtflowService;
|
import org.nl.wms.storage_manage.basedata.service.record.service.IStIvtStructivtflowService;
|
||||||
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
||||||
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.check.dao.StIvtCheckdtlBcp;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.check.dao.StIvtCheckmstBcp;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpOutService;
|
import org.nl.wms.storage_manage.semimanage.service.iostorInv.IStIvtIostorinvBcpOutService;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.mapper.StIvtIostorinvBcpMapper;
|
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.mapper.StIvtIostorinvBcpMapper;
|
||||||
@@ -80,6 +85,18 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
return this.baseMapper.getIostorinv(query);
|
return this.baseMapper.getIostorinv(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(Long[] ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
StIvtIostorinvBcp dao = this.getOne(new QueryWrapper<StIvtIostorinvBcp>().eq("iostorinv_id", id));
|
||||||
|
dao.setIs_delete(true);
|
||||||
|
|
||||||
|
//仓位解锁
|
||||||
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().set("inv_code", "").set("lock_type", IOSEnum.LOCK_TYPE.code("未锁定")).eq("struct_id", dao.getStruct_id()));
|
||||||
|
this.updateById(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void create(JSONObject form) {
|
public void create(JSONObject form) {
|
||||||
@@ -107,6 +124,12 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
mst.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
mst.setCreate_time(DateUtil.now());
|
mst.setCreate_time(DateUtil.now());
|
||||||
this.save(mst);
|
this.save(mst);
|
||||||
|
|
||||||
|
//锁定起点
|
||||||
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
||||||
|
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
||||||
|
.set(StIvtStructattr::getInv_code,mst.getBill_code())
|
||||||
|
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("出库锁")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +169,7 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
this.updateById(mst);
|
this.updateById(mst);
|
||||||
|
|
||||||
//删除库存
|
//删除库存
|
||||||
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id",mst.getStruct_id()));
|
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", mst.getStruct_id()));
|
||||||
|
|
||||||
/*structivtflowService.recordStructivtFlow(
|
/*structivtflowService.recordStructivtFlow(
|
||||||
StIvtStructivtflowDto.builder()
|
StIvtStructivtflowDto.builder()
|
||||||
@@ -157,6 +180,14 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
.storagevehicle_code(mst.getStoragevehicle_code())
|
.storagevehicle_code(mst.getStoragevehicle_code())
|
||||||
.build()
|
.build()
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
|
//维护载具
|
||||||
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
||||||
|
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
||||||
|
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
|
.set(StIvtStructattr::getInv_code,"")
|
||||||
|
.set(StIvtStructattr::getStoragevehicle_code, ""));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +201,8 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
.type(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_SEND.getCode())
|
.type(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_SEND.getCode())
|
||||||
.point_code1(mst.getPoint_code())
|
.point_code1(mst.getPoint_code())
|
||||||
.point_code2(mst.getStruct_code())
|
.point_code2(mst.getStruct_code())
|
||||||
|
.vehicle_code(mst.getStoragevehicle_code())
|
||||||
|
.product_area(mst.getWorkshop_id())
|
||||||
.callback((Consumer<String>) mst::setTask_id)
|
.callback((Consumer<String>) mst::setTask_id)
|
||||||
.build();
|
.build();
|
||||||
BussEventMulticaster.Publish(event);
|
BussEventMulticaster.Publish(event);
|
||||||
@@ -207,4 +240,21 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
|||||||
return mst.getIostorinv_id();
|
return mst.getIostorinv_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void taskOperate(JSONObject form) {
|
||||||
|
String task_id = form.getString("task_id");
|
||||||
|
String status = form.getString("status");
|
||||||
|
StIvtIostorinvBcp mst = this.getOne(new QueryWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id));
|
||||||
|
if (status.equals(AcsTaskEnum.STATUS_FINISH.getCode())) {
|
||||||
|
this.update(new UpdateWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id)
|
||||||
|
.set(StIvtIostorinvBcp::getWork_status, IOSEnum.WORK_STATUS.code("完成")));
|
||||||
|
JSONObject mst_jo = new JSONObject();
|
||||||
|
mst_jo.put("iostorinv_id", mst.getIostorinv_id());
|
||||||
|
this.confirm(mst_jo);
|
||||||
|
} else {
|
||||||
|
this.update(new UpdateWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id)
|
||||||
|
.set(StIvtIostorinvBcp::getWork_status, IOSEnum.WORK_STATUS.code("执行中")));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,25 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.jsonwebtoken.lang.Assert;
|
import io.jsonwebtoken.lang.Assert;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
import org.nl.common.publish.BussEventMulticaster;
|
import org.nl.common.publish.BussEventMulticaster;
|
||||||
import org.nl.common.publish.event.PointEvent;
|
import org.nl.common.publish.event.PointEvent;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtSectattrService;
|
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtSectattrService;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||||
|
import org.nl.wms.product_manage.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.storage_manage.IOSEnum;
|
import org.nl.wms.storage_manage.IOSEnum;
|
||||||
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
import org.nl.wms.storage_manage.CHANGE_BILL_TYPE_ENUM;
|
||||||
import org.nl.wms.storage_manage.basedata.service.record.dto.StIvtStructivtflowDto;
|
import org.nl.wms.storage_manage.basedata.service.record.dto.StIvtStructivtflowDto;
|
||||||
@@ -162,6 +166,13 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//维护载具
|
||||||
|
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
|
||||||
|
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
|
||||||
|
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
|
.set(StIvtStructattr::getInv_code, "")
|
||||||
|
.set(StIvtStructattr::getStoragevehicle_code, mst.getStoragevehicle_code()));
|
||||||
|
|
||||||
/*structivtflowService.recordStructivtFlow(
|
/*structivtflowService.recordStructivtFlow(
|
||||||
StIvtStructivtflowDto.builder()
|
StIvtStructivtflowDto.builder()
|
||||||
.bill_code(mst.getBill_code()).change_type_scode(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_CONFIRM).bill_table("st_ivt_iostorinv_bcp")
|
.bill_code(mst.getBill_code()).change_type_scode(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_CONFIRM).bill_table("st_ivt_iostorinv_bcp")
|
||||||
@@ -191,7 +202,13 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
throw new BadRequestException("无可分配货位");
|
throw new BadRequestException("无可分配货位");
|
||||||
}
|
}
|
||||||
|
|
||||||
仓库信息:{
|
stIvtStructattr.setLock_type(IOSEnum.LOCK_TYPE.code("入库锁"));
|
||||||
|
stIvtStructattr.setInv_code(mst.getBill_code());
|
||||||
|
//维护载具
|
||||||
|
structattrService.updateById(stIvtStructattr);
|
||||||
|
|
||||||
|
仓库信息:
|
||||||
|
{
|
||||||
mst.setSect_id(stIvtStructattr.getSect_id());
|
mst.setSect_id(stIvtStructattr.getSect_id());
|
||||||
mst.setSect_code(stIvtStructattr.getSect_code());
|
mst.setSect_code(stIvtStructattr.getSect_code());
|
||||||
mst.setSect_name(stIvtStructattr.getSect_name());
|
mst.setSect_name(stIvtStructattr.getSect_name());
|
||||||
@@ -201,9 +218,11 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
}
|
}
|
||||||
|
|
||||||
PointEvent event = PointEvent.builder()
|
PointEvent event = PointEvent.builder()
|
||||||
.type(CHANGE_BILL_TYPE_ENUM.IOSTORINV_IN_SEND.getCode())
|
.type(AcsTaskEnum.TASK_STRUCT_IN.getCode())
|
||||||
.point_code1(mst.getPoint_code())
|
.point_code1(mst.getPoint_code())
|
||||||
.point_code2(stIvtStructattr.getStruct_code())
|
.point_code2(stIvtStructattr.getStruct_code())
|
||||||
|
.vehicle_code(mst.getStoragevehicle_code())
|
||||||
|
.product_area(mst.getWorkshop_id())
|
||||||
.callback((Consumer<String>) mst::setTask_id)
|
.callback((Consumer<String>) mst::setTask_id)
|
||||||
.build();
|
.build();
|
||||||
BussEventMulticaster.Publish(event);
|
BussEventMulticaster.Publish(event);
|
||||||
@@ -241,4 +260,22 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
|||||||
return mst.getIostorinv_id();
|
return mst.getIostorinv_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void taskOperate(JSONObject form) {
|
||||||
|
String task_id = form.getString("task_id");
|
||||||
|
String status = form.getString("status");
|
||||||
|
StIvtIostorinvBcp mst = this.getOne(new QueryWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id));
|
||||||
|
if (status.equals(AcsTaskEnum.STATUS_FINISH.getCode())) {
|
||||||
|
this.update(new UpdateWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id)
|
||||||
|
.set(StIvtIostorinvBcp::getWork_status, IOSEnum.WORK_STATUS.code("完成")));
|
||||||
|
JSONObject mst_jo = new JSONObject();
|
||||||
|
mst_jo.put("iostorinv_id", mst.getIostorinv_id());
|
||||||
|
this.confirm(mst_jo);
|
||||||
|
} else {
|
||||||
|
this.update(new UpdateWrapper<StIvtIostorinvBcp>().lambda().eq(StIvtIostorinvBcp::getTask_id, task_id)
|
||||||
|
.set(StIvtIostorinvBcp::getWork_status, IOSEnum.WORK_STATUS.code("执行中")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,5 +36,9 @@ public interface IStIvtShutframeinvBcpService extends IService<StIvtShutframeinv
|
|||||||
|
|
||||||
void confirm(JSONObject jo);
|
void confirm(JSONObject jo);
|
||||||
|
|
||||||
|
void issueTask(JSONObject jo);
|
||||||
|
|
||||||
|
void taskOperate(JSONObject jo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -14,6 +15,10 @@ import io.jsonwebtoken.lang.Assert;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
|
import org.nl.common.publish.BussEventMulticaster;
|
||||||
|
import org.nl.common.publish.event.PointEvent;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.MapOf;
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
@@ -21,6 +26,9 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattrService;
|
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattrService;
|
||||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
||||||
|
import org.nl.wms.product_manage.sch.service.TaskService;
|
||||||
|
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||||
|
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||||
import org.nl.wms.storage_manage.IOSEnum;
|
import org.nl.wms.storage_manage.IOSEnum;
|
||||||
import org.nl.wms.storage_manage.SHUTEnum;
|
import org.nl.wms.storage_manage.SHUTEnum;
|
||||||
import org.nl.wms.storage_manage.rawmanage.service.iostorInv.dao.StIvtIostorinvYl;
|
import org.nl.wms.storage_manage.rawmanage.service.iostorInv.dao.StIvtIostorinvYl;
|
||||||
@@ -37,8 +45,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -59,6 +70,9 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
private IStIvtStructivtBcpService structivtBcpService;
|
private IStIvtStructivtBcpService structivtBcpService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private StIvtStructivtBcpMapper bcpMapper;
|
private StIvtStructivtBcpMapper bcpMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISchBaseTaskService taskService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object pageQuery(ShutQuery query, PageQuery pageQuery) {
|
public Object pageQuery(ShutQuery query, PageQuery pageQuery) {
|
||||||
@@ -69,6 +83,75 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void taskOperate(JSONObject form) {
|
||||||
|
String task_id = form.getString("task_id");
|
||||||
|
String status = form.getString("status");
|
||||||
|
|
||||||
|
boolean all_finish = false;
|
||||||
|
//根据任务号查询对应的任务组
|
||||||
|
SchBaseTask task = taskService.getOne(new QueryWrapper<SchBaseTask>().eq("task_id", task_id));
|
||||||
|
|
||||||
|
List<SchBaseTask> task_list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||||
|
.eq("task_group_id", task.getTask_group_id())
|
||||||
|
.ne("task_status", StatusEnum.TASK_FINISH)
|
||||||
|
.eq("is_delete", false));
|
||||||
|
|
||||||
|
if (task_list.size() <= 0) {
|
||||||
|
all_finish = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<StIvtShutframedtlBcp> list = shutframedtlBcpService.list(new QueryWrapper<StIvtShutframedtlBcp>().eq("task_id", task.getTask_group_id()));
|
||||||
|
|
||||||
|
StIvtShutframedtlBcp dtl = list.get(0);
|
||||||
|
|
||||||
|
String work_status = dtl.getWork_status();
|
||||||
|
if (all_finish){
|
||||||
|
|
||||||
|
}else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void issueTask(JSONObject form) {
|
||||||
|
Assert.notNull(new Object[]{form, form.get("shutframeinv_id")}, "请求参数不能为空");
|
||||||
|
|
||||||
|
//查询可用的半成品移出点位
|
||||||
|
List<String> point_list = Arrays.asList(new String[]{"PP01", "PP02"});
|
||||||
|
if (point_list.size() < 2) {
|
||||||
|
throw new BadRequestException("拼盘需要两个可用的拼盘点位!");
|
||||||
|
}
|
||||||
|
StIvtShutframeinvBcp mst = this.getById(form.getString("shutframeinv_id"));
|
||||||
|
|
||||||
|
List<StIvtShutframedtlBcp> list = shutframedtlBcpService.list(new QueryWrapper<StIvtShutframedtlBcp>().eq("shutframeinv_id", form.getString("shutframeinv_id")));
|
||||||
|
|
||||||
|
String task_group_id = IdUtil.getStringId();
|
||||||
|
PointEvent event = PointEvent.builder()
|
||||||
|
.type(AcsTaskEnum.TASK_STRUCT_SHUT.getCode())
|
||||||
|
.point_code1(list.get(0).getTurnin_struct_code())
|
||||||
|
.point_code2(point_list.get(0))
|
||||||
|
.task_group_id(task_group_id)
|
||||||
|
.vehicle_code(list.get((0)).getStoragevehicle_code_in())
|
||||||
|
.product_area(mst.getWorkshop_id())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PointEvent event2 = PointEvent.builder()
|
||||||
|
.type(AcsTaskEnum.TASK_STRUCT_SHUT.getCode())
|
||||||
|
.point_code1(list.get(0).getTurnout_struct_code())
|
||||||
|
.point_code2(point_list.get(1))
|
||||||
|
.vehicle_code(list.get((0)).getStoragevehicle_code())
|
||||||
|
.product_area(mst.getWorkshop_id())
|
||||||
|
.build();
|
||||||
|
BussEventMulticaster.Publish(event);
|
||||||
|
BussEventMulticaster.Publish(event2);
|
||||||
|
|
||||||
|
shutframedtlBcpService.update(new UpdateWrapper<StIvtShutframedtlBcp>().lambda()
|
||||||
|
.set(StIvtShutframedtlBcp::getTask_id, task_group_id)
|
||||||
|
.eq(StIvtShutframedtlBcp::getShutframeinv_id, mst.getShutframeinv_id()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void confirm(JSONObject form) {
|
public void confirm(JSONObject form) {
|
||||||
Assert.notNull(new Object[]{form, form.get("shutframeinv_id")}, "请求参数不能为空");
|
Assert.notNull(new Object[]{form, form.get("shutframeinv_id")}, "请求参数不能为空");
|
||||||
|
|||||||
@@ -12,26 +12,46 @@
|
|||||||
>
|
>
|
||||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||||
<el-col :span="20" style="border: 1px solid white">
|
<el-col :span="20" style="border: 1px solid white">
|
||||||
<span/>
|
<span />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary"
|
<el-button
|
||||||
@click="crud.submitCU">保存</el-button>
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
:loading="crud.cu === 2"
|
||||||
|
type="primary"
|
||||||
|
@click="crud.submitCU"
|
||||||
|
>保存</el-button>
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
<el-form
|
||||||
:model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
ref="form"
|
||||||
|
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||||
|
:inline="true"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
size="mini"
|
||||||
|
label-width="85px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
<el-form-item label="单据号" prop="bill_code">
|
<el-form-item label="单据号" prop="bill_code">
|
||||||
<label slot="label">单 据 号:</label>
|
<label slot="label">单 据 号:</label>
|
||||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务日期" prop="biz_date">
|
<el-form-item label="业务日期" prop="biz_date">
|
||||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
|
<el-date-picker
|
||||||
value-format="yyyy-MM-dd" :disabled="crud.status.view > 0"/>
|
v-model="form.biz_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
style="width: 210px"
|
||||||
|
align="center"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务类型" prop="bill_type">
|
<el-form-item label="业务类型" prop="bill_type">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -55,9 +75,9 @@
|
|||||||
v-model="form.stor_id"
|
v-model="form.stor_id"
|
||||||
clearable
|
clearable
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@change="storChange"
|
|
||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
:disabled="crud.status.view > 0"
|
:disabled="crud.status.view > 0"
|
||||||
|
@change="storChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in storlist"
|
v-for="item in storlist"
|
||||||
@@ -114,12 +134,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="明细数" prop="detail_count">
|
<el-form-item label="明细数" prop="detail_count">
|
||||||
<label slot="label">明 细 数:</label>
|
<label slot="label">明 细 数:</label>
|
||||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
|
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总重量" prop="total_qty">
|
<el-form-item label="总重量" prop="total_qty">
|
||||||
<label slot="label">总 重 量:</label>
|
<label slot="label">总 重 量:</label>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.total_qty"
|
v-model.number="form.total_qty"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:precision="3"
|
:precision="3"
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -129,8 +149,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"
|
<el-input
|
||||||
:disabled="crud.status.view > 0"/>
|
v-model="form.remark"
|
||||||
|
style="width: 380px;"
|
||||||
|
rows="2"
|
||||||
|
type="textarea"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -138,7 +163,7 @@
|
|||||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left"/>
|
<slot name="left" />
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -170,24 +195,24 @@
|
|||||||
border
|
border
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码"/>
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称"/>
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="入库重量">
|
<el-table-column show-overflow-tooltip prop="plan_qty" label="入库重量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.tableData[scope.$index].plan_qty"
|
v-model.number="form.tableData[scope.$index].plan_qty"
|
||||||
size="small"
|
size="small"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
precision="3"
|
:precision="3"
|
||||||
:min="0"
|
:min="0"
|
||||||
@change="changeQty"
|
@change="changeQty"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位"/>
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注">
|
<el-table-column show-overflow-tooltip prop="remark" label="明细备注">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -195,12 +220,11 @@
|
|||||||
size="small"
|
size="small"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="changeQty"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型"/>
|
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" />
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号"/>
|
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" />
|
||||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -217,7 +241,6 @@
|
|||||||
<MaterDtl
|
<MaterDtl
|
||||||
:dialog-show.sync="materShow"
|
:dialog-show.sync="materShow"
|
||||||
:is-single="false"
|
:is-single="false"
|
||||||
:mater-opt-code="materType"
|
|
||||||
@setMaterValue="tableChanged"
|
@setMaterValue="tableChanged"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -231,18 +254,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, {crud, form} from '@crud/crud'
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
||||||
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
||||||
import crudStructattr from "@/api/wms/basedata/st/structattr";
|
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
bill_code: '',
|
bill_code: '',
|
||||||
product_code: '',
|
product_code: '',
|
||||||
bill_status: '10',
|
bill_status: '10',
|
||||||
total_qty: '0',
|
total_qty: 0,
|
||||||
detail_count: '0',
|
detail_count: '0',
|
||||||
stor_id: '',
|
stor_id: '',
|
||||||
struct_id: '',
|
struct_id: '',
|
||||||
@@ -256,16 +279,13 @@ const defaultForm = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: {MaterDtl, BillDtl},
|
components: { MaterDtl, BillDtl },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
|
||||||
openParam: {
|
|
||||||
type: Object
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -273,23 +293,20 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
materShow: false,
|
materShow: false,
|
||||||
billShow: false,
|
billShow: false,
|
||||||
dtlShow: false,
|
|
||||||
struct_id: '',
|
struct_id: '',
|
||||||
sect_id: '',
|
sect_id: '',
|
||||||
opendtlParam: null,
|
opendtlParam: null,
|
||||||
materType: '03', // 关键成品
|
|
||||||
storlist: [],
|
storlist: [],
|
||||||
sects: [],
|
sects: [],
|
||||||
billtypelist: [],
|
|
||||||
rules: {
|
rules: {
|
||||||
product_code: [
|
product_code: [
|
||||||
{required: true, message: '生产车间不能为空', trigger: 'blur'}
|
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
bill_type: [
|
bill_type: [
|
||||||
{required: true, message: '业务类型不能为空', trigger: 'blur'}
|
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
biz_date: [
|
biz_date: [
|
||||||
{required: true, message: '业务日期不能为空', trigger: 'blur'}
|
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,7 +320,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
crudStorattr.getStor({"stor_type": "3"}).then(res => {
|
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
||||||
this.storlist = res.content
|
this.storlist = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -312,7 +329,7 @@ export default {
|
|||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
// 获取入库单明细
|
// 获取入库单明细
|
||||||
crudProductIn.getIODtl({'iostorinv_id': this.form.iostorinv_id}).then(res => {
|
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
@@ -324,13 +341,13 @@ export default {
|
|||||||
[CRUD.HOOK.beforeToEdit]() {
|
[CRUD.HOOK.beforeToEdit]() {
|
||||||
this.struct_id = this.crud.form.struct_id
|
this.struct_id = this.crud.form.struct_id
|
||||||
this.sect_id = this.crud.form.sect_id
|
this.sect_id = this.crud.form.sect_id
|
||||||
crudStructattr.getSectCascader({'stor_id': this.crud.form.stor_id}).then(res => {
|
crudStructattr.getSectCascader({ 'stor_id': this.crud.form.stor_id }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
this.form.struct_id = this.search(this.sects, this.struct_id)
|
this.form.struct_id = this.search(this.sects, this.struct_id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToView]() {
|
[CRUD.HOOK.afterToView]() {
|
||||||
crudProductIn.getIODtl({'bill_code': this.form.bill_code}).then(res => {
|
crudProductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
@@ -372,22 +389,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
storChange(value) {
|
storChange(value) {
|
||||||
crudStructattr.getSectCascader({'stor_id': value}).then(res => {
|
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
search(object, value) {
|
search(object, value) {
|
||||||
debugger
|
|
||||||
for (var key in object) {
|
for (var key in object) {
|
||||||
if (object[key].value == value) return [object[key].value];
|
if (object[key].value == value) return [object[key].value]
|
||||||
if (object[key].children && Object.keys(object[key].children).length > 0) {
|
if (object[key].children && Object.keys(object[key].children).length > 0) {
|
||||||
var temp = search(object[key].children, value);
|
var temp = this.search(object[key].children, value)
|
||||||
if (temp) return [object[key].value, temp].flat();
|
if (temp) return [object[key].value, temp].flat()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sectQueryChange(val) {
|
sectQueryChange(val) {
|
||||||
debugger
|
|
||||||
this.sectProp = val
|
this.sectProp = val
|
||||||
if (val.length === 1) {
|
if (val.length === 1) {
|
||||||
this.sect_id = val[0]
|
this.sect_id = val[0]
|
||||||
@@ -430,7 +445,7 @@ export default {
|
|||||||
item.quality_scode = '01'
|
item.quality_scode = '01'
|
||||||
item.ivt_level = '01'
|
item.ivt_level = '01'
|
||||||
item.is_active = '1'
|
item.is_active = '1'
|
||||||
item.plan_qty = '1'
|
item.plan_qty = 1
|
||||||
item.qty_unit_id = item.base_unit_id
|
item.qty_unit_id = item.base_unit_id
|
||||||
item.qty_unit_name = item.base_unit_name
|
item.qty_unit_name = item.base_unit_name
|
||||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||||
@@ -443,7 +458,6 @@ export default {
|
|||||||
debugger
|
debugger
|
||||||
// 对新增的行进行校验不能存在相同物料批次
|
// 对新增的行进行校验不能存在相同物料批次
|
||||||
rows.forEach((item) => {
|
rows.forEach((item) => {
|
||||||
debugger
|
|
||||||
let same_mater = true
|
let same_mater = true
|
||||||
this.form.tableData.forEach((row) => {
|
this.form.tableData.forEach((row) => {
|
||||||
if (row.material_code === item.material_code && row.po_code === item.po.code) {
|
if (row.material_code === item.material_code && row.po_code === item.po.code) {
|
||||||
@@ -454,7 +468,7 @@ export default {
|
|||||||
item.quality_scode = '01'
|
item.quality_scode = '01'
|
||||||
item.ivt_level = '01'
|
item.ivt_level = '01'
|
||||||
item.is_active = '1'
|
item.is_active = '1'
|
||||||
item.plan_qty = item.need_qty
|
item.plan_qty = parseFloat(item.need_qty)
|
||||||
item.source_bill_code = item.po_code
|
item.source_bill_code = item.po_code
|
||||||
item.source_bill_type_name = '原料需求'
|
item.source_bill_type_name = '原料需求'
|
||||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="日期">
|
||||||
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd"/>
|
<date-range-picker v-model="query.createTime" align="center" class="date-item" value-format="yyyy-MM-dd" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据号">
|
<el-form-item label="单据号">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -45,11 +45,11 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<rrOperation/>
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation/>
|
<crudOperation />
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
@@ -58,18 +58,18 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"/>
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="ask_time" label="日期"/>
|
<el-table-column show-overflow-tooltip width="150" prop="ask_time" label="日期" />
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="po_code" label="单据号"/>
|
<el-table-column show-overflow-tooltip width="150" prop="po_code" label="单据号" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号"/>
|
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号" />
|
||||||
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称"/>
|
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称" />
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="class_name" label="物料类别"/>
|
<el-table-column show-overflow-tooltip width="150" prop="class_name" label="物料类别" />
|
||||||
<el-table-column show-overflow-tooltip width="150" prop="total_qty" label="重量"/>
|
<el-table-column show-overflow-tooltip width="150" prop="total_qty" label="重量" />
|
||||||
<el-table-column show-overflow-tooltip width="170" prop="need_qty" label="待入重量"/>
|
<el-table-column show-overflow-tooltip width="170" prop="need_qty" label="待入重量" />
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位"/>
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination/>
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
@@ -91,7 +91,7 @@ import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/ra
|
|||||||
const start = new Date()
|
const start = new Date()
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDtl',
|
name: 'AddDtl',
|
||||||
components: {crudOperation, rrOperation, pagination, DateRangePicker},
|
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '采购订单',
|
title: '采购订单',
|
||||||
|
|||||||
@@ -1,526 +0,0 @@
|
|||||||
<!--suppress ALL -->
|
|
||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
append-to-body
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
destroy-on-close
|
|
||||||
:show-close="false"
|
|
||||||
fullscreen
|
|
||||||
@close="close"
|
|
||||||
@open="open"
|
|
||||||
>
|
|
||||||
|
|
||||||
<span slot="title" class="dialog-footer">
|
|
||||||
<div class="crud-opts2">
|
|
||||||
<span class="el-dialog__title2">入库分配</span>
|
|
||||||
<span class="crud-opts-right2">
|
|
||||||
<!--左侧插槽-->
|
|
||||||
<slot name="left" />
|
|
||||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
<div class="crud-opts2">
|
|
||||||
<span class="role-span">入库明细项</span>
|
|
||||||
</div>
|
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="dtl_table"
|
|
||||||
:data="this.openParam"
|
|
||||||
style="width: 100%;"
|
|
||||||
max-height="300"
|
|
||||||
border
|
|
||||||
highlight-current-row
|
|
||||||
:row-class-name="tableRowClassName"
|
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
|
||||||
@row-click="clcikRow"
|
|
||||||
>
|
|
||||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.bill_status"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="true"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.IO_BILL_STATUS"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
|
||||||
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
|
|
||||||
<el-form-item label="入库点" prop="point_code">
|
|
||||||
<el-select
|
|
||||||
v-model="form.point_code"
|
|
||||||
clearable
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
style="width: 200px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in pointlist"
|
|
||||||
:key="item.point_code"
|
|
||||||
:label="item.point_name"
|
|
||||||
:value="item.point_code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<div class="crud-opts2">
|
|
||||||
<span class="role-span">载具物料明细</span>
|
|
||||||
<div class="crud-opts-form">
|
|
||||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
|
||||||
<el-form-item label="区域" prop="gender5">
|
|
||||||
<el-cascader
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="sects"
|
|
||||||
:props="{ checkStrictly: true }"
|
|
||||||
clearable
|
|
||||||
@change="sectQueryChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="checked">
|
|
||||||
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<span class="crud-opts-right2">
|
|
||||||
<!--左侧插槽-->
|
|
||||||
<slot name="left" />
|
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="confirmvehicle()"
|
|
||||||
>
|
|
||||||
组盘确认
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
:loading="divBtn"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="divStruct()"
|
|
||||||
>
|
|
||||||
分配货位
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="unDivStruct()"
|
|
||||||
>
|
|
||||||
取消分配
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
@click="divPoint()"
|
|
||||||
>
|
|
||||||
设置起点
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="dis_table"
|
|
||||||
:data="form.tableMater"
|
|
||||||
style="width: 100%;"
|
|
||||||
max-height="300"
|
|
||||||
border
|
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
|
||||||
@row-click="clcikRowDis"
|
|
||||||
>
|
|
||||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input
|
|
||||||
v-model="form.tableMater[scope.$index].storagevehicle_code"
|
|
||||||
clearable
|
|
||||||
:controls="false"
|
|
||||||
controls-position="right"
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="overstruct_type" label="载具超限" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="form.tableMater[scope.$index].overstruct_type"
|
|
||||||
clearable
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
style="width: 100px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.MD_OVERSTRUCT_TYPE"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import CRUD, { crud } from '@crud/crud'
|
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
|
||||||
import crudPoint from '@/views/wms/scheduler_manage/point/point'
|
|
||||||
import crudRegion from '@/views/wms/scheduler_manage/region/region'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'DivDialog',
|
|
||||||
components: {},
|
|
||||||
mixins: [crud()],
|
|
||||||
dicts: ['IO_BILL_STATUS', 'MD_OVERSTRUCT_TYPE'],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
bussConfig: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
openParam: {
|
|
||||||
type: Array,
|
|
||||||
default: () => {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
billType: {
|
|
||||||
type: String,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
storId: {
|
|
||||||
type: String,
|
|
||||||
default: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogVisible: false,
|
|
||||||
stor_id: '',
|
|
||||||
sect_id: '',
|
|
||||||
sectProp: null,
|
|
||||||
bucketProp: {},
|
|
||||||
structShow: false,
|
|
||||||
bucketObj: null,
|
|
||||||
divBtn: false,
|
|
||||||
bucketShow: false,
|
|
||||||
sects: [],
|
|
||||||
sect_val: null,
|
|
||||||
dis_row: null,
|
|
||||||
form: {
|
|
||||||
dtl_row: null,
|
|
||||||
storage_qty: '',
|
|
||||||
sect_id: '',
|
|
||||||
stor_id: '',
|
|
||||||
point_code: null,
|
|
||||||
checked: true,
|
|
||||||
tableMater: []
|
|
||||||
},
|
|
||||||
storlist: [],
|
|
||||||
pointlist: [],
|
|
||||||
rules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue, oldValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
crudRegion.getRegionSelect({ 'stor_id': this.storId }).then(res => {
|
|
||||||
this.sects = res.content
|
|
||||||
})
|
|
||||||
const area_type = 'A1_RK01'
|
|
||||||
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
|
|
||||||
this.pointlist = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
toDelete(data) {
|
|
||||||
data.pop = true
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.form.tableMater = []
|
|
||||||
this.form.dtl_row = null
|
|
||||||
this.sectProp = null
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
this.$emit('AddChanged')
|
|
||||||
this.crud.refresh()
|
|
||||||
this.$refs['form2'].resetFields()
|
|
||||||
},
|
|
||||||
clcikRow(row, column, event) {
|
|
||||||
this.form.dtl_row = row
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
this.form.dtl_row = res[row.index]
|
|
||||||
})
|
|
||||||
crudProductIn.getDisDtl(row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clcikRowDis(row, column, event) {
|
|
||||||
this.dis_row = row
|
|
||||||
},
|
|
||||||
vehicleCheck() {
|
|
||||||
if (!this.form.dtl_row) {
|
|
||||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
this.form.storagevehicle_code = ''
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudProductIn.checkVehicle({
|
|
||||||
'storagevehicle_code': this.form.storagevehicle_code,
|
|
||||||
'dis_num': this.form.tableMater.length,
|
|
||||||
'iostorinv_id': this.form.dtl_row.iostorinv_id
|
|
||||||
}).then(res => {
|
|
||||||
|
|
||||||
}).catch(err => {
|
|
||||||
this.form.storagevehicle_code = ''
|
|
||||||
})
|
|
||||||
},
|
|
||||||
tableRowClassName({ row, rowIndex }) {
|
|
||||||
row.index = rowIndex
|
|
||||||
},
|
|
||||||
insertvehicle() {
|
|
||||||
if (!this.form.dtl_row) {
|
|
||||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.form.storagevehicle_code) {
|
|
||||||
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 判断是否选择了桶号
|
|
||||||
if (this.bucketObj) {
|
|
||||||
if (!(this.bucketObj.status === '01')) {
|
|
||||||
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj))
|
|
||||||
// 判断选择的桶是否已经被选过
|
|
||||||
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique)
|
|
||||||
if (!flag) {
|
|
||||||
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code)
|
|
||||||
if (flag) {
|
|
||||||
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
dis_dtl.storagevehicle_code = this.form.storagevehicle_code
|
|
||||||
dis_dtl.pop = false
|
|
||||||
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl)
|
|
||||||
if (this.form.dtl_row.assign_qty) {
|
|
||||||
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty)
|
|
||||||
} else {
|
|
||||||
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty)
|
|
||||||
}
|
|
||||||
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) {
|
|
||||||
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty)
|
|
||||||
} else {
|
|
||||||
this.form.dtl_row.unassign_qty = 0
|
|
||||||
}
|
|
||||||
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
|
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
confirmvehicle() {
|
|
||||||
if (this.dis_row === null) {
|
|
||||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dis_row.overstruct_type === '') {
|
|
||||||
this.crud.notify('载具超限不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudProductIn.confirmvehicle(this.dis_row).then(res => {
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sectQueryChange(val) {
|
|
||||||
this.sectProp = val
|
|
||||||
if (val.length === 1) {
|
|
||||||
this.stor_id = val[0]
|
|
||||||
this.sect_id = ''
|
|
||||||
}
|
|
||||||
if (val.length === 0) {
|
|
||||||
this.sect_id = ''
|
|
||||||
this.stor_id = ''
|
|
||||||
}
|
|
||||||
if (val.length === 2) {
|
|
||||||
this.stor_id = val[0]
|
|
||||||
this.sect_id = val[1]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tableChanged(row) {
|
|
||||||
this.form.sect_id = this.sect_id
|
|
||||||
this.form.stor_id = this.stor_id
|
|
||||||
// 新增一行物料时,给行进行赋值
|
|
||||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
|
||||||
this.form.tableMater[i].struct_id = row.point_id
|
|
||||||
this.form.tableMater[i].struct_code = row.point_code
|
|
||||||
this.form.tableMater[i].struct_name = row.point_name
|
|
||||||
this.form.tableMater[i].region_code = row.region_code
|
|
||||||
this.form.tableMater[i].region_name = row.region_name
|
|
||||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
|
||||||
}
|
|
||||||
crudProductIn.divStruct(this.form).then(res => {
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
this.form.tableMater = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
divPoint() {
|
|
||||||
if (!this.form.point_code) {
|
|
||||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.form.tableMater.length === 0) {
|
|
||||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudProductIn.divPoint(this.form).then(res => {
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.crud.notify('设置起点成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
divStruct() {
|
|
||||||
if (this.dis_row === null) {
|
|
||||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 如果勾选了,直接跳后台
|
|
||||||
if (this.form.checked) {
|
|
||||||
if (!this.sect_id) {
|
|
||||||
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.divBtn = true
|
|
||||||
this.form.sect_id = this.sect_id
|
|
||||||
this.form.stor_id = this.stor_id
|
|
||||||
this.form.is_pc = '1'
|
|
||||||
crudProductIn.divStruct(this.form).then(res => {
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.divBtn = false
|
|
||||||
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
}).finally(() => {
|
|
||||||
this.divBtn = false
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.structShow = true
|
|
||||||
this.$refs.child.getMsg(false)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
unDivStruct() {
|
|
||||||
if (this.form.tableMater.length <= 0) {
|
|
||||||
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const flag = this.form.tableMater.some(mater => !mater.struct_code)
|
|
||||||
if (flag) {
|
|
||||||
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 如果勾选了,直接跳后台
|
|
||||||
crudProductIn.unDivStruct(this.form).then(res => {
|
|
||||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.crud-opts2 {
|
|
||||||
padding: 0;
|
|
||||||
display: -webkit-flex;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crud-opts2 .el-dialog__title2 {
|
|
||||||
line-height: 24px;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crud-opts2 .role-span {
|
|
||||||
padding: 10px 0px 10px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crud-opts2 .crud-opts-form {
|
|
||||||
padding: 10px 0px 0px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-with-select {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -9,11 +9,18 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
<el-form
|
||||||
:model="form" size="mini" label-width="85px" label-suffix=":">
|
ref="form"
|
||||||
|
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||||
|
:inline="true"
|
||||||
|
:model="form"
|
||||||
|
size="mini"
|
||||||
|
label-width="85px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
<el-form-item label="单据号" prop="bill_code">
|
<el-form-item label="单据号" prop="bill_code">
|
||||||
<label slot="label">单 据 号:</label>
|
<label slot="label">单 据 号:</label>
|
||||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产车间">
|
<el-form-item label="生产车间">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -71,7 +78,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="明细数" prop="detail_count">
|
<el-form-item label="明细数" prop="detail_count">
|
||||||
<label slot="label">明 细 数:</label>
|
<label slot="label">明 细 数:</label>
|
||||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
|
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总重量" prop="total_qty">
|
<el-form-item label="总重量" prop="total_qty">
|
||||||
<label slot="label">总 重 量:</label>
|
<label slot="label">总 重 量:</label>
|
||||||
@@ -85,12 +92,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务日期" prop="biz_date">
|
<el-form-item label="业务日期" prop="biz_date">
|
||||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
|
<el-date-picker
|
||||||
value-format="yyyy-MM-dd" :disabled="true"/>
|
v-model="form.biz_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
style="width: 210px"
|
||||||
|
align="center"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true"/>
|
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="crud-opts2">
|
<div class="crud-opts2">
|
||||||
@@ -109,13 +123,13 @@
|
|||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
@current-change="handleDtlCurrentChange"
|
@current-change="handleDtlCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
<el-table-column prop="pcsn" label="订单号" width="150" align="center"/>
|
<el-table-column prop="pcsn" label="订单号" width="150" align="center" />
|
||||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center"/>
|
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||||
<el-table-column prop="qty_unit_name" label="单位" align="center"/>
|
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center"/>
|
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -123,7 +137,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {crud} from '@crud/crud'
|
import { crud } from '@crud/crud'
|
||||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -174,7 +188,7 @@ export default {
|
|||||||
this.currentdtl = null
|
this.currentdtl = null
|
||||||
this.tableDtl = []
|
this.tableDtl = []
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
this.$emit('TaskChanged')
|
this.$emit('AddChanged')
|
||||||
},
|
},
|
||||||
stateFormat(row, column) {
|
stateFormat(row, column) {
|
||||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||||
@@ -209,13 +223,13 @@ export default {
|
|||||||
this.currentDis = current
|
this.currentDis = current
|
||||||
},
|
},
|
||||||
queryTableDtl() {
|
queryTableDtl() {
|
||||||
crudProductIn.getIODtl({'iostorinv_id': this.form.iostorinv_id}).then(res => {
|
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.tableDtl = res
|
this.tableDtl = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryTableDdis() {
|
queryTableDdis() {
|
||||||
if (this.currentdtl !== null) {
|
if (this.currentdtl !== null) {
|
||||||
crudProductIn.getDisTask({'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id}).then(res => {
|
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||||
this.tabledis = res
|
this.tabledis = res
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
align="center"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
@@ -204,7 +205,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<AddDialog @AddChanged="querytable" />
|
<AddDialog @AddChanged="querytable" />
|
||||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||||
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -218,21 +218,20 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDialog'
|
import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDialog'
|
||||||
import DivDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/DivDialog'
|
|
||||||
import ViewDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/ViewDialog'
|
import ViewDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/ViewDialog'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RawProductIn',
|
name: 'RawProductIn',
|
||||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
|
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '',
|
title: '',
|
||||||
optShow: { add: true, reset: true },
|
optShow: { add: true, reset: true },
|
||||||
idField: 'iostorinv_id',
|
idField: 'iostorinv_id',
|
||||||
url: '/api/stIvtIostorinvYl',
|
url: '/api/stIvtIostorinvYl',
|
||||||
sort: ['bill_code,desc'],
|
sort: ['bill_code'],
|
||||||
crudMethod: { ...rawProductIn }
|
crudMethod: { ...rawProductIn }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -330,15 +329,6 @@ export default {
|
|||||||
stateFormat(row, column) {
|
stateFormat(row, column) {
|
||||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||||
},
|
},
|
||||||
divOpen() {
|
|
||||||
crudProductIn.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
debugger
|
|
||||||
this.storId = this.currentRow.product_code
|
|
||||||
this.billType = this.currentRow.bill_type
|
|
||||||
this.divShow = true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
querytable() {
|
querytable() {
|
||||||
this.onSelectAll()
|
this.onSelectAll()
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|||||||
@@ -24,110 +24,6 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getType(params) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/getType',
|
|
||||||
method: 'get',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getIODtl(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/getIODtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function insertDtl(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/insertDtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function commit(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/commit',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function checkVehicle(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/checkVehicle',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function confirmvehicle(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/confirmvehicle',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDisDtl(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/getDisDtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function divStruct(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/divStruct',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function unDivStruct(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/unDivStruct',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function divPoint(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/divPoint',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function bucketDtl(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/bucketDtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function updateTask(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/updateTask',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function confirmTask(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/stIvtIostorinvYl/confirmTask',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function confirm(data) {
|
export function confirm(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtIostorinvYl/confirm',
|
url: '/api/stIvtIostorinvYl/confirm',
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud, form } from '@crud/crud'
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
import crudsemiproductOut from '@/views/wms/storage_manage/semiproduct/semiproductout/semiproductout'
|
||||||
import MaterDtl from '@/views/wms/storage_manage/semiproduct/semiproductout/StructIvt'
|
import MaterDtl from '@/views/wms/storage_manage/semiproduct/semiproductout/StructIvt'
|
||||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ export default {
|
|||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'ST_INV_OUT_TYPE', 'product_area'],
|
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'ST_INV_OUT_TYPE', 'product_area'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '入库新增', crudMethod: { ...crudsemiproductIn }})
|
return CRUD({ title: '入库新增', crudMethod: { ...crudsemiproductOut }})
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
@@ -284,7 +284,7 @@ export default {
|
|||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
// 获取入库单明细
|
// 获取入库单明细
|
||||||
crudsemiproductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
crudsemiproductOut.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
@@ -294,7 +294,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToView]() {
|
[CRUD.HOOK.afterToView]() {
|
||||||
crudsemiproductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
crudsemiproductOut.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||||
this.form.tableData = res.content
|
this.form.tableData = res.content
|
||||||
// 将明细变成不可编辑
|
// 将明细变成不可编辑
|
||||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { crud } from '@crud/crud'
|
import { crud } from '@crud/crud'
|
||||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
import crudsemiproductOut from '@/views/wms/storage_manage/semiproduct/semiproductout/semiproductout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewDialog',
|
name: 'ViewDialog',
|
||||||
@@ -217,7 +217,7 @@ export default {
|
|||||||
this.currentDis = current
|
this.currentDis = current
|
||||||
},
|
},
|
||||||
queryTableDtl() {
|
queryTableDtl() {
|
||||||
crudsemiproductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
crudsemiproductOut.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||||
this.tableDtl = res
|
this.tableDtl = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user