|
|
|
@ -733,7 +733,7 @@ export default {
|
|
|
|
|
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
|
|
|
|
|
this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData))
|
|
|
|
|
this.tableHeight = document.body.clientHeight - 230
|
|
|
|
|
this.getList({}, true)
|
|
|
|
|
// this.getList({}, true)
|
|
|
|
|
this.getConfigUser(true)
|
|
|
|
|
this.getCarrier()
|
|
|
|
|
},
|
|
|
|
@ -896,7 +896,7 @@ export default {
|
|
|
|
|
getConfigUser(isInit = false) {
|
|
|
|
|
// 请求自定义: 查询表单 表头 页码
|
|
|
|
|
const query = {
|
|
|
|
|
typeArr: ['booking_list_cond', 'booking_list_column']
|
|
|
|
|
typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page']
|
|
|
|
|
}
|
|
|
|
|
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => {
|
|
|
|
|
const $data = {}
|
|
|
|
@ -910,9 +910,9 @@ export default {
|
|
|
|
|
this.$set($data, 'booking_list_column', item)
|
|
|
|
|
// this.setTableList(item)
|
|
|
|
|
break
|
|
|
|
|
// case 'booking_list_page':
|
|
|
|
|
// this.setPageSize(item)
|
|
|
|
|
// break
|
|
|
|
|
case 'booking_list_page':
|
|
|
|
|
this.setPageSize(item)
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('==获取数据,表单 ==', $data.booking_list_cond)
|
|
|
|
@ -1086,6 +1086,7 @@ export default {
|
|
|
|
|
setPageSize(data) {
|
|
|
|
|
if (data && JSON.parse(data.configJson)) {
|
|
|
|
|
this.gridOptions.pagerConfig.pageSize = JSON.parse(data.configJson).pageSize
|
|
|
|
|
this.getList({}, true, 'add')
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1123,9 +1124,9 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
|
// if (this.gridOptions.pagerConfig.pageSize !== pageSize) {
|
|
|
|
|
// this.editPageSizeSave(pageSize)
|
|
|
|
|
// }
|
|
|
|
|
if (this.gridOptions.pagerConfig.pageSize !== pageSize) {
|
|
|
|
|
this.editPageSizeSave(pageSize)
|
|
|
|
|
}
|
|
|
|
|
this.gridOptions.pagerConfig.currentPage = currentPage
|
|
|
|
|
this.gridOptions.pagerConfig.pageSize = pageSize
|
|
|
|
|
console.log('== 当前搜索内容 ==', this.searchData)
|
|
|
|
@ -1133,15 +1134,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editPageSizeSave(pageSize = 10) {
|
|
|
|
|
// const data = {
|
|
|
|
|
// pageSize: pageSize
|
|
|
|
|
// }
|
|
|
|
|
// DjyUserConfigAdd({
|
|
|
|
|
// type: 'booking_list_page',
|
|
|
|
|
// configJson: JSON.stringify(data)
|
|
|
|
|
// }).then(res => {
|
|
|
|
|
// console.log('页码设置成功')
|
|
|
|
|
// })
|
|
|
|
|
const data = {
|
|
|
|
|
pageSize: pageSize
|
|
|
|
|
}
|
|
|
|
|
DjyUserConfigAdd({
|
|
|
|
|
type: 'booking_list_page',
|
|
|
|
|
configJson: JSON.stringify(data)
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log('页码设置成功')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// form
|
|
|
|
@ -1306,7 +1307,7 @@ export default {
|
|
|
|
|
editColumns(row) {
|
|
|
|
|
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid, mblno: row.mblno } })
|
|
|
|
|
},
|
|
|
|
|
getList(queryParam = {}, isInit = false) {
|
|
|
|
|
getList(queryParam = {}, isInit = false, isAdd = 'normal') {
|
|
|
|
|
this.$set(this.gridOptions, 'loading', true)
|
|
|
|
|
const { currentPage, pageSize } = this.gridOptions.pagerConfig
|
|
|
|
|
const query = {
|
|
|
|
@ -1377,6 +1378,7 @@ export default {
|
|
|
|
|
this.$set(this.gridOptions.pagerConfig, 'columns', JSON.parse(JSON.stringify(initData.columns)))
|
|
|
|
|
// debugger
|
|
|
|
|
// this.$set(this.gridOptions, 'data', [..._data])
|
|
|
|
|
console.log('== 即将渲染列表 ==', isAdd)
|
|
|
|
|
this.$refs.xGrid.reloadData(_data).then(() => {
|
|
|
|
|
this.$set(this.gridOptions, 'loading', false)
|
|
|
|
|
})
|
|
|
|
|