Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cfb8ce96a7
@ -3,84 +3,84 @@
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="计划编码" prop="wmsOutPlanCode">
|
||||
<el-input
|
||||
v-model="queryParams.wmsOutPlanCode"
|
||||
placeholder="请输入出库计划编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.wmsOutPlanCode"
|
||||
placeholder="请输入出库计划编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编码" prop="taskCode">
|
||||
<el-input
|
||||
v-model="queryParams.taskCode"
|
||||
placeholder="请输入任务编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.taskCode"
|
||||
placeholder="请输入任务编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务数量" prop="taskNumber">
|
||||
<el-input
|
||||
v-model="queryParams.taskNumber"
|
||||
placeholder="请输入任务数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.taskNumber"
|
||||
placeholder="请输入任务数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outNumber">
|
||||
<el-input
|
||||
v-model="queryParams.outNumber"
|
||||
placeholder="请输入出库数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.outNumber"
|
||||
placeholder="请输入出库数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="batchNum">
|
||||
<el-input
|
||||
v-model="queryParams.batchNum"
|
||||
placeholder="请输入批次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.batchNum"
|
||||
placeholder="请输入批次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="mdItemCode">
|
||||
<el-input
|
||||
v-model="queryParams.mdItemCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.mdItemCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="mdItemName">
|
||||
<el-input
|
||||
v-model="queryParams.mdItemName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.mdItemName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料单位" prop="mdItemUnit">
|
||||
<el-input
|
||||
v-model="queryParams.mdItemUnit"
|
||||
placeholder="请输入物料单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.mdItemUnit"
|
||||
placeholder="请输入物料单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态" prop="taskState">
|
||||
<el-select v-model="queryParams.taskState" placeholder="请选择任务状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_plan_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in dict.type.in_plan_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料人" prop="recipientUsername">
|
||||
<el-input
|
||||
v-model="queryParams.recipientUsername"
|
||||
placeholder="请输入领料人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.recipientUsername"
|
||||
placeholder="请输入领料人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -159,6 +159,31 @@
|
||||
<el-table-column label="出库时间" align="center" prop="createTime"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.taskState !== '1' && scope.row.wmsBusinessTypeCode !== 'ZDCK'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.taskState !== 'YTC'"
|
||||
@click="handleIssue(scope.row,'CK')"
|
||||
>推出库位
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.taskState !== 'YTR' && scope.row.taskState !== '0'"
|
||||
@click="handleIssue(scope.row,'RK')"
|
||||
>推入库位
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-running"
|
||||
@click="handleIssue(scope.row,'CK')"
|
||||
v-hasPermi="['md:TASK:remove']"
|
||||
v-if="scope.row.taskState ==='0'"
|
||||
>WCS下发任务
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -175,25 +200,16 @@
|
||||
v-if="scope.row.taskState =='0'"
|
||||
>手动出库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-running"
|
||||
@click="handleAutoRun(scope.row)"
|
||||
v-hasPermi="['md:TASK:remove']"
|
||||
v-if="scope.row.taskState =='0'"
|
||||
>WCS下发任务
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改出库任务对话框 -->
|
||||
@ -241,10 +257,10 @@
|
||||
<el-form-item label="任务状态" prop="taskState">
|
||||
<el-select v-model="form.taskState" placeholder="请选择任务状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_plan_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in dict.type.in_plan_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -287,7 +303,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addTASK, autoRunTASK, delTASK, getTASK, listTASK, runTASK, updateTASK} from "@/api/md/TASK";
|
||||
import {
|
||||
addTASK,
|
||||
autoRunTASK,
|
||||
delTASK,
|
||||
getTASK, issueOutTaskWcsDJ,
|
||||
issueWmsOutTaskToWcs,
|
||||
listTASK,
|
||||
runTASK,
|
||||
updateTASK
|
||||
} from "@/api/md/TASK";
|
||||
|
||||
export default {
|
||||
name: "TASK",
|
||||
@ -349,9 +374,9 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
tableRowStyle({row, index}){
|
||||
tableRowStyle({row, index}) {
|
||||
let rowBackground = {}
|
||||
if (row.knifeWarning == true){
|
||||
if (row.knifeWarning == true) {
|
||||
rowBackground.background = "#ff6666"
|
||||
rowBackground.color = "#666666"
|
||||
return rowBackground
|
||||
@ -485,6 +510,61 @@ export default {
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
// 下发任务至 WCS
|
||||
handleIssue(task, type = 'CK') {
|
||||
getTASK(task.wmsOutTaskId).then(res => {
|
||||
res.data.outInfoList.length = 1;
|
||||
res.data.outInfoList.forEach(outInfo => {
|
||||
const param = {
|
||||
// 计划ID
|
||||
planId: outInfo.planInId,
|
||||
// 任务ID
|
||||
taskId: outInfo.id,
|
||||
// 库位 信息
|
||||
cellCode: outInfo.wmStorageAreaCode,
|
||||
cellX: outInfo.cellX,
|
||||
cellY: outInfo.cellY,
|
||||
cellZ: outInfo.cellZ,
|
||||
// 库房类型编码
|
||||
warehouseTypeCode: "",
|
||||
// 物料信息
|
||||
materialId: outInfo.mdItemId,
|
||||
materialCode: outInfo.mdItemCode,
|
||||
materialName: outInfo.mdItemName,
|
||||
materialCount: outInfo.actualInQuantity,
|
||||
rfid: "123456789AAA",
|
||||
// 出库OR入库
|
||||
type,
|
||||
}
|
||||
if (['DPCK', 'DBCK'].includes(task.wmsBusinessTypeCode)) {
|
||||
param.warehouseTypeCode = "LTK"
|
||||
issueWmsOutTaskToWcs(param).then(res => {
|
||||
if (type === "RK") {
|
||||
task.taskState = "YTR"
|
||||
this.$modal.msgSuccess("推入库位");
|
||||
} else if (type === "CK") {
|
||||
task.taskState = "YTC"
|
||||
this.$modal.msgSuccess("推出库位");
|
||||
}
|
||||
updateTASK(task).then(res => {
|
||||
this.getList();
|
||||
})
|
||||
this.$modal.msgSuccess("下发成功");
|
||||
})
|
||||
} else if (task.wmsBusinessTypeCode === "ZDCK") {
|
||||
param.warehouseTypeCode = "DJ"
|
||||
issueOutTaskWcsDJ(param).then(res => {
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess("下发成功");
|
||||
})
|
||||
}
|
||||
})
|
||||
// issueBatchWmsInTask([task.id.toString()]).then(response => {
|
||||
// this.$modal.msgSuccess("执行成功");
|
||||
// this.getList();
|
||||
// });
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
|
@ -64,7 +64,7 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleIssueWcs(scope.row,'CK')"
|
||||
@click="handleIssueWcs(scope.row,'RK')"
|
||||
>下发
|
||||
</el-button>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user