|
|
@ -1,7 +1,7 @@
|
|
|
|
<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="productLineCode">
|
|
|
|
<el-form-item label="所属产线" prop="productLineCode" >
|
|
|
|
<el-select v-model="queryParams.productLineCode" placeholder="请选择所属产线">
|
|
|
|
<el-select v-model="queryParams.productLineCode" placeholder="请选择所属产线">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in productLineList"
|
|
|
|
v-for="item in productLineList"
|
|
|
@ -44,8 +44,7 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['base:processStation:add']"
|
|
|
|
v-hasPermi="['base:processStation:add']"
|
|
|
|
>新增
|
|
|
|
>新增</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -56,8 +55,7 @@
|
|
|
|
:disabled="single"
|
|
|
|
:disabled="single"
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['base:processStation:edit']"
|
|
|
|
v-hasPermi="['base:processStation:edit']"
|
|
|
|
>修改
|
|
|
|
>修改</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -68,8 +66,7 @@
|
|
|
|
:disabled="multiple"
|
|
|
|
:disabled="multiple"
|
|
|
|
@click="handleDelete"
|
|
|
|
@click="handleDelete"
|
|
|
|
v-hasPermi="['base:processStation:remove']"
|
|
|
|
v-hasPermi="['base:processStation:remove']"
|
|
|
|
>删除
|
|
|
|
>删除</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -79,8 +76,7 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
@click="handleExport"
|
|
|
|
v-hasPermi="['base:processStation:export']"
|
|
|
|
v-hasPermi="['base:processStation:export']"
|
|
|
|
>导出
|
|
|
|
>导出</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -89,14 +85,13 @@
|
|
|
|
icon="el-icon-close"
|
|
|
|
icon="el-icon-close"
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleClose"
|
|
|
|
@click="handleClose"
|
|
|
|
>关闭
|
|
|
|
>关闭</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="processStationList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table v-loading="loading" :data="processStationList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="生产工序编号" align="center" prop="processCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="生产工序编号" align="center" prop="processCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="生产工序名称" align="center" prop="processName" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="生产工序名称" align="center" prop="processName" v-if="columns[2].visible"/>
|
|
|
@ -131,16 +126,14 @@
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-s-grid"
|
|
|
|
icon="el-icon-s-grid"
|
|
|
|
@click="findStation(scope.row)"
|
|
|
|
@click="findStation(scope.row)"
|
|
|
|
>下级工位
|
|
|
|
>下级工位</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
@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"-->
|
|
|
@ -164,10 +157,10 @@
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
<el-form-item label="生产工序编号" prop="processCode">
|
|
|
|
<el-form-item label="生产工序编号" prop="processCode">
|
|
|
|
<el-input v-model="form.processCode" placeholder="请输入生产工序编号"/>
|
|
|
|
<el-input v-model="form.processCode" placeholder="请输入生产工序编号" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="生产工序名称" prop="processName">
|
|
|
|
<el-form-item label="生产工序名称" prop="processName">
|
|
|
|
<el-input v-model="form.processName" placeholder="请输入生产工序名称"/>
|
|
|
|
<el-input v-model="form.processName" placeholder="请输入生产工序名称" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="所属产线">
|
|
|
|
<el-form-item label="所属产线">
|
|
|
|
<el-select v-model="form.productLineCode" placeholder="请输入所属产线">
|
|
|
|
<el-select v-model="form.productLineCode" placeholder="请输入所属产线">
|
|
|
@ -190,13 +183,13 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="单位生产时间" prop="productionTime">
|
|
|
|
<el-form-item label="单位生产时间" prop="productionTime">
|
|
|
|
<el-input v-model="form.productionTime" placeholder="请输入单位生产时间"/>
|
|
|
|
<el-input v-model="form.productionTime" placeholder="请输入单位生产时间" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="日产能" prop="capacityDay">
|
|
|
|
<el-form-item label="日产能" prop="capacityDay">
|
|
|
|
<el-input v-model="form.capacityDay" placeholder="请输入日产能"/>
|
|
|
|
<el-input v-model="form.capacityDay" placeholder="请输入日产能" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="月产能" prop="capacityMonth">
|
|
|
|
<el-form-item label="月产能" prop="capacityMonth">
|
|
|
|
<el-input v-model="form.capacityMonth" placeholder="请输入月产能"/>
|
|
|
|
<el-input v-model="form.capacityMonth" placeholder="请输入月产能" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@ -208,18 +201,11 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
import { listProcessStation, getProcessStation, delProcessStation, addProcessStation, updateProcessStation } from "@/api/base/processStation";
|
|
|
|
listProcessStation,
|
|
|
|
import { findProductLineList } from "@/api/base/productLine";
|
|
|
|
getProcessStation,
|
|
|
|
|
|
|
|
delProcessStation,
|
|
|
|
|
|
|
|
addProcessStation,
|
|
|
|
|
|
|
|
updateProcessStation
|
|
|
|
|
|
|
|
} from "@/api/base/processStation";
|
|
|
|
|
|
|
|
import {findProductLineList} from "@/api/base/productLine";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "ProcessStation",
|
|
|
|
name: "ProcessStation",
|
|
|
|
dicts: ['is_flag', 'process_type'],
|
|
|
|
dicts: ['is_flag','process_type'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
@ -247,7 +233,7 @@ export default {
|
|
|
|
processCode: null,
|
|
|
|
processCode: null,
|
|
|
|
processName: null,
|
|
|
|
processName: null,
|
|
|
|
processType: 1,
|
|
|
|
processType: 1,
|
|
|
|
productLineCode: null,
|
|
|
|
productLineCode: 'CX_02',
|
|
|
|
productionTime: null,
|
|
|
|
productionTime: null,
|
|
|
|
capacityDay: null,
|
|
|
|
capacityDay: null,
|
|
|
|
capacityMonth: null,
|
|
|
|
capacityMonth: null,
|
|
|
@ -261,23 +247,24 @@ export default {
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {},
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
},
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{key: 0, label: `主键标识`, visible: false},
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
{key: 1, label: `生产工序/工位编号`, visible: true},
|
|
|
|
{ key: 1, label: `生产工序/工位编号`, visible: true },
|
|
|
|
{key: 2, label: `生产工序/工位名称`, visible: true},
|
|
|
|
{ key: 2, label: `生产工序/工位名称`, visible: true },
|
|
|
|
{key: 3, label: `类别`, visible: false},
|
|
|
|
{ key: 3, label: `类别`, visible: false },
|
|
|
|
{key: 4, label: `所属产线`, visible: true},
|
|
|
|
{ key: 4, label: `所属产线`, visible: true },
|
|
|
|
{key: 5, label: `单位生产时间`, visible: true},
|
|
|
|
{ key: 5, label: `单位生产时间`, visible: true },
|
|
|
|
{key: 6, label: `日产能`, visible: true},
|
|
|
|
{ key: 6, label: `日产能`, visible: true },
|
|
|
|
{key: 7, label: `月产能`, visible: true},
|
|
|
|
{ key: 7, label: `月产能`, visible: true },
|
|
|
|
{key: 8, label: `启用标识`, visible: false},
|
|
|
|
{ key: 8, label: `启用标识`, visible: false },
|
|
|
|
{key: 9, label: `创建人`, visible: false},
|
|
|
|
{ key: 9, label: `创建人`, visible: false },
|
|
|
|
{key: 10, label: `创建时间`, visible: false},
|
|
|
|
{ key: 10, label: `创建时间`, visible: false },
|
|
|
|
{key: 11, label: `更新人`, visible: false},
|
|
|
|
{ key: 11, label: `更新人`, visible: false },
|
|
|
|
{key: 12, label: `更新时间`, visible: false},
|
|
|
|
{ key: 12, label: `更新时间`, visible: false },
|
|
|
|
{key: 13, label: `工位编号`, visible: true},
|
|
|
|
{ key: 13, label: `工位编号`, visible: true },
|
|
|
|
{key: 14, label: `工位名称`, visible: true},
|
|
|
|
{ key: 14, label: `工位名称`, visible: true },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
// 产线选项
|
|
|
|
// 产线选项
|
|
|
|
productLineList: [],
|
|
|
|
productLineList: [],
|
|
|
@ -285,38 +272,23 @@ export default {
|
|
|
|
findStationList: [],
|
|
|
|
findStationList: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async created() {
|
|
|
|
created() {
|
|
|
|
if (this.$route.params != null) {
|
|
|
|
if (this.$route.params != null && this.$route.params.productLineCode != null){
|
|
|
|
this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode;
|
|
|
|
this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode;
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.queryParams.productLineCode = 'CX_02'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
await findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
|
|
|
|
this.productLineList = response.data;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
await findProductLineList({productLineType: 2}).then(response => {
|
|
|
|
|
|
|
|
this.findStationList = response.data;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await listProcessStation(this.queryParams).then(response => {
|
|
|
|
|
|
|
|
this.processStationList = response.rows;
|
|
|
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
/** 查询生产工序/工位信息列表 */
|
|
|
|
/** 查询生产工序/工位信息列表 */
|
|
|
|
async getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
await findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
this.productLineList = response.data;
|
|
|
|
this.productLineList = response.data;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
await findProductLineList({productLineType: 2}).then(response => {
|
|
|
|
findProductLineList({productLineType: 2}).then(response => {
|
|
|
|
this.findStationList = response.data;
|
|
|
|
this.findStationList = response.data;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
await listProcessStation(this.queryParams).then(response => {
|
|
|
|
listProcessStation(this.queryParams).then(response => {
|
|
|
|
this.processStationList = response.rows;
|
|
|
|
this.processStationList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
@ -361,7 +333,7 @@ export default {
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.objId)
|
|
|
|
this.ids = selection.map(item => item.objId)
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.single = selection.length!==1
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.multiple = !selection.length
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
@ -371,13 +343,13 @@ export default {
|
|
|
|
this.title = "添加生产工序/工位信息";
|
|
|
|
this.title = "添加生产工序/工位信息";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查看下级工位 */
|
|
|
|
/** 查看下级工位 */
|
|
|
|
findStation: function (row) {
|
|
|
|
findStation: function(row) {
|
|
|
|
const processCode = row.processCode;
|
|
|
|
const processCode = row.processCode;
|
|
|
|
this.$router.push("/base/productProcess-station/index/" + processCode);
|
|
|
|
this.$router.push("/base/productProcess-station/index/" + processCode);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 返回按钮操作 */
|
|
|
|
/** 返回按钮操作 */
|
|
|
|
handleClose() {
|
|
|
|
handleClose() {
|
|
|
|
const obj = {path: "/base/productLine"};
|
|
|
|
const obj = { path: "/base/productLine" };
|
|
|
|
this.$tab.closeOpenPage(obj);
|
|
|
|
this.$tab.closeOpenPage(obj);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|