update - 工序/工位维护

master
yinq 1 year ago
parent c5f59d2984
commit 863c416f43

@ -246,6 +246,20 @@ export const dynamicRoutes = [
}, },
], ],
}, },
{
path: "/base/subordinate-workers",
component: Layout,
hidden: true,
permissions: ["base:processStation:list"],
children: [
{
path:"index/:productLineCode",
component:() => import("@/views/base/processStation/index"),
name:"SubordinateWorkers",
meta: {title: "工序信息",activeMenu: "/base/processStation"},
},
],
},
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错

@ -1,26 +1,28 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工序/工位编号" prop="processCode"> <el-form-item label="所属产线" prop="productLineCode" >
<el-input <el-select v-model="queryParams.productLineCode" placeholder="请选择产线工位">
v-model="queryParams.processCode" <el-option
placeholder="请输入工序/工位编号" v-for="item in productLineList"
clearable :key="item.productLineCode"
@keyup.enter.native="handleQuery" :label="item.productLineName"
/> :value="item.productLineCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="工序/工位名称" prop="processName"> <!-- <el-form-item label="工序编号" prop="processCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.processCode"-->
<!-- placeholder="请输入工序编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="工序名称" prop="processName">
<el-input <el-input
v-model="queryParams.processName" v-model="queryParams.processName"
placeholder="请输入工序/工位名称" placeholder="请输入工序名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属产线" prop="productLineCode">
<el-input
v-model="queryParams.productLineCode"
placeholder="请输入所属产线"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -74,6 +76,15 @@
v-hasPermi="['base:processStation:export']" v-hasPermi="['base:processStation:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-close"
size="mini"
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -254,6 +265,7 @@ export default {
}; };
}, },
created() { created() {
this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode;
this.getList(); this.getList();
}, },
methods: { methods: {
@ -295,6 +307,7 @@ export default {
updatedTime: null, updatedTime: null,
parentId: null parentId: null
}; };
this.queryParams.productLineCode = null
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -319,6 +332,11 @@ export default {
this.open = true; this.open = true;
this.title = "添加生产工序/工位信息"; this.title = "添加生产工序/工位信息";
}, },
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/base/productLine" };
this.$tab.closeOpenPage(obj);
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();

@ -95,22 +95,28 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-d-arrow-right" icon="el-icon-d-arrow-right"
@click="findStation(scope.row)" @click="findSubordinateWorkers(scope.row)"
>查看所属工位</el-button> >下级工序</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['base:productLine:edit']"
>修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-s-grid"
@click="handleDelete(scope.row)" @click="findStation(scope.row)"
v-hasPermi="['base:productLine:remove']" >所属工位</el-button>
>删除</el-button> <!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['base:productLine:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:productLine:remove']"-->
<!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -301,11 +307,18 @@ export default {
this.title = "修改产线信息"; this.title = "修改产线信息";
}); });
}, },
/** 查看所属工位 */ /** 查看所属工位 */
findStation: function(row) { findStation: function(row) {
const productLineCode = row.productLineCode; const productLineCode = row.productLineCode;
this.$router.push("/base/product-station/index/" + productLineCode); this.$router.push("/base/product-station/index/" + productLineCode);
}, },
/** 查看下级工序 */
findSubordinateWorkers: function(row) {
const productLineCode = row.productLineCode;
this.$router.push("/base/subordinate-workers/index/" + productLineCode);
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -1,13 +1,15 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="产线编号" prop="parentId"> <el-form-item label="产线编号" prop="parentId" >
<el-input <el-select v-model="queryParams.parentId" placeholder="请选择产线" disabled>
v-model="queryParams.parentId" <el-option
placeholder="请输入产线编号" v-for="item in productLineList"
clearable :key="item.productLineCode"
@keyup.enter.native="handleQuery" :label="item.productLineName"
/> :value="item.productLineCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="工位名称" prop="productLineName"> <el-form-item label="工位名称" prop="productLineName">
<el-input <el-input
@ -301,7 +303,8 @@ export default {
createdBy: null, createdBy: null,
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,
updatedTime: null updatedTime: null,
parentId: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },

Loading…
Cancel
Save