change - 修改产线/工位关系

master
yinq 1 year ago
parent 23d1abe4b9
commit 15de9bf4c6

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

@ -115,13 +115,13 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['base:processStation:edit']" v-hasPermi="['base:processStation:edit']"
>修改</el-button> >修改</el-button>
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
v-hasPermi="['base:processStation:remove']" <!-- v-hasPermi="['base:processStation:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -91,6 +91,12 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-d-arrow-right"
@click="findStation(scope.row)"
>查看所属工位</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -295,6 +301,11 @@ export default {
this.title = "修改产线信息"; this.title = "修改产线信息";
}); });
}, },
/** 查看所属工位 */
findStation: function(row) {
const productLineCode = row.productLineCode;
this.$router.push("/base/product-station/index/" + productLineCode);
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -1,6 +1,14 @@
<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-input
v-model="queryParams.parentId"
placeholder="请输入产线编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工位名称" prop="productLineName"> <el-form-item label="工位名称" prop="productLineName">
<el-input <el-input
v-model="queryParams.productLineName" v-model="queryParams.productLineName"
@ -58,6 +66,15 @@
v-hasPermi="['base:productLine:export']" v-hasPermi="['base:productLine: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>
@ -176,9 +193,15 @@
</template> </template>
<script> <script>
import { listProductLine, getProductLine, delProductLine, addProductLine, updateProductLine } from "@/api/base/productLine"; import {
import { findFactoryList } from "@/api/base/factory"; addProductLine,
import { findProductLineList } from "@/api/base/productLine"; delProductLine,
findProductLineList,
getProductLine,
listProductLine,
updateProductLine
} from '@/api/base/productLine'
import { findFactoryList } from '@/api/base/factory'
export default { export default {
name: "ProductLine", name: "ProductLine",
@ -242,6 +265,7 @@ export default {
}; };
}, },
created() { created() {
this.queryParams.parentId = this.$route.params && this.$route.params.productLineCode;
this.getList(); this.getList();
findFactoryList().then(response => { findFactoryList().then(response => {
this.factoryList = response.data; this.factoryList = response.data;
@ -313,6 +337,11 @@ export default {
this.title = "修改工位信息"; this.title = "修改工位信息";
}); });
}, },
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/base/productLine" };
this.$tab.closeOpenPage(obj);
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -142,6 +142,7 @@
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="所属工位" align="center" key="stationName" prop="stationName" v-if="columns[5].visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible"> <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope"> <template slot-scope="scope">
@ -293,6 +294,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="所属工位">
<el-select v-model="form.stationCode" placeholder="请输入所属工位">
<el-option
v-for="item in findStationList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -345,6 +358,7 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { findProductLineList } from '@//api/base/productLine'
export default { export default {
name: "User", name: "User",
@ -412,6 +426,8 @@ export default {
status: undefined, status: undefined,
deptId: undefined deptId: undefined
}, },
//
findStationList: [],
// //
columns: [ columns: [
{ key: 0, label: `用户编号`, visible: true }, { key: 0, label: `用户编号`, visible: true },
@ -475,6 +491,9 @@ export default {
this.loading = false; this.loading = false;
} }
); );
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
}, },
//this //this
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
@ -514,6 +533,7 @@ export default {
this.form = { this.form = {
userId: undefined, userId: undefined,
deptId: undefined, deptId: undefined,
stationCode: undefined,
userName: undefined, userName: undefined,
nickName: undefined, nickName: undefined,
password: undefined, password: undefined,

Loading…
Cancel
Save