Commit 214a0b6d authored by 赵汉亭's avatar 赵汉亭

BOM页面及工艺路线

parent 573cd23a
import request from '@/utils/request'
// 查询生产BOM列表
export function listBom(query) {
return request({
url: '/mes/pro/bom/list',
method: 'get',
params: query
})
}
// 查询所有有效生产BOM
export function listAllBom() {
return request({
url: '/mes/pro/bom/listAll',
method: 'get'
})
}
// 查询生产BOM详细
export function getBom(bomId) {
return request({
url: '/mes/pro/bom/' + bomId,
method: 'get'
})
}
// 新增生产BOM
export function addBom(data) {
return request({
url: '/mes/pro/bom',
method: 'post',
data: data
})
}
// 修改生产BOM
export function updateBom(data) {
return request({
url: '/mes/pro/bom',
method: 'put',
data: data
})
}
// 删除生产BOM
export function delBom(bomId) {
return request({
url: '/mes/pro/bom/' + bomId,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询生产BOM组件列表
export function listBomItem(query) {
return request({
url: '/mes/pro/bomItem/list',
method: 'get',
params: query
})
}
// 查询生产BOM组件详细
export function getBomItem(bomItemId) {
return request({
url: '/mes/pro/bomItem/' + bomItemId,
method: 'get'
})
}
// 新增生产BOM组件
export function addBomItem(data) {
return request({
url: '/mes/pro/bomItem',
method: 'post',
data: data
})
}
// 修改生产BOM组件
export function updateBomItem(data) {
return request({
url: '/mes/pro/bomItem',
method: 'put',
data: data
})
}
// 删除生产BOM组件
export function delBomItem(bomItemId) {
return request({
url: '/mes/pro/bomItem/' + bomItemId,
method: 'delete'
})
}
<template>
<el-dialog
title="用途选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="57%"
center
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="用途编码" prop="usageCode">
<el-input
v-model="queryParams.usageCode"
placeholder="请输入用途编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用途名称" prop="usageName">
<el-input
v-model="queryParams.usageName"
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-table
v-loading="loading"
:data="usageList"
@current-change="handleCurrent"
@row-dblclick="handleRowDbClick"
>
<el-table-column width="200" align="center">
<template v-slot="scope">
<el-radio
v-model="selectedusageId"
:label="scope.row.usageId"
@change="handleRowChange(scope.row)"
>{{ "" }}</el-radio
>
</template>
</el-table-column>
<el-table-column label="用途编码" width="200" prop="usageCode">
</el-table-column>
<el-table-column
label="用途名称"
width="100"
align="center"
prop="usageName"
:show-overflow-tooltip="true"
/>
<el-table-column label="备注" width="400" align="center" prop="remark">
<template slot-scope="scope">
<dict-tag
:options="dict.type.mes_usage_sourcetype"
:value="scope.row.orderSource"
/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listUsage } from "@/api/mes/pro/usage";
export default {
name: "UsageSelectSingle",
components: {},
dicts: ["mes_order_status", "mes_workorder_sourcetype"],
// props:{
// workorder: {
// type: Object,
// default: function(){
// return {'workorderType': 'SELF'}
// }} //外部传入的用途过滤信息
// },
data() {
return {
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
selectedUsageId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 生产用途表格数据
usageList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
usageCode: null,
usageName: null,
},
// 列信息
columns: [
{ key: 0, label: `用途编码`, visible: true },
{ key: 1, label: `用途名称`, visible: true },
{ key: 2, label: `备注`, visible: true },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询生产用途列表 */
getList() {
this.loading = true;
listUsage(this.queryParams).then((response) => {
this.usageList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row) {
if (row) {
this.selectedRows = row;
}
},
// 单选选中数据
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
//确定选中
confirmSelect() {
if (this.selectedUsageId == null || this.selectedUsageId == 0) {
this.$notify({
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
},
},
};
</script>
<template>
<el-dialog title="工作站选择"
<el-dialog
title="工作站选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
:modal="false"
width="80%"
center
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-row>
<el-col :span="7">
<el-form-item label="工作站编号" prop="workstationCode">
<el-form-item
label="工作站编号"
label-width="120"
prop="workstationCode"
>
<el-input
v-model="queryParams.workstationCode"
placeholder="请输入工作站编号"
......@@ -19,7 +31,7 @@
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="所属工序" prop="processName">
<el-form-item label="所属工序" prop="processId">
<el-select v-model="queryParams.processId" placeholder="请选择工序">
<el-option
v-for="item in processOptions"
......@@ -32,7 +44,10 @@
</el-col>
<el-col :span="7">
<el-form-item label="所在车间" prop="workshopName">
<el-select v-model="queryParams.workshopId" placeholder="请选择车间">
<el-select
v-model="queryParams.workshopId"
placeholder="请选择车间"
>
<el-option
v-for="item in workshopOptions"
:key="item.workshopId"
......@@ -44,34 +59,63 @@
</el-col>
<el-col :span="3">
<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-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-col>
</el-row>
<el-row>
<el-col :span="24">
</el-col>
<el-col :span="24"> </el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="workstationList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="55" align="center" >
<el-table
v-loading="loading"
:data="workstationList"
@current-change="handleCurrent"
@row-dblclick="handleRowDbClick"
>
<el-table-column width="55" align="center">
<template v-slot="scope">
<el-radio v-model="selectedWorkstationId" :label="scope.row.workstationId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
<el-radio
v-model="selectedWorkstationId"
:label="scope.row.workstationId"
@change="handleRowChange(scope.row)"
>{{ "" }}</el-radio
>
</template>
</el-table-column>
<el-table-column label="工作站编号" align="center" prop="workstationCode" >
<el-table-column label="工作站编号" align="center" prop="workstationCode">
</el-table-column>
<el-table-column label="工作站名称" align="center" prop="workstationName" />
<el-table-column label="工作站地点" align="center" prop="workstationAddress" />
<el-table-column label="所在车间名称" align="center" prop="workshopName" />
<el-table-column
label="工作站名称"
align="center"
prop="workstationName"
/>
<el-table-column
label="工作站地点"
align="center"
prop="workstationAddress"
/>
<el-table-column
label="所在车间名称"
align="center"
prop="workshopName"
/>
<el-table-column label="所属工序" align="center" prop="processName" />
<el-table-column label="标准工时" align="center" prop="stdWorkingTime" />
<el-table-column label="备注" align="center" prop="remark" />
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
......@@ -79,21 +123,29 @@
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag=false">取 消</el-button>
<el-button @click="showFlag = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listWorkstation, getWorkstation, delWorkstation, addWorkstation, updateWorkstation } from "@/api/mes/md/workstation";
import {listAllProcess} from "@/api/mes/pro/process";
import {
listWorkstation,
getWorkstation,
delWorkstation,
addWorkstation,
updateWorkstation,
} from "@/api/mes/md/workstation";
import { listAllProcess } from "@/api/mes/pro/process";
import { listAllWorkshop } from "@/api/mes/md/workshop";
export default {
name: "WorkstationSelect",
dicts: ['sys_yes_no'],
dicts: ["sys_yes_no"],
data() {
return {
showFlag:false,
// processId: this.processId,
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
......@@ -110,9 +162,9 @@ export default {
// 工作站表格数据
workstationList: [],
//车间选项
workshopOptions:[],
workshopOptions: [],
//工序选项
processOptions:[],
processOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -127,42 +179,56 @@ export default {
workshopId: null,
workshopCode: null,
workshopName: null,
processId: this.processId,
processId: null,
processCode: null,
processName: null,
enableFlag: null,
stdWorkingTime: null,
},
// 表单参数
form: {},
};
},
props:{
processId: undefined //外部传入的工序过滤条件
props: {
processId: {
type: Number | undefined,
default: undefined,
}, //外部传入的工序过滤条件
},
created() {
this.getList();
this.getWorkshops();
this.getProcess();
},
watch: {
processId: {
handler(val) {
this.queryParams.processId = val;
this.getList();
},
immediate: true,
},
},
methods: {
/** 查询工作站列表 */
getList() {
this.loading = true;
listWorkstation(this.queryParams).then(response => {
listWorkstation(this.queryParams).then((response) => {
console.log(this.queryParams);
this.workstationList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//查询车间信息
getWorkshops(){
listAllWorkshop().then( response => {
getWorkshops() {
listAllWorkshop().then((response) => {
this.workshopOptions = response.data;
});
},
//查询工序信息
getProcess(){
listAllProcess().then( response =>{
getProcess() {
listAllProcess().then((response) => {
this.processOptions = response.data;
});
},
......@@ -184,12 +250,13 @@ export default {
processId: null,
processCode: null,
processName: null,
enableFlag: 'Y',
enableFlag: "Y",
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
stdWorkingTime: null,
};
this.resetForm("form");
},
......@@ -203,38 +270,41 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row){
if(row){
handleCurrent(row) {
if (row) {
this.selectedRows = row;
}
},
// 单选选中数据
handleRowChange(row) {
if(row){
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row){
if(row){
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit('onSelected',this.selectedRows);
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
//确定选中
confirmSelect(){
if(this.selectedWorkstationId == null || this.selectedWorkstationId == 0){
confirmSelect() {
if (
this.selectedWorkstationId == null ||
this.selectedWorkstationId == 0
) {
this.$notify({
title:'提示',
type:'warning',
message: '请至少选择一条数据!'
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit('onSelected',this.selectedRows);
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
}
},
},
};
</script>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div class="app-container">
<el-row v-if="optType !='view'" :gutter="10" class="mb8">
<el-row v-if="optType != 'view'" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
......@@ -9,7 +9,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['mes:pro:process:add']"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
......@@ -20,7 +21,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:pro:process:edit']"
>修改</el-button>
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
......@@ -31,7 +33,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:pro:process:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
......@@ -41,19 +44,54 @@
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:process:export']"
>导出</el-button>
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="processcontentList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="processcontentList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="顺序编号" align="center" prop="orderNum" />
<el-table-column label="步骤说明" width="400px" align="center" prop="contentText" :show-overflow-tooltip="true"/>
<el-table-column label="辅助设备" align="center" prop="device" :show-overflow-tooltip="true"/>
<el-table-column label="辅助材料" align="center" prop="material" :show-overflow-tooltip="true"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" width="100px" v-if="optType !='view'" align="center" class-name="small-padding fixed-width">
<el-table-column
label="步骤说明"
width="400px"
align="center"
prop="contentText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="辅助设备"
align="center"
prop="device"
:show-overflow-tooltip="true"
/>
<el-table-column
label="辅助材料"
align="center"
prop="material"
:show-overflow-tooltip="true"
/>
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
width="100px"
v-if="optType != 'view'"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
......@@ -61,20 +99,22 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:process:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:process:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
......@@ -84,10 +124,14 @@
<!-- 添加或修改生产工序内容对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row >
<el-row>
<el-col :span="12">
<el-form-item label="顺序编号" prop="orderNum">
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入顺序编号" />
<el-input-number
:min="1"
v-model="form.orderNum"
placeholder="请输入顺序编号"
/>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -111,14 +155,22 @@
<el-row>
<el-col :span="24">
<el-form-item label="步骤说明" prop="contentText">
<el-input v-model="form.contentText" type="textarea" placeholder="请输入内容" />
<el-input
v-model="form.contentText"
type="textarea"
placeholder="请输入内容"
/>
</el-form-item>
</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-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
......@@ -132,7 +184,13 @@
</template>
<script>
import { listProcesscontent, getProcesscontent, delProcesscontent, addProcesscontent, updateProcesscontent } from "@/api/mes/pro/processcontent";
import {
listProcesscontent,
getProcesscontent,
delProcesscontent,
addProcesscontent,
updateProcesscontent,
} from "@/api/mes/pro/processcontent";
export default {
name: "Processcontent",
......@@ -172,14 +230,14 @@ export default {
// 表单校验
rules: {
processId: [
{ required: true, message: "工序不能为空", trigger: "blur" }
{ required: true, message: "工序不能为空", trigger: "blur" },
],
}
},
};
},
props :{
props: {
processId: undefined,
optType: undefined
optType: undefined,
},
created() {
this.getList();
......@@ -188,7 +246,7 @@ export default {
/** 查询生产工序内容列表 */
getList() {
this.loading = true;
listProcesscontent(this.queryParams).then(response => {
listProcesscontent(this.queryParams).then((response) => {
this.processcontentList = response.rows;
this.total = response.total;
this.loading = false;
......@@ -213,7 +271,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
};
this.resetForm("form");
},
......@@ -229,9 +287,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.contentId)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.contentId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
......@@ -242,8 +300,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const contentId = row.contentId || this.ids
getProcesscontent(contentId).then(response => {
const contentId = row.contentId || this.ids;
getProcesscontent(contentId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改操作步骤";
......@@ -251,16 +309,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.contentId != null) {
updateProcesscontent(this.form).then(response => {
updateProcesscontent(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addProcesscontent(this.form).then(response => {
addProcesscontent(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
......@@ -272,19 +330,27 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const contentIds = row.contentId || this.ids;
this.$modal.confirm('是否确认删除操作步骤?').then(function() {
this.$modal
.confirm("是否确认删除操作步骤?")
.then(function () {
return delProcesscontent(contentIds);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/pro/processcontent/export', {
...this.queryParams
}, `processcontent_${new Date().getTime()}.xlsx`)
}
}
this.download(
"mes/pro/processcontent/export",
{
...this.queryParams,
},
`processcontent_${new Date().getTime()}.xlsx`
);
},
},
};
</script>
......@@ -96,14 +96,14 @@
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row>
<el-col :span="12">
<el-form-item label="序号" prop="orderNum">
<el-col :span="8">
<el-form-item label="序号" width="120px" prop="orderNum">
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入序号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="工序" prop="processId">
<el-select v-model="form.processId" placeholder="请选择工序">
<el-select v-model="form.processId" placeholder="请选择工序" @change="changeProcessId">
<el-option
v-for="item in processOptions"
:key="item.processId"
......@@ -113,9 +113,7 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="与下一道工序关系" prop="linkType">
<el-tooltip effect="dark" placement="right">
<div slot="content">
......@@ -140,12 +138,10 @@
<el-color-picker v-model="form.colorCode"></el-color-picker>
</el-form-item>
</el-col>
<el-col :span="7">
<el-input v-model="form.colorCode" maxlength="7" placeholder="请输入颜色编码在左侧选择颜色" />
<el-col :span="2">
<el-input v-model="form.colorCode" style="left: 5px" maxlength="7" placeholder="请输入颜色编码在左侧选择颜色" />
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="7">
<el-form-item label="是否关键工序" prop="keyFlag">
<el-tooltip effect="dark" placement="right">
<div slot="content">
......@@ -163,7 +159,7 @@
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="是否需要质检确认" prop="isCheck">
<el-tooltip effect="dark" placement="right">
<div slot="content">
......@@ -181,8 +177,6 @@
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="准备时间" prop="defaultPreTime">
<el-tooltip effect="dark" content="当前系统支持的最小时间粒度为1小时" placement="right">
......@@ -195,8 +189,27 @@
<el-input-number :min="0" :step="1" v-model="form.defaultSufTime" placeholder="请输入等待时间" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工作站" prop="workstationId">
<el-input
v-model="form.workstationName"
disabled
placeholder="请选择工作站信息"
>
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect ref="WorkstationSelect" :processId="form.processId" @onSelected="onWorkstationSelected"></WorkstationSelect>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="标准工时" prop="stdWorkingTime">
<el-input-number :min="0" :step="0.1" v-model="form.stdWorkingTime" placeholder="请输入标准工时" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
......@@ -216,9 +229,12 @@
<script>
import { listRouteprocess, getRouteprocess, delRouteprocess, addRouteprocess, updateRouteprocess } from "@/api/mes/pro/routeprocess";
import {listAllProcess} from "@/api/mes/pro/process";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
import { log } from 'three';
export default {
name: "Routeprocess",
dicts: ['mes_link_type','sys_yes_no'],
components: {WorkstationSelect},
data() {
return {
// 遮罩层
......@@ -276,6 +292,9 @@ export default {
],
isCheck: [
{ required: true, message: "请指定当前工序是否需要质检确认", trigger: "blur" }
],
workstationId: [
{ required: true, message: "请选择工作站", trigger: "blur" }
]
}
};
......@@ -301,9 +320,22 @@ export default {
//查询工序信息
getProcess(){
listAllProcess().then( response =>{
console.log(response.data)
this.processOptions = response.data;
console.log(this.processOptions.processId)
});
},
// 查询工作站信息
handleWorkstationSelect() {
this.$refs.WorkstationSelect.showFlag = true;
},
onWorkstationSelected(row) {
if (row != undefined && row != null) {
this.form.workstationId = row.workstationId;
this.form.workstationName = row.workstationName;
this.form.stdWorkingTime = row.stdWorkingTime;
}
},
// 取消按钮
cancel() {
this.open = false;
......@@ -327,14 +359,13 @@ export default {
defaultSufTime: 0,
colorCode: '#00AEF3',
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
workstationId: null,
workstationName: null,
stdWorkingTime: null
};
this.resetForm("form");
},
......@@ -389,6 +420,23 @@ export default {
}
}
});
},
// 工序改变
changeProcessId(){
this.form.workstationId = ''
this.form.workstationName = ''
this.form.stdWorkingTime = ''
// watch:{
// processId(newValue){
// alert("工序发生改变,请重新选择工作站");
// this.form={
// workstationId : null,
// workstationName: null,
// stdWorkingTime: null
// }
// }
},
/** 删除按钮操作 */
handleDelete(row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment