Compare commits
10 Commits
7de3d51762
...
c95ac80a13
Author | SHA1 | Date | |
---|---|---|---|
c95ac80a13 | |||
171d62aa5f | |||
6dc2761fa2 | |||
fa84dc4355 | |||
6053df2144 | |||
49e6add53b | |||
7a9ac420bc | |||
0e7187dd58 | |||
12d682a96d | |||
1a6eafc2a9 |
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 工刀具库WMS(内部)
|
||||
VUE_APP_TITLE = 刀具库WMS(内部)
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 工刀具库WMS(内部)
|
||||
VUE_APP_TITLE = 刀具库WMS(内部)
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 工刀具库WMS(内部)
|
||||
VUE_APP_TITLE = 刀具库WMS(内部)
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
|
@ -1,9 +1,3 @@
|
||||
# DJ-WMS-UI
|
||||
|
||||
#### 介绍
|
||||
|
||||
安全、稳定的WMS系统的前端
|
||||
|
||||
#### 部署
|
||||
|
||||
·执行npm install --legacy-peer-deps 命令(cnpm install)安装所有依赖包。
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ktg-mes-ui",
|
||||
"version": "3.8.2",
|
||||
"description": "工刀具库WMS(内部)",
|
||||
"description": "刀具库WMS(内部)",
|
||||
"author": "YinJinLu",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
@ -17,6 +17,14 @@ export function getBaseKnife(baseKnifeId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询台账RFID是否重复
|
||||
export function isDuplicateRfid(rfid) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/isDuplicateRfid/' + rfid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增刀具台账
|
||||
export function addBaseKnife(data) {
|
||||
return request({
|
||||
|
61
src/api/mes/md/inventoryBatch.js
Normal file
61
src/api/mes/md/inventoryBatch.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询刀具台账列表
|
||||
export function listInventoryBatch(query) {
|
||||
return request({
|
||||
url: '/mes/md/inventoryBatch/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询刀具台账详细
|
||||
export function getBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/' + baseKnifeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增刀具台账
|
||||
export function addBaseKnife(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改刀具台账
|
||||
export function updateBaseKnife(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除刀具台账
|
||||
export function delBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/' + baseKnifeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 重置刀具台账寿命
|
||||
export function resetBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/reset/' + baseKnifeId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 重置刀具台账寿命
|
||||
export function submitZdTask(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/zdTask',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
44
src/api/mes/wm/wmsSupplier.js
Normal file
44
src/api/mes/wm/wmsSupplier.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询供应商基础信息列表
|
||||
export function listWmsSupplier(query) {
|
||||
return request({
|
||||
url: '/wm/wmsSupplier/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询供应商基础信息详细
|
||||
export function getWmsSupplier(id) {
|
||||
return request({
|
||||
url: '/wm/wmsSupplier/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增供应商基础信息
|
||||
export function addWmsSupplier(data) {
|
||||
return request({
|
||||
url: '/wm/wmsSupplier',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改供应商基础信息
|
||||
export function updateWmsSupplier(data) {
|
||||
return request({
|
||||
url: '/wm/wmsSupplier',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除供应商基础信息
|
||||
export function delWmsSupplier(id) {
|
||||
return request({
|
||||
url: '/wm/wmsSupplier/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -37,7 +37,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '工刀具库WMS(内部)',
|
||||
title: '刀具库WMS(内部)',
|
||||
logo: ""
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,15 @@
|
||||
<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="基础物料" prop="mbbBdMrlId">
|
||||
<el-select v-model="queryParams.mbbBdMrlId" placeholder="请选择物料" filterable clearable>
|
||||
<el-form-item label="计划单" prop="planSheet">
|
||||
<el-input
|
||||
v-model="queryParams.planSheet"
|
||||
placeholder="请输入计划单"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料项" prop="mbbBdMrlId">
|
||||
<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>
|
||||
@ -64,7 +71,7 @@
|
||||
<!-- <el-table-column label="刀具类型" align="center" prop="knifeType" min-width="120" />-->
|
||||
<!-- <el-table-column label="安全库存" align="center" prop="safeStock" />-->
|
||||
<!-- <el-table-column label="标准数量" align="center" prop="standardQuantity" />-->
|
||||
<el-table-column label="库位编码" align="center" prop="areaCode" min-width="120" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库位名称" align="center" prop="areaName" min-width="120" :show-overflow-tooltip="true"/>
|
||||
<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">
|
||||
@ -239,14 +246,20 @@
|
||||
<dict-tag :options="dict.type.plan_source_type" :value="scope.row.planType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用人" align="center" prop="useUsername" :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="useUsername" :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-table-column label="库位编码" align="center" prop="wmStorageAreaCode" :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="detailStatus" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="明细状态" align="center" prop="detailStatus" :show-overflow-tooltip="true"/>-->
|
||||
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是否对刀" align="center" prop="isToolSetting" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isToolSetting == 0 ? '否' : '是' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="对刀参数" align="center" prop="toolSettingParam" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<el-divider content-position="center">入库信息</el-divider>
|
||||
@ -314,6 +327,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
mbbBdMrlId: null,
|
||||
planSheet: null,
|
||||
rfid: null,
|
||||
knifeCode: null,
|
||||
knifeName: null,
|
||||
|
367
src/views/mes/md/inventoryBatch/index.vue
Normal file
367
src/views/mes/md/inventoryBatch/index.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<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="批次" prop="batchNum">
|
||||
<el-input
|
||||
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"
|
||||
/>
|
||||
</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">
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="TASKList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_plan_state" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" align="center" prop="batchNum"/>
|
||||
<el-table-column label="物料编码" align="center" prop="mdItemCode"/>
|
||||
<el-table-column label="物料名称" align="center" prop="mdItemName"/>
|
||||
<el-table-column label="物料单位" align="center" prop="mdItemUnit"/>
|
||||
<el-table-column label="物料数量" align="center" prop="mdItemNum"/>
|
||||
<el-table-column label="类型" align="center" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.inOrOut == 0 ? '出库' : '入库' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出/入库时间" align="center" prop="dateTime"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleLook(scope.row)"
|
||||
v-hasPermi="['md:TASK:edit']"
|
||||
>查看物料清单
|
||||
</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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改出库任务对话框 -->
|
||||
<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-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="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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openLook = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listTASK, getTASK, delTASK, addTASK, updateTASK, runTASK, autoRunTASK} from "@/api/md/TASK";
|
||||
import {listInventoryBatch} from "@/api/mes/md/inventoryBatch"
|
||||
import {rgb} from "chalk";
|
||||
|
||||
export default {
|
||||
name: "TASK",
|
||||
dicts: ['in_plan_state'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 出库任务表格数据
|
||||
TASKList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
wmsOutPlanId: null,
|
||||
wmsOutPlanCode: null,
|
||||
wmsOutPlanDetailId: null,
|
||||
wmsBusinessTypeId: null,
|
||||
taskCode: null,
|
||||
taskNumber: null,
|
||||
outNumber: null,
|
||||
wmStorageAreaId: null,
|
||||
batchNum: null,
|
||||
mdItemId: null,
|
||||
mdItemCode: null,
|
||||
mdItemName: null,
|
||||
mdItemUnit: null,
|
||||
taskState: null,
|
||||
recipientUsername: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
openLook: false,
|
||||
outInfoList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询出库任务列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInventoryBatch(this.queryParams).then(response => {
|
||||
this.TASKList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
wmsOutTaskId: null,
|
||||
wmsOutPlanId: null,
|
||||
wmsOutPlanCode: null,
|
||||
wmsOutPlanDetailId: null,
|
||||
wmsBusinessTypeId: null,
|
||||
taskCode: null,
|
||||
taskNumber: null,
|
||||
outNumber: null,
|
||||
wmStorageAreaId: null,
|
||||
batchNum: null,
|
||||
mdItemId: null,
|
||||
mdItemCode: null,
|
||||
mdItemName: null,
|
||||
mdItemUnit: null,
|
||||
taskState: null,
|
||||
recipientUsername: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.wmsOutTaskId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加出库任务";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const wmsOutTaskId = row.wmsOutTaskId || this.ids
|
||||
getTASK(wmsOutTaskId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改出库任务";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.wmsOutTaskId != null) {
|
||||
updateTASK(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTASK(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleLook(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
getTASK(wmsOutTaskIds).then(response => {
|
||||
this.openLook = true;
|
||||
this.outInfoList = []
|
||||
this.outInfoList = response.data.outInfoList;
|
||||
});
|
||||
},
|
||||
/** 执行按钮操作 */
|
||||
handleRun(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认手动出库该数据项?').then(function () {
|
||||
return runTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 执行按钮操作 */
|
||||
handleAutoRun(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认WCS下发数据该数据项?').then(function () {
|
||||
return autoRunTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认删除出库任务编号为"' + wmsOutTaskIds + '"的数据项?').then(function () {
|
||||
return delTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('md/TASK/export', {
|
||||
...this.queryParams
|
||||
}, `TASK_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -247,15 +247,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">
|
||||
@ -562,9 +562,6 @@ export default {
|
||||
unitOfMeasure: [
|
||||
{required: true, message: "单位不能为空", trigger: "blur"}
|
||||
],
|
||||
standardNumber: [
|
||||
{required: true, message: "标准数量不能为空", trigger: "blur"}
|
||||
],
|
||||
itemTypeId: [
|
||||
{required: true, message: "物料分类不能为空", trigger: "blur"},
|
||||
]
|
||||
|
@ -354,7 +354,7 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
planCode: [{required: true}, {validator: planCodeValidator, trigger: "change"}],
|
||||
planCode: [{required: true}, {validator: planCodeValidator, trigger: "blur"}],
|
||||
planTypeId: [{required: true}],
|
||||
relBillCode: [{required: true}],
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ export default {
|
||||
selectIndex: -1
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
getKnifeType(){
|
||||
if(this.planTypeId==9){
|
||||
computed: {
|
||||
getKnifeType() {
|
||||
if (this.planTypeId == 9 || this.planTypeId == 15) {
|
||||
return "整刀"
|
||||
}else{
|
||||
} else {
|
||||
return "刀柄类"
|
||||
}
|
||||
}
|
||||
@ -111,11 +111,6 @@ export default {
|
||||
<el-input v-model="scope.row.source" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="RFID" align="center" prop="rfid">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rfid" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="消耗寿命" align="center" prop="consumeLife">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.consumeLife" type="number" min="0" @change="updateEntityList"></el-input>
|
||||
@ -155,7 +150,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">
|
||||
@ -168,11 +163,6 @@ export default {
|
||||
<el-input v-model="scope.row.source" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="RFID" align="center" prop="rfid">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rfid" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -187,7 +177,8 @@ export default {
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<base-knife-select-cmps :visible.sync="baseKnifeVisible" :knife-type="getKnifeType" @change="selectBaseKnifeChange"></base-knife-select-cmps>
|
||||
<base-knife-select-cmps :visible.sync="baseKnifeVisible" :knife-type="getKnifeType"
|
||||
@change="selectBaseKnifeChange"></base-knife-select-cmps>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,6 +4,7 @@ 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";
|
||||
|
||||
export default {
|
||||
name: "wmsInPlanKnifeBackFormCmps",
|
||||
@ -58,11 +59,23 @@ export default {
|
||||
},
|
||||
/** 对话框关闭 */
|
||||
handleClose() {
|
||||
this.reset();
|
||||
this.$emit("update:visible", false)
|
||||
},
|
||||
async validateRfid() {
|
||||
const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid);
|
||||
if (rfidList.length === 0) return
|
||||
const res = await isDuplicateRfid(rfidList.join(","));
|
||||
return res.data
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
async submitForm() {
|
||||
const validateRfidResult = await this.validateRfid();
|
||||
if (validateRfidResult.length > 0) {
|
||||
this.$modal.msgError(`RFID重复:${validateRfidResult}`);
|
||||
return;
|
||||
}
|
||||
await this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.localDataForm.wmsInPlanDetailsList = []
|
||||
// 根据入库计划明细实例 生成相应入库计划明细
|
||||
@ -130,6 +143,42 @@ export default {
|
||||
this.mdItemList = response.rows;
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
planId: null,
|
||||
state: null,
|
||||
sourceType: null,
|
||||
wareId: null,
|
||||
cellCode: null,
|
||||
workOrderCode: null,
|
||||
expectDate: null,
|
||||
publishName: null,
|
||||
publishTime: null,
|
||||
closerId: null,
|
||||
closeTime: null,
|
||||
relBillCode: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
updateBy: null,
|
||||
remark: null,
|
||||
customerId: null,
|
||||
poCode: null,
|
||||
departmentId: null,
|
||||
contractNo: null,
|
||||
supplierId: null,
|
||||
businessTypeId: null,
|
||||
srcOutTaskId: null,
|
||||
isActive: null,
|
||||
isDelete: null,
|
||||
planCode: null,
|
||||
planTypeId: null,
|
||||
wmsInPlanDetailsList: []
|
||||
};
|
||||
this.wmsInPlanDetailsList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getAreaList();
|
||||
@ -145,7 +194,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog :title="title" :visible="visible" width="50%" append-to-body @close="handleClose" :close-on-click-modal="false">
|
||||
<el-dialog :title="title" :visible="visible" width="50%" 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'">
|
||||
|
@ -32,7 +32,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:warehouse:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -43,7 +44,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:warehouse:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -54,26 +56,32 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:warehouse:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="warehouseList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="库房编码" align="center" prop="warehouseCode" >
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="库房编码" align="center" prop="warehouseCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:warehouse:query']"
|
||||
>{{scope.row.warehouseCode}}</el-button>
|
||||
>{{ scope.row.warehouseCode }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库房名称" align="center" prop="warehouseName" />
|
||||
<el-table-column label="负责人" align="center" prop="charge" />
|
||||
<el-table-column label="类型" align="center" prop="attr2" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" ></el-table-column>
|
||||
<el-table-column label="库房名称" align="center" prop="warehouseName"/>
|
||||
<el-table-column label="负责人" align="center" prop="charge"/>
|
||||
<el-table-column label="类型" align="center" prop="attr2" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.warehouse_type" :value="scope.row.attr2"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
|
||||
<el-table-column label="是否有效" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<i :class="scope.row.attr3==1?'el-icon-circle-check':'el-icon-circle-close'"></i>
|
||||
@ -88,21 +96,24 @@
|
||||
icon="el-icon-s-shop"
|
||||
@click="handleLocation(scope.row.warehouseId)"
|
||||
v-hasPermi="['mes:wm:location:edit','mes:wm:location:list']"
|
||||
>库区</el-button>
|
||||
>库区
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:warehouse:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:warehouse:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -117,65 +128,35 @@
|
||||
|
||||
<!-- 添加或修改库房设置对话框 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" append-to-body width="960px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="库房编码" prop="warehouseCode">
|
||||
<el-input v-model="form.warehouseCode" placeholder="请输入库房编码"/>
|
||||
</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="warehouseName">
|
||||
<el-input v-model="form.warehouseName" placeholder="请输入库房名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="负责人" prop="charge">
|
||||
<el-input v-model="form.charge" placeholder="请输入负责人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="库房类型" prop="location">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.attr2" placeholder="请选择库区名称" />
|
||||
<el-button @click="selectWareHouseVisible=true" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否有效" prop="area">
|
||||
<el-switch @change="isFig" v-model="fig"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline>
|
||||
<el-form-item label="库房编码" prop="warehouseCode">
|
||||
<el-input v-model="form.warehouseCode" placeholder="请输入库房编码"/>
|
||||
</el-form-item>
|
||||
<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-form-item label="库房名称" prop="warehouseName">
|
||||
<el-input v-model="form.warehouseName" placeholder="请输入库房名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="charge">
|
||||
<el-input v-model="form.charge" placeholder="请输入负责人"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库房类型" prop="attr2">
|
||||
<el-select v-model="form.attr2" placeholder="请选择库房类型">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in dict.type.warehouse_type"
|
||||
:key="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有效" prop="area">
|
||||
<el-switch @change="isFig" v-model="fig"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
||||
@ -204,14 +185,15 @@ import InOutTypeCmps from "@/components/wm/InOutTypeCmps.vue";
|
||||
|
||||
export default {
|
||||
name: "Warehouse",
|
||||
components: {InOutTypeCmps, BarcodeImg } ,
|
||||
components: {InOutTypeCmps, BarcodeImg},
|
||||
dicts: ['warehouse_type'],
|
||||
data() {
|
||||
return {
|
||||
selectWareHouseVisible:false,
|
||||
selectWareHouseVisible: false,
|
||||
//是否有效
|
||||
fig:false,
|
||||
fig: false,
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag: false,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -262,10 +244,10 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
warehouseCode: [
|
||||
{ required: true, message: "库房编码不能为空", trigger: "blur" }
|
||||
{required: true, message: "库房编码不能为空", trigger: "blur"}
|
||||
],
|
||||
warehouseName: [
|
||||
{ required: true, message: "库房名称不能为空", trigger: "blur" }
|
||||
{required: true, message: "库房名称不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
@ -281,8 +263,8 @@ export default {
|
||||
this.selectWareHouseVisible = false;
|
||||
},
|
||||
//修改库房是否有效
|
||||
isFig(val){
|
||||
this.form.attr3=val?1:0
|
||||
isFig(val) {
|
||||
this.form.attr3 = val ? 1 : 0
|
||||
},
|
||||
/** 查询库房设置列表 */
|
||||
getList() {
|
||||
@ -333,7 +315,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.warehouseId)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -344,7 +326,7 @@ export default {
|
||||
this.optType = "add";
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
handleView(row) {
|
||||
debugger;
|
||||
this.reset();
|
||||
const warehouseId = row.warehouseId || this.ids
|
||||
@ -391,13 +373,13 @@ export default {
|
||||
* 冻结状态变更
|
||||
* @param row
|
||||
*/
|
||||
handleFrozenChange(row){
|
||||
handleFrozenChange(row) {
|
||||
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.warehouseName + '"库房吗?').then(function() {
|
||||
return changeFrozenState(row.warehouseId,row.frozenFlag);
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.warehouseName + '"库房吗?').then(function () {
|
||||
return changeFrozenState(row.warehouseId, row.frozenFlag);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
}).catch(function () {
|
||||
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||
});
|
||||
|
||||
@ -405,12 +387,13 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const warehouseIds = row.warehouseId || this.ids;
|
||||
this.$modal.confirm('是否确认删除库房设置编号为"' + warehouseIds + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除库房设置编号为"' + warehouseIds + '"的数据项?').then(function () {
|
||||
return delWarehouse(warehouseIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -418,17 +401,17 @@ export default {
|
||||
...this.queryParams
|
||||
}, `warehouse_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleLocation(warehouseId){
|
||||
this.$router.push({ path: '/mes/wm/location/index', query: { warehouseId: warehouseId || 0 ,optType: this.optType} })
|
||||
handleLocation(warehouseId) {
|
||||
this.$router.push({path: '/mes/wm/location/index', query: {warehouseId: warehouseId || 0, optType: this.optType}})
|
||||
},
|
||||
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag){
|
||||
if(autoGenFlag){
|
||||
genCode('WAREHOUSE_CODE').then(response =>{
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('WAREHOUSE_CODE').then(response => {
|
||||
this.form.warehouseCode = response;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.form.warehouseCode = null;
|
||||
}
|
||||
}
|
||||
|
284
src/views/mes/wm/wmsSupplier/index.vue
Normal file
284
src/views/mes/wm/wmsSupplier/index.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<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="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wm:wmsSupplier: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:wmsSupplier: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:wmsSupplier:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wmsSupplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="主键" align="center" prop="id"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName"/>
|
||||
<el-table-column label="主要联系人姓名" align="center" prop="contactName"/>
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPhone"/>
|
||||
<el-table-column label="联系人邮箱" align="center" prop="contactEmail"/>
|
||||
<el-table-column label="联系地址" align="center" prop="contactAddress"/>
|
||||
<el-table-column label="供应商公司官网" align="center" prop="website"/>
|
||||
<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="['wm:wmsSupplier:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wm:wmsSupplier:remove']"
|
||||
>删除
|
||||
</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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改供应商基础信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="35%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" inline>
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input v-model="form.supplierName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要联系人" prop="contactName">
|
||||
<el-input v-model="form.contactName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人邮箱" prop="contactEmail">
|
||||
<el-input v-model="form.contactEmail"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系地址" prop="contactAddress">
|
||||
<el-input v-model="form.contactAddress"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商官网" prop="website">
|
||||
<el-input v-model="form.website"></el-input>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listWmsSupplier,
|
||||
getWmsSupplier,
|
||||
delWmsSupplier,
|
||||
addWmsSupplier,
|
||||
updateWmsSupplier
|
||||
} from "@/api/mes/wm/wmsSupplier";
|
||||
|
||||
export default {
|
||||
name: "WmsSupplier",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 供应商基础信息表格数据
|
||||
wmsSupplierList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierName: null,
|
||||
supplierTypeName: null,
|
||||
supplierTypeCode: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
contactEmail: null,
|
||||
contactAddress: null,
|
||||
region: null,
|
||||
website: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
isDelete: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询供应商基础信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWmsSupplier(this.queryParams).then(response => {
|
||||
this.wmsSupplierList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
supplierName: null,
|
||||
supplierTypeName: null,
|
||||
supplierTypeCode: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
contactEmail: null,
|
||||
contactAddress: null,
|
||||
region: null,
|
||||
website: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
isDelete: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加供应商基础信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWmsSupplier(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改供应商基础信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateWmsSupplier(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWmsSupplier(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除供应商基础信息编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delWmsSupplier(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wm/wmsSupplier/export', {
|
||||
...this.queryParams
|
||||
}, `wmsSupplier_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -106,7 +106,7 @@
|
||||
@click="handleOut(scope.row)"
|
||||
v-if="scope.row.status == 0"
|
||||
v-hasPermi="['wm:zdTask:edit']"
|
||||
>组装</el-button>
|
||||
>开始组装</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -114,7 +114,7 @@
|
||||
@click="handleIn(scope.row)"
|
||||
v-if="scope.row.status == 1"
|
||||
v-hasPermi="['wm:zdTask:edit']"
|
||||
>组装成功</el-button>
|
||||
>组装完毕</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">工刀具库WMS</h3>
|
||||
<h3 class="title">刀具库WMS</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '工刀具库WMS(内部)' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || '刀具库WMS(内部)' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 3000 // 端口
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user