Commit 8f443767 authored by 旭艳's avatar 旭艳

站位计划列表开发-控制按钮显示

parent 123f282c
......@@ -76,6 +76,7 @@ export default {
}
},
created() {
this.$emit('input', this.form)
this.getModelData()
this.getSortiesList()
},
......@@ -83,7 +84,6 @@ export default {
// 组件方法
methods: {
changeFrom(val) {
console.log(this.form)
this.$emit('input', val)
},
getStation(val) {
......@@ -107,6 +107,7 @@ export default {
})
this.$set(this.form, 'postion', this.postionList[0].value)
this.$set(this.form, 'postionName', this.postionList[0].label)
this.$bus.$emit('getTableData', this.form)
}
})
}
......
......@@ -11,6 +11,7 @@
<template slot="paneL">
<div class="three-member-wrap">
<dee-as-com
ref="detailCom"
:key="layConfig.typeName"
:lay-config="layConfig"
@row-click="rowClick"
......@@ -34,6 +35,7 @@
</template>
<script>
import { post } from '@/utils/http'
import searchBar from './searchBar.vue'
import station from './station.vue'
import gantt from './gantt.vue'
......@@ -72,12 +74,144 @@ export default {
}
},
mounted() {
this.$bus.$on('getTableData', (data) => {
this.$nextTick(() => {
const formData = {
items: [],
operator: 'AND'
}
for (const i in data) {
formData.items.push({
fieldName: i,
value: data[i]
})
}
this.$refs.detailCom.$children[0].searchFormData = formData
this.$refs.detailCom.$children[0].getData()
})
})
this.getStateOptions()
},
methods: {
rowClick(data) {
this.$emit('rowClick', data.row)
this.getLeftCount(data.row.extProcessPlan)
this.getRightCount(data.row.extProcessPlan)
this.getMissInfo(data.row.extProcessPlan)
// this.$emit('rowClick', data.row)
},
getLeftCount(obj) {
const params = {
'operator': 'AND',
'items': [
{
'fieldName': 'extProcessPlan.sorties',
'operator': 'EQ',
'value': obj.sorties
},
{
'fieldName': 'extProcessPlan.positionNumber',
'operator': 'EQ',
'value': obj.positionNumber
},
{
'fieldName': 'extProcessPlan.subTypeName',
'operator': 'IN',
'value': [
'ExtProcessPlanAssembly',
'ExtProcessPlanAOR'
]
},
{
'fieldName': 'fitRates',
'operator': 'EQ',
'value': '1'
}
]
}
post(`/ExtSupporting/count`, params).then(res => {
if (res.items) {
// this.aoData = res.items.content[0]
// this.loading = true
}
}).finally(() => {
})
},
getRightCount(obj) {
const params = {
'operator': 'AND',
'items': [
{
'fieldName': 'sorties',
'operator': 'EQ',
'value': obj.sorties
},
{
'fieldName': 'positionNumber',
'operator': 'EQ',
'value': obj.positionNumber
},
{
'fieldName': 'subTypeName',
'operator': 'IN',
'value': [
'ExtProcessPlanAssembly',
'ExtProcessPlanAOR'
]
}
]
}
post(`/ExtProcessPlan/count`, params).then(res => {
if (res.items) {
// this.aoData = res.items.content[0]
// this.loading = true
}
}).finally(() => {
})
},
getMissInfo(obj) {
const params = {
'pageFrom': 1,
'pageSize': 200,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extSupporting.extProcessPlanId',
'operator': 'EQ',
'value': obj.id
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extMaterial'
},
{
'name': 'productWorkCenter'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post(`/ExtSupportingItem/supportingItemAoId`, params).then(res => {
if (res.items) {
// this.aoData = res.items.content[0]
// this.loading = true
}
}).finally(() => {
})
},
getStateOptions() {
this.$utils.getDicListByCode('PlanState').then(res => {
......
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