rev:拣选单异常
This commit is contained in:
@@ -36,14 +36,20 @@ public class PickingController {
|
|||||||
|
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public ResponseEntity<Object> queryAll(FormDataQuery query, PageQuery page) {
|
public ResponseEntity<Object> queryAll(FormDataQuery query, PageQuery page) {
|
||||||
return new ResponseEntity<>(TableDataInfo.build(iPmFormDataService.queryTree(query,page)), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(iPmFormDataService.queryTree(query, page)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateDtl")
|
||||||
|
public ResponseEntity<Object> updateDtl(@RequestBody JSONArray params) {
|
||||||
|
pickingService.update(params);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getSonFormData/{id}")
|
@GetMapping("/getSonFormData/{id}")
|
||||||
public ResponseEntity<Object> getSonDtlFormData(@PathVariable String id){
|
public ResponseEntity<Object> getSonDtlFormData(@PathVariable String id) {
|
||||||
//参数判读,参数解析,调用参数入库
|
//参数判读,参数解析,调用参数入库
|
||||||
//Page<BmFormStruc> page = iBmFormStrucService.page(pageQuery.build(), query.build());
|
//Page<BmFormStruc> page = iBmFormStrucService.page(pageQuery.build(), query.build());
|
||||||
return new ResponseEntity<>(iPmFormDataService.getSonDtlFormData(id),HttpStatus.OK);
|
return new ResponseEntity<>(iPmFormDataService.getSonDtlFormData(id), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,20 +59,23 @@ public class PickingController {
|
|||||||
iPmFormDataService.syncFormData("type", formDtl);
|
iPmFormDataService.syncFormData("type", formDtl);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/savePickTask")
|
@PostMapping("/savePickTask")
|
||||||
@Log("拣选作业")
|
@Log("拣选作业")
|
||||||
public ResponseEntity<Object> savePickTask(@RequestBody JSONArray params) {
|
public ResponseEntity<Object> savePickTask(@RequestBody JSONArray params) {
|
||||||
pickingService.savePickTask(params);
|
pickingService.savePickTask(params);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/updateStatus")
|
@PostMapping("/updateStatus")
|
||||||
public ResponseEntity<Object> updateStatus(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> updateStatus(@RequestBody JSONObject param) {
|
||||||
//TODO:明细校验
|
//TODO:明细校验
|
||||||
iPmFormDataService.update(new UpdateWrapper<PmFormData>()
|
iPmFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||||
.set("status",param.getString("status"))
|
.set("status", param.getString("status"))
|
||||||
.eq("id",param.getString("id")));
|
.eq("id", param.getString("id")));
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/taskOpen")
|
@PostMapping("/taskOpen")
|
||||||
@Log("拣选作业下发")
|
@Log("拣选作业下发")
|
||||||
public ResponseEntity<Object> taskOpen(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> taskOpen(@RequestBody JSONObject param) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
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.LambdaQueryWrapper;
|
||||||
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.core.conditions.update.UpdateWrapper;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -25,6 +26,8 @@ import org.nl.wms.md_manage.vehicleMater.service.dao.MdPbVehicleMater;
|
|||||||
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||||
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
||||||
import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
import org.nl.wms.stor_manage.io.service.iostor.dao.StIvtIostorinv;
|
||||||
|
import org.nl.wms.stor_manage.io.service.iostor_dtl.IStIvtIostorinvdtlService;
|
||||||
|
import org.nl.wms.stor_manage.io.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||||
import org.nl.wms.stor_manage.io.service.iostor_dtl.dto.StIvtIostorinvdtlVo;
|
import org.nl.wms.stor_manage.io.service.iostor_dtl.dto.StIvtIostorinvdtlVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@@ -32,6 +35,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -46,7 +50,7 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class PickingService {
|
public class PickingService {
|
||||||
|
|
||||||
private static Map<String,String> Pick_Convery = MapOf.of("1309","1207","1311","1209");
|
private static Map<String, String> Pick_Convery = MapOf.of("1309", "1207", "1311", "1209");
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPmFormDataService iFormDataService;
|
private IPmFormDataService iFormDataService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -57,39 +61,53 @@ public class PickingService {
|
|||||||
private IBmVehicleInfoService iBmVehicleInfoService;
|
private IBmVehicleInfoService iBmVehicleInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsToAcsService wmsToAcsService;
|
private WmsToAcsService wmsToAcsService;
|
||||||
|
@Autowired
|
||||||
|
private IPmFormDataService pmFormDataService;
|
||||||
|
@Autowired
|
||||||
|
private IStIvtIostorinvdtlService iStIvtIostorinvDtlService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成拣选任务
|
* 生成拣选任务
|
||||||
|
*
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void savePickTask(JSONArray params){
|
public void savePickTask(JSONArray params) {
|
||||||
PmFormData dtl = iFormDataService.getById((String)((Map) params.get(0)).get("parent_id"));
|
if (params.size() == 0) {
|
||||||
|
throw new BadRequestException("作业明细不能为空!");
|
||||||
|
}
|
||||||
|
PmFormData dtl = iFormDataService.getById((String) ((Map) params.get(0)).get("parent_id"));
|
||||||
MdPbVehicleMater one = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>()
|
MdPbVehicleMater one = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>()
|
||||||
.eq("vehicle_code", dtl.getVehicle_code()).eq("material_id", dtl.getMaterial_id()));
|
.eq("vehicle_code", dtl.getVehicle_code()).eq("material_id", dtl.getMaterial_id()));
|
||||||
if (one==null){
|
if (one == null) {
|
||||||
throw new BadRequestException("拣选明细载具物料信息不存在");
|
throw new BadRequestException("拣选明细载具物料信息不存在");
|
||||||
}
|
}
|
||||||
Set<Object> vehicleCodes = params.stream().map(a -> ((Map) a).get("vehicle_code")).collect(Collectors.toSet());
|
Set<Object> vehicleCodes = params.stream().map(a -> ((Map) a).get("vehicle_code")).collect(Collectors.toSet());
|
||||||
int vCode = iBmVehicleInfoService.count(new QueryWrapper<BmVehicleInfo>().in("vehicle_code", vehicleCodes));
|
int vCode = iBmVehicleInfoService.count(new QueryWrapper<BmVehicleInfo>().in("vehicle_code", vehicleCodes));
|
||||||
if (vCode!=vehicleCodes.size()){
|
if (vCode != vehicleCodes.size()) {
|
||||||
throw new BadRequestException("载具编码不存在");
|
throw new BadRequestException("载具编码不存在");
|
||||||
}
|
}
|
||||||
vehicleCodes.remove(one.getVehicle_code());
|
vehicleCodes.remove(one.getVehicle_code());
|
||||||
int mCode = iMdPbVehicleMaterService.count(new QueryWrapper<MdPbVehicleMater>().in("vehicle_code", vehicleCodes));
|
int mCode = iMdPbVehicleMaterService.count(new QueryWrapper<MdPbVehicleMater>().in("vehicle_code", vehicleCodes));
|
||||||
if (mCode>0){
|
if (mCode > 0) {
|
||||||
throw new BadRequestException("当前载具"+vehicleCodes.toString()+"以存在载具物料信息");
|
throw new BadRequestException("当前载具" + vehicleCodes.toString() + "以存在载具物料信息");
|
||||||
}
|
}
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
String user = SecurityUtils.getCurrentNickName();
|
String user = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
|
String id = dtl.getId();
|
||||||
|
LambdaQueryWrapper<PmFormData> lqw = new LambdaQueryWrapper<>();
|
||||||
|
lqw.eq(PmFormData::getParent_id, id)
|
||||||
|
.and(l -> l.eq(PmFormData::getForm_type, "Picking_Task"));
|
||||||
|
iFormDataService.remove(lqw);
|
||||||
for (Object param : params) {
|
for (Object param : params) {
|
||||||
JSONObject task = new JSONObject((Map) param);
|
JSONObject task = new JSONObject((Map) param);
|
||||||
PmFormData data = task.toJavaObject(PmFormData.class);
|
PmFormData data = task.toJavaObject(PmFormData.class);
|
||||||
if (StringUtils.isEmpty(data.getParent_id())||StringUtils.isEmpty(data.getVehicle_code())){
|
if (StringUtils.isEmpty(data.getParent_id()) || StringUtils.isEmpty(data.getVehicle_code())) {
|
||||||
throw new BadRequestException("创建失败:缺少参数");
|
throw new BadRequestException("创建失败:缺少参数");
|
||||||
}
|
}
|
||||||
String task_type = data.getForm_data().getString("task_type");
|
String task_type = data.getForm_data().getString("task_type");
|
||||||
if (StringUtils.isEmpty(task_type)){
|
if (StringUtils.isEmpty(task_type)) {
|
||||||
throw new BadRequestException("创建失败:未配置任务类型");
|
throw new BadRequestException("创建失败:未配置任务类型");
|
||||||
}
|
}
|
||||||
data.setCreate_time(now);
|
data.setCreate_time(now);
|
||||||
@@ -97,7 +115,8 @@ public class PickingService {
|
|||||||
data.setId(IdUtil.getStringId());
|
data.setId(IdUtil.getStringId());
|
||||||
iFormDataService.save(data);
|
iFormDataService.save(data);
|
||||||
}
|
}
|
||||||
单据状态变动:{
|
单据状态变动:
|
||||||
|
{
|
||||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||||
.set("status", StatusEnum.FORM_STATUS.code("已分配")).eq("id", dtl.getId()));
|
.set("status", StatusEnum.FORM_STATUS.code("已分配")).eq("id", dtl.getId()));
|
||||||
int count = iFormDataService.count(new QueryWrapper<PmFormData>()
|
int count = iFormDataService.count(new QueryWrapper<PmFormData>()
|
||||||
@@ -116,12 +135,12 @@ public class PickingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void taskOpen(JSONObject form){
|
public void taskOpen(JSONObject form) {
|
||||||
PmFormData mst = form.toJavaObject(PmFormData.class);
|
PmFormData mst = form.toJavaObject(PmFormData.class);
|
||||||
if (StringUtils.isEmpty(mst.getProc_inst_id())){
|
if (StringUtils.isEmpty(mst.getProc_inst_id())) {
|
||||||
throw new BadRequestException("下发失败:当前单据不存在流程实例id");
|
throw new BadRequestException("下发失败:当前单据不存在流程实例id");
|
||||||
}
|
}
|
||||||
if (!mst.getStatus().equals(StatusEnum.FORM_STATUS.code("已分配"))){
|
if (!mst.getStatus().equals(StatusEnum.FORM_STATUS.code("已分配"))) {
|
||||||
throw new BadRequestException("下发失败:当前单据未分配或者一下发");
|
throw new BadRequestException("下发失败:当前单据未分配或者一下发");
|
||||||
}
|
}
|
||||||
JSONObject mstJ = (JSONObject) JSON.toJSON(mst);
|
JSONObject mstJ = (JSONObject) JSON.toJSON(mst);
|
||||||
@@ -131,7 +150,7 @@ public class PickingService {
|
|||||||
dto.setSource_form_type(mst.getSource_form_type());
|
dto.setSource_form_type(mst.getSource_form_type());
|
||||||
dto.setSource_form_id(mst.getSource_form_id());
|
dto.setSource_form_id(mst.getSource_form_id());
|
||||||
dto.setT(mstJ);
|
dto.setT(mstJ);
|
||||||
dto.setItem(packageT(mstJ,"id"));
|
dto.setItem(packageT(mstJ, "id"));
|
||||||
|
|
||||||
JSONObject form_data = mstJ.getJSONObject("form_data");
|
JSONObject form_data = mstJ.getJSONObject("form_data");
|
||||||
String platform = form_data.getString("point_code");
|
String platform = form_data.getString("point_code");
|
||||||
@@ -140,18 +159,18 @@ public class PickingService {
|
|||||||
for (ExecutionDto executionDto : dto.getItem()) {
|
for (ExecutionDto executionDto : dto.getItem()) {
|
||||||
for (ExecutionDto executionDto1 : executionDto.getItem()) {
|
for (ExecutionDto executionDto1 : executionDto.getItem()) {
|
||||||
JSONObject dis = executionDto1.getT();
|
JSONObject dis = executionDto1.getT();
|
||||||
if (!"false".equals(dis.getJSONObject("form_data").getString("s_move"))){
|
if (!"false".equals(dis.getJSONObject("form_data").getString("s_move"))) {
|
||||||
String vehicle_code = dis.getString("vehicle_code");
|
String vehicle_code = dis.getString("vehicle_code");
|
||||||
if (vehicle_code.equals(sourceVehicle)){
|
if (vehicle_code.equals(sourceVehicle)) {
|
||||||
converys.add(platform);
|
converys.add(platform);
|
||||||
}else {
|
} else {
|
||||||
converys.add(Pick_Convery.get(platform));
|
converys.add(Pick_Convery.get(platform));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String convery : converys) {
|
for (String convery : converys) {
|
||||||
wmsToAcsService.toCommand(convery,"1");
|
wmsToAcsService.toCommand(convery, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
// PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
// PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
||||||
@@ -179,15 +198,16 @@ public class PickingService {
|
|||||||
List<PmFormData> dis = iFormDataService.getByParentId(dtl.getId());
|
List<PmFormData> dis = iFormDataService.getByParentId(dtl.getId());
|
||||||
for (PmFormData data : dis) {
|
for (PmFormData data : dis) {
|
||||||
String vehicle_code = data.getVehicle_code();
|
String vehicle_code = data.getVehicle_code();
|
||||||
if (dtl.getVehicle_code().equals(vehicle_code)){
|
if (dtl.getVehicle_code().equals(vehicle_code)) {
|
||||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||||
.set("frozen_qty",0)
|
.set("frozen_qty", 0)
|
||||||
.set("update_time",DateUtil.now())
|
.set("update_time", DateUtil.now())
|
||||||
.set("update_name", SecurityUtils.getCurrentNickName())
|
.set("update_name", SecurityUtils.getCurrentNickName())
|
||||||
.set("qty",data.getQty())
|
.set("qty", data.getQty())
|
||||||
.eq("vehicle_code",vehicle_code));
|
.eq("vehicle_code", vehicle_code));
|
||||||
}else {
|
} else {
|
||||||
组盘:{
|
组盘:
|
||||||
|
{
|
||||||
MdGruopDick dick = new MdGruopDick();
|
MdGruopDick dick = new MdGruopDick();
|
||||||
dick.setVehicle_code(vehicle_code);
|
dick.setVehicle_code(vehicle_code);
|
||||||
dick.setSource_form_type("Picking_Task");
|
dick.setSource_form_type("Picking_Task");
|
||||||
@@ -222,10 +242,10 @@ public class PickingService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ExecutionDto> packageT(JSONObject current,String itemField){
|
private List<ExecutionDto> packageT(JSONObject current, String itemField) {
|
||||||
String id = current.getString(itemField);
|
String id = current.getString(itemField);
|
||||||
List<PmFormData> items = iFormDataService.getByParentId(id);
|
List<PmFormData> items = iFormDataService.getByParentId(id);
|
||||||
if (!CollectionUtils.isEmpty(items)){
|
if (!CollectionUtils.isEmpty(items)) {
|
||||||
List<ExecutionDto> list = new ArrayList<>();
|
List<ExecutionDto> list = new ArrayList<>();
|
||||||
for (PmFormData item : items) {
|
for (PmFormData item : items) {
|
||||||
JSONObject itemJ = (JSONObject) JSON.toJSON(item);
|
JSONObject itemJ = (JSONObject) JSON.toJSON(item);
|
||||||
@@ -235,11 +255,29 @@ public class PickingService {
|
|||||||
itemDto.setForm_type(item.getForm_type());
|
itemDto.setForm_type(item.getForm_type());
|
||||||
itemDto.setSource_form_type(item.getSource_form_type());
|
itemDto.setSource_form_type(item.getSource_form_type());
|
||||||
itemDto.setSource_form_id(item.getSource_form_id());
|
itemDto.setSource_form_id(item.getSource_form_id());
|
||||||
itemDto.setItem(packageT(itemJ,itemField));
|
itemDto.setItem(packageT(itemJ, itemField));
|
||||||
list.add(itemDto);
|
list.add(itemDto);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void update(JSONArray params) {
|
||||||
|
for (int i = 0; i < params.size(); i++) {
|
||||||
|
JSONObject jsonObject = params.getJSONObject(i);
|
||||||
|
String id = jsonObject.getString("id");
|
||||||
|
Integer assign_qty = jsonObject.getInteger("assign_qty");
|
||||||
|
// Integer qty = jsonObject.getInteger("qty");
|
||||||
|
String vehicle_code = jsonObject.getString("vehicle_code");
|
||||||
|
|
||||||
|
PmFormData pmFormData = new PmFormData();
|
||||||
|
pmFormData.setId(id);
|
||||||
|
pmFormData.setAssign_qty(new BigDecimal(assign_qty));
|
||||||
|
pmFormData.setVehicle_code(vehicle_code);
|
||||||
|
|
||||||
|
pmFormDataService.updateById(pmFormData);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,358 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
append-to-body
|
||||||
|
title="拣选作业"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
:show-close="false"
|
||||||
|
fullscreen
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20" style="border: 1px solid white">
|
||||||
|
<span/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="updateDtl">保存</el-button>
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="closeDialog">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
||||||
|
:model="form" size="mini" label-width="100px" label-suffix=":">
|
||||||
|
<el-form-item label="单据编号" prop="code">
|
||||||
|
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据类型" prop="form_type">
|
||||||
|
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务单据类型" prop="source_form_type">
|
||||||
|
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务单据id" prop="source_form_id">
|
||||||
|
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务单据时间" prop="source_form_date">
|
||||||
|
<!-- <el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
|
||||||
|
<el-input v-model="form.biz_date" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次" prop="pcsn">
|
||||||
|
<el-input v-model="form.pcsn" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料数量" prop="qty">
|
||||||
|
<el-input v-model="form.qty" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具编号" prop="vehicle_code">
|
||||||
|
<el-input v-model="form.vehicle_code" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据状态" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="form.status"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 180px;"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in statusEnum.FORM_STATUS"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input v-model="form.status" disabled clearable style="width: 210px"/>-->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="create_time">
|
||||||
|
<!-- <el-date-picker v-model="form.create_time" type="date" placeholder="选择日期" style="width: 210px"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
|
||||||
|
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-for="(col,index) in cols">
|
||||||
|
<el-form-item label="col.lable" prop="bill_code">
|
||||||
|
<label slot="label">{{ col.lable }}:</label>
|
||||||
|
<el-input disabled v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">拣选明细</span>
|
||||||
|
</div>
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="tableDtl"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:highlight-current-row="true"
|
||||||
|
@current-change="handleDtlCurrentChange"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
|
||||||
|
<!-- <el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip width="120"/>-->
|
||||||
|
<el-table-column prop="assign_qty" label="拣选数量" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.assign_qty" show-word-limit></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select disabled v-model="tableDtl[scope.$index].unit_id"
|
||||||
|
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in unitDict"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="vehicle_code" label="拣选载具" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.vehicle_code" show-word-limit></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="vehicle_code" label="拣选载具" show-overflow-tooltip width="120"/>-->
|
||||||
|
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="source_form_id" label="业务单据id" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="source_form_type" label="业务单据类型" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column prop="source_form_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||||
|
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||||
|
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
|
||||||
|
:label="item.lable">
|
||||||
|
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="create_time" label="创建时间"/>
|
||||||
|
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CRUD, {crud} from '@crud/crud'
|
||||||
|
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||||
|
import crudFormData, {inDecision} from "./formData";
|
||||||
|
import pick from "./pick";
|
||||||
|
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EditDialog',
|
||||||
|
components: {},
|
||||||
|
mixins: [crud()],
|
||||||
|
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
|
||||||
|
statusEnums: ['IOBILL_TYPE_OUT', 'FORM_STATUS'],
|
||||||
|
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
storId: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
divflag: false,
|
||||||
|
cols: [],
|
||||||
|
dtlCols: [],
|
||||||
|
unitDict: [],
|
||||||
|
disCols: [],
|
||||||
|
disFormData: {},
|
||||||
|
tableDtl: [],
|
||||||
|
tabledis: [],
|
||||||
|
vehicledis: [],
|
||||||
|
vehicleform: {},
|
||||||
|
un_assign_qty: 0,
|
||||||
|
currentDtl: null,
|
||||||
|
PickTaskType: [
|
||||||
|
{"label": "拣选回库", "value": "13"}, {"label": "拣选出库", "value": "23"}
|
||||||
|
],
|
||||||
|
outboundList: [
|
||||||
|
{"label": "一楼出库口", "value": "1101"}, {"label": "二楼出库口", "value": "2114"}
|
||||||
|
],
|
||||||
|
form: {},
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setForm(row) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.form = row
|
||||||
|
let dtl_form_type = this.form.children[0].form_type;
|
||||||
|
formstruc.getHeader(this.form.form_type).then(res => {
|
||||||
|
this.cols = res
|
||||||
|
})
|
||||||
|
formstruc.getHeader(dtl_form_type).then(res => {
|
||||||
|
this.dtlCols = res
|
||||||
|
})
|
||||||
|
formstruc.getHeader("Picking_Task").then(res => {
|
||||||
|
this.disCols = res
|
||||||
|
res.forEach(a => {
|
||||||
|
this.$set(this.disFormData, a.value, '')
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
measureunit.getSelect().then(res => {
|
||||||
|
this.unitDict = res.content
|
||||||
|
})
|
||||||
|
this.queryTableDtl(row.id)
|
||||||
|
},
|
||||||
|
addPickTask() {
|
||||||
|
let dis_assign_qty = 0;
|
||||||
|
this.tabledis.forEach(a => {
|
||||||
|
dis_assign_qty = dis_assign_qty + a.qty
|
||||||
|
})
|
||||||
|
if (!this.currentDtl) {
|
||||||
|
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let dtl = {};
|
||||||
|
dtl.material_id = this.currentDtl.material_id
|
||||||
|
dtl.material_name = this.currentDtl.material_name
|
||||||
|
dtl.material_spec = this.currentDtl.material_spec
|
||||||
|
dtl.material_pcsn = this.currentDtl.material_pcsn
|
||||||
|
dtl.qty = this.currentDtl.assign_qty - dis_assign_qty
|
||||||
|
dtl.pcsn = this.currentDtl.pcsn
|
||||||
|
dtl.unit_id = this.currentDtl.unit_id
|
||||||
|
dtl.form_type = 'Picking_Task'
|
||||||
|
dtl.source_form_type = this.currentDtl.source_form_type
|
||||||
|
dtl.source_form_id = this.currentDtl.id
|
||||||
|
dtl.source_form_date = this.currentDtl.create_time
|
||||||
|
dtl.parent_id = this.currentDtl.id
|
||||||
|
dtl.form_data = JSON.parse(JSON.stringify(this.disFormData))
|
||||||
|
dtl.form_data.pick_vehicle = this.currentDtl.vehicle_code
|
||||||
|
dtl.form_data.point_code = this.form.form_data.point_code
|
||||||
|
this.tabledis.push(dtl)
|
||||||
|
},
|
||||||
|
subRow(index) {
|
||||||
|
this.tabledis.splice(this.tabledis.indexOf(index), 1)
|
||||||
|
},
|
||||||
|
handleDtlCurrentChange(current) {
|
||||||
|
if (current !== null) {
|
||||||
|
this.tabledis = []
|
||||||
|
this.currentDtl = current
|
||||||
|
this.queryTableDis()
|
||||||
|
} else {
|
||||||
|
this.tabledis = []
|
||||||
|
this.currentDtl = {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeTaskType(index, taskType) {
|
||||||
|
if (taskType == "13") {
|
||||||
|
let dis_assign_qty = 0;
|
||||||
|
this.tabledis.forEach(a => {
|
||||||
|
dis_assign_qty = dis_assign_qty + a.qty
|
||||||
|
})
|
||||||
|
this.tabledis[index].qty = this.currentDtl.qty - dis_assign_qty
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateDtl() {
|
||||||
|
console.log(this.tableDtl)
|
||||||
|
pick.updateDtl(this.tableDtl).then(res => {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
},
|
||||||
|
queryTableDtl(id) {
|
||||||
|
crudFormData.getSonFormData(id).then(res => {
|
||||||
|
this.tableDtl = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryTableDis() {
|
||||||
|
if (this.currentDtl !== null) {
|
||||||
|
crudFormData.getSonFormData(this.currentDtl.id).then(res => {
|
||||||
|
this.tabledis = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.tabledis = []
|
||||||
|
this.tableDtl = []
|
||||||
|
},
|
||||||
|
savePickMst() {
|
||||||
|
pick.updateStatus({"status": "13", "id": this.form.id})
|
||||||
|
this.closeDialog()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.form.tableMater = []
|
||||||
|
this.form.dtl_row = null
|
||||||
|
this.form.bucketunique = null
|
||||||
|
this.sectProp = null
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
this.crud.refresh()
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts-right2 {
|
||||||
|
padding-left: 89%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -382,6 +382,10 @@ export default {
|
|||||||
},
|
},
|
||||||
savePickTask() {
|
savePickTask() {
|
||||||
pick.savePickTask(this.tabledis).then(res => {
|
pick.savePickTask(this.tabledis).then(res => {
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.tabledis = []
|
||||||
|
this.tableDtl = []
|
||||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -399,6 +403,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
closeDialog(){
|
closeDialog(){
|
||||||
|
this.$emit('AddChanged')
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
this.tableDtl = []
|
this.tableDtl = []
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
placeholder="请选择/搜索"
|
placeholder="请选择/搜索"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
disabled
|
||||||
@change="crud.toQuery()"
|
@change="crud.toQuery()"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -31,38 +32,38 @@
|
|||||||
<template v-for="(col,index) in cols" v-if="hideShowDialog">
|
<template v-for="(col,index) in cols" v-if="hideShowDialog">
|
||||||
<el-form-item label="col.lable">
|
<el-form-item label="col.lable">
|
||||||
<label slot="label">{{ col.lable }}:</label>
|
<label slot="label">{{ col.lable }}:</label>
|
||||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<rrOperation :crud="crud" />
|
<rrOperation :crud="crud"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
slot="right"
|
<!-- slot="right"-->
|
||||||
class="filter-item"
|
<!-- class="filter-item"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
type="success"
|
<!-- type="success"-->
|
||||||
icon="el-icon-s-operation"
|
<!-- icon="el-icon-s-operation"-->
|
||||||
@click="ToExpandall"
|
<!-- @click="ToExpandall"-->
|
||||||
>
|
<!-- >-->
|
||||||
全部展开
|
<!-- 全部展开-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
slot="right"
|
<!-- slot="right"-->
|
||||||
class="filter-item"
|
<!-- class="filter-item"-->
|
||||||
type="warning"
|
<!-- type="warning"-->
|
||||||
icon="el-icon-upload2"
|
<!-- icon="el-icon-upload2"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
>
|
<!-- >-->
|
||||||
导入
|
<!-- 导入-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-position"
|
icon="el-icon-notebook-2"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="dis_flag"
|
:disabled="dis_flag"
|
||||||
@click="disOpen"
|
@click="disOpen"
|
||||||
@@ -72,21 +73,21 @@
|
|||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="warning"
|
||||||
icon="el-icon-position"
|
icon="el-icon-thumb"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="task_flag"
|
:disabled="task_flag"
|
||||||
@click="taskOpen"
|
@click="taskOpen"
|
||||||
>
|
>
|
||||||
作业下发
|
作业下发
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
slot="right"
|
<!-- slot="right"-->
|
||||||
class="filter-item"
|
<!-- class="filter-item"-->
|
||||||
icon="el-icon-view"
|
<!-- icon="el-icon-view"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
@click="hideShow"
|
<!-- @click="hideShow"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -96,17 +97,17 @@
|
|||||||
@select="handleSelectionChange"
|
@select="handleSelectionChange"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
||||||
scope.row.code
|
scope.row.code
|
||||||
}}
|
}}
|
||||||
</el-link>
|
</el-link>
|
||||||
<span v-else>{{ scope.row.code }}</span>
|
<span v-else>{{ scope.row.code }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template v-for="item in statusEnum.FORM_STATUS">
|
<template v-for="item in statusEnum.FORM_STATUS">
|
||||||
@@ -114,16 +115,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120"/>
|
||||||
<!-- <el-table-column prop="qty" label="物料数量" show-overflow-tooltip />-->
|
<!-- <el-table-column prop="qty" label="物料数量" show-overflow-tooltip />-->
|
||||||
<!-- <el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />-->
|
<!-- <el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />-->
|
||||||
<!-- <el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />-->
|
<!-- <el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />-->
|
||||||
<!-- <el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />-->
|
<!-- <el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />-->
|
||||||
<!-- <el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />-->
|
<!-- <el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />-->
|
||||||
<!-- <el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />-->
|
<!-- <el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />-->
|
||||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120" />
|
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120"/>
|
||||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130" />
|
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
|
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(item, index) in cols"
|
v-for="(item, index) in cols"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -133,44 +134,54 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="create_time" label="创建时间" />
|
<el-table-column prop="create_time" label="创建时间" width="150"/>
|
||||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
<el-table-column prop="proc_inst_id" label="对应流程实例" show-overflow-tooltip width="120"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
|
||||||
label="操作"
|
label="操作"
|
||||||
width="120px"
|
width="120px"
|
||||||
align="center"
|
align="center"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<!-- <udOperation-->
|
||||||
|
<!-- style="display: inline"-->
|
||||||
|
<!-- :data="scope.row"-->
|
||||||
|
<!-- :permission="permission"-->
|
||||||
|
<!-- :disabled-edit="scope.row.is_modify === '0'"-->
|
||||||
|
<!-- :disabled-dle="scope.row.is_modify === '0'"-->
|
||||||
|
<!-- msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"-->
|
||||||
|
<!-- />-->
|
||||||
|
<el-button icon="el-icon-edit" type="text" class="filter-item" size="mini" @click="toUpdate(scope.row)">修改
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<udOperation
|
<udOperation
|
||||||
style="display: inline"
|
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:disabled-edit="scope.row.is_modify === '0'"
|
:is-visiable-edit="false"
|
||||||
:disabled-dle="scope.row.is_modify === '0'"
|
class="filter-item"
|
||||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination/>
|
||||||
</div>
|
</div>
|
||||||
<ViewDialog ref="viewDialog" />
|
<ViewDialog ref="viewDialog"/>
|
||||||
<TaskDialog ref="taskDis"/>
|
<EditDialog ref="editDialog" @AddChanged="querytable"/>
|
||||||
|
<TaskDialog ref="taskDis" @AddChanged="querytable"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudFormData from './formData'
|
import crudFormData from './formData'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||||
import ViewDialog from './ViewDialog'
|
import ViewDialog from './ViewDialog'
|
||||||
|
import EditDialog from './EditDialog'
|
||||||
import TaskDialog from './TaskDialog'
|
import TaskDialog from './TaskDialog'
|
||||||
import crudPick from './pick'
|
import crudPick from './pick'
|
||||||
|
|
||||||
@@ -198,7 +209,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'FormData',
|
name: 'FormData',
|
||||||
statusEnums: ['FORM_STATUS'],
|
statusEnums: ['FORM_STATUS'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog, TaskDialog },
|
components: {pagination, crudOperation, rrOperation, udOperation, ViewDialog, TaskDialog, EditDialog},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -206,13 +217,13 @@ export default {
|
|||||||
url: 'api/pmFormData',
|
url: 'api/pmFormData',
|
||||||
idField: 'id',
|
idField: 'id',
|
||||||
sort: 'id,desc',
|
sort: 'id,desc',
|
||||||
crudMethod: { ...crudFormData },
|
crudMethod: {...crudFormData},
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: true,
|
||||||
reset: true
|
reset: true
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
form_type:'Picking',
|
form_type: 'Picking',
|
||||||
form_data: {}
|
form_data: {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -274,6 +285,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toUpdate(row) {
|
||||||
|
if (row !== null) {
|
||||||
|
this.$refs.editDialog.setForm(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
if (val.length === 1) {
|
if (val.length === 1) {
|
||||||
this.task_flag = false
|
this.task_flag = false
|
||||||
@@ -299,7 +315,11 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
querytable() {
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.dis_flag = true
|
||||||
|
this.task_flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -46,4 +46,12 @@ export function taskopen(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {add, edit, del, savePickTask, updateStatus, taskopen}
|
export function updateDtl(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/picking/updateDtl',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {add, edit, del, savePickTask, updateStatus, taskopen, updateDtl}
|
||||||
|
|||||||
Reference in New Issue
Block a user