修改排序

szh_zidingyibiaoti
sunzehua 2 years ago
parent 8a2335ce2d
commit ffca658cb6

@ -872,3 +872,27 @@ export function downloadBookingConfirm(parameter) {
data: parameter
})
}
export function downloadDraft(parameter) {
return axios({
url: '/BookingValueAdded/DownloadDraft',
method: 'post',
data: parameter
})
}
export function checkUpdateETA(parameter) {
return axios({
url: '/BookingValueAdded/CheckUpdateETA',
method: 'post',
data: parameter
})
}
export function checkUpdateManifestNo(parameter) {
return axios({
url: '/BookingValueAdded/CheckUpdateManifestNo',
method: 'post',
data: parameter
})
}

@ -16,7 +16,7 @@ export default {
selectedRows: [],
selectedRowKeys: [],
sortObj: { DescSort: '' },
localLoading: false,
localDataSource: [],
localPagination: Object.assign({}, this.pagination),
@ -136,6 +136,10 @@ export default {
})) ||
false
this.needTotalList = this.initTotalList(this.columns)
this.sortObj = {
DescSort: '',
field: ''
}
this.loadData()
// this.columnsSetting = this.columns
// 记录选择显示的列以当前路由为key
@ -165,6 +169,7 @@ export default {
* @param Boolean bool
*/
refresh(bool = false) {
console.log(this.sortObj)
bool &&
(this.localPagination = Object.assign(
{},
@ -182,9 +187,10 @@ export default {
* @param {Object} sorter 排序条件
*/
loadData(pagination, filters, sorter) {
console.log(pagination)
this.localLoading = true
if (sorter) {
this.sortObj = sorter
}
const parameter = Object.assign(
{
pageNo:
@ -194,16 +200,24 @@ export default {
(this.showPagination && this.localPagination.pageSize) ||
this.pageSize
},
(sorter && sorter.field && { SortField: sorter.field }) || {},
(sorter && sorter.order && { sortOrder: sorter.order }) || {},
(this.sortObj && this.sortObj.field && { SortField: this.sortObj.field }) || {},
{
...filters
}
)
if (sorter && sorter.order === 'descend') {
if (this.sortObj && this.sortObj.order === 'descend' && this.sortObj.field) {
parameter.DescSort = true
this.sortObj.DescSort = true
} else {
parameter.DescSort = false
if (this.sortObj && this.sortObj.field) {
parameter.DescSort = false
this.sortObj.DescSort = false
} else {
delete parameter.DescSort
if (this.sortObj) {
this.sortObj.DescSort = ''
}
}
}
const result = this.data(parameter)
// 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data

@ -101,16 +101,16 @@
<span> <i class="iconfont icon-xiaopiaodayin"></i>船公司文件 </span>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDownByBc" href="javascript:;">BC下载</a>
<a @click="handleDownByBc(1)" href="javascript:;">BC下载</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">DRAFT下载</a>
<a @click="handleDownByBc(2)" href="javascript:;">DRAFT下载</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">到港时间更新</a>
<a @click="handleDownByBc(3)" href="javascript:;">到港时间更新</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">舱位分配查询</a>
<a @click="handleDownByBc(4)" href="javascript:;">舱位分配查询</a>
</a-menu-item>
</a-menu>
</a-dropdown>
@ -659,15 +659,16 @@
@cancel="bcFileFlag=false"
>
<div class="bcfile-title">
<a-icon style="margin-right: 10px;" type="copy" />时间{{ bcFile.executeTime }}
<span> {{ bcFile.batchTotal }}</span>
<div><a-icon style="margin-right: 10px;" @click="handleCopy" type="copy" />时间{{ bcFile.executeTime }}</div>
<span > {{ bcFile.batchTotal }}</span>
</div>
<div class="bc-box">
<div ref="bcBox" class="bc-box" v-if="bcFile.ext && bcFile.ext.length>0">
<div class="bc-item" v-for="(item,index) in bcFile.ext" :key="index">
<span>{{ item.bno }}</span>
<span> {{ item.msg }}</span>
</div>
</div>
<div v-else>{{ bcFile.msg }}</div>
</a-modal>
</a-spin>
</div>
@ -698,7 +699,10 @@ import {
DeleteBookingOrder,
ExcuteShippingOrderCompareBatch,
GetTenantLineList,
downloadBookingConfirm
downloadBookingConfirm,
downloadDraft,
checkUpdateETA,
checkUpdateManifestNo
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@ -807,7 +811,7 @@ export default {
destinationData: [],
RcarrierData: [],
RecentlyCarrierData: [],
bcFile: {},
bcFile: { ext: [] },
bcFileFlag: false
}
},
@ -910,7 +914,7 @@ export default {
// }
}
},
handleDownByBc() {
handleDownByBc(type) {
const select = this.$refs.xGrid.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
return item.id
@ -919,7 +923,8 @@ export default {
this.$message.error('请至少选择一条数据')
return false
} else {
downloadBookingConfirm(pkIdArr)
if (type === 1) {
downloadBookingConfirm(pkIdArr)
.then((res) => {
if (res.success) {
this.bcFileFlag = true
@ -931,6 +936,49 @@ export default {
.catch((err) => {
console.log(err)
})
}
if (type === 2) {
downloadDraft(pkIdArr)
.then((res) => {
if (res.success) {
this.bcFileFlag = true
this.bcFile = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
}
if (type === 3) {
checkUpdateETA(pkIdArr)
.then((res) => {
if (res.success) {
this.bcFileFlag = true
this.bcFile = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
}
if (type === 4) {
checkUpdateManifestNo(pkIdArr)
.then((res) => {
if (res.success) {
this.bcFileFlag = true
this.bcFile = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
}
}
},
//
@ -1464,6 +1512,15 @@ export default {
handledbclick({ row }) {
this.editColumns(row)
},
handleCopy() {
const text = this.$refs.bcBox.innerText
var cInput = document.createElement('input');
cInput.value = text;
document.body.appendChild(cInput);
cInput.select(); //
document.execCommand('copy');
document.body.removeChild(cInput);
},
editColumns(row) {
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid, mblno: row.mblno } })
},
@ -3014,6 +3071,9 @@ export default {
border-bottom:1px dashed black;
padding-bottom: 5px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.bc-box{
max-height: 200px;

Loading…
Cancel
Save