Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.check.stockcheckdetail.domain;
|
||||
|
||||
import com.ruoyi.common.domain.ExtraField;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -132,6 +133,15 @@ public class CheckStockinDetail extends BaseEntity
|
||||
|
||||
private String status;
|
||||
|
||||
private ExtraField extraField;
|
||||
|
||||
public ExtraField getExtraField() {
|
||||
return extraField;
|
||||
}
|
||||
public void setExtraField(ExtraField extraField) {
|
||||
this.extraField = extraField;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,10 @@ package com.ruoyi.check.stockcheckdetail.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.check.stockcheck.domain.CheckStockin;
|
||||
import com.ruoyi.common.domain.ExtraField;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.check.stockcheckdetail.mapper.CheckStockinDetailMapper;
|
||||
@@ -42,7 +45,11 @@ public class CheckStockinDetailServiceImpl implements ICheckStockinDetailService
|
||||
@Override
|
||||
public List<CheckStockinDetail> selectCheckStockinDetailList(CheckStockinDetail checkStockinDetail)
|
||||
{
|
||||
return checkStockinDetailMapper.selectCheckStockinDetailList(checkStockinDetail);
|
||||
List<CheckStockinDetail> checkStockinDetails = checkStockinDetailMapper.selectCheckStockinDetailList(checkStockinDetail);
|
||||
for (CheckStockinDetail stockinDetail : checkStockinDetails) {
|
||||
stockinDetail.setExtraField(JSONUtil.toBean(stockinDetail.getSpare1(), ExtraField.class));
|
||||
}
|
||||
return checkStockinDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.ruoyi.check.stockcheckdetailfinish.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.check.stockcheckdetail.domain.CheckStockinDetail;
|
||||
import com.ruoyi.common.domain.ExtraField;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.check.stockcheckdetailfinish.mapper.CheckStockinDetailFinishMapper;
|
||||
@@ -95,7 +97,10 @@ public class CheckStockinDetailFinishServiceImpl implements ICheckStockinDetailF
|
||||
|
||||
@Override
|
||||
public List<CheckStockinDetail> selectCheckStockinDetailList(CheckStockinDetail checkStockinDetail) {
|
||||
return checkStockinDetailFinishMapper.selectCheckStockinDetailList(checkStockinDetail);
|
||||
|
||||
List<CheckStockinDetail> checkStockinDetails = checkStockinDetailFinishMapper.selectCheckStockinDetailList(checkStockinDetail);
|
||||
for (CheckStockinDetail stockinDetail : checkStockinDetails) {
|
||||
stockinDetail.setExtraField(JSONUtil.toBean(stockinDetail.getSpare1(), ExtraField.class));
|
||||
}
|
||||
return checkStockinDetails;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class InMydoJobController extends BaseController
|
||||
* 手动完成任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:manualCompleted')")
|
||||
@Log(title = "任务表", businessType = BusinessType.DELETE)
|
||||
@Log(title = "任务表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/manualCompleted")
|
||||
public AjaxResult manualCompleted(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
BasProduct basProduct = iBasProductService.selectBasProductByProductId(receiveProductVo.getProductId());
|
||||
ReceiveStockinDetail receiveStockinDetail = new ReceiveStockinDetail();
|
||||
receiveStockinDetail.setQuantity(receiveProductVo.getQuantity());
|
||||
receiveStockinDetail.setProductGuid(receiveProductVo.getProductId());
|
||||
receiveStockinDetail.setProductGuid(basProduct.getProductGuid());
|
||||
receiveStockinDetail.setProductId(basProduct.getProductId());
|
||||
receiveStockinDetail.setStockinId(receiveStockin.getStockinId());
|
||||
receiveStockinDetail.setStockinDetailId(receiveStockin.getStockinId()+"-"+i++);
|
||||
@@ -176,7 +176,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
List<String> collect = list.stream().map(ReceiveProductVo::getProductId).collect(Collectors.toList());
|
||||
List<BasProduct> result = iBasProductService.selectBasProductListByProductIds(collect);
|
||||
for (BasProduct basProduct : result) {
|
||||
Optional<ReceiveProductVo> first = list.stream().filter(x -> x.getProductId().equals(basProduct.getProductGuid())).findFirst();
|
||||
Optional<ReceiveProductVo> first = list.stream().filter(x -> x.getProductId().equals(basProduct.getProductId())).findFirst();
|
||||
first.ifPresent(receiveProductVo -> basProduct.setQuantity(receiveProductVo.getQuantity()));
|
||||
first.ifPresent(receiveProductVo -> basProduct.setLotNo(receiveProductVo.getLotNo()));
|
||||
}
|
||||
@@ -259,6 +259,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
inStockinDetail.setStockStatus("0");
|
||||
inStockinDetail.setAssignNum("0");
|
||||
inStockinDetail.setScanNum("0");
|
||||
inStockinDetail.setSpare2(receiveStockinDetail.getStockinDetailId());
|
||||
inStockinDetailList.add(inStockinDetail);
|
||||
}
|
||||
return inStockinDetailList;
|
||||
@@ -279,6 +280,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
inStockin.setStockinId(iBasJobIdService.getJobId("RKD"));
|
||||
// 设置状态等默认值
|
||||
inStockin.setStatus("1");
|
||||
inStockin.setSpare1(receiveStockin.getStockinId());
|
||||
return inStockin;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.ruoyi.work.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.work.domain.ViewNoDoneOutWork;
|
||||
import com.ruoyi.work.service.IViewNoDoneOutWorkService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库未完成任务Controller
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/work")
|
||||
public class ViewNoDoneOutWorkController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IViewNoDoneOutWorkService viewNoDoneOutWorkService;
|
||||
|
||||
/**
|
||||
* 查询已完成入库任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:list1')")
|
||||
@GetMapping("/list1")
|
||||
public TableDataInfo list1(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
// startPage();
|
||||
List<ViewNoDoneOutWork> list = viewNoDoneOutWorkService.selectViewNoDoneOutWorkList1(viewNoDoneOutWork);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已完成出库任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:list2')")
|
||||
@GetMapping("/list2")
|
||||
public TableDataInfo list2(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
// startPage();
|
||||
List<ViewNoDoneOutWork> list = viewNoDoneOutWorkService.selectViewNoDoneOutWorkList2(viewNoDoneOutWork);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询未完成入库任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:list3')")
|
||||
@GetMapping("/list3")
|
||||
public TableDataInfo list3(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
// startPage();
|
||||
List<ViewNoDoneOutWork> list = viewNoDoneOutWorkService.selectViewNoDoneOutWorkList3(viewNoDoneOutWork);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询未完成出库任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:list4')")
|
||||
@GetMapping("/list4")
|
||||
public TableDataInfo list4(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
// startPage();
|
||||
List<ViewNoDoneOutWork> list = viewNoDoneOutWorkService.selectViewNoDoneOutWorkList4(viewNoDoneOutWork);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.ruoyi.work.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库未完成任务对象 view_no_done_out_work
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
public class ViewNoDoneOutWork extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String workName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String workValue;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long workNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long by1;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String by2;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String by3;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String by4;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String by5;
|
||||
|
||||
public void setWorkName(String workName)
|
||||
{
|
||||
this.workName = workName;
|
||||
}
|
||||
|
||||
public String getWorkName()
|
||||
{
|
||||
return workName;
|
||||
}
|
||||
|
||||
public void setWorkValue(String workValue)
|
||||
{
|
||||
this.workValue = workValue;
|
||||
}
|
||||
|
||||
public String getWorkValue()
|
||||
{
|
||||
return workValue;
|
||||
}
|
||||
|
||||
public void setWorkNum(Long workNum)
|
||||
{
|
||||
this.workNum = workNum;
|
||||
}
|
||||
|
||||
public Long getWorkNum()
|
||||
{
|
||||
return workNum;
|
||||
}
|
||||
|
||||
public void setBy1(Long by1)
|
||||
{
|
||||
this.by1 = by1;
|
||||
}
|
||||
|
||||
public Long getBy1()
|
||||
{
|
||||
return by1;
|
||||
}
|
||||
|
||||
public void setBy2(String by2)
|
||||
{
|
||||
this.by2 = by2;
|
||||
}
|
||||
|
||||
public String getBy2()
|
||||
{
|
||||
return by2;
|
||||
}
|
||||
|
||||
public void setBy3(String by3)
|
||||
{
|
||||
this.by3 = by3;
|
||||
}
|
||||
|
||||
public String getBy3()
|
||||
{
|
||||
return by3;
|
||||
}
|
||||
|
||||
public void setBy4(String by4)
|
||||
{
|
||||
this.by4 = by4;
|
||||
}
|
||||
|
||||
public String getBy4()
|
||||
{
|
||||
return by4;
|
||||
}
|
||||
|
||||
public void setBy5(String by5)
|
||||
{
|
||||
this.by5 = by5;
|
||||
}
|
||||
|
||||
public String getBy5()
|
||||
{
|
||||
return by5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("workName", getWorkName())
|
||||
.append("workValue", getWorkValue())
|
||||
.append("workNum", getWorkNum())
|
||||
.append("by1", getBy1())
|
||||
.append("by2", getBy2())
|
||||
.append("by3", getBy3())
|
||||
.append("by4", getBy4())
|
||||
.append("by5", getBy5())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.work.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.work.domain.ViewNoDoneOutWork;
|
||||
|
||||
/**
|
||||
* 出库未完成任务Mapper接口
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
public interface ViewNoDoneOutWorkMapper
|
||||
{
|
||||
/**
|
||||
* 查询work列表
|
||||
*
|
||||
* @param viewNoDoneOutWork work
|
||||
* @return work集合
|
||||
*/
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList1(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList2(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList3(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList4(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.work.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.work.domain.ViewNoDoneOutWork;
|
||||
|
||||
/**
|
||||
* 出库未完成任务Service接口
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
public interface IViewNoDoneOutWorkService
|
||||
{
|
||||
|
||||
|
||||
|
||||
List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList1(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
|
||||
List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList2(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
|
||||
List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList3(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
|
||||
List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList4(ViewNoDoneOutWork viewNoDoneOutWork);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.work.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.work.mapper.ViewNoDoneOutWorkMapper;
|
||||
import com.ruoyi.work.domain.ViewNoDoneOutWork;
|
||||
import com.ruoyi.work.service.IViewNoDoneOutWorkService;
|
||||
|
||||
/**
|
||||
* 出库未完成任务Service业务层处理
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
@Service
|
||||
public class ViewNoDoneOutWorkServiceImpl implements IViewNoDoneOutWorkService
|
||||
{
|
||||
@Autowired
|
||||
private ViewNoDoneOutWorkMapper viewNoDoneOutWorkMapper;
|
||||
|
||||
@Override
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList1(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
return viewNoDoneOutWorkMapper.selectViewNoDoneOutWorkList1(viewNoDoneOutWork);
|
||||
}
|
||||
@Override
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList2(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
return viewNoDoneOutWorkMapper.selectViewNoDoneOutWorkList2(viewNoDoneOutWork);
|
||||
}
|
||||
@Override
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList3(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
return viewNoDoneOutWorkMapper.selectViewNoDoneOutWorkList3(viewNoDoneOutWork);
|
||||
}
|
||||
@Override
|
||||
public List<ViewNoDoneOutWork> selectViewNoDoneOutWorkList4(ViewNoDoneOutWork viewNoDoneOutWork)
|
||||
{
|
||||
return viewNoDoneOutWorkMapper.selectViewNoDoneOutWorkList4(viewNoDoneOutWork);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
<insert id="insertCheckStockinDetailHistory">
|
||||
insert into check_stockin_detail_finish
|
||||
select * from check_stockin_detail where stock_check_guid = #{stockCheckGuid}
|
||||
select * from check_stockin_detail where stock_check_id = #{stockCheckId}
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckStockinDetail" parameterType="CheckStockinDetail">
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.work.mapper.ViewNoDoneOutWorkMapper">
|
||||
|
||||
<resultMap type="ViewNoDoneOutWork" id="ViewNoDoneOutWorkResult">
|
||||
<result property="workName" column="work_name" />
|
||||
<result property="workValue" column="work_value" />
|
||||
<result property="workNum" column="work_num" />
|
||||
<result property="by1" column="by1" />
|
||||
<result property="by2" column="by2" />
|
||||
<result property="by3" column="by3" />
|
||||
<result property="by4" column="by4" />
|
||||
<result property="by5" column="by5" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectViewNoDoneOutWorkList1" parameterType="ViewNoDoneOutWork" resultMap="ViewNoDoneOutWorkResult">
|
||||
select work_name, work_value, work_num, by1, by2, by3, by4, by5 from view_is_done_in_work
|
||||
</select>
|
||||
<select id="selectViewNoDoneOutWorkList2" parameterType="ViewNoDoneOutWork" resultMap="ViewNoDoneOutWorkResult">
|
||||
select work_name, work_value, work_num, by1, by2, by3, by4, by5 from view_is_done_out_work
|
||||
</select>
|
||||
<select id="selectViewNoDoneOutWorkList3" parameterType="ViewNoDoneOutWork" resultMap="ViewNoDoneOutWorkResult">
|
||||
select work_name, work_value, work_num, by1, by2, by3, by4, by5 from view_no_done_in_work
|
||||
</select>
|
||||
<select id="selectViewNoDoneOutWorkList4" parameterType="ViewNoDoneOutWork" resultMap="ViewNoDoneOutWorkResult">
|
||||
select work_name, work_value, work_num, by1, by2, by3, by4, by5 from view_no_done_out_work
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -42,3 +42,20 @@ export function delMydoJob(jobId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 新增任务表
|
||||
export function manualInvalidation(data) {
|
||||
return request({
|
||||
url: '/job/inmydoJob/manualInvalidation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 新增任务表
|
||||
export function manualCompleted(data) {
|
||||
return request({
|
||||
url: '/job/inmydoJob/manualCompleted',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
34
ruoyi-ui/src/api/work.js
Normal file
34
ruoyi-ui/src/api/work.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 已完成入库任务
|
||||
export function listWork1(query) {
|
||||
return request({
|
||||
url: '/work/list1',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 已完成出库任务
|
||||
export function listWork2(query) {
|
||||
return request({
|
||||
url: '/work/list2',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 未完成入库任务
|
||||
export function listWork3(query) {
|
||||
return request({
|
||||
url: '/work/list3',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 未完成出库任务
|
||||
export function listWork4(query) {
|
||||
return request({
|
||||
url: '/work/list4',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -95,51 +95,51 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['check:difference:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['check:difference:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['check:difference:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['check:difference:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="10" class="mb8">-->
|
||||
<!--<!– <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['check:difference:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['check:difference:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['check:difference:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>–>-->
|
||||
<!--<!– <el-col :span="1.5">–>-->
|
||||
<!--<!– <el-button–>-->
|
||||
<!--<!– type="warning"–>-->
|
||||
<!--<!– plain–>-->
|
||||
<!--<!– icon="el-icon-download"–>-->
|
||||
<!--<!– size="mini"–>-->
|
||||
<!--<!– @click="handleExport"–>-->
|
||||
<!--<!– v-hasPermi="['check:difference:export']"–>-->
|
||||
<!--<!– >导出</el-button>–>-->
|
||||
<!--<!– </el-col>–>-->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="differenceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
574
ruoyi-ui/src/views/check/job/in/index.vue
Normal file
574
ruoyi-ui/src/views/check/job/in/index.vue
Normal file
@@ -0,0 +1,574 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="任务ID" prop="jobId">
|
||||
<el-input
|
||||
v-model="queryParams.jobId"
|
||||
placeholder="请输入任务ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mydo_job_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="上线类型" prop="onLineType">
|
||||
<el-select v-model="queryParams.onLineType" placeholder="请选择上线类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.on_line_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="任务号" prop="taskNo">
|
||||
<el-input
|
||||
v-model="queryParams.taskNo"
|
||||
placeholder="请输入任务号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商ID" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="请输入供应商ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户ID" prop="customerId">
|
||||
<el-input
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请输入客户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门ID" prop="departmentId">
|
||||
<el-input
|
||||
v-model="queryParams.departmentId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="托盘码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="巷道ID" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="货位ID" prop="cargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.cargoSpaceId"
|
||||
placeholder="请输入货位ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="目标巷道ID" prop="targetRoadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.targetRoadwayId"
|
||||
placeholder="请输入目标巷道ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="目标货位" prop="targetCargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.targetCargoSpaceId"
|
||||
placeholder="请输入目标货位ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产线ID" prop="lineId">
|
||||
<el-input
|
||||
v-model="queryParams.lineId"
|
||||
placeholder="请输入产线ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车间ID" prop="workshopId">
|
||||
<el-input
|
||||
v-model="queryParams.workshopId"
|
||||
placeholder="请输入车间ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-input
|
||||
v-model="queryParams.priority"
|
||||
placeholder="请输入优先级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="执行阶段" prop="executionPhase">
|
||||
<el-select v-model="queryParams.executionPhase" placeholder="请选择执行阶段" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.execution_phase_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="inOrOut">
|
||||
<el-select v-model="queryParams.inOrOut" placeholder="请选择任务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_in_job_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="finishTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入口" prop="entranceId">
|
||||
<el-input
|
||||
v-model="queryParams.entranceId"
|
||||
placeholder="请输入入口ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出口" prop="exitId">
|
||||
<el-input
|
||||
v-model="queryParams.exitId"
|
||||
placeholder="请输入出口ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="班组ID" prop="classId">
|
||||
<el-input
|
||||
v-model="queryParams.classId"
|
||||
placeholder="请输入班组ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="重分标记" prop="faultFlag">
|
||||
<el-input
|
||||
v-model="queryParams.faultFlag"
|
||||
placeholder="请输入重分标记"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'invalid'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
>手动作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'completed'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
>手动完成</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['job:mydoJob:export']"
|
||||
>导出</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
|
||||
max-height="300">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="center" prop="jobId" fixed />
|
||||
<el-table-column label="任务状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上线类型" align="center" prop="onLineType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务类型" align="center" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.check_in_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="center" prop="taskNo" />
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" key="supplierId" value="supplierName" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="部门" align="center" prop="departmentName" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="巷道ID" align="center" prop="roadwayId" />
|
||||
<el-table-column label="货位" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="目标巷道" align="center" prop="targetRoadwayId" />
|
||||
<el-table-column label="目标货位" align="center" prop="targetCargoSpaceName" />
|
||||
<el-table-column label="产线ID" align="center" prop="lineId" />
|
||||
<el-table-column label="车间ID" align="center" prop="workshopId" />
|
||||
<el-table-column label="优先级" align="center" prop="priority" />
|
||||
<el-table-column label="执行阶段" align="center" prop="executionPhase">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="finishTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入口ID" align="center" prop="entranceId" />
|
||||
<!-- <el-table-column label="出口ID" align="center" prop="exitId" />-->
|
||||
<el-table-column label="班组ID" align="center" prop="classId" />
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
||||
<el-table-column label="重分标记" align="center" prop="faultFlag" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
|
||||
max-height="300"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子任务ID" align="center" prop="jobDetailId" />
|
||||
<el-table-column label="任务ID" align="center" prop="jobId" />
|
||||
<el-table-column label="库存ID" align="center" prop="stockId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="入库时间" align="center" prop="inDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.inDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据ID" align="center" prop="inOrOutId" />
|
||||
<el-table-column label="子单据ID" align="center" prop="inOrOutDId" />
|
||||
<el-table-column label="物料GUID" align="center" prop="productGuid" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="库存状态" align="center" prop="stockStatus" />
|
||||
<el-table-column label="入库数量" align="center" prop="inQuantity" />
|
||||
<!-- <el-table-column label="库存数量" align="center" prop="stockQuantity" />-->
|
||||
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />-->
|
||||
<!-- <el-table-column label="整层数量" align="center" prop="layerQuantity" />-->
|
||||
<!-- <el-table-column label="出库层数量" align="center" prop="outLayerQuantity" />-->
|
||||
<!-- <el-table-column label="回流数量" align="center" prop="giveNum" />-->
|
||||
<!-- <el-table-column label="追溯入库单ID" align="center" prop="stockinId" />-->
|
||||
<!-- <el-table-column label="垛型ID" align="center" prop="stackingId" />-->
|
||||
<!-- <el-table-column label="出库口ID" align="center" prop="exitId" />-->
|
||||
<el-table-column label="生产日期" align="center" prop="printDate" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="供应商ID" align="center" prop="supplierId" />
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'check_in_job_type', 'on_line_type', 'mydo_job_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading:false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
detailTotal: 0,
|
||||
// 任务表表格数据
|
||||
mydoJobList: [],
|
||||
// 子任务表表格数据
|
||||
mydoJobDetailList:[],
|
||||
// 当前选中行
|
||||
currentRow:null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: '1',
|
||||
onLineType: null,
|
||||
taskNo: null,
|
||||
supplierId: null,
|
||||
customerId: null,
|
||||
departmentId: null,
|
||||
trayCode: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceId: null,
|
||||
targetRoadwayId: null,
|
||||
targetCargoSpaceId: null,
|
||||
lineId: null,
|
||||
workshopId: null,
|
||||
priority: null,
|
||||
executionPhase: null,
|
||||
inOrOut: '2',
|
||||
createTime: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
entranceId: null,
|
||||
exitId: null,
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null
|
||||
},
|
||||
queryDetailParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
jobId: [
|
||||
{ required: true, message: "任务ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "任务状态不能为空", trigger: "change" }
|
||||
],
|
||||
taskNo: [
|
||||
{ required: true, message: "任务号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取字典数据后,设置默认值
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询任务表列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listMydoJob(this.queryParams).then(response => {
|
||||
this.mydoJobList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
// 如果有数据,自动选中第一行
|
||||
if (this.mydoJobList.length > 0) {
|
||||
this.handleRowClick(this.mydoJobList[0]);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
jobId: null,
|
||||
status: null,
|
||||
onLineType: null,
|
||||
taskNo: null,
|
||||
supplierId: null,
|
||||
customerId: null,
|
||||
departmentId: null,
|
||||
trayCode: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceId: null,
|
||||
targetRoadwayId: null,
|
||||
targetCargoSpaceId: null,
|
||||
lineId: null,
|
||||
workshopId: null,
|
||||
priority: null,
|
||||
executionPhase: null,
|
||||
inOrOut: null,
|
||||
createTime: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
entranceId: null,
|
||||
exitId: null,
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
// 清空子表数据
|
||||
this.mydoJobDetailList = [];
|
||||
this.detailTotal = 0;
|
||||
this.currentRow = null;
|
||||
this.queryDetailParams.jobId = null;
|
||||
// 重新查询主表数据
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
// 只处理主表的多选
|
||||
if (selection.length > 0 && selection[0].hasOwnProperty('jobDetailId')) {
|
||||
return;
|
||||
}
|
||||
this.ids = selection.map(item => item.jobId);
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
// 手动完成/作废
|
||||
handleCompletedManually(row) {
|
||||
const jobIds = this.ids;
|
||||
if (jobIds.length === 0) {
|
||||
this.$modal.msgError("请选择要操作的数据");
|
||||
return;
|
||||
}
|
||||
if (row.type === 'invalid'){
|
||||
//手动作废
|
||||
}else if (row.type === 'completed'){
|
||||
//手动完成
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('job/mydoJob/export', {
|
||||
...this.queryParams
|
||||
}, `mydoJob_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 行点击事件处理 */
|
||||
handleRowClick(row) {
|
||||
// 设置当前选中行
|
||||
this.currentRow = row;
|
||||
// 更新子表格查询参数
|
||||
this.queryDetailParams.jobId = row.jobId;
|
||||
this.queryDetailParams.status = row.status;
|
||||
// 查询子表格数据
|
||||
this.getDetailList();
|
||||
},
|
||||
/** 查询子任务表列表 */
|
||||
getDetailList() {
|
||||
// 如果没有选中的主任务,不加载子任务
|
||||
if (!this.queryDetailParams.jobId) {
|
||||
this.mydoJobDetailList = [];
|
||||
this.detailTotal = 0;
|
||||
this.detailLoading = false;
|
||||
return;
|
||||
}
|
||||
this.detailLoading = true;
|
||||
listMydoJobDetail(this.queryDetailParams).then(response => {
|
||||
this.mydoJobDetailList = response.rows;
|
||||
this.detailTotal = response.total;
|
||||
this.detailLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table >>> .current-row {
|
||||
background-color: #f0f9eb;
|
||||
}
|
||||
</style>
|
||||
574
ruoyi-ui/src/views/check/job/out/index.vue
Normal file
574
ruoyi-ui/src/views/check/job/out/index.vue
Normal file
@@ -0,0 +1,574 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="任务ID" prop="jobId">
|
||||
<el-input
|
||||
v-model="queryParams.jobId"
|
||||
placeholder="请输入任务ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mydo_job_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="上线类型" prop="onLineType">
|
||||
<el-select v-model="queryParams.onLineType" placeholder="请选择上线类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.on_line_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="任务号" prop="taskNo">
|
||||
<el-input
|
||||
v-model="queryParams.taskNo"
|
||||
placeholder="请输入任务号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商ID" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="请输入供应商ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户ID" prop="customerId">
|
||||
<el-input
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请输入客户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门ID" prop="departmentId">
|
||||
<el-input
|
||||
v-model="queryParams.departmentId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="托盘码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="巷道ID" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="货位ID" prop="cargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.cargoSpaceId"
|
||||
placeholder="请输入货位ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="目标巷道ID" prop="targetRoadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.targetRoadwayId"
|
||||
placeholder="请输入目标巷道ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="目标货位" prop="targetCargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.targetCargoSpaceId"
|
||||
placeholder="请输入目标货位ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产线ID" prop="lineId">
|
||||
<el-input
|
||||
v-model="queryParams.lineId"
|
||||
placeholder="请输入产线ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车间ID" prop="workshopId">
|
||||
<el-input
|
||||
v-model="queryParams.workshopId"
|
||||
placeholder="请输入车间ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-input
|
||||
v-model="queryParams.priority"
|
||||
placeholder="请输入优先级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="执行阶段" prop="executionPhase">
|
||||
<el-select v-model="queryParams.executionPhase" placeholder="请选择执行阶段" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.execution_phase_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="inOrOut">
|
||||
<el-select v-model="queryParams.inOrOut" placeholder="请选择任务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_out_job_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="finishTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入口" prop="entranceId">
|
||||
<el-input
|
||||
v-model="queryParams.entranceId"
|
||||
placeholder="请输入入口ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出口" prop="exitId">
|
||||
<el-input
|
||||
v-model="queryParams.exitId"
|
||||
placeholder="请输入出口ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="班组ID" prop="classId">
|
||||
<el-input
|
||||
v-model="queryParams.classId"
|
||||
placeholder="请输入班组ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="重分标记" prop="faultFlag">
|
||||
<el-input
|
||||
v-model="queryParams.faultFlag"
|
||||
placeholder="请输入重分标记"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'invalid'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
>手动作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'completed'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
>手动完成</el-button>
|
||||
</el-col>
|
||||
<!– <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['job:mydoJob:export']"
|
||||
>导出</el-button>
|
||||
</el-col>–>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
|
||||
max-height="300">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="center" prop="jobId" fixed />
|
||||
<el-table-column label="任务状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上线类型" align="center" prop="onLineType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务类型" align="center" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.check_out_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务号" align="center" prop="taskNo" />
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" key="supplierId" value="supplierName" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="部门" align="center" prop="departmentName" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="巷道ID" align="center" prop="roadwayId" />
|
||||
<el-table-column label="货位" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="目标巷道" align="center" prop="targetRoadwayId" />
|
||||
<el-table-column label="目标货位" align="center" prop="targetCargoSpaceName" />
|
||||
<el-table-column label="产线ID" align="center" prop="lineId" />
|
||||
<el-table-column label="车间ID" align="center" prop="workshopId" />
|
||||
<el-table-column label="优先级" align="center" prop="priority" />
|
||||
<el-table-column label="执行阶段" align="center" prop="executionPhase">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="finishTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入口ID" align="center" prop="entranceId" />
|
||||
<!-- <el-table-column label="出口ID" align="center" prop="exitId" />-->
|
||||
<el-table-column label="班组ID" align="center" prop="classId" />
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
||||
<el-table-column label="重分标记" align="center" prop="faultFlag" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
|
||||
max-height="300"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子任务ID" align="center" prop="jobDetailId" />
|
||||
<el-table-column label="任务ID" align="center" prop="jobId" />
|
||||
<el-table-column label="库存ID" align="center" prop="stockId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="入库时间" align="center" prop="inDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.inDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据ID" align="center" prop="inOrOutId" />
|
||||
<el-table-column label="子单据ID" align="center" prop="inOrOutDId" />
|
||||
<el-table-column label="物料GUID" align="center" prop="productGuid" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="库存状态" align="center" prop="stockStatus" />
|
||||
<el-table-column label="入库数量" align="center" prop="inQuantity" />
|
||||
<!-- <el-table-column label="库存数量" align="center" prop="stockQuantity" />-->
|
||||
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" />-->
|
||||
<!-- <el-table-column label="整层数量" align="center" prop="layerQuantity" />-->
|
||||
<!-- <el-table-column label="出库层数量" align="center" prop="outLayerQuantity" />-->
|
||||
<!-- <el-table-column label="回流数量" align="center" prop="giveNum" />-->
|
||||
<!-- <el-table-column label="追溯入库单ID" align="center" prop="stockinId" />-->
|
||||
<!-- <el-table-column label="垛型ID" align="center" prop="stackingId" />-->
|
||||
<!-- <el-table-column label="出库口ID" align="center" prop="exitId" />-->
|
||||
<el-table-column label="生产日期" align="center" prop="printDate" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="供应商ID" align="center" prop="supplierId" />
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'check_out_job_type', 'on_line_type', 'mydo_job_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading:false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
detailTotal: 0,
|
||||
// 任务表表格数据
|
||||
mydoJobList: [],
|
||||
// 子任务表表格数据
|
||||
mydoJobDetailList:[],
|
||||
// 当前选中行
|
||||
currentRow:null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: '1',
|
||||
onLineType: null,
|
||||
taskNo: null,
|
||||
supplierId: null,
|
||||
customerId: null,
|
||||
departmentId: null,
|
||||
trayCode: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceId: null,
|
||||
targetRoadwayId: null,
|
||||
targetCargoSpaceId: null,
|
||||
lineId: null,
|
||||
workshopId: null,
|
||||
priority: null,
|
||||
executionPhase: null,
|
||||
inOrOut: '23',
|
||||
createTime: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
entranceId: null,
|
||||
exitId: null,
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null
|
||||
},
|
||||
queryDetailParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jobId: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
jobId: [
|
||||
{ required: true, message: "任务ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "任务状态不能为空", trigger: "change" }
|
||||
],
|
||||
taskNo: [
|
||||
{ required: true, message: "任务号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取字典数据后,设置默认值
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询任务表列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listMydoJob(this.queryParams).then(response => {
|
||||
this.mydoJobList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
// 如果有数据,自动选中第一行
|
||||
if (this.mydoJobList.length > 0) {
|
||||
this.handleRowClick(this.mydoJobList[0]);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
jobId: null,
|
||||
status: null,
|
||||
onLineType: null,
|
||||
taskNo: null,
|
||||
supplierId: null,
|
||||
customerId: null,
|
||||
departmentId: null,
|
||||
trayCode: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceId: null,
|
||||
targetRoadwayId: null,
|
||||
targetCargoSpaceId: null,
|
||||
lineId: null,
|
||||
workshopId: null,
|
||||
priority: null,
|
||||
executionPhase: null,
|
||||
inOrOut: null,
|
||||
createTime: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
entranceId: null,
|
||||
exitId: null,
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
// 清空子表数据
|
||||
this.mydoJobDetailList = [];
|
||||
this.detailTotal = 0;
|
||||
this.currentRow = null;
|
||||
this.queryDetailParams.jobId = null;
|
||||
// 重新查询主表数据
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
// 只处理主表的多选
|
||||
if (selection.length > 0 && selection[0].hasOwnProperty('jobDetailId')) {
|
||||
return;
|
||||
}
|
||||
this.ids = selection.map(item => item.jobId);
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
// 手动完成/作废
|
||||
handleCompletedManually(row) {
|
||||
const jobIds = this.ids;
|
||||
if (jobIds.length === 0) {
|
||||
this.$modal.msgError("请选择要操作的数据");
|
||||
return;
|
||||
}
|
||||
if (row.type === 'invalid'){
|
||||
//手动作废
|
||||
}else if (row.type === 'completed'){
|
||||
//手动完成
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('job/mydoJob/export', {
|
||||
...this.queryParams
|
||||
}, `mydoJob_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 行点击事件处理 */
|
||||
handleRowClick(row) {
|
||||
// 设置当前选中行
|
||||
this.currentRow = row;
|
||||
// 更新子表格查询参数
|
||||
this.queryDetailParams.jobId = row.jobId;
|
||||
this.queryDetailParams.status = row.status;
|
||||
// 查询子表格数据
|
||||
this.getDetailList();
|
||||
},
|
||||
/** 查询子任务表列表 */
|
||||
getDetailList() {
|
||||
// 如果没有选中的主任务,不加载子任务
|
||||
if (!this.queryDetailParams.jobId) {
|
||||
this.mydoJobDetailList = [];
|
||||
this.detailTotal = 0;
|
||||
this.detailLoading = false;
|
||||
return;
|
||||
}
|
||||
this.detailLoading = true;
|
||||
listMydoJobDetail(this.queryDetailParams).then(response => {
|
||||
this.mydoJobDetailList = response.rows;
|
||||
this.detailTotal = response.total;
|
||||
this.detailLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table >>> .current-row {
|
||||
background-color: #f0f9eb;
|
||||
}
|
||||
</style>
|
||||
@@ -223,33 +223,16 @@
|
||||
<el-table-column label="子单ID" align="center" prop="stockCheckDetailId" />
|
||||
<!-- <el-table-column label="主单GUID" align="center" prop="stockCheckGuid" /> -->
|
||||
<el-table-column label="主单ID" align="center" prop="stockCheckId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<!-- <el-table-column label="物料ID" align="center" prop="productGuid" /> -->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<!-- <el-table-column label="计划数量(箱)" align="center" prop="quantityX" />-->
|
||||
<!-- <el-table-column label="计划数量(件)" align="center" prop="quantityJ" />-->
|
||||
<el-table-column label="参考单价" align="center" prop="price" />
|
||||
<el-table-column label="品牌" align="center" prop="cargoNo" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
<!-- <el-table-column label="实际数量(箱)" align="center" prop="assignNumX" />-->
|
||||
<!-- <el-table-column label="实际数量(件)" align="center" prop="assignNumJ" />-->
|
||||
<el-table-column label="入库日期" align="center" prop="printDate" />
|
||||
<el-table-column label="单据状态" align="center" prop="stockStatus" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierId" />
|
||||
<el-table-column label="客户编码" align="center" prop="customerId" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="扫码数量" align="center" prop="scanNum" />
|
||||
<!-- <el-table-column label="扫码数量(箱)" align="center" prop="scanNumX" />-->
|
||||
<!-- <el-table-column label="扫码数量(件)" align="center" prop="scanNumJ" />-->
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段5" align="center" prop="spare5" />
|
||||
<el-table-column label="备用字段6" align="center" prop="spare6" /> -->
|
||||
<el-table-column label="批次号" align="center" prop="lotNo"/>
|
||||
<!-- <el-table-column label="物料ID" align="center" prop="productGuid"/>-->
|
||||
<el-table-column label="物料编码" align="center" prop="productId"/>
|
||||
<el-table-column label="物料描述" align="center" prop="extraField.materialDesc"/>
|
||||
<el-table-column label="英文描述" align="center" prop="extraField.englishDesc"/>
|
||||
<el-table-column label="箱号" align="center" prop="extraField.cartonNo"/>
|
||||
<el-table-column label="包装方式" align="center" prop="extraField.packingMethod"/>
|
||||
<el-table-column label="计划数量" align="center" prop="quantity"/>
|
||||
<el-table-column label="扫码数量" align="center" prop="scanNum"/>
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'invalid'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
v-hasPermi="['job:mydoJob:manualInvalidation']"
|
||||
>手动作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -225,7 +225,7 @@
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleCompletedManually({type: 'completed'})"
|
||||
v-hasPermi="['job:mydoJob:CompletedManually']"
|
||||
v-hasPermi="['job:mydoJob:manualCompleted']"
|
||||
>手动完成</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -352,7 +352,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJob,manualInvalidation,manualCompleted, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
|
||||
export default {
|
||||
@@ -525,10 +525,23 @@ export default {
|
||||
this.$modal.msgError("请选择要操作的数据");
|
||||
return;
|
||||
}
|
||||
if (jobIds.length > 1) {
|
||||
this.$modal.msgError("请选择一条任务");
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
"jobId": jobIds[0],
|
||||
}
|
||||
if (row.type === 'invalid'){
|
||||
//手动作废
|
||||
manualInvalidation(data).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
}else if (row.type === 'completed'){
|
||||
//手动完成
|
||||
manualCompleted(data).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<span>{{ $t('receiveStockinAdd.InboundMaterials') }}</span>
|
||||
<el-row>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleAddProduct" v-hasPermi="['bas:BasProduct:list']">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleAddProduct" v-hasPermi="['receive:stockin:add']">
|
||||
{{ $t('receiveStockinAdd.AddMaterials') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
size="mini"
|
||||
:detailDisabled="single"
|
||||
@click="handleQualityInspection"
|
||||
v-hasPermi="['receive:stockin:edit']"
|
||||
v-hasPermi="['receive:stockInDetail:qualityInspection']"
|
||||
>质检
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -283,7 +283,7 @@
|
||||
size="mini"
|
||||
:detailDisabled="multiple"
|
||||
@click="handleStockinDetailDelete"
|
||||
v-hasPermi="['receive:stockin:remove']"
|
||||
v-hasPermi="['receive:stockInDetail:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -303,7 +303,6 @@
|
||||
<el-table-column label="计划数量" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-dialog-drag-width="100"
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
@@ -342,7 +341,7 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleQualityInspection(scope.row)"
|
||||
v-hasPermi="['receive:stockInDetail:edit']"
|
||||
v-hasPermi="['receive:stockInDetail:qualityInspection']"
|
||||
>质检
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -358,11 +357,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
@@ -399,6 +398,7 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
detailTotal: 0,
|
||||
// 收货单据表格数据
|
||||
stockinList: [],
|
||||
stockInDetailList: [],
|
||||
@@ -581,27 +581,38 @@ export default {
|
||||
},
|
||||
//质检功能
|
||||
handleQualityInspection(row) {
|
||||
|
||||
const stockinDetailIds = row.stockinDetailId || this.detailIds
|
||||
|
||||
if (!stockinDetailIds || (Array.isArray(stockinDetailIds) && stockinDetailIds.length === 0)) {
|
||||
this.$modal.msgError("请选择需要质检的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
let selectedDetails = [];
|
||||
// 如果是点击批量质检按钮,获取所有选中行的数据
|
||||
selectedDetails = this.stockInDetailList.filter(item =>
|
||||
stockinDetailIds.includes(item.stockinDetailId)
|
||||
).map(item => ({
|
||||
stockinDetailId: item.stockinDetailId,
|
||||
quantity: item.quantity,
|
||||
stockinId: item.stockinId
|
||||
}));
|
||||
stockinDetailIds.includes(item.stockinDetailId)
|
||||
).map(item => ({
|
||||
stockinDetailId: item.stockinDetailId,
|
||||
quantity: item.quantity,
|
||||
stockinId: item.stockinId
|
||||
}));
|
||||
|
||||
if (selectedDetails.length === 0) {
|
||||
this.$modal.msgError("未找到需要质检的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
let data = {
|
||||
list: selectedDetails,
|
||||
stockinId: selectedDetails[0].stockinId
|
||||
};
|
||||
//console.log(data);
|
||||
|
||||
qualityInspection(data).then(response => {
|
||||
this.getDetailList(data.stockinId)
|
||||
this.$modal.msgSuccess("质检成功");
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("质检失败:" + error.message);
|
||||
});
|
||||
},/**
|
||||
* 创建入库单
|
||||
|
||||
@@ -251,39 +251,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName"/>
|
||||
<el-table-column label="完成日期" align="center" prop="finishDate"/>
|
||||
<!-- <el-table-column label="erp单号" align="center" prop="erpBill"/>-->
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门" align="center" prop="departmentName"/>
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo" />-->
|
||||
<!-- <el-table-column label="班组编码" align="center" prop="classNo"/>-->
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段5" align="center" prop="spare5" />-->
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['in:stockIn:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['in:stockIn:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -297,10 +271,8 @@
|
||||
<el-table v-loading="detailLoading" :data="stockInDetailList" @selection-change="handleDetailSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子单ID" align="center" prop="stockinDetailId"/>
|
||||
<!-- <el-table-column label="主单GUID" align="center" prop="stockinGuid" />-->
|
||||
<el-table-column label="主单ID" align="center" prop="stockinId"/>
|
||||
<el-table-column label="批次号" align="center" prop="lotNo"/>
|
||||
<el-table-column label="物料ID" align="center" prop="productGuid"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productId"/>
|
||||
<el-table-column label="物料描述" align="center" prop="extraField.materialDesc"/>
|
||||
<el-table-column label="英文描述" align="center" prop="extraField.englishDesc"/>
|
||||
@@ -309,30 +281,6 @@
|
||||
<el-table-column label="计划数量" align="center" prop="quantity"/>
|
||||
<el-table-column label="扫码数量" align="center" prop="scanNum"/>
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段5" align="center" prop="spare5" />
|
||||
<el-table-column label="备用字段6" align="center" prop="spare6" />-->
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['in:stockInDetail:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['in:stockInDetail:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user