|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<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-option
|
|
|
|
|
v-for="item in productLineList"
|
|
|
|
@ -11,16 +11,16 @@
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="工序类别" prop="processType">-->
|
|
|
|
|
<!-- <el-select v-model="queryParams.processType" placeholder="请选择工序类别" clearable>-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="dict in dict.type.process_type"-->
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="工序类别" prop="processType">-->
|
|
|
|
|
<!-- <el-select v-model="queryParams.processType" placeholder="请选择工序类别" clearable>-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="dict in dict.type.process_type"-->
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="生产工序名称" prop="processName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.processName"
|
|
|
|
@ -44,7 +44,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
v-hasPermi="['base:processStation:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
>新增
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -55,7 +56,8 @@
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['base:processStation:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -66,7 +68,8 @@
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
v-hasPermi="['base:processStation:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -76,7 +79,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['base:processStation:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -85,13 +89,14 @@
|
|
|
|
|
icon="el-icon-close"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleClose"
|
|
|
|
|
>关闭</el-button>
|
|
|
|
|
>关闭
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<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="processCode" v-if="columns[1].visible"/>
|
|
|
|
|
<el-table-column label="生产工序名称" align="center" prop="processName" v-if="columns[2].visible"/>
|
|
|
|
@ -126,21 +131,23 @@
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-s-grid"
|
|
|
|
|
@click="findStation(scope.row)"
|
|
|
|
|
>下级工位</el-button>
|
|
|
|
|
>下级工位
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['base:processStation:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
|
<!-- v-hasPermi="['base:processStation:remove']"-->
|
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
|
<!-- v-hasPermi="['base:processStation:remove']"-->
|
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -157,10 +164,10 @@
|
|
|
|
|
<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-item label="生产工序编号" prop="processCode">
|
|
|
|
|
<el-input v-model="form.processCode" placeholder="请输入生产工序编号" />
|
|
|
|
|
<el-input v-model="form.processCode" placeholder="请输入生产工序编号"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<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 label="所属产线">
|
|
|
|
|
<el-select v-model="form.productLineCode" placeholder="请输入所属产线">
|
|
|
|
@ -183,13 +190,13 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<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 label="日产能" prop="capacityDay">
|
|
|
|
|
<el-input v-model="form.capacityDay" placeholder="请输入日产能" />
|
|
|
|
|
<el-input v-model="form.capacityDay" placeholder="请输入日产能"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<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>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -201,11 +208,18 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listProcessStation, getProcessStation, delProcessStation, addProcessStation, updateProcessStation } from "@/api/base/processStation";
|
|
|
|
|
import { findProductLineList } from "@/api/base/productLine";
|
|
|
|
|
import {
|
|
|
|
|
listProcessStation,
|
|
|
|
|
getProcessStation,
|
|
|
|
|
delProcessStation,
|
|
|
|
|
addProcessStation,
|
|
|
|
|
updateProcessStation
|
|
|
|
|
} from "@/api/base/processStation";
|
|
|
|
|
import {findProductLineList} from "@/api/base/productLine";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ProcessStation",
|
|
|
|
|
dicts: ['is_flag','process_type'],
|
|
|
|
|
dicts: ['is_flag', 'process_type'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
@ -247,25 +261,24 @@ export default {
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
},
|
|
|
|
|
rules: {},
|
|
|
|
|
columns: [
|
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
|
{ key: 1, label: `生产工序/工位编号`, visible: true },
|
|
|
|
|
{ key: 2, label: `生产工序/工位名称`, visible: true },
|
|
|
|
|
{ key: 3, label: `类别`, visible: false },
|
|
|
|
|
{ key: 4, label: `所属产线`, visible: true },
|
|
|
|
|
{ key: 5, label: `单位生产时间`, visible: true },
|
|
|
|
|
{ key: 6, label: `日产能`, visible: true },
|
|
|
|
|
{ key: 7, label: `月产能`, visible: true },
|
|
|
|
|
{ key: 8, label: `启用标识`, visible: false },
|
|
|
|
|
{ key: 9, label: `创建人`, visible: false },
|
|
|
|
|
{ key: 10, label: `创建时间`, visible: false },
|
|
|
|
|
{ key: 11, label: `更新人`, visible: false },
|
|
|
|
|
{ key: 12, label: `更新时间`, visible: false },
|
|
|
|
|
{ key: 13, label: `工位编号`, visible: true },
|
|
|
|
|
{ key: 14, label: `工位名称`, visible: true },
|
|
|
|
|
],
|
|
|
|
|
{key: 0, label: `主键标识`, visible: false},
|
|
|
|
|
{key: 1, label: `生产工序/工位编号`, visible: true},
|
|
|
|
|
{key: 2, label: `生产工序/工位名称`, visible: true},
|
|
|
|
|
{key: 3, label: `类别`, visible: false},
|
|
|
|
|
{key: 4, label: `所属产线`, visible: true},
|
|
|
|
|
{key: 5, label: `单位生产时间`, visible: true},
|
|
|
|
|
{key: 6, label: `日产能`, visible: true},
|
|
|
|
|
{key: 7, label: `月产能`, visible: true},
|
|
|
|
|
{key: 8, label: `启用标识`, visible: false},
|
|
|
|
|
{key: 9, label: `创建人`, visible: false},
|
|
|
|
|
{key: 10, label: `创建时间`, visible: false},
|
|
|
|
|
{key: 11, label: `更新人`, visible: false},
|
|
|
|
|
{key: 12, label: `更新时间`, visible: false},
|
|
|
|
|
{key: 13, label: `工位编号`, visible: true},
|
|
|
|
|
{key: 14, label: `工位名称`, visible: true},
|
|
|
|
|
],
|
|
|
|
|
// 产线选项
|
|
|
|
|
productLineList: [],
|
|
|
|
|
// 工位选项
|
|
|
|
@ -273,24 +286,24 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.$route.params != null){
|
|
|
|
|
if (this.$route.params != null) {
|
|
|
|
|
this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode;
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询生产工序/工位信息列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
async getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listProcessStation(this.queryParams).then(response => {
|
|
|
|
|
await findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
|
this.productLineList = response.data;
|
|
|
|
|
this.queryParams.productLineCode = response.data.find(val => val.productLineName === '一产线')?.productLineCode
|
|
|
|
|
})
|
|
|
|
|
await listProcessStation(this.queryParams).then(response => {
|
|
|
|
|
this.processStationList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
|
this.productLineList = response.data;
|
|
|
|
|
this.queryParams.productLineCode = response.data.find(val=>val.productLineName === '一产线')?.productLineCode
|
|
|
|
|
});
|
|
|
|
|
findProductLineList({productLineType: 2}).then(response => {
|
|
|
|
|
this.findStationList = response.data;
|
|
|
|
|
});
|
|
|
|
@ -334,7 +347,7 @@ export default {
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.objId)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
@ -344,13 +357,13 @@ export default {
|
|
|
|
|
this.title = "添加生产工序/工位信息";
|
|
|
|
|
},
|
|
|
|
|
/** 查看下级工位 */
|
|
|
|
|
findStation: function(row) {
|
|
|
|
|
findStation: function (row) {
|
|
|
|
|
const processCode = row.processCode;
|
|
|
|
|
this.$router.push("/base/productProcess-station/index/" + processCode);
|
|
|
|
|
},
|
|
|
|
|
/** 返回按钮操作 */
|
|
|
|
|
handleClose() {
|
|
|
|
|
const obj = { path: "/base/productLine" };
|
|
|
|
|
const obj = {path: "/base/productLine"};
|
|
|
|
|
this.$tab.closeOpenPage(obj);
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
@ -370,7 +383,7 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.parentId != null){
|
|
|
|
|
if (this.form.parentId != null) {
|
|
|
|
|
this.form.parentId = this.form.parentId.join(',');
|
|
|
|
|
}
|
|
|
|
|
if (this.form.objId != null) {
|
|
|
|
@ -392,12 +405,13 @@ export default {
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const objIds = row.objId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除生产工序/工位信息编号为"' + objIds + '"的数据项?').then(function() {
|
|
|
|
|
this.$modal.confirm('是否确认删除生产工序/工位信息编号为"' + objIds + '"的数据项?').then(function () {
|
|
|
|
|
return delProcessStation(objIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|