Commit 5fa88e21 authored by jingnan's avatar jingnan 👀

理化批量签审,按照机载设备、外购成品、器材的分类标签

parent 629ac202
...@@ -6,12 +6,44 @@ ...@@ -6,12 +6,44 @@
<template> <template>
<div class="jobResponseInExperiment"> <div class="jobResponseInExperiment">
<dee-as-com <dee-as-com
ref="applyTable" ref="search"
class="list-table" :lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResExp_search'}"
:basic-data=" { selectData,selectionRows }" :basic-data="defaultData"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}" @searchEvent="searchEvent"
@selectionChange="selectionChange"
/> />
<!-- tab页签 -->
<el-tabs v-model="active" type="border-card" class="detailTabs" @tab-click="tabClick">
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
class="list-table"
:basic-data=" {...basicData,tableType:'Material'}"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}"
@requestSuccess="onRequestSuccess($event,'Material')"
@selectionChange="selectionChange($event,'Material')"
/>
</el-tab-pane>
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}"
:basic-data=" {...basicData,tableType:'AirEquipment'}"
@requestSuccess="onRequestSuccess($event,'AirEquipment')"
@selectionChange="selectionChange($event,'AirEquipment')"
/>
</el-tab-pane>
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}"
:basic-data="{...basicData,tableType:'OutSource'}"
@requestSuccess="onRequestSuccess($event,'OutSource')"
@selectionChange="selectionChange($event,'OutSource')"
/>
</el-tab-pane>
</el-tabs>
</div> </div>
</template> </template>
...@@ -26,18 +58,75 @@ export default { ...@@ -26,18 +58,75 @@ export default {
} }
}, },
data() { data() {
const _that = this
return { return {
selectionRows: [] active: 'Material',
defaultData: {},
totals: {
MaterialTotal: 0,
AirEquipmentTotal: 0,
OutSourceTotal: 0
},
billTypeList: [],
searchItems: [],
tabNames: [
'Material',
'AirEquipment',
'OutSource'
],
selectionRows: {},
basicData: { selectData: _that.selectData, selectionRows: [] }
} }
}, },
computed: {}, computed: {
watch: {}, },
created() {}, watch: {
mounted() {}, selectData: {
immediate: true,
deep: true,
handler(val) {
if (val && val.taskKey) {
this.$nextTick(() => {
this.getTableData()
})
}
}
}
},
created() {
},
mounted() {
this.$bus.$on('refreshBackItem', () => {
this.$nextTick(() => {
if (this.$refs[this.active + 'Table']) {
(this.$refs[this.active + 'Table'].$refs.asCom.selfDrawerShow = false)
this.$refs[this.active + 'Table'].$refs.asCom.getData(this.searchItems)
}
})
})
},
// 组件方法 // 组件方法
methods: { methods: {
selectionChange(val) { onRequestSuccess(res, tabName) {
this.selectionRows = val this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
this.searchItems = val.items
this.getTableData()
},
getTableData() {
this.tabNames.forEach(item => {
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
}
})
},
selectionChange(val, tabName) {
this.$set(this.basicData, 'selectionRows', val)
},
tabClick() {
this.$set(this.basicData, 'selectionRows', [])
} }
} }
} }
...@@ -49,6 +138,30 @@ export default { ...@@ -49,6 +138,30 @@ export default {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding:0 4px; padding:0 4px;
.detailTabs {
height: calc(100% - 40px);
border: 0;
.dee-table-header{
padding: 0px 10px;
.dee-tools{
margin: 4px 0;
}
}
}
.el-tabs--border-card > .el-tabs__content {
padding: 0px;
height: calc(100% - 70px);
.el-tab-pane{
height: 100%;
}
}
.el-tabs--border-card > .el-tabs__header {
.el-tabs__nav-wrap {
margin: 0px;
}
.el-tabs__item.is-active {
color: #409eff;
}
}
} }
</style> </style>
<!--
* @Author: gjn
* @Date: 2023-08-04 10:29:39
* @Description:批量签审_理化实验入库响应
-->
<template>
<div class="jobResponseInExperiment">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data=" { selectData,selectionRows }"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}"
@selectionChange="selectionChange"
/>
</div>
</template>
<script>
export default {
name: 'JobResponseInExperiment',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: []
}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang='scss'>
.jobResponseInExperiment{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
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