Compare commits

..

No commits in common. "a53fa45c9a76ea414600a60ee545c445c0b74ca1" and "e336643b5adee206a3a0c01bb31fdea831d3cf8d" have entirely different histories.

3 changed files with 254 additions and 220 deletions

View File

@ -24,42 +24,53 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd('DBRK')" @click="handleAdd"
>刀柄入库 v-hasPermi="['wm:PLAN:add']"
>新增
</el-button> </el-button>
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="knifeBackVisible=true"-->
<!-- >整刀回库-->
<!-- </el-button>-->
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <!-- <el-button-->
type="primary" <!-- type="success"-->
plain <!-- plain-->
icon="el-icon-plus" <!-- icon="el-icon-edit"-->
size="mini" <!-- size="mini"-->
@click="handleAdd('DPRK')" <!-- :disabled="single"-->
>刀片入库 <!-- @click="handleUpdate"-->
</el-button> <!-- v-hasPermi="['wm:PLAN: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="['wm:PLAN:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <!-- <el-button-->
type="primary" <!-- type="warning"-->
plain <!-- plain-->
icon="el-icon-plus" <!-- icon="el-icon-download"-->
size="mini" <!-- size="mini"-->
@click="handleAdd('ZDHK')" <!-- @click="handleExport"-->
>整刀回库 <!-- v-hasPermi="['wm:PLAN:export']"-->
</el-button> <!-- >导出-->
</el-col> <!-- </el-button>-->
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd('CDHK')"
>拆刀回库
</el-button>
</el-col>
<el-col :span="1.5">
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -134,102 +145,110 @@
/> />
<!-- 添加或修改入库计划对话框 --> <!-- 添加或修改入库计划对话框 -->
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false"> <div v-if="!isKnifeBack">
<!--状态为 1 已执行 则禁用表单--> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'"> <!--状态为1已执行 则禁用-->
<el-form-item label="计划编码" prop="planCode"> <el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'">
<el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input> <el-form-item label="计划编码" prop="planCode">
</el-form-item> <el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>
<el-form-item label="源头单据" prop="relBillCode"> </el-form-item>
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input> <el-form-item label="入库类型" prop="planTypeId">
</el-form-item> <el-select v-model="form.planTypeId" placeholder="请选择入库类型" @change="handlePlanTypeSelectChange">
<el-form-item label="备注" prop="remark"> <el-option :label="item.name" :value="item.typeId" v-for="item in inPlanTypeList"
<el-input v-model="form.remark" placeholder="请输入备注"></el-input> :key="item.typeId"/>
</el-form-item> </el-select>
<el-divider content-position="center">入库计划明细信息</el-divider> </el-form-item>
<el-row :gutter="10" class="mb8"> <el-form-item label="源头单据" prop="relBillCode">
<el-col :span="1.5"> <el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWmsInPlanDetails">添加 </el-form-item>
</el-button> <el-form-item label="备注" prop="remark">
</el-col> <el-input v-model="form.remark" placeholder="请输入备注"></el-input>
<el-col :span="1.5"> </el-form-item>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWmsInPlanDetails">删除 <el-divider content-position="center">入库计划明细信息</el-divider>
</el-button> <el-row :gutter="10" class="mb8">
</el-col> <el-col :span="1.5">
</el-row> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWmsInPlanDetails">添加
<div> </el-button>
<el-table :data="wmsInPlanDetailsList" :row-class-name="rowWmsInPlanDetailsIndex" </el-col>
@selection-change="handleWmsInPlanDetailsSelectionChange" ref="wmsInPlanDetails" <el-col :span="1.5">
@current-change="handleWmsInPlanDetailsCurrentChange"> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWmsInPlanDetails">删除
<el-table-column type="selection" width="55" align="center"/> </el-button>
<el-table-column label="序号" align="center" prop="index" width="50"/> </el-col>
<el-table-column label="物品" prop="materialId" width="170"> </el-row>
<template slot-scope="scope"> <div>
<el-select v-model="scope.row.materialId" placeholder="请选择物料" filterable remote <el-table :data="wmsInPlanDetailsList" :row-class-name="rowWmsInPlanDetailsIndex"
:remote-method="getMdItemList" clearable> @selection-change="handleWmsInPlanDetailsSelectionChange" ref="wmsInPlanDetails"
<el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList" :highlight-current-row="isKnifeBack" @current-change="handleWmsInPlanDetailsCurrentChange">
:key="item.itemId"> <el-table-column type="selection" width="55" align="center"/>
<span style="float: left">{{ item.itemName }}</span> <el-table-column label="序号" align="center" prop="index" width="50"/>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.itemCode }}</span> <el-table-column label="物品" prop="materialId" width="170">
</el-option> <template slot-scope="scope">
</el-select> <el-select v-model="scope.row.materialId" placeholder="请选择物料" filterable remote
</template> :remote-method="getMdItemList" clearable>
</el-table-column> <el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList"
<el-table-column label="批次" prop="batch" width="150"> :key="item.itemId">
<template slot-scope="scope"> <span style="float: left">{{ item.itemName }}</span>
<el-input v-model="scope.row.batch" plcaeholder="请输入批次"></el-input> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.itemCode }}</span>
</template> </el-option>
</el-table-column> </el-select>
<!-- <el-table-column label="计划数量" prop="quantity" width="150">--> </template>
<!-- <template slot-scope="scope">--> </el-table-column>
<!-- <el-input v-model="scope.row.quantity" plcaeholder="请输入计划数量" type="number" :min="0"></el-input>--> <el-table-column label="批次" prop="batch" width="150">
<!-- </template>--> <template slot-scope="scope">
<!-- </el-table-column>--> <el-input v-model="scope.row.batch" plcaeholder="请输入批次"></el-input>
<el-table-column label="入库数量" prop="quantityIn" width="150"> </template>
<template slot-scope="scope"> </el-table-column>
<el-input v-model="scope.row.quantityIn" plcaeholder="请输入入库数量" type="number" :min="0" <el-table-column label="计划数量" prop="quantity" width="150">
@change="handleQuantityIn($event,scope.row)"></el-input> <template slot-scope="scope">
</template> <el-input v-model="scope.row.quantity" plcaeholder="请输入计划数量" type="number" :min="0"></el-input>
</el-table-column> </template>
<el-table-column label="库位" prop="cellId" width="190"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="入库数量" prop="quantityIn" width="150">
<el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote <template slot-scope="scope">
:remote-method="getMdItemList" clearable> <el-input v-model="scope.row.quantityIn" plcaeholder="请输入入库数量" type="number" :min="0"
<el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList" @change="handleQuantityIn($event,scope.row)" :disabled="isKnifeBack"></el-input>
:key="item.areaId"> </template>
<span style="float: left">{{ item.areaName }}</span> </el-table-column>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.areaCode }}</span> <el-table-column label="库位" prop="cellId" width="150">
</el-option> <template slot-scope="scope">
</el-select> <el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote
</template> :remote-method="getMdItemList" clearable>
</el-table-column> <el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList"
<el-table-column label="状态" prop="planInStatus" width="150"> :key="item.areaId">
<dict-tag :options="dict.type.in_plan_state" :value="form.state"></dict-tag> <span style="float: left">{{ item.areaName }}</span>
</el-table-column> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.areaCode }}</span>
</el-table> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="状态" prop="planInStatus" width="150">
<dict-tag :options="dict.type.in_plan_state" :value="form.state"></dict-tag>
</el-table-column>
</el-table>
</div>
<!--入库类型为整刀回库则显示-->
<!-- <div v-if="isKnifeBack && Object.keys(selectPlanDetail).length > 0">-->
<!-- <el-divider content-position="center">整刀实例</el-divider>-->
<!-- <wms-in-plan-detail-entity-table-cmps-->
<!-- :planDetail="wmsInPlanDetailsList[selectPlanDetail.index-1]"-->
<!-- :entityList.sync="wmsInPlanDetailsList[selectPlanDetail.index-1].wmsInPlanDetailEntityList"-->
<!-- @count="wmsInPlanDetailsList[selectPlanDetail.index-1].quantityIn = $event"-->
<!-- ></wms-in-plan-detail-entity-table-cmps>-->
<!-- </div>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
<!--入库类型为整刀回库则显示--> </el-dialog>
<!-- <div v-if="isKnifeBack && Object.keys(selectPlanDetail).length > 0">--> </div>
<!-- <el-divider content-position="center">整刀实例</el-divider>-->
<!-- <wms-in-plan-detail-entity-table-cmps-->
<!-- :planDetail="wmsInPlanDetailsList[selectPlanDetail.index-1]"-->
<!-- :entityList.sync="wmsInPlanDetailsList[selectPlanDetail.index-1].wmsInPlanDetailEntityList"-->
<!-- @count="wmsInPlanDetailsList[selectPlanDetail.index-1].quantityIn = $event"-->
<!-- ></wms-in-plan-detail-entity-table-cmps>-->
<!-- </div>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改入库计划对话框 整刀回库 --> <!-- 添加或修改入库计划对话框 整刀回库 -->
<wms-in-plan-knife-back-form-cmps v-if="knifeBackVisible" :data-form.sync="form" :visible.sync="knifeBackVisible" <div v-if="isKnifeBack">
@confirm="getList" <wms-in-plan-knife-back-form-cmps :data-form.sync="form" :visible.sync="open" @confirm="getList"
@planTypeSelectChange="handlePlanTypeSelectChange" @planTypeSelectChange="handlePlanTypeSelectChange"
></wms-in-plan-knife-back-form-cmps> ></wms-in-plan-knife-back-form-cmps>
</div>
</div> </div>
</template> </template>
@ -242,7 +261,6 @@ import {listArea} from "@/api/mes/wm/area"
import {addWmsInTask} from "@/api/mes/wm/wmsInTask" import {addWmsInTask} from "@/api/mes/wm/wmsInTask"
import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue"; import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue";
import WmsInPlanKnifeBackFormCmps from "@/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue"; import WmsInPlanKnifeBackFormCmps from "@/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue";
import plan from "@/views/mes/cal/plan/index.vue";
// //
const planCodeValidator = (rule, value, callback) => { const planCodeValidator = (rule, value, callback) => {
@ -289,7 +307,7 @@ export default {
// //
areaList: [], areaList: [],
// //
dialogTitle: "", title: "",
// //
open: false, open: false,
// //
@ -342,7 +360,12 @@ export default {
} }
}; };
}, },
computed: {}, computed: {
/** 控制弹窗类型 */
isKnifeBack() {
return this.form.planTypeId == 9 || this.form.planTypeId == 7 || this.form.planTypeId == 15;
}
},
created() { created() {
this.getList(); this.getList();
}, },
@ -478,7 +501,6 @@ export default {
isDelete: null, isDelete: null,
planCode: null, planCode: null,
planTypeId: null, planTypeId: null,
planTypeCode: null,
wmsInPlanDetailsList: [] wmsInPlanDetailsList: []
}; };
this.wmsInPlanDetailsList = []; this.wmsInPlanDetailsList = [];
@ -501,25 +523,10 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd(planTypeCode) { handleAdd() {
this.reset(); this.reset();
// this.open = true;
const filter = this.inPlanTypeList.filter(item => item.code === planTypeCode); this.title = "添加入库计划";
if (filter.length) {
this.form.planTypeId = filter[0].typeId;
this.form.planTypeCode = filter[0].code;
this.form.planTypeName = filter[0].name;
} else {
this.$message.error("系统错误,请联系管理员");
console.error("计划类型查找失败")
return;
}
if (planTypeCode === "DPRK") {
this.open = true;
} else {
this.knifeBackVisible = true;
}
this.dialogTitle = "新增" + filter[0].name;
}, },
/** 执行按钮操作 */ /** 执行按钮操作 */
async handleIssue(row) { async handleIssue(row) {
@ -554,7 +561,6 @@ export default {
materialId: planForm.materialId, materialId: planForm.materialId,
materialCode: material[0].itemCode, materialCode: material[0].itemCode,
planTypeId: planForm.planTypeId, planTypeId: planForm.planTypeId,
planTypeCode: planForm.planTypeCode,
// //
planInStatus: 0, planInStatus: 0,
// ID // ID
@ -593,7 +599,7 @@ export default {
this.form = response.data; this.form = response.data;
this.wmsInPlanDetailsList = response.data.wmsInPlanDetailsList; this.wmsInPlanDetailsList = response.data.wmsInPlanDetailsList;
this.open = true; this.open = true;
this.dialogTitle = "修改入库计划"; this.title = "修改入库计划";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

View File

@ -40,7 +40,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return (this.localDataForm.planId ? "修改" : "新增") + this.dataForm.planTypeName return this.localDataForm.planId ? "修改入库计划" : "新增入库计划"
}, },
}, },
methods: { methods: {
@ -206,9 +206,21 @@ export default {
<el-form-item label="计划编码" prop="planCode"> <el-form-item label="计划编码" prop="planCode">
<el-input v-model="localDataForm.planCode" placeholder="请输入计划编码"></el-input> <el-input v-model="localDataForm.planCode" placeholder="请输入计划编码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="入库类型" prop="planTypeId">
<el-select v-model="localDataForm.planTypeId" placeholder="请选择入库类型" @change="handlePlanTypeSelectChange">
<el-option :label="item.name" :value="item.typeId" v-for="item in inPlanTypeList"
:key="item.typeId"/>
</el-select>
</el-form-item>
<el-form-item label="源头单据" prop="relBillCode">
<el-input v-model="localDataForm.relBillCode" placeholder="请输入源头单据"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="localDataForm.remark" placeholder="请输入备注"></el-input> <el-input v-model="localDataForm.remark" placeholder="请输入备注"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="批次" prop="batch">
<el-input v-model="wmsInPlanDetailForm.batch" plcaeholder="请输入批次"></el-input>
</el-form-item>
<el-form-item label="库位" prop="cellId"> <el-form-item label="库位" prop="cellId">
<el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote <el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote
:remote-method="getAreaList" clearable> :remote-method="getAreaList" clearable>
@ -219,7 +231,7 @@ export default {
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="物品" prop="materialId" v-if="localDataForm.planTypeCode==='DBRK'"> <el-form-item label="物品" prop="materialId" v-if="localDataForm.planTypeId==7">
<el-select v-model="wmsInPlanDetailForm.materialId" placeholder="请选择物料" filterable remote <el-select v-model="wmsInPlanDetailForm.materialId" placeholder="请选择物料" filterable remote
:remote-method="getMdItemList" clearable> :remote-method="getMdItemList" clearable>
<el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList" <el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList"
@ -230,7 +242,7 @@ export default {
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-divider content-position="center">台账实例</el-divider> <el-divider content-position="center">整刀实例</el-divider>
<wms-in-plan-detail-entity-table-cmps <wms-in-plan-detail-entity-table-cmps
:entityList.sync="wmsInPlanDetailEntityList" :entityList.sync="wmsInPlanDetailEntityList"
:planTypeId="localDataForm.planTypeId" :planTypeId="localDataForm.planTypeId"

View File

@ -18,6 +18,52 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <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="['wm:wmsInTask: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="['wm:wmsInTask: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="['wm:wmsInTask: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="['wm:wmsInTask:export']"-->
<!-- >导出-->
<!-- </el-button>-->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -44,37 +90,29 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.planInStatus !== '1' && scope.row.planTypeCode !== 'ZDHK'"> <!-- <el-button-->
<el-button <!-- size="mini"-->
size="mini" <!-- type="text"-->
type="text" <!-- icon="el-icon-edit"-->
v-if="scope.row.planInStatus !== 'YTC'" <!-- @click="openTaskDetailDialog(scope.row)"-->
@click="handleIssueWcs(scope.row,'CK')" <!-- >详情-->
>推出库位 <!-- </el-button>-->
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.planInStatus !== 'YTR' && scope.row.planInStatus !== '0'"
@click="handleIssueWcs(scope.row,'RK')"
>推入库位
</el-button>
</template>
<template v-if="scope.row.planInStatus !== '1'">
<el-button
size="mini"
type="text"
@click="handleIssueWcs(scope.row,'CK')"
>下发
</el-button>
</template>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit"
:disabled="scope.row.planInStatus === '1'" :disabled="scope.row.planInStatus === '1'"
@click="manualIssue(scope.row)" @click="handleIssue(scope.row)"
>手动入库 >下发
</el-button> </el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['wm:wmsInTask:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -131,7 +169,7 @@ import {
delWmsInTask, delWmsInTask,
addWmsInTask, addWmsInTask,
updateWmsInTask, updateWmsInTask,
issueBatchWmsInTask, issueInTaskWcsLTK, issueInTaskWcsDJ issueBatchWmsInTask, issueWmsInTaskToWcs
} from "@/api/mes/wm/wmsInTask"; } from "@/api/mes/wm/wmsInTask";
import {listTYPE} from "@/api/md/TYPE"; import {listTYPE} from "@/api/md/TYPE";
import {listWmsInPlanDetailsEntity} from "@/api/mes/wm/wmsInPlanDetailsEntity"; import {listWmsInPlanDetailsEntity} from "@/api/mes/wm/wmsInPlanDetailsEntity";
@ -180,7 +218,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
isActive: null, isActivy: null,
isDelete: null, isDelete: null,
batch: null, batch: null,
materialId: null, materialId: null,
@ -234,12 +272,13 @@ export default {
} }
return id return id
}, },
/** // WCS
* 下发任务至 WCS handleIssue(task) {
* @param task let warehouseTypeCode = ""
* @param type 出库或入库 //
*/ if (task.planTypeId === "8") {
handleIssueWcs(task, type = "RK") { warehouseTypeCode = "LTK"
}
const param = { const param = {
// ID // ID
planId: task.planInId, planId: task.planInId,
@ -248,48 +287,25 @@ export default {
// //
cellCode: task.cellCode, cellCode: task.cellCode,
// //
warehouseTypeCode: "", warehouseTypeCode,
// //
materialId: task.materialId, materialId: task.materialId,
materialCode: task.materialCode, materialCode: task.materialCode,
materialName: task.materialName, materialName: task.materialName,
materialCount: task.actualInQuantity, materialCount: task.actualInQuantity,
rfid: "123456789AAA", rfid: "",
// OR // OR
type, type: "RK",
} }
/** 刀片入库|刀柄入库|拆刀回库 入 立体库 */ console.log(task)
if (["DPRK", "DBRK", "CDHK"].includes(task.planTypeCode)) { issueWmsInTaskToWcs(param).then(res => {
param.warehouseTypeCode = "LTK" console.log(res)
issueInTaskWcsLTK(param).then(res => { this.$modal.msgSuccess("下发成功");
if (type === "RK") { })
task.planInStatus = "YTR" // issueBatchWmsInTask([task.id.toString()]).then(response => {
this.$modal.msgSuccess("推入库位"); // this.$modal.msgSuccess("");
} else if (type === "CK") { // this.getList();
task.planInStatus = "YTC" // });
this.$modal.msgSuccess("推出库位");
}
//
updateWmsInTask(task).then(res => {
this.getList();
})
})
} else if (["ZDHK", "ZDRK"].includes(task.planTypeCode)) {
/** 整刀回库|组刀入库 入 刀具库 */
param.warehouseTypeCode = "DJ"
issueInTaskWcsDJ(param).then(res => {
this.$modal.msgSuccess("下发成功");
})
}
},
/**
* 手动执行入库任务
*/
manualIssue(task) {
issueBatchWmsInTask([task.id.toString()]).then(response => {
this.$modal.msgSuccess("执行成功");
this.getList();
});
}, },
// //
cancel() { cancel() {