Commit 16bbc99e authored by jingnan's avatar jingnan 👀

入库申请及入库审核tab页签上total渲染修改

parent a724bf89
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
class="list-table" class="list-table"
:basic-data=" { selectData: selectData }" :basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'material_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'material_table'}"
@freshData="freshData('Material')" @requestSuccess="onRequestSuccess($event,'Material')"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment"> <el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
class="list-table" class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'airEquipment_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'airEquipment_table'}"
:basic-data=" { selectData: selectData }" :basic-data=" { selectData: selectData }"
@freshData="freshData('AirEquipment')" @requestSuccess="onRequestSuccess($event,'AirEquipment')"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource"> <el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
class="list-table" class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'outSource_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'outSource_table'}"
:basic-data=" { selectData: selectData }" :basic-data=" { selectData: selectData }"
@freshData="freshData('OutSource')" @requestSuccess="onRequestSuccess($event,'OutSource')"
/> />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -93,16 +93,8 @@ export default { ...@@ -93,16 +93,8 @@ export default {
}, },
// 组件方法 // 组件方法
methods: { methods: {
freshData(tabName) { onRequestSuccess(res, tabName) {
setTimeout(() => { this.$set(this.totals, tabName + 'Total', res.items.totalElements)
this.changeTotal(tabName)
}, 1000)
},
changeTotal(tabName) {
const el = this.$refs[tabName + 'Table']
if (el && el.$refs.asCom) {
this.$set(this.totals, tabName + 'Total', el.$refs.asCom.pagination.total)
}
}, },
searchEvent(val) { searchEvent(val) {
this.searchItems = val.items this.searchItems = val.items
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
class="list-table" class="list-table"
:basic-data=" basicData" :basic-data=" basicData"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_material_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_material_table'}"
@freshData="freshData('Material')" @requestSuccess="onRequestSuccess($event,'Material')"
@selectionChange="selectionChange($event,'Material')" @selectionChange="selectionChange($event,'Material')"
/> />
</el-tab-pane> </el-tab-pane>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
class="list-table" class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_airEquipment_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_airEquipment_table'}"
:basic-data=" basicData" :basic-data=" basicData"
@freshData="freshData('AirEquipment')" @requestSuccess="onRequestSuccess($event,'AirEquipment')"
@selectionChange="selectionChange($event,'AirEquipment')" @selectionChange="selectionChange($event,'AirEquipment')"
/> />
</el-tab-pane> </el-tab-pane>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
class="list-table" class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_outSource_table'}" :lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_outSource_table'}"
:basic-data=" basicData" :basic-data=" basicData"
@freshData="freshData('OutSource')" @requestSuccess="onRequestSuccess($event,'OutSource')"
@selectionChange="selectionChange($event,'OutSource')" @selectionChange="selectionChange($event,'OutSource')"
/> />
</el-tab-pane> </el-tab-pane>
...@@ -99,16 +99,8 @@ export default { ...@@ -99,16 +99,8 @@ export default {
}, },
// 组件方法 // 组件方法
methods: { methods: {
freshData(tabName) { onRequestSuccess(res, tabName) {
setTimeout(() => { this.$set(this.totals, tabName + 'Total', res.items.totalElements)
this.changeTotal(tabName)
}, 1000)
},
changeTotal(tabName) {
const el = this.$refs[tabName + 'Table']
if (el && el.$refs.asCom) {
this.$set(this.totals, tabName + 'Total', el.$refs.asCom.pagination.total)
}
}, },
searchEvent(val) { searchEvent(val) {
this.searchItems = val.items this.searchItems = val.items
......
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