Commit 1a50c61f authored by 旭艳's avatar 旭艳

任务执行添加搜索和试图切换

parent 5ec31432
...@@ -102,6 +102,8 @@ export default { ...@@ -102,6 +102,8 @@ export default {
return '待办任务' return '待办任务'
} else if (obj.id === 'myMessage') { } else if (obj.id === 'myMessage') {
return '我的消息' return '我的消息'
} else if (obj.id === 'myTaskReceive' || obj.id === 'myCheckTaskReceive' || obj.id === 'myAirTaskReceive') {
return obj.path.title
} }
} }
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<sidebar class="sidebar-container" /> <sidebar class="sidebar-container" />
<div v-if="showNav" :class="{'fixed-header':fixedHeader}"> <div v-if="showNav" :class="{'fixed-header':fixedHeader}">
<navbar /> <navbar />
<div class="tag-box"> <div v-if="showTag" class="tag-box">
<tags-view /> <tags-view />
</div> </div>
</div> </div>
...@@ -37,7 +37,8 @@ export default { ...@@ -37,7 +37,8 @@ export default {
}, },
data: function() { data: function() {
return { return {
noSidePage: [] noSidePage: [],
showTag: false
} }
}, },
computed: { computed: {
...@@ -61,6 +62,7 @@ export default { ...@@ -61,6 +62,7 @@ export default {
}, },
watch: { watch: {
'$route'(route) { '$route'(route) {
this.showTag = this.$route.query.showTag !== 'false'
// if (this.noSidePage.length && this.noSidePage.includes(route.name)) { // if (this.noSidePage.length && this.noSidePage.includes(route.name)) {
// this.handleClickOutside() // this.handleClickOutside()
// } else { // } else {
......
...@@ -76,6 +76,34 @@ ...@@ -76,6 +76,34 @@
</el-col> </el-col>
</el-row> </el-row>
<div v-else class="process-page-not">暂无数据</div> <div v-else class="process-page-not">暂无数据</div>
<dl class="right-side">
<el-popover
v-model="visible"
placement="right"
width="230"
trigger="click"
popper-class="fuzzy-search-popper"
>
<div class="body">
<el-input v-model="aoName" size="mini" placeholder="AO号/名称" />
<footer>
<el-button size="mini" type="text" class="last-anchor" name="" @click="getTaskAcceptance()">查询</el-button>
</footer>
</div>
<dd slot="reference">
<i class="el-icon-search" />
<p>模糊搜索</p>
</dd>
</el-popover>
<dd @click="$parent.isShow = false">
<i class="icon iconfont el-icon-collection" />
<p>视图切换</p>
</dd>
<!-- <dd @click="$refs.TimeToSee.open()">
<span class="iconfont icon-view-mode" />
<p>工时查看</p>
</dd> -->
</dl>
</div> </div>
</div> </div>
</template> </template>
...@@ -83,7 +111,6 @@ ...@@ -83,7 +111,6 @@
<script> <script>
// import Dialog from './dialog' // import Dialog from './dialog'
// import TimeToSee from '@/views/mes/programExecutionManagement/assemblyPerform/components/TimeToSee/index' // import TimeToSee from '@/views/mes/programExecutionManagement/assemblyPerform/components/TimeToSee/index'
// import $ from 'jquery'
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'TaskReceiveCard', name: 'TaskReceiveCard',
...@@ -139,6 +166,7 @@ export default { ...@@ -139,6 +166,7 @@ export default {
}, },
data() { data() {
return { return {
visible: false,
joExecutePlanStateData: [], joExecutePlanStateData: [],
colorObj: { colorObj: {
1: '#6BA8E6', 1: '#6BA8E6',
...@@ -174,10 +202,6 @@ export default { ...@@ -174,10 +202,6 @@ export default {
created() { created() {
this.getJoExecutePlanState() this.getJoExecutePlanState()
}, },
// mounted() {
// this.getTaskAcceptance()
// },
methods: { methods: {
routerAssemblyExecution(item) { routerAssemblyExecution(item) {
// if (!item.isOK) { // if (!item.isOK) {
...@@ -227,12 +251,12 @@ export default { ...@@ -227,12 +251,12 @@ export default {
{ {
'fieldName': 'extProcessPlan.serialNumber', 'fieldName': 'extProcessPlan.serialNumber',
'operator': 'LIKE', 'operator': 'LIKE',
'value': '' 'value': this.aoName || ''
}, },
{ {
'fieldName': 'extProcessPlan.name', 'fieldName': 'extProcessPlan.name',
'operator': 'LIKE', 'operator': 'LIKE',
'value': '' 'value': this.aoName || ''
} }
], ],
'operator': 'OR' 'operator': 'OR'
...@@ -264,63 +288,59 @@ export default { ...@@ -264,63 +288,59 @@ export default {
}, },
'searchItem': { 'searchItem': {
'fieldName': 'joExecuteOpPlan.status', 'fieldName': 'joExecuteOpPlan.status',
'operator': 'IN', 'operator': this.$route.query.title === '装配任务' ? 'IN' : 'EQ',
'value': [ 'value': this.$route.query.title === '装配任务' ? ['Yes', 'UnderTest'] : this.$route.query.title === '检验任务' ? 'Yes' : 'UnderTest'
'Yes',
'UnderTest'
]
}, },
'operator': 'NEQ' 'operator': this.$route.query.title === '装配任务' ? 'NEQ' : 'EQ'
} }
that.processLoading = true that.processLoading = true
post('/JoExecutePlan/getTaskAcceptance', param) post('/JoExecutePlan/getTaskAcceptance', param)
.then((res) => { .then((res) => {
if (res && res.items) { if (res && res.items) {
const operator = []
const inspector = []
console.log(res.items)
if (res.items) { if (res.items) {
res.items.forEach(item => { res.items.forEach(item => {
if (item.prodTask) { if (item.prodTask) {
item.operatPerson = []
item.inspectPerson = []
item.prodTask.forEach(element => { item.prodTask.forEach(element => {
if (element.subTypeName === 'CheckOut') { if (element.subTypeName === 'CheckOut') {
inspector.push(element.extProcessSkillUser.dxUserInfo.name) item.inspectPerson.push(element.extProcessSkillUser.dxUserInfo.name)
} else if (element.subTypeName === 'FitOut') { } else if (element.subTypeName === 'FitOut') {
operator.push(element.extProcessSkillUser.dxUserInfo.name) item.operatPerson.push(element.extProcessSkillUser.dxUserInfo.name)
} }
}) })
} }
}) })
} }
console.log(operator, inspector)
that.processData = res.items.map((p) => { that.processData = res.items.map((p) => {
return { return {
id: p.id, id: p.id,
status: p.planState, status: p.planState,
code: p.extProcessPlan.serialNumber, code: p.extProcessPlan.serialNumber,
sortie: p.extProcessPlan.sorties, sortie: p.extProcessPlan.sorties,
// percent: percent:
// p.isOkOpPlan && p.allOpPlan ? p.isOkOpPlan / p.allOpPlan : 0, p.isOkOpPlan && p.allOpPlan ? p.isOkOpPlan / p.allOpPlan : 0,
operator: operator.join(' '), operator: p.operatPerson.join(' '),
priorCompletion: p.preIsAccomplish, priorCompletion: p.preIsAccomplish,
start: p.scheduledStart, start: p.scheduledStart,
end: p.scheduledEnd, end: p.scheduledEnd,
inspector: inspector.join(' '), inspector: p.inspectPerson.join(' '),
task: p.extProcessPlan.materName, task: p.extProcessPlan.name,
gaceVersion: p.extProcessPlan.gaceVersion, gaceVersion: p.extProcessPlan.gaceVersion,
ready: p.extProcessPlan.fitRates, ready: p.extProcessPlan.fitRates,
// outStatus: p.outStatus, outStatus: p.outStatus,
// step: p.isOkOpPlan, step: p.isOkOpPlan,
// countStep: p.allOpPlan, countStep: p.allOpPlan,
firstCheckFlag: p.extProcessPlan.firstCheckFlag, firstCheckFlag: p.extProcessPlan.firstCheckFlag,
// // 不合格产品 // // 不合格产品
// isQualified: p.isQualified, isQualified: p.isQualified,
isExit: p.isExit isExit: p.isExit,
// isOK: p.isOK, isOK: p.planVer === p.extProcessPlan.gaceVersion,
// // 例外放行 // // 例外放行
// isException: p.isException isException: p.isException
} }
}) })
this.visible = false
} else { } else {
this.$message({ this.$message({
showClose: true, showClose: true,
...@@ -627,7 +647,7 @@ export default { ...@@ -627,7 +647,7 @@ export default {
.right-side { .right-side {
position: fixed; position: fixed;
right: 0px; right: 0px;
bottom: 0px; bottom: 20px;
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;
line-height: 29px; line-height: 29px;
...@@ -637,6 +657,9 @@ export default { ...@@ -637,6 +657,9 @@ export default {
// overflow: auto; // overflow: auto;
// right: 6px; // right: 6px;
// } // }
dd {
margin-inline-start:0;
}
dd.el-popover__reference { dd.el-popover__reference {
padding: 10px; padding: 10px;
font-size: 14px; font-size: 14px;
......
<!--
* @Author: ljm
* @Date: 2021-04-15
* @LastEditTime:
* @Description: 任务接收
* @FilePath: applications/dee-mes/src/viewsapplications/dee-mes/src/views/mes/programExecutionManagement/taskReceive/components/taskReceiveTable/index
-->
<template> <template>
<section class="taskReceiveTable"> <section class="taskReceiveTable">
<div class="header"> <div class="header">
...@@ -17,12 +10,12 @@ ...@@ -17,12 +10,12 @@
placeholder="请选择" placeholder="请选择"
:loading="modelLoading" :loading="modelLoading"
clearable clearable
@change="getAddRecursion" @change="changeModel"
> >
<el-option <el-option
v-for="item in modelData" v-for="item in modelData"
:key="item.id" :key="item.id"
:label="item.resName" :label="item.defName"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
...@@ -35,11 +28,12 @@ ...@@ -35,11 +28,12 @@
clearable clearable
placeholder="请选择" placeholder="请选择"
:loading="sortiesLoading" :loading="sortiesLoading"
@change="changeSorties"
> >
<el-option <el-option
v-for="item in sortiesData" v-for="item in sortiesData"
:key="item.id" :key="item.id"
:label="item.serialNo" :label="item.defName"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
...@@ -79,9 +73,11 @@ export default { ...@@ -79,9 +73,11 @@ export default {
data() { data() {
return { return {
model: null, model: null,
modelName: null,
modelLoading: false, modelLoading: false,
modelData: [], modelData: [],
sorties: null, sorties: null,
sortiesName: null,
sortiesLoading: false, sortiesLoading: false,
sortiesData: [], sortiesData: [],
aoName: null aoName: null
...@@ -92,20 +88,21 @@ export default { ...@@ -92,20 +88,21 @@ export default {
this.getAddModel(true) this.getAddModel(true)
}, },
methods: { methods: {
changeModel() {
const model = this.modelData.find(r => r.id === this.model)
this.$set(this, 'modelName', model && model.defName || '')
this.getAddRecursion()
},
changeSorties() {
const sorties = this.sortiesData.find(r => r.id === this.sorties)
this.$set(this, 'sortiesName', sorties && sorties.defName || '')
this.getTableData()
},
/** /**
* 获取新增机型 * 获取新增机型
*/ */
getAddModel(status) { getAddModel(status) {
const param = { this.$api.searchApi('AircraftType', {})
indices: ['DxProcessProduct'],
sortItem: [
{
fieldName: 'modifyTime',
sortOrder: 'desc'
}
]
}
this.HttpRequest('/DxProcessProduct/find/recursion', param, 'post')
.then((res) => { .then((res) => {
this.modelData = [] this.modelData = []
if (res.items && res.items.content) { if (res.items && res.items.content) {
...@@ -113,6 +110,7 @@ export default { ...@@ -113,6 +110,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.modelData.length) { if (this.modelData.length) {
this.model = this.modelData[0].id this.model = this.modelData[0].id
this.modelName = this.modelData[0].defName
this.getAddRecursion(status) this.getAddRecursion(status)
} }
}) })
...@@ -141,48 +139,19 @@ export default { ...@@ -141,48 +139,19 @@ export default {
this.sorties = null this.sorties = null
} }
const param = { const param = {
indices: ['DxProcessMaterialLot'],
openProps: [
{
name: 'dxProcessMaterial',
searchItems: {
items: [
{
fieldName: 'id',
operator: 'EQ',
value: this.model
}
],
operator: 'AND'
},
parentFilter: true
}
],
searchItems: { searchItems: {
items: [ items: [{ 'fieldName': 'aircraftTypeId', operator: 'EQ', value: this.model }],
{
fieldName: 'dxProcessPlanIdType',
operator: 'EQ',
value: 'DxProcessPlan'
}
],
operator: 'AND' operator: 'AND'
},
sortItem: [
{
fieldName: 'modifyTime',
sortOrder: 'desc'
} }
]
} }
this.HttpRequest('/DxProcessMaterialLot/find/recursion', param, 'post') this.$api.searchApi('AircraftSorties', param).then((res) => {
.then((res) => {
this.sortiesData = [] this.sortiesData = []
if (res) { if (res) {
this.sortiesData = res && res.items && res.items.content this.sortiesData = res && res.items && res.items.content
this.$nextTick(() => { this.$nextTick(() => {
if (this.sortiesData.length) { if (this.sortiesData.length) {
this.sorties = this.sortiesData[0].id this.sorties = this.sortiesData[0].id
this.sortiesName = this.sortiesData[0].defName
if (status) { if (status) {
this.getTableData() this.getTableData()
} }
......
...@@ -5,17 +5,10 @@ ...@@ -5,17 +5,10 @@
v-loading="loading" v-loading="loading"
:data="tableData" :data="tableData"
border border
height="100%" height="95%"
size="mini" size="mini"
> >
<el-table-column type="index" width="60" align="center" label="序号" /> <el-table-column type="index" width="60" align="center" label="序号" />
<el-table-column
prop="dxProcessPlanAssemblyUnitNo"
label="装配单元"
min-width="120"
align="center"
show-overflow-tooltip
/>
<el-table-column <el-table-column
prop="serialNumber" prop="serialNumber"
label="AO号" label="AO号"
...@@ -48,7 +41,6 @@ ...@@ -48,7 +41,6 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:red">{{ scope.row.operating.main }}</span>
<span>{{ scope.row.operating.vice }}</span> <span>{{ scope.row.operating.vice }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -63,7 +55,7 @@ ...@@ -63,7 +55,7 @@
show-overflow-tooltip show-overflow-tooltip
/> />
</el-table> </el-table>
<!-- <el-pagination <el-pagination
:current-page="tablePagination.currentPage" :current-page="tablePagination.currentPage"
:page-sizes="tablePagination.pageSizes" :page-sizes="tablePagination.pageSizes"
:page-size="tablePagination.pageSize" :page-size="tablePagination.pageSize"
...@@ -71,10 +63,11 @@ ...@@ -71,10 +63,11 @@
:total="tablePagination.total" :total="tablePagination.total"
@size-change="setPage" @size-change="setPage"
@current-change="setPage($event, true)" @current-change="setPage($event, true)"
/> --> />
</section> </section>
</template> </template>
<script> <script>
import { post } from '@/utils/http'
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -90,13 +83,6 @@ export default { ...@@ -90,13 +83,6 @@ export default {
}, },
// 所有可动态配置的表格列 // 所有可动态配置的表格列
tableColums1: [ tableColums1: [
// {
// title: 'AO号',
// show: true,
// key: 'serialNumber',
// sortable: true,
// width: '120'
// },
{ {
title: 'AO名称', title: 'AO名称',
show: true, show: true,
...@@ -161,51 +147,16 @@ export default { ...@@ -161,51 +147,16 @@ export default {
} }
}, },
created() { created() {
Promise.all([this.getJoExecutePlanState(), this.getTableData()]) this.getJoExecutePlanState()
// this.getJoExecutePlanState()
},
mounted() {
// this.getTableData()
}, },
methods: { methods: {
/** /**
* 获取作业计划状态 * 获取作业计划状态
*/ */
getJoExecutePlanState() { getJoExecutePlanState() {
const that = this this.$utils.getDicListByCode('PlanState').then(res => {
var param = { this.joExecutePlanStateData = res
pageFrom: 1,
pageSize: 100000,
searchItems: {
items: [
{ fieldName: 'dictState', operator: 'EQ', value: 'ENABLE' },
{
fieldName: 'dictCode',
operator: 'EQ',
value: 'JoExecutePlanState'
}
]
},
sortItem: [{ fieldName: 'dictSeq', sortOrder: 'asc' }]
}
this.HttpRequest('DictData/search', param, 'post')
.then((res) => {
if (res) {
if (res.items && res.items.content.length) {
that.joExecutePlanStateData = res.items.content
} else {
that.joExecutePlanStateData = []
}
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
}) })
.catch((err) => console.error(err))
.finally(() => {})
}, },
/** /**
* 页码触发 * 页码触发
...@@ -222,87 +173,112 @@ export default { ...@@ -222,87 +173,112 @@ export default {
getTableData() { getTableData() {
const that = this const that = this
var param = { var param = {
indices: ['DxProcessPlan'],
pageFrom: that.tablePagination.currentPage, pageFrom: that.tablePagination.currentPage,
pageSize: that.tablePagination.pageSize, pageSize: that.tablePagination.pageSize,
searchItems: { 'searchItems': {
items: [ 'children': [
{
'items': [
{ {
fieldName: 'id', 'fieldName': 'prodTask.extProcessSkillUser.dxUserInfoId',
operator: 'EQ', 'operator': 'EQ',
value: localStorage.getItem('userId') 'value': 1626781927440
}, },
{ {
fieldName: 'serialId', 'fieldName': 'extProcessPlan.sorties',
operator: 'LIKE', 'operator': 'EQ',
value: this.$parent.sorties 'value': this.$parent.sortiesName
}, },
{ {
fieldName: 'aoName', 'fieldName': 'extProcessPlan.planeType',
operator: 'LIKE', 'operator': 'EQ',
value: this.$parent.aoName 'value': this.$parent.modelName
}
],
'operator': 'AND'
}, },
{ {
fieldName: 'isView', 'items': [
operator: 'LIKE', {
value: 'Y' 'fieldName': 'extProcessPlan.serialNumber',
'operator': 'LIKE',
'value': this.$parent.aoName || ''
},
{
'fieldName': 'extProcessPlan.name',
'operator': 'LIKE',
'value': this.$parent.aoName || ''
}
],
'operator': 'OR'
} }
], ],
operator: 'AND' 'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessPlan'
}, },
sortItem: [
{ {
fieldName: 'modifyTime', 'name': 'prodTask',
sortOrder: 'desc' 'openProps': [
{
'name': 'extProcessSkillUser'
} }
] ]
} }
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
that.processLoading = true that.processLoading = true
this.HttpRequest('/JoExecutePlan/getTaskAcceptance', param, 'post') post('/JoExecutePlan/getTaskAcceptanceToDo', param)
.then((res) => { .then((res) => {
if (res && res.items) { if (res && res.items && res.items.content) {
that.tableData = res.items.map((p) => { that.tableData = res.items.content.map((p) => {
var vice = (p.operating &&
p.operating.filter(t => t.userName !== p.masterOprName)
.map((q) => {
return q.userName
})
.join(',')) ||
''
return { return {
id: p.id, id: p.id,
dxProcessPlanAssemblyUnitNo: p.dxProcessPlanAssemblyUnitNo, // dxProcessPlanAssemblyUnitNo: p.wrProduction,
serialNumber: p.ao.serialNumber, serialNumber: p.extProcessPlan.serialNumber,
materName: p.ao.materName, materName: p.extProcessPlan.name,
isOK: p.isOK, isOK: p.isOK,
gaceVersion: p.ao.gaceVersion, gaceVersion: p.extProcessPlan.gaceVersion,
scheduledStart: p.scheduledStart, scheduledStart: p.scheduledStart,
scheduledEnd: p.scheduledEnd, scheduledEnd: p.scheduledEnd,
allWorkHour: p.ao.countWorkHour, allWorkHour: p.extProcessPlan.workHour,
operating: { operating: {
main: p.masterOprName || '', vice: (p.prodTask &&
vice: p.masterOprName && vice ? ', ' + vice : vice p.prodTask.filter(t => t.subTypeName === 'FitOut')
.map((q) => {
return q.extProcessSkillUser.dxUserInfo.name
})
.join(' '))
}, },
operatorUser: operatorUser:
(p.examines && (p.prodTask &&
p.examines p.prodTask.filter(t => t.subTypeName === 'CheckOut')
.map((q) => { .map((q) => {
return q.userName return q.extProcessSkillUser.dxUserInfo.name
}) })
.join(',')) || .join(' ')),
'',
planStateCode: planStateCode:
(p.planStateCode && (p.planState &&
that.joExecutePlanStateData.filter( that.joExecutePlanStateData.filter(
(q) => q.dictKey === p.planStateCode (q) => q.value === p.planState
)[0].dictValue) || )[0].label) ||
'', '',
percentage: (p.isOkOpPlan && p.allOpPlan percentage: (p.isOkOpPlan && p.allOpPlan
? Math.round((p.isOkOpPlan / p.allOpPlan) * 1000) / 10 : 0) + ? Math.round((p.isOkOpPlan / p.allOpPlan) * 1000) / 10 : 0) +
'%' '%'
} }
}) })
that.tablePagination.total = res.items.total that.tablePagination.total = res.items.totalElements
} else { } else {
this.$message({ this.$message({
showClose: true, showClose: true,
......
<template> <template>
<section class="taskReceive"> <section class="taskReceive">
<!-- <IpadHeader /> -->
<TaskReceiveCard v-if="isShow" /> <TaskReceiveCard v-if="isShow" />
<TaskReceiveTable v-else /> <TaskReceiveTable v-else />
</section> </section>
</template> </template>
<script> <script>
// import IpadHeader from '../ipadHeader'
import TaskReceiveCard from './components/taskReceiveCard/index' import TaskReceiveCard from './components/taskReceiveCard/index'
import TaskReceiveTable from './components/taskReceiveTable/index' import TaskReceiveTable from './components/taskReceiveTable/index'
export default { export default {
name: 'TaskReceive', name: 'TaskReceive',
components: { components: {
// IpadHeader,
TaskReceiveCard, TaskReceiveCard,
TaskReceiveTable TaskReceiveTable
}, },
......
<template> <template>
<div v-if="show&&module.total>0" class="my-custom-module" @click="goModule(module)"> <div v-if="show" class="my-custom-module" @click="goModule(module)">
<div class="custom-module-title">{{ module.name }}</div> <div class="custom-module-title">{{ module.name }}</div>
<div class="custom-module-content"> <div class="custom-module-content">
<div class="custom-module-content-item"> <div class="custom-module-content-item">
...@@ -78,10 +78,10 @@ export default { ...@@ -78,10 +78,10 @@ export default {
async goModule(module) { async goModule(module) {
this.$router.push({ this.$router.push({
path: module.originRoute, path: module.originRoute,
// meta: { disnav: false },
query: { query: {
title: module.name, title: module.name,
showMenu: module.showMenu showMenu: module.showMenu,
showTag: 'false'
} }
}) })
this.$store.dispatch('menu/activeModel', { this.$store.dispatch('menu/activeModel', {
......
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