Commit f6181e16 authored by 沈翠玲's avatar 沈翠玲

生产工单编排分析

parent 765b5150
...@@ -183,4 +183,12 @@ export function tmtoolForcePass(data) { ...@@ -183,4 +183,12 @@ export function tmtoolForcePass(data) {
method: "post", method: "post",
data: data, data: data,
}); });
}
// 查询生产工单列表
export function proofMakeProductionByWorkunit(id) {
return request({
url: '/mes/pro/workorder/proofMakeProduction/workunit/' + id,
method: 'get'
})
} }
\ No newline at end of file
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="生产工单" prop="workorderCode"> <el-form-item label="生产工单" prop="workorderCodeList">
<el-input <el-input
v-model="queryParams.workorderCode" v-model="queryParams.workorderCodeList"
placeholder="请输入生产工单" placeholder="请输入生产工单"
type="textarea" :rows="2" resize="none"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="编排单号" prop="arrangeCodeList">
<el-input
v-model="queryParams.arrangeCodeList"
placeholder="请输入编排单号"
type="textarea" :rows="2" resize="none"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -78,6 +88,7 @@ ...@@ -78,6 +88,7 @@
<el-table v-loading="loading" :data="informationList" :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange" :max-height="maxHeight"> <el-table v-loading="loading" :data="informationList" :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange" :max-height="maxHeight">
<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="combinationCode" /> <el-table-column label="组合单号" align="center" prop="combinationCode" />
<el-table-column label="编排单号" align="center" prop="arrangeCode" />
<el-table-column align="center" prop="workorderCode" width="180"> <el-table-column align="center" prop="workorderCode" width="180">
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<div class="t-cell"> <div class="t-cell">
...@@ -290,8 +301,9 @@ export default { ...@@ -290,8 +301,9 @@ export default {
statusList: [], statusList: [],
seRouteCode: null, seRouteCode: null,
sapItemCodeList: null, sapItemCodeList: null,
arrangeCodeList: null,
abnormalType: null, abnormalType: null,
workorderCode: null, workorderCodeList: null,
requestDate: null, requestDate: null,
}, },
// 表单参数 // 表单参数
...@@ -360,7 +372,9 @@ export default { ...@@ -360,7 +372,9 @@ export default {
ascOrderKeyList: this.ascOrderKeyList, ascOrderKeyList: this.ascOrderKeyList,
descOrderKeyList: this.descOrderKeyList, descOrderKeyList: this.descOrderKeyList,
itemNameList: this.queryParams.itemNameList ? this.queryParams.itemNameList.split(/[\n,;,、;。]/).filter(item => item) : null, itemNameList: this.queryParams.itemNameList ? this.queryParams.itemNameList.split(/[\n,;,、;。]/).filter(item => item) : null,
sapItemCodeList: this.queryParams.sapItemCodeList ? this.queryParams.sapItemCodeList.split(/[\n,;,、;。]/).filter(item => item) : null sapItemCodeList: this.queryParams.sapItemCodeList ? this.queryParams.sapItemCodeList.split(/[\n,;,、;。]/).filter(item => item) : null,
arrangeCodeList: this.queryParams.arrangeCodeList ? this.queryParams.arrangeCodeList.split(/[\n,;,、;。]/).filter(item => item) : null,
workorderCodeList: this.queryParams.workorderCodeList ? this.queryParams.workorderCodeList.split(/[\n,;,、;。]/).filter(item => item) : null,
} }
listSecrecyissue(params).then(response => { listSecrecyissue(params).then(response => {
this.informationList = response.rows; this.informationList = response.rows;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="'tableData.' + scope.$index + '.workunitId'" <el-form-item :prop="'tableData.' + scope.$index + '.workunitId'"
:rules="rules.workunitId"> :rules="rules.workunitId">
<el-select v-model="scope.row.workunitId" placeholder="请选择" @focus="handleFous(scope.row)"> <el-select v-model="scope.row.workunitId" placeholder="请选择" @focus="handleFous(scope.row)" @change="e => changeWorkunit(e, scope.row)">
<el-option <el-option
v-for="(item,index) in scope.row.taskList" v-for="(item,index) in scope.row.taskList"
:key="index" :key="index"
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</template> </template>
<script> <script>
import { getProWorkOrderProcessList, workorderProofMakeProduction } from "@/api/mes/pro/workorder"; import { getProWorkOrderProcessList, workorderProofMakeProduction, proofMakeProductionByWorkunit } from "@/api/mes/pro/workorder";
import { gettaskWorkunitList } from '@/api/mes/pro/scheduleList' import { gettaskWorkunitList } from '@/api/mes/pro/scheduleList'
export default { export default {
...@@ -128,6 +128,14 @@ export default { ...@@ -128,6 +128,14 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
changeWorkunit(e, row) {
proofMakeProductionByWorkunit(e).then(res => {
if (res.data) {
row['scheduleStartTime'] = res.data.startDate
row['scheduleEndTime'] = res.data.endDate
}
})
},
/** 查询物料编码列表 */ /** 查询物料编码列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -1017,7 +1017,9 @@ export default { ...@@ -1017,7 +1017,9 @@ export default {
checkArrange(){ checkArrange(){
if(this.ids.length !== 2) return this.$message.warning('请选择两条工单记录进行分析!') if(this.ids.length !== 2) return this.$message.warning('请选择两条工单记录进行分析!')
checkArrange({workorderIdList: this.ids}).then(res => { checkArrange({workorderIdList: this.ids}).then(res => {
console.log('编排分析', res) if (res.code == 200) {
this.$modal.msgSuccess("可以编排在一起");
}
} }
) )
}, },
......
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