Compare commits

...

41 Commits

Author SHA1 Message Date
655ec104d0 refactor(入库计划): rfid校验,增加本地表单数据校验 2025-01-02 15:59:43 +08:00
dbaceed5ae refactor(入库计划): rfid校验,仅刀柄入库 2025-01-02 15:28:37 +08:00
b663a8ef1c refactor(入库计划): 获取库位列表修改 2025-01-02 14:44:11 +08:00
20cc48124c fix(入库计划): 选择库位方法修复 2025-01-02 14:34:18 +08:00
aa918b58bb 完成入库计划显示库位物料台账 2024-12-17 17:48:22 +08:00
b1c91a6dad 初步完成整刀入库机制 2024-12-17 11:50:32 +08:00
d4a6203d06 大号物料 2024-12-17 10:24:15 +08:00
63f861fbca 大号物料 2024-12-16 16:17:57 +08:00
ec374b2cb3 增加大箱子小箱子,禁用启用机制 2024-12-16 15:40:04 +08:00
12f75e74ec Merge remote-tracking branch 'origin/master' 2024-12-16 15:02:09 +08:00
cf416f5bd7 格式化代码 2024-12-16 15:01:27 +08:00
e0c7e40790 refactor: 取消账号密码自动填充 2024-12-16 09:20:47 +08:00
9f980ea5e5 refactor: 自动生成计划编码 2024-12-13 14:31:59 +08:00
c15c0d6adc refactor: 优化 2024-12-13 14:31:19 +08:00
2a5cd84833 feat(物料管理): 同步小型刀具库数据 2024-12-13 14:28:40 +08:00
cf8ef55f8f 优化 2024-12-11 17:25:39 +08:00
2543902e16 Merge remote-tracking branch 'gitea/master' 2024-12-11 16:49:25 +08:00
02d5705556 完成出库计划执行时自动匹配库位 2024-12-10 16:31:14 +08:00
e28bfd93e5 refactor(入库计划): 优化 2024-12-10 10:53:02 +08:00
cd27322054 Merge remote-tracking branch 'origin/master' 2024-12-10 10:26:33 +08:00
a7168e21f4 删除计划类型,并设定默认值 2024-12-10 10:26:02 +08:00
426bbcafee Merge remote-tracking branch 'gitea/master' 2024-12-05 11:46:32 +08:00
f58b827866 fix(入库计划): rfid 为空 2024-12-05 11:40:26 +08:00
e273d0636a refactor(入库计划): 同步小型刀具库 更改为按钮触发 2024-12-05 11:39:54 +08:00
b381f39fc6 自动同步改为手动同步 2024-12-05 09:36:22 +08:00
88178cc72e Merge remote-tracking branch 'origin/master' 2024-12-05 09:30:04 +08:00
46761fae29 修改页面文字,是否默认改为是否有效 2024-12-05 09:29:35 +08:00
4d5c3ea548 Merge remote-tracking branch 'origin/master' 2024-12-03 17:24:44 +08:00
7e3d00a9ca WCS下发出库任务添加任务id参数 2024-12-03 17:24:30 +08:00
f6388a9249 refactor(入库任务): 入库类型 列修改 2024-11-29 14:24:52 +08:00
dce12bd64a refactor(入库计划): 入库类型 列修改 2024-11-29 11:29:35 +08:00
49c9a4686c Merge remote-tracking branch 'gitea/master' 2024-11-29 09:40:24 +08:00
bdd3af76df refactor(入库计划): rfid验证方法增加错误提示 2024-11-29 09:36:04 +08:00
8cfdc8e7d1 Merge remote-tracking branch 'origin/master' 2024-11-29 09:27:44 +08:00
39f86b7773 页面优化 2024-11-29 09:27:31 +08:00
49297c6870 调试 2024-11-28 18:08:06 +08:00
a000293554 增加同步按钮 2024-11-28 16:48:59 +08:00
53d716fd23 fix(入库计划): rfid验证方法修复 2024-11-28 10:55:02 +08:00
83e9c5bdc2 refactor(对接wcs): 配置修改 2024-11-27 10:35:22 +08:00
cfb8ce96a7 Merge remote-tracking branch 'origin/master' 2024-11-27 08:59:52 +08:00
166ca79035 页面优化 2024-11-27 08:58:55 +08:00
23 changed files with 579 additions and 366 deletions

View File

@ -51,6 +51,14 @@ export function runPLAN(wmsOutPlanId) {
})
}
// 一键清退无寿命物品操作
export function synchronizationMiniBox() {
return request({
url: '/md/PLAN/synchronization-mini-box',
method: 'put'
})
}
// 一键清退无寿命物品操作
export function autoScrapOutPLAN() {
return request({

View File

@ -77,3 +77,11 @@ export function issueOutTaskWcsDJ(data) {
data
})
}
// 查询出库任务详细
export function xmlParam() {
return request({
url: '/md/TASK/xmlParam',
method: 'get'
})
}

View File

@ -42,3 +42,11 @@ export function delMdItem(itemId) {
method: 'delete'
})
}
// 同步小型刀具库数据
export function asyncSmallKnifeData() {
return request({
url: '/mes/md/mditem/asyncSmallKnife',
method: 'get'
})
}

View File

@ -51,3 +51,11 @@ export function isDuplicatePlanCode(planCode) {
method: 'get'
})
}
// 同步小型刀具库 入库数据
export function syncInBound() {
return request({
url: '/wm/PLAN/sync',
method: 'get'
})
}

View File

@ -22,7 +22,7 @@ const service = axios.create({
const serviceWcs = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: "http://192.168.8.60:1880",
baseURL: "/wcs",
// 超时
timeout: 30000
})

View File

@ -71,8 +71,8 @@ export default {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
username: "",
password: "",
rememberMe: false,
code: "",
uuid: ""

View File

@ -73,6 +73,16 @@
>一键清退无寿命物品
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleSynchronizationClick"
v-hasPermi="['md:PLAN:add']"
>同步小型刀具库数据
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
@ -181,9 +191,9 @@
<!-- 添加或修改出库计划管理对话框 -->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" append-to-body width="60%">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="计划编号" prop="planCode">
<el-input v-model="form.planCode" placeholder="请输入计划编号" :readonly="title == '修改出库计划管理'"/>
</el-form-item>
<!-- <el-form-item label="计划编号" prop="planCode">-->
<!-- <el-input v-model="form.planCode" placeholder="请输入计划编号" :readonly="title == '修改出库计划管理'"/>-->
<!-- </el-form-item>-->
<el-form-item label="出库类型" prop="wmsBusinessTypeId">
<el-select v-model="form.wmsBusinessTypeId" placeholder="请选择出库类型">
<el-option
@ -204,16 +214,16 @@
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="计划类型" prop="planType">
<el-select v-model="form.planType" placeholder="请选择计划类型">
<el-option
v-for="dict in dict.type.plan_source_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="计划类型" prop="planType">-->
<!-- <el-select v-model="form.planType" placeholder="请选择计划类型">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.plan_source_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="领用人" prop="recipientUsername">
<el-input v-model="form.recipientUsername" placeholder="请输入领用人"/>
</el-form-item>
@ -267,20 +277,20 @@
</template>
</el-table-column>
<el-table-column label="库位编码" prop="wmStorageAreaCode" min-width="150">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.wmStorageAreaCode" placeholder="请输入库位编码"/>-->
<el-input v-model="scope.row.wmStorageAreaCode" readonly="readonly" placeholder="请输入库位编码">
<el-button slot="append" @click="handleSelecArea(scope.row.index)"
icon="el-icon-search"></el-button>
</el-input>
</template>
</el-table-column>
<el-table-column label="库位名称" prop="wmStorageAreaName" min-width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.wmStorageAreaName" readonly="readonly" placeholder="请输入库位名称"/>
</template>
</el-table-column>
<!-- <el-table-column label="库位编码" prop="wmStorageAreaCode" min-width="150">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; <el-input v-model="scope.row.wmStorageAreaCode" placeholder="请输入库位编码"/>&ndash;&gt;-->
<!-- <el-input v-model="scope.row.wmStorageAreaCode" readonly="readonly" placeholder="请输入库位编码">-->
<!-- <el-button slot="append" @click="handleSelecArea(scope.row.index)"-->
<!-- icon="el-icon-search"></el-button>-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="库位名称" prop="wmStorageAreaName" min-width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.wmStorageAreaName" readonly="readonly" placeholder="请输入库位名称"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="明细状态" prop="detailState" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-select v-model="scope.row.detailState" placeholder="请选择明细状态">-->
@ -333,16 +343,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="计划类型" prop="planType">
<el-select v-model="form.planType" placeholder="请选择计划类型" readonly="readonly" disabled>
<el-option
v-for="dict in dict.type.plan_source_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="计划类型" prop="planType">-->
<!-- <el-select v-model="form.planType" placeholder="请选择计划类型" readonly="readonly" disabled>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.plan_source_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="领用人" prop="recipientUsername">
<el-input v-model="form.recipientUsername" placeholder="请输入领用人" readonly="readonly"/>
</el-form-item>
@ -380,19 +390,19 @@
<el-input v-model="scope.row.detailBatchNum" placeholder="请输入明细批次" readonly="readonly"/>
</template>
</el-table-column>
<el-table-column label="库位编码" prop="wmStorageAreaCode" min-width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.wmStorageAreaCode" readonly="readonly" placeholder="请输入库位编码">
<el-button slot="append" @click="handleSelecArea(scope.row.index)"
icon="el-icon-search"></el-button>
</el-input>
</template>
</el-table-column>
<el-table-column label="库位名称" prop="wmStorageAreaName" min-width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.wmStorageAreaName" readonly="readonly" placeholder="请输入库位名称"/>
</template>
</el-table-column>
<!-- <el-table-column label="库位编码" prop="wmStorageAreaCode" min-width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.wmStorageAreaCode" readonly="readonly" placeholder="请输入库位编码">-->
<!-- <el-button slot="append" @click="handleSelecArea(scope.row.index)"-->
<!-- icon="el-icon-search"></el-button>-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="库位名称" prop="wmStorageAreaName" min-width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.wmStorageAreaName" readonly="readonly" placeholder="请输入库位名称"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="明细状态" prop="detailState" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.detailState" placeholder="请选择明细状态" readonly="readonly" disabled>
@ -412,7 +422,16 @@
</template>
<script>
import {addPLAN, autoScrapOutPLAN, delPLAN, getPLAN, listPLAN, runPLAN, updatePLAN} from "@/api/md/PLAN";
import {
addPLAN,
autoScrapOutPLAN,
delPLAN,
getPLAN,
listPLAN,
runPLAN,
synchronizationMiniBox,
updatePLAN
} from "@/api/md/PLAN";
import ItemSelect from "@/components/itemSelect/single.vue";
import SelecAreaCmps from "@/components/wm/SelecAreaCmps.vue";
import {listTYPE} from "@/api/md/TYPE";
@ -464,6 +483,7 @@ export default {
//
form: {
planState: '0',
planType: 'SGLR',
},
//
rules: {
@ -507,7 +527,7 @@ export default {
planCode: null,
wmsBusinessTypeId: null,
planState: '0',
planType: null,
planType: "SGLR",
recipientUsername: null,
remark: null,
attr1: null,
@ -563,6 +583,16 @@ export default {
}).catch(() => {
});
},
/** 处理同步小型刀具库数据点击事件 */
handleSynchronizationClick() {
this.$modal.confirm('是否确认同步小型刀具库数据?').then(function () {
return synchronizationMiniBox();
}).then((res) => {
this.getList();
this.$modal.msgSuccess("同步成功");
}).catch(() => {
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@ -622,7 +652,7 @@ export default {
if (valid) {
let sign = true;
this.wmsOutPlanDetailList.forEach(item => {
if (!item.mdItemId || !item.wmStorageAreaId || !item.plannedQuantity || !item.detailState) {
if (!item.mdItemId || !item.plannedQuantity || !item.detailState) {
this.$modal.msgWarning("请将出库计划明细信息填写完整后保存");
sign = false;
}

View File

@ -33,8 +33,8 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="是否默认" prop="isDefault">
<el-select v-model="queryParams.isDefault" placeholder="请选择是否默认" clearable>
<el-form-item label="是否有效" prop="isDefault">
<el-select v-model="queryParams.isDefault" placeholder="请选择是否有效" clearable>
<el-option
v-for="dict in dict.type.yes_or_no"
:key="dict.value"
@ -106,7 +106,7 @@
<el-table-column label="BOM名称" align="center" prop="bomName"/>
<el-table-column label="BOM版本" align="center" prop="bomVersion"/>
<!-- <el-table-column label="所属物料" align="center" prop="mdItemId"/>-->
<el-table-column label="是否默认" align="center" prop="isDefault">
<el-table-column label="是否有效" align="center" prop="isDefault">
<template slot-scope="scope">
<dict-tag :options="dict.type.yes_or_no" :value="scope.row.isDefault"/>
</template>
@ -181,8 +181,8 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="是否默认" prop="isDefault">
<el-select v-model="form.isDefault" placeholder="请选择是否默认">
<el-form-item label="是否有效" prop="isDefault">
<el-select v-model="form.isDefault" placeholder="请选择是否有效">
<el-option
v-for="dict in dict.type.yes_or_no"
:key="dict.value"
@ -320,7 +320,7 @@ export default {
{required: true, message: "物料编码不能为空", trigger: "blur"}
],
isDefault: [
{required: true, message: "是否默认不能为空", trigger: "change"}
{required: true, message: "是否有效不能为空", trigger: "change"}
],
},
nowChildItemIndex: null

View File

@ -86,6 +86,7 @@
<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-button icon="el-icon-refresh" size="mini" @click="xmlParam">读取XML</el-button>-->
</el-form-item>
</el-form>
@ -311,7 +312,8 @@ import {
issueWmsOutTaskToWcs,
listTASK,
runTASK,
updateTASK
updateTASK,
xmlParam
} from "@/api/md/TASK";
export default {
@ -433,6 +435,9 @@ export default {
this.getList();
},
/** 重置按钮操作 */
xmlParam(){
xmlParam()
},
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
@ -517,9 +522,9 @@ export default {
res.data.outInfoList.forEach(outInfo => {
const param = {
// ID
planId: outInfo.planInId,
planId: res.data.wmsOutPlanId,
// ID
taskId: outInfo.id,
taskId: res.data.wmsOutTaskId,
//
cellCode: outInfo.wmStorageAreaCode,
cellX: outInfo.cellX,

View File

@ -56,16 +56,16 @@
v-hasPermi="['mes:dv:checkplan: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="['mes:dv:checkplan:export']"
>导出</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['mes:dv:checkplan:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -9,7 +9,7 @@
/>
</el-form-item>
<el-form-item label="物料项" prop="mbbBdMrlId">
<el-select v-model="queryParams.mbbBdMrlId" placeholder="请选择物料项" filterable clearable>
<el-select v-model="queryParams.mbbBdMrlId" placeholder="请选择所属库位" filterable clearable>
<el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList"
:key="item.itemId">
<span style="float: left">{{ item.itemName }}</span>
@ -17,6 +17,15 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属库位" prop="areaCode">
<el-select v-model="queryParams.areaCode" placeholder="请选择物料项" filterable clearable>
<el-option :label="item.areaName" :value="item.areaCode" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.areaCode }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="刀具类型" prop="itemOrProduct">
<el-select v-model="queryParams.itemOrProduct" placeholder="请选择物料类型" clearable>
<el-option
@ -58,7 +67,7 @@
<el-table-column type="selection" min-width="55" align="center"/>
<!-- <el-table-column label="更新时间" align="center" prop="baseKnifeId" />-->
<el-table-column label="台账ID" align="center" prop="baseKnifeId" min-width="55" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="rfid" align="center" prop="rfid" />-->
<el-table-column label="rfid" align="center" prop="rfid" />
<el-table-column label="刀具编码" align="center" prop="knifeCode" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="刀具名称" align="center" prop="knifeName" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="物料类型" align="center" key="itemOrProduct" prop="itemOrProduct"
@ -294,6 +303,7 @@
import {addBaseKnife, getBaseKnife, listBaseKnife, updateBaseKnife} from "@/api/mes/md/baseKnife";
import {resetBaseKnife} from "../../../../api/mes/md/baseKnife";
import {listMdItem} from "@/api/mes/md/mdItem"
import {listArea} from "@/api/mes/wm/area";
export default {
name: "BaseKnife",
@ -318,6 +328,7 @@ export default {
BaseKnifeList: [],
//
mdItemList: [],
areaList: [],
//
title: "",
//
@ -327,6 +338,7 @@ export default {
pageNum: 1,
pageSize: 10,
mbbBdMrlId: null,
areaId: null,
planSheet: null,
rfid: null,
knifeCode: null,
@ -366,6 +378,8 @@ export default {
listMdItem().then(response => this.mdItemList = response.rows)
listArea().then(response => this.areaList = response.rows)
listBaseKnife(this.queryParams).then(response => {
this.BaseKnifeList = response.rows;
this.total = response.total;

View File

@ -52,7 +52,7 @@
type="text"
@click="handleLook(scope.row)"
v-hasPermi="['md:TASK:edit']"
>查看物料清单
>查看明细
</el-button>
</template>
</el-table-column>
@ -66,84 +66,18 @@
@pagination="getList"
/>
<!-- 添加或修改出库任务对话框 -->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="出库计划ID" prop="wmsOutPlanId">
<el-input v-model="form.wmsOutPlanId" placeholder="请输入出库计划ID"/>
</el-form-item>
<el-form-item label="出库计划编码" prop="wmsOutPlanCode">
<el-input v-model="form.wmsOutPlanCode" placeholder="请输入出库计划编码"/>
</el-form-item>
<el-form-item label="出库计划明细ID" prop="wmsOutPlanDetailId">
<el-input v-model="form.wmsOutPlanDetailId" placeholder="请输入出库计划明细ID"/>
</el-form-item>
<el-form-item label="出库类型ID" prop="wmsBusinessTypeId">
<el-input v-model="form.wmsBusinessTypeId" placeholder="请输入出库类型ID"/>
</el-form-item>
<el-form-item label="任务编码" prop="taskCode">
<el-input v-model="form.taskCode" placeholder="请输入任务编码"/>
</el-form-item>
<el-form-item label="任务数量" prop="taskNumber">
<el-input v-model="form.taskNumber" placeholder="请输入任务数量"/>
</el-form-item>
<el-form-item label="出库数量" prop="outNumber">
<el-input v-model="form.outNumber" placeholder="请输入出库数量"/>
</el-form-item>
<el-form-item label="目标库位ID" prop="wmStorageAreaId">
<el-input v-model="form.wmStorageAreaId" placeholder="请输入目标库位ID"/>
</el-form-item>
<el-form-item label="批次" prop="batchNum">
<el-input v-model="form.batchNum" placeholder="请输入批次"/>
</el-form-item>
<el-form-item label="物料ID" prop="mdItemId">
<el-input v-model="form.mdItemId" placeholder="请输入物料ID"/>
</el-form-item>
<el-form-item label="物料编码" prop="mdItemCode">
<el-input v-model="form.mdItemCode" placeholder="请输入物料编码"/>
</el-form-item>
<el-form-item label="物料名称" prop="mdItemName">
<el-input v-model="form.mdItemName" placeholder="请输入物料名称"/>
</el-form-item>
<el-form-item label="物料单位" prop="mdItemUnit">
<el-input v-model="form.mdItemUnit" placeholder="请输入物料单位"/>
</el-form-item>
<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"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="领料人" prop="recipientUsername">
<el-input v-model="form.recipientUsername" placeholder="请输入领料人"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
</el-form-item>
</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>
<el-dialog :close-on-click-modal="false" title="出库物品清单" :visible.sync="openLook" width="60%" append-to-body>
<el-table :data="outInfoList" >
<el-table-column label="计划状态" align="center" prop="planStatus" :show-overflow-tooltip="true"/>
<el-table-column label="计划类型" align="center" prop="planType" :show-overflow-tooltip="true"/>
<el-table-column label="出库类型编码" align="center" prop="planTypeCode" :show-overflow-tooltip="true"/>
<el-table-column label="出库类型名称" align="center" prop="planTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="明细批次" align="center" prop="detailBatchNum" :show-overflow-tooltip="true"/>
<el-dialog :close-on-click-modal="false" title="批次台账明细" :visible.sync="openLook" width="60%" append-to-body>
<el-table :data="infoList" >
<el-table-column label="台账ID" align="center" prop="baseKnifeId" :show-overflow-tooltip="true"/>
<el-table-column label="物料编码" align="center" prop="mdItemCode" :show-overflow-tooltip="true"/>
<el-table-column label="库房" align="center" prop="wmWarehouseName" :show-overflow-tooltip="true"/>
<el-table-column label="库位" align="center" prop="wmStorageAreaName" :show-overflow-tooltip="true"/>
<el-table-column label="明细批次" align="center" prop="detailBatchNum" :show-overflow-tooltip="true"/>
<el-table-column label="物料名称" align="center" prop="mdItemName" :show-overflow-tooltip="true"/>
<el-table-column label="库位编码" align="center" prop="wmStorageAreaCode" :show-overflow-tooltip="true"/>
<el-table-column label="库位名称" align="center" prop="wmStorageAreaName" :show-overflow-tooltip="true"/>
<el-table-column label="当时寿命%" align="center" prop="knifeLife" :show-overflow-tooltip="true"/>
<el-table-column label="物料编码" align="center" prop="mdItemCode" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="mdItemUnit" :show-overflow-tooltip="true"/>
<el-table-column label="业务类型" align="center" prop="planTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="业务编码" align="center" prop="planCode" :show-overflow-tooltip="true"/>
<el-table-column label="出/入库时间" align="center" prop="dateTime" :show-overflow-tooltip="true"/>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="openLook = false"> </el-button>
@ -210,7 +144,7 @@ export default {
//
rules: {},
openLook: false,
outInfoList: []
infoList: []
};
},
created() {
@ -316,12 +250,9 @@ export default {
},
/** 查看按钮操作 */
handleLook(row) {
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
getTASK(wmsOutTaskIds).then(response => {
this.openLook = true;
this.outInfoList = []
this.outInfoList = response.data.outInfoList;
});
this.openLook = true;
this.infoList = []
this.infoList = row.infoList;
},
/** 执行按钮操作 */
handleRun(row) {

View File

@ -89,6 +89,16 @@
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
@click="asyncSmallKnifeData"
>同步小型刀具库
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
@ -210,22 +220,34 @@
<el-input v-model="form.itemCode" placeholder="请输入物料编码" maxlength="64" v-else/>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label-width="80">-->
<!-- <el-switch v-model="autoGenFlag"-->
<!-- active-color="#13ce66"-->
<!-- active-text="自动生成"-->
<!-- @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">-->
<!-- </el-switch>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label-width="80">-->
<!-- <el-switch v-model="autoGenFlag"-->
<!-- active-color="#13ce66"-->
<!-- active-text="自动生成"-->
<!-- @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">-->
<!-- </el-switch>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="物料名称" prop="itemName">
<el-input v-model="form.itemName" maxlength="255" readonly="readonly" v-if="optType=='view'"/>
<el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/>
</el-form-item>
<el-col :span="24">
<el-col :span="16">
<el-form-item label="物料名称" prop="itemName">
<el-input v-model="form.itemName" maxlength="255" readonly="readonly" v-if="optType=='view'"/>
<el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="80">
<el-switch v-model="form.attr3"
active-color="#13ce66"
active-text="大号物料"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
@ -247,15 +269,15 @@
</el-col>
</el-row>
</el-col>
<!-- <el-col :span="10">-->
<!-- <div class="flex-container">-->
<!-- <el-image class="barcodeClass" fit="scale-down" :src="form.barcodeUrl">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="10">-->
<!-- <div class="flex-container">-->
<!-- <el-image class="barcodeClass" fit="scale-down" :src="form.barcodeUrl">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -291,15 +313,15 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="标准数量" prop="standardNumber">-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled-->
<!-- v-if="optType=='view'"/>-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"-->
<!-- placeholder="请输入标准数量"-->
<!-- v-else/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="标准数量" prop="standardNumber">-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled-->
<!-- v-if="optType=='view'"/>-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"-->
<!-- placeholder="请输入标准数量"-->
<!-- v-else/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12" v-if="resentEnable">
<el-form-item label="刀刃数" prop="attr1">
<el-input-number v-model="form.attr1" :min="1" :percision="0" :step="1" disabled
@ -371,6 +393,35 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="长度" prop="length">
<el-input-number v-model="form.length" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.length" :min="0" :percision="0" :step="1"
placeholder="请输入长度"
v-else/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="宽度" prop="width">
<el-input-number v-model="form.width" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.width" :min="0" :percision="0" :step="1"
placeholder="请输入宽度"
v-else/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高度" prop="height">
<el-input-number v-model="form.height" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.height" :min="0" :percision="0" :step="1"
placeholder="请输入高度"
v-else/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row v-if="form.safeStockFlag == 'Y'">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="最小库存量">-->
@ -453,7 +504,7 @@
</template>
<script>
import {addMdItem, delMdItem, getMdItem, listMdItem, updateMdItem} from "@/api/mes/md/mdItem";
import {addMdItem, asyncSmallKnifeData, delMdItem, getMdItem, listMdItem, updateMdItem} from "@/api/mes/md/mdItem";
import ItemBom from "./components/itembom.vue";
import SOPTab from "./components/sop.vue"
@ -659,7 +710,8 @@ export default {
minStock: 0,
maxStock: 0,
optType: undefined,
remark: undefined
remark: undefined,
attr3: 0
};
this.autoGenFlag = false;
this.resetForm("form");
@ -717,6 +769,13 @@ export default {
this.getBarcodeUrl();
});
},
asyncSmallKnifeData() {
asyncSmallKnifeData().then(res => {
console.log(res);
this.$message.success(`同步成功,新增数据 ${res.data}`);
this.getList();
})
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {

View File

@ -78,7 +78,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['mes:wm:area:add']"
>新增</el-button>
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -89,7 +90,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:wm:area:edit']"
>修改</el-button>
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -100,28 +102,30 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:wm:area:remove']"
>删除</el-button>
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="areaList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="库位编码" align="center" prop="areaCode" >
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="库位编码" align="center" prop="areaCode">
<template slot-scope="scope">
<el-button
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:wm:area:query']"
>{{scope.row.areaCode}}</el-button>
>{{ scope.row.areaCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="库位名称" align="center" prop="areaName" />
<el-table-column label="所属库区" align="center" prop="locationName" />
<el-table-column label="上级库位" align="center" prop="superiorName" />
<el-table-column label="X" align="center" prop="positionX" />
<el-table-column label="y" align="center" prop="positionY" />
<el-table-column label="z" align="center" prop="positionZ" />
<el-table-column label="库位名称" align="center" prop="areaName"/>
<el-table-column label="所属库区" align="center" prop="locationName"/>
<el-table-column label="上级库位" align="center" prop="superiorName"/>
<el-table-column label="X" align="center" prop="positionX"/>
<el-table-column label="y" align="center" prop="positionY"/>
<el-table-column label="z" align="center" prop="positionZ"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -131,14 +135,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:wm:area:edit']"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:wm:area:remove']"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -163,26 +169,38 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="80">
<el-form-item label-width="80">
<el-switch v-model="autoGenFlag"
active-color="#13ce66"
active-text="自动生成"
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
active-color="#13ce66"
active-text="自动生成"
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
</el-switch>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="库位名称" prop="areaName">
<el-input v-model="form.areaName" placeholder="请输入库位名称" />
</el-form-item>
<el-col :span="16">
<el-form-item label="库位名称" prop="areaName">
<el-input v-model="form.areaName" placeholder="请输入库位名称"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="80">
<el-switch v-model="form.attr3"
active-color="#13ce66"
active-text="大号库位"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<div style="display: flex">
<el-form-item label="库区" prop="locationId">
<div style="display: flex">
<el-input v-model="form.locationName" placeholder="请选择库区名称" />
<el-input v-model="form.locationName" placeholder="请选择库区名称"/>
<el-button @click="selecocationVisible=true" icon="el-icon-search"></el-button>
</div>
</el-form-item>
@ -190,40 +208,52 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="24">-->
<!-- <div style="display: flex">-->
<!-- <el-form-item label="上级库位" prop="attr1">-->
<!-- <div style="display: flex">-->
<!-- <el-input v-model="form.superiorName" placeholder="请选择上级库位" />-->
<!-- <el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </div>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item label="是否禁用">
<el-switch v-model="form.attr4"
active-color="#13ce66"
active-text="禁用"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="24">-->
<!-- <div style="display: flex">-->
<!-- <el-form-item label="上级库位" prop="attr1">-->
<!-- <div style="display: flex">-->
<!-- <el-input v-model="form.superiorName" placeholder="请选择上级库位" />-->
<!-- <el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="库位位置X" prop="positionX">
<el-input-number :min="0" :step="1" v-model="form.positionX" placeholder="请输入库位位置X" />
<el-input-number :min="0" :step="1" v-model="form.positionX" placeholder="请输入库位位置X"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="库位位置y" prop="positionY">
<el-input-number :min="0" :step="1" v-model="form.positionY" placeholder="请输入库位位置y" />
<el-input-number :min="0" :step="1" v-model="form.positionY" placeholder="请输入库位位置y"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="库位位置z" prop="positionZ">
<el-input-number :min="0" :step="1" v-model="form.positionZ" placeholder="请输入库位位置z" />
<el-input-number :min="0" :step="1" v-model="form.positionZ" placeholder="请输入库位位置z"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
</el-form-item>
</el-col>
</el-row>
@ -255,15 +285,15 @@ import SelecAreaCmps from "@/components/wm/SelecAreaCmps.vue";
export default {
name: "Area",
dicts: ['sys_yes_no'],
components: {SelecLocationCmps, BarcodeImg,SelecAreaCmps } ,
components: {SelecLocationCmps, BarcodeImg, SelecAreaCmps},
data() {
return {
//
selecareaVisible:false,
selecareaVisible: false,
//
selecocationVisible:false,
selecocationVisible: false,
//
autoGenFlag:false,
autoGenFlag: false,
optType: undefined,
locationId: undefined,
//
@ -302,16 +332,16 @@ export default {
//
rules: {
areaCode: [
{ required: true, message: "库位编码不能为空", trigger: "blur" }
{required: true, message: "库位编码不能为空", trigger: "blur"}
],
areaName: [
{ required: true, message: "库位名称不能为空", trigger: "blur" }
{required: true, message: "库位名称不能为空", trigger: "blur"}
],
locationId: [
{ required: true, message: "库区不能为空", trigger: "blur" }
{required: true, message: "库区不能为空", trigger: "blur"}
],
attr1: [
{ required: true, message: "上级库位名称不能为空", trigger: "blur" }
{required: true, message: "上级库位名称不能为空", trigger: "blur"}
]
}
};
@ -389,7 +419,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.areaId)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@ -400,7 +430,7 @@ export default {
this.optType = "add";
},
//
handleView(row){
handleView(row) {
this.reset();
const areaId = row.areaId || this.ids
getArea(areaId).then(response => {
@ -445,25 +475,26 @@ export default {
* 冻结状态变更
* @param row
*/
handleFrozenChange(row){
handleFrozenChange(row) {
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function() {
return changeFrozenState(row.areaId,row.frozenFlag);
this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function () {
return changeFrozenState(row.areaId, row.frozenFlag);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
}).catch(function () {
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
});
},
/** 删除按钮操作 */
handleDelete(row) {
const areaIds = row.areaId || this.ids;
this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function () {
return delArea(areaIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
@ -472,12 +503,12 @@ export default {
}, `area_${new Date().getTime()}.xlsx`)
},
//
handleAutoGenChange(autoGenFlag){
if(autoGenFlag){
genCode('AREA_CODE').then(response =>{
handleAutoGenChange(autoGenFlag) {
if (autoGenFlag) {
genCode('AREA_CODE').then(response => {
this.form.areaCode = response;
});
}else{
} else {
this.form.areaCode = null;
}
}

View File

@ -58,6 +58,16 @@
>拆刀回库
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-refresh"
size="mini"
@click="handleSync"
>同步小型刀具库
</el-button>
</el-col>
<el-col :span="1.5">
</el-col>
@ -70,7 +80,7 @@
<el-table-column label="计划编码" align="center" prop="planCode"/>
<el-table-column label="入库类型" align="center" prop="planTypeId">
<template slot-scope="scope">
{{ filterInPlanType(scope.row.planTypeId) }}
{{ filterInPlanType(scope.row.planTypeCode) }}
</template>
</el-table-column>
<el-table-column label="计划类型" align="center" prop="sourceType">
@ -137,9 +147,9 @@
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
<!--状态为 1 已执行 则禁用表单-->
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'">
<el-form-item label="计划编码" prop="planCode">
<el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>
</el-form-item>
<!-- <el-form-item label="计划编码" prop="planCode">-->
<!-- <el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="源头单据" prop="relBillCode">
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
</el-form-item>
@ -194,7 +204,7 @@
<el-table-column label="库位" prop="cellId" width="190">
<template slot-scope="scope">
<el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote
:remote-method="getMdItemList" clearable>
:remote-method="getAreaList" clearable>
<el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
@ -235,7 +245,7 @@
</template>
<script>
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode,} from "@/api/wm/PLAN";
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode, syncInBound,} from "@/api/wm/PLAN";
import {listTYPE} from "@/api/md/TYPE";
import {listMdItem} from "@/api/mes/md/mdItem"
import {listArea} from "@/api/mes/wm/area"
@ -354,8 +364,6 @@ export default {
this.PLANList = response.rows;
this.total = response.total;
this.getPlanTypeList();
this.getMdItemList();
this.getAreaList();
this.loading = false;
});
},
@ -379,7 +387,6 @@ export default {
* @param itemName
*/
getMdItemList(itemName = "") {
this.loading = true;
const params = {
pageNum: 1,
pageSize: 100,
@ -395,12 +402,13 @@ export default {
* @param areaName
*/
getAreaList(areaName = "") {
this.loading = true;
const params = {
pageNum: 1,
pageSize: 100,
//
itemName: areaName
//
areaName: areaName,
// ID
locationId: 222
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -408,15 +416,15 @@ export default {
},
/**
* 过滤出入库类型
* @param id 出入库类型ID
* @param code 出入库类型 编码
* @returns {*}
*/
filterInPlanType(id) {
const filter = this.inPlanTypeList.filter(item => item.typeId === id);
filterInPlanType(code) {
const filter = this.inPlanTypeList.filter(item => item.code === code);
if (filter.length) {
return filter[0].name
}
return id
return code
},
/** 入库类型选择器回调 */
handlePlanTypeSelectChange(typeId) {
@ -500,9 +508,30 @@ export default {
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleSync() {
syncInBound().then(res => {
this.getList();
this.$message.success("数据同步成功");
})
},
/** 新增按钮操作 */
handleAdd(planTypeCode) {
this.reset();
//
switch (planTypeCode) {
case "DBRK":
this.form.locationCode = null;
break;
case "DPRK":
this.form.locationCode = null;
break;
case "ZDHK":
this.form.locationCode = 'L055';
break;
case "CDHK":
this.form.locationCode = null;
break;
}
//
const filter = this.inPlanTypeList.filter(item => item.code === planTypeCode);
if (filter.length) {
@ -510,7 +539,7 @@ export default {
this.form.planTypeCode = filter[0].code;
this.form.planTypeName = filter[0].name;
} else {
this.$message.error("系统错误,请联系管理员");
this.$message.error("计划类型查找失败");
console.error("计划类型查找失败")
return;
}
@ -519,6 +548,8 @@ export default {
} else {
this.knifeBackVisible = true;
}
this.getMdItemList();
this.getAreaList();
this.dialogTitle = "新增" + filter[0].name;
},
/** 执行按钮操作 */

View File

@ -14,6 +14,10 @@ export default {
planTypeId: {
type: String,
require: true
},
planTypeCode: {
type: String,
require: true
}
},
data() {
@ -25,7 +29,7 @@ export default {
},
computed: {
getKnifeType() {
if (this.planTypeId == 9 || this.planTypeId == 15) {
if (["CDHK", "ZDHK"].includes(this.planTypeCode)) {
return "整刀"
} else {
return "刀柄类"
@ -61,6 +65,7 @@ export default {
selectBaseKnifeChange(e) {
if (this.selectIndex !== -1) {
this.localEntityList[this.selectIndex].knifeId = e.baseKnifeId
this.localEntityList[this.selectIndex].rfid = e.rfid
this.localEntityList[this.selectIndex].baseKnifeInfo = e
//
listMdItem({itemCode: e.knifeCode}).then(res => {
@ -150,7 +155,7 @@ export default {
</el-table-column>
</el-table>
<!--拆刀回库-->
<el-table :data="localEntityList" v-if=" planTypeId==15" @selection-change="handleSelectionChange">
<el-table :data="localEntityList" v-if="planTypeId==15" @selection-change="handleSelectionChange">
<el-table-column label="台账ID" align="center" prop="knifeId">
<template slot-scope="scope">
<el-input v-model="scope.row.knifeId" @change="updateEntityList">

View File

@ -4,10 +4,11 @@ import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetai
import {addPLAN, updatePLAN} from "@/api/wm/PLAN";
import {listMdItem} from "@/api/mes/md/mdItem";
import {listTYPE} from "@/api/md/TYPE";
import {isDuplicateRfid} from "@/api/mes/md/baseKnife";
import {isDuplicateRfid, listBaseKnife} from "@/api/mes/md/baseKnife";
export default {
name: "wmsInPlanKnifeBackFormCmps",
dicts: ['sys_yes_no', 'mes_item_product', 'is_locked', 'knife_fine_status', 'plan_source_type', 'in_plan_state'],
components: {WmsInPlanDetailEntityTableCmps},
props: {
dataForm: {
@ -25,17 +26,23 @@ export default {
wmsInPlanDetailForm: {},
//
areaList: [],
BaseKnifeList: [],
total: 0,
//
wmsInPlanDetailEntityList: [],
//
rules: {
planCode: [{required: true}],
relBillCode: [{required: true}],
},
localVisible: this.visible,
//
inPlanTypeList: [],
mdItemList: []
mdItemList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: ""
}
}
},
computed: {
@ -44,14 +51,18 @@ export default {
},
},
methods: {
/** 获取库位列表 */
/**
* 获取库位列表
* @param areaName
*/
getAreaList(areaName = "") {
this.loading = true;
const params = {
pageNum: 1,
pageSize: 100,
//
itemName: areaName
//
areaName: areaName,
// ID
locationId: 222
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -63,19 +74,22 @@ export default {
this.$emit("update:visible", false)
},
async validateRfid() {
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => {
if (entity.rfid && entity.rfid.trim().length > 0) {
return entity.rfid;
}
});
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => entity.rfid && entity.rfid.trim().length > 0).map(entity => entity.rfid);
console.log(rfidList)
if (!Array.isArray(rfidList) || rfidList.length === 0) return
//
const duplicateList = rfidList.filter((item, index) => rfidList.indexOf(item) !== index);
if (Array.isArray(rfidList) || rfidList.length) {
return duplicateList;
}
const res = await isDuplicateRfid(rfidList.join(","));
return res.data
},
/** 提交按钮 */
async submitForm() {
const validateRfidResult = await this.validateRfid();
if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) {
// rfid
if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0 && this.localDataForm.planTypeCode === "DBRK") {
this.$modal.msgError(`RFID重复${validateRfidResult}`);
return;
}
@ -128,6 +142,15 @@ export default {
this.inPlanTypeList = response.rows;
});
},
handleAreaSelectChange() {
let result = this.areaList.filter(item => item.areaId == this.wmsInPlanDetailForm.cellId)
this.queryParams.areaCode = result[0].areaCode
listBaseKnife(this.queryParams).then(response => {
this.BaseKnifeList = response.rows;
this.total = response.total;
});
},
handlePlanTypeSelectChange(typeId) {
this.$emit("planTypeSelectChange", typeId)
},
@ -198,20 +221,17 @@ export default {
</script>
<template>
<el-dialog :title="title" :visible="visible" width="50%" append-to-body @close="handleClose"
<el-dialog :title="title" :visible="visible" width="60%" append-to-body @close="handleClose"
:close-on-click-modal="false">
<!--状态为1已执行 则禁用-->
<el-form ref="form" :model="localDataForm" :rules="rules" label-width="80px" inline
:disabled="localDataForm.state === '1'">
<el-form-item label="计划编码" prop="planCode">
<el-input v-model="localDataForm.planCode" placeholder="请输入计划编码"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="localDataForm.remark" placeholder="请输入备注"></el-input>
</el-form-item>
<el-form-item label="库位" prop="cellId">
<el-form-item label="库位" prop="cellId" v-if="localDataForm.planTypeCode!=='ZDHK'">
<el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote
:remote-method="getAreaList" clearable>
:remote-method="getAreaList" clearable @change="handleAreaSelectChange">
<el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
@ -234,7 +254,50 @@ export default {
<wms-in-plan-detail-entity-table-cmps
:entityList.sync="wmsInPlanDetailEntityList"
:planTypeId="localDataForm.planTypeId"
:planTypeCode="localDataForm.planTypeCode"
></wms-in-plan-detail-entity-table-cmps>
<el-divider content-position="center" v-if="localDataForm.planTypeCode!=='ZDHK'">库位包含物料</el-divider>
<el-table :data="BaseKnifeList" v-if="localDataForm.planTypeCode!=='ZDHK'">
<el-table-column label="台账ID" align="center" prop="baseKnifeId" min-width="60" :show-overflow-tooltip="true"/>
<el-table-column label="rfid" align="center" prop="rfid"/>
<el-table-column label="刀具编码" align="center" prop="knifeCode" min-width="135"
:show-overflow-tooltip="true"/>
<el-table-column label="刀具名称" align="center" prop="knifeName" min-width="135"
:show-overflow-tooltip="true"/>
<el-table-column label="物料类型" align="center" key="itemOrProduct" prop="itemOrProduct"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>
</template>
</el-table-column>
<el-table-column label="刀具寿命" align="center" prop="knifeLife" min-width="100"
:show-overflow-tooltip="true"/>
<el-table-column label="刀具状态" align="center" prop="knifeFineState" min-width="100"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.knife_fine_status" :value="scope.row.knifeFineState"/>
</template>
</el-table-column>
<el-table-column label="是否锁定" align="center" prop="isLocked" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_locked" :value="scope.row.isLocked"/>
</template>
</el-table-column>
<el-table-column label="归属计划单" align="center" prop="planSheet" min-width="120"/>
<el-table-column label="重置次数" align="center" prop="resetCount" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.itemOrProduct == 'PRODUCT'">{{ scope.row.resetCount }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="handleAreaSelectChange"
/>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

View File

@ -32,7 +32,7 @@
<el-table-column label="目标库位" align="center" prop="cellName"/>
<el-table-column label="出入库类型" align="center" prop="planTypeId">
<template slot-scope="scope">
{{ filterInPlanType(scope.row.planTypeId) }}
{{ filterInPlanType(scope.row.planTypeCode) }}
</template>
</el-table-column>
<el-table-column label="物料" align="center" prop="materialName"/>
@ -60,7 +60,7 @@
>推入库位
</el-button>
</template>
<template v-if="scope.row.planInStatus !== '1'">
<template v-else-if="scope.row.planInStatus !== '1'">
<el-button
size="mini"
type="text"
@ -224,15 +224,15 @@ export default {
},
/**
* 过滤出入库类型
* @param id 出入库类型ID
* @param code 出入库类型 编码
* @returns {*}
*/
filterInPlanType(id) {
const filter = this.inPlanTypeList.filter(item => item.typeId === id);
filterInPlanType(code) {
const filter = this.inPlanTypeList.filter(item => item.code === code);
if (filter.length) {
return filter[0].name
}
return id
return code
},
/**
* 下发任务至 WCS
@ -280,6 +280,8 @@ export default {
issueInTaskWcsDJ(param).then(res => {
this.$modal.msgSuccess("下发成功");
})
} else {
console.error("入库类型不匹配: " + task.planTypeCode)
}
},
/**

View File

@ -193,6 +193,7 @@
{{scope.row.standardDosage * form.productIdQty}}
</template>
</el-table-column>
<el-table-column label="当前库存" prop="currentInventory" min-width="150" />
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
@ -243,6 +244,7 @@
{{scope.row.standardDosage * form.productIdQty}}
</template>
</el-table-column>
<el-table-column label="当前库存" prop="currentInventory" min-width="150" />
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
@ -389,7 +391,7 @@ export default {
} else {
return submitOutTask(this.form).then(() => {
this.getList();
this.$modal.msgSuccess("基础物料已出库!");
this.$modal.msgSuccess("基础物料出库中");
this.reset();
}).catch(() => {});
}
@ -440,7 +442,7 @@ export default {
return submitOutTask(row)
}).then(() => {
this.getList();
this.$modal.msgSuccess("基础物料已出库!");
this.$modal.msgSuccess("基础物料出库中");
}).catch(() => {});
}
},

View File

@ -84,16 +84,16 @@
v-hasPermi="['system:role: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="['system:role:export']"
>导出</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:role:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -111,26 +111,26 @@
v-hasPermi="['system:user:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['system:user:import']"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:user:export']"
>导出</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
<!-- plain-->
<!-- icon="el-icon-upload2"-->
<!-- size="mini"-->
<!-- @click="handleImport"-->
<!-- v-hasPermi="['system:user:import']"-->
<!-- >导入</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:user:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>

View File

@ -45,16 +45,16 @@
v-hasPermi="['wm:ctBase: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:ctBase:export']"
>导出</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:ctBase:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -43,19 +43,27 @@ module.exports = {
},
'/ureport': {
target: 'http://localhost:8080',
ws:false,
ws: false,
changeOrigin: true,
pathRewrite: {
'^/ureport': '/ureport'
}
},
'/wcs': {
target: 'http://192.168.8.60:1880',
ws: false,
changeOrigin: true,
pathRewrite: {
'^/wcs': ''
}
},
},
disableHostCheck: true
},
css: {
loaderOptions: {
sass: {
sassOptions: { outputStyle: "expanded" }
sassOptions: {outputStyle: "expanded"}
}
}
},
@ -104,39 +112,39 @@ module.exports = {
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
})
}
})
config.optimization.runtimeChunk('single'),
{
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './' //到根目录下
}
{
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './' //到根目录下
}
}
)
}