|
|
|
@ -115,24 +115,52 @@
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="tableNodeRef" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
:tableData="details.data" |
|
|
|
|
:loading="loadingObj.list" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
<el-tabs |
|
|
|
|
type="border-card" |
|
|
|
|
v-loading="loadingObj.list" |
|
|
|
|
v-model="details.tabStatus" |
|
|
|
|
@tab-click="handleTab" |
|
|
|
|
> |
|
|
|
|
<template #default="{ scope: { row, column } }"> |
|
|
|
|
<div> |
|
|
|
|
{{ row[column.property] + '%' }} |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
<el-tab-pane label="定制品" name="order"> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="tableNodeRef1" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
:tableData="details.data" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="{ scope: { row, column } }"> |
|
|
|
|
<div> |
|
|
|
|
{{ row[column.property] + '%' }} |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
|
|
<el-tab-pane label="零担" name="zero"> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="tableNodeRef2" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
:tableData="details.data" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="{ scope: { row, column } }"> |
|
|
|
|
<div> |
|
|
|
|
{{ row[column.property] + '%' }} |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> |
|
|
|
@ -175,6 +203,10 @@ import {
|
|
|
|
|
postCheckWaybillTimePage, |
|
|
|
|
postCheckWaybillTimeExport, |
|
|
|
|
} from '@/api/reportforms/PackageAllTrunklineTimePageReport'; |
|
|
|
|
import { |
|
|
|
|
postZeroAllTrunklineTimePage, |
|
|
|
|
postZeroAllTrunklineTimeExport, |
|
|
|
|
} from '@/api/reportforms/ZeroAllTrunklineTimePageReport'; |
|
|
|
|
import { getListName } from '@/api/basicdata/basicdataVehicle'; |
|
|
|
|
import { |
|
|
|
|
setNodeHeight, |
|
|
|
@ -196,7 +228,8 @@ const $router = useRouter();
|
|
|
|
|
const $store = useStore(); |
|
|
|
|
|
|
|
|
|
// 组件实例 |
|
|
|
|
const tableNodeRef = ref(); |
|
|
|
|
const tableNodeRef1 = ref(); |
|
|
|
|
const tableNodeRef2 = ref(); |
|
|
|
|
|
|
|
|
|
const details = reactive<any>({ |
|
|
|
|
/** 是否开启搜索 */ |
|
|
|
@ -265,6 +298,8 @@ const details = reactive<any>({
|
|
|
|
|
popUpShow: {}, |
|
|
|
|
/** 全屏 */ |
|
|
|
|
fullscreenObj: {}, |
|
|
|
|
/** tab */ |
|
|
|
|
tabStatus: 'order' as 'order' | 'zero', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const { search, query, shortcuts, loadingObj, selectionList, drawerShow, page } = toRefs(details); |
|
|
|
@ -309,7 +344,10 @@ const onLoad = async (params = {}) => {
|
|
|
|
|
delete submitData.timeArr; |
|
|
|
|
delete submitData.total; |
|
|
|
|
|
|
|
|
|
const res = await postCheckWaybillTimePage(submitData); |
|
|
|
|
const res = |
|
|
|
|
details.tabStatus === 'order' |
|
|
|
|
? await postCheckWaybillTimePage(submitData) |
|
|
|
|
: await postZeroAllTrunklineTimePage(submitData); |
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
details.data = getObjType(data.records) === 'array' ? data.records : []; |
|
|
|
@ -401,7 +439,8 @@ const showdrawer = (_flag?: boolean) => {
|
|
|
|
|
const searchHide = () => { |
|
|
|
|
details.search = !details.search; |
|
|
|
|
|
|
|
|
|
setNodeHeight(tableNodeRef.value.$el, '', true); |
|
|
|
|
setNodeHeight(tableNodeRef1.value.$el, '', true); |
|
|
|
|
setNodeHeight(tableNodeRef2.value.$el, '', true); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 表格表头输入框搜索 */ |
|
|
|
@ -485,17 +524,39 @@ const ExportData = async () => {
|
|
|
|
|
delete submitData.timeArr; |
|
|
|
|
delete submitData.total; |
|
|
|
|
|
|
|
|
|
const res = await postCheckWaybillTimeExport(submitData); |
|
|
|
|
const res = |
|
|
|
|
details.tabStatus === 'order' |
|
|
|
|
? await postCheckWaybillTimeExport(submitData) |
|
|
|
|
: await postZeroAllTrunklineTimeExport(submitData); |
|
|
|
|
const { status, data } = res; |
|
|
|
|
if (status !== 200) return; |
|
|
|
|
const time = new Date().getTime(); |
|
|
|
|
downloadXls(data, '定制品干线时效报表 -' + time + '.xlsx'); |
|
|
|
|
downloadXls( |
|
|
|
|
data, |
|
|
|
|
(details.tabStatus === 'order' ? '定制品干线时效报表 - ' : '零担干线时效报表 - ') + |
|
|
|
|
time + |
|
|
|
|
'.xlsx' |
|
|
|
|
); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.list = false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleTab = async () => { |
|
|
|
|
await nextTick(); |
|
|
|
|
setNodeHeight(tableNodeRef1.value.$el, '', true); |
|
|
|
|
setNodeHeight(tableNodeRef2.value.$el, '', true); |
|
|
|
|
onLoad(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
// 重置表格高度 |
|
|
|
|
await nextTick(); |
|
|
|
|
setNodeHeight(tableNodeRef1.value.$el, '', true); |
|
|
|
|
setNodeHeight(tableNodeRef2.value.$el, '', true); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|