丽知中台报表更新
This commit is contained in:
parent
19cf8f2d34
commit
fbe4a369b1
|
@ -2,19 +2,19 @@
|
||||||
<div class="wrapTable">
|
<div class="wrapTable">
|
||||||
<div class="RightBtnList">
|
<div class="RightBtnList">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="item"
|
class="item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="item.title"
|
:content="item.title"
|
||||||
placement="top"
|
placement="top"
|
||||||
v-for="(item, index) in fixedButtonList"
|
v-for="(item, index) in fixedButtonList"
|
||||||
:key="index"
|
:key="index"
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
:icon="item.icon"
|
:icon="item.icon"
|
||||||
@click.stop="
|
@click.stop="
|
||||||
fixedClick(
|
fixedClick(
|
||||||
item,
|
item,
|
||||||
'#mainTable',
|
'#mainTable',
|
||||||
|
@ -23,19 +23,19 @@
|
||||||
mainTableColumn
|
mainTableColumn
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
style="margin: 0"
|
style="margin: 0"
|
||||||
></el-button>
|
></el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
:showIndex="true"
|
:showIndex="true"
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:tableColumn="tableColumn"
|
:tableColumn="tableColumn"
|
||||||
:tableDataMergeList="tableDataMergeList"
|
:tableDataMergeList="tableDataMergeList"
|
||||||
id="mainTable"
|
id="mainTable"
|
||||||
>
|
>
|
||||||
<template #push_status="{row}">
|
<template #push_status="{row}">
|
||||||
<div>
|
<div>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{row}">
|
<template #operation="{row}">
|
||||||
<div style="color: blue;cursor: pointer" @click="clickHandle(row)">
|
<div style="color: blue;cursor: pointer" @click="clickHandle(row)" v-if="row.approve!=='Y'">
|
||||||
补推
|
补推
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -73,13 +73,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="page" v-if="pageShow">
|
<div class="page" v-if="pageShow">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page="pageModel.pageNum"
|
:current-page="pageModel.pageNum"
|
||||||
:page-sizes="[10, 20, 40, 100]"
|
:page-sizes="[10, 20, 40, 100]"
|
||||||
:page-size="pageModel.pageSize"
|
:page-size="pageModel.pageSize"
|
||||||
layout="total, prev, pager, next,sizes, jumper"
|
layout="total, prev, pager, next,sizes, jumper"
|
||||||
:total="pageModel.pageTotal"
|
:total="pageModel.pageTotal"
|
||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
@ -171,8 +171,8 @@ export default {
|
||||||
raw: true
|
raw: true
|
||||||
}
|
}
|
||||||
let grid = XLSX.utils.table_to_book(
|
let grid = XLSX.utils.table_to_book(
|
||||||
document.querySelector(boxId),
|
document.querySelector(boxId),
|
||||||
gatherData
|
gatherData
|
||||||
)
|
)
|
||||||
let workbook = XLSX.write(grid, {
|
let workbook = XLSX.write(grid, {
|
||||||
bookType: 'xlsx',
|
bookType: 'xlsx',
|
||||||
|
@ -181,10 +181,10 @@ export default {
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
FileSaver.saveAs(
|
FileSaver.saveAs(
|
||||||
new Blob([workbook], {
|
new Blob([workbook], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}),
|
}),
|
||||||
this.exportEventName + '.xlsx'
|
this.exportEventName + '.xlsx'
|
||||||
)
|
)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, workbook)
|
if (typeof console !== 'undefined') console.log(e, workbook)
|
||||||
|
|
|
@ -6,29 +6,29 @@
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<el-select v-model="queryCriteria.u8c_code_corp" placeholder="公司" clearable>
|
<el-select v-model="queryCriteria.u8c_code_corp" placeholder="公司" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in stateOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="datepickBox" style="">
|
<div class="datepickBox" style="">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryCriteria.start_time"
|
v-model="queryCriteria.start_time"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="创建时间-开始"
|
placeholder="创建时间-开始"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="datepickBox" style="">
|
<div class="datepickBox" style="">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryCriteria.end_time"
|
v-model="queryCriteria.end_time"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="创建时间-结束"
|
placeholder="创建时间-结束"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,35 +61,35 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="query"
|
@click="query"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="small"
|
size="small"
|
||||||
style=" margin: 5px 5px"
|
style=" margin: 5px 5px"
|
||||||
>查询
|
>查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="reset"
|
@click="reset"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin: 5px 5px"
|
style="margin: 5px 5px"
|
||||||
>重置
|
>重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 主体内容-->
|
<!-- 主体内容-->
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<baseNewTable
|
<baseNewTable
|
||||||
:tableData="mainTableData"
|
:tableData="mainTableData"
|
||||||
:tableColumn="mainTableColumn"
|
:tableColumn="mainTableColumn"
|
||||||
:tableLoading="tableLoading"
|
:tableLoading="tableLoading"
|
||||||
:tableDataMergeList="tableDataMergeList"
|
:tableDataMergeList="tableDataMergeList"
|
||||||
:pageModel="pageModel"
|
:pageModel="pageModel"
|
||||||
@pageSizeChange="(val) => pageSizeChange(val, pageModel)"
|
@pageSizeChange="(val) => pageSizeChange(val, pageModel)"
|
||||||
@pageChange="(val) => pageChange(val, pageModel)"
|
@pageChange="(val) => pageChange(val, pageModel)"
|
||||||
exportEventName="ToB库存报表"
|
exportEventName="ToB库存报表"
|
||||||
:pageShow="false"
|
:pageShow="false"
|
||||||
@clickHandle="clickHandle"
|
@clickHandle="clickHandle"
|
||||||
>
|
>
|
||||||
</baseNewTable>
|
</baseNewTable>
|
||||||
</div>
|
</div>
|
||||||
|
@ -311,7 +311,7 @@ export default {
|
||||||
const res = await pushByIdAPI({
|
const res = await pushByIdAPI({
|
||||||
id: row.id
|
id: row.id
|
||||||
})
|
})
|
||||||
this.$vmNews(res.msg, 'success')
|
this.$vmNews(res.attribute, res.flag ? 'success' : '')
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
async downLoad() {
|
async downLoad() {
|
||||||
|
@ -457,8 +457,8 @@ export default {
|
||||||
raw: true
|
raw: true
|
||||||
}
|
}
|
||||||
let grid = XLSX.utils.table_to_book(
|
let grid = XLSX.utils.table_to_book(
|
||||||
document.querySelector(boxId),
|
document.querySelector(boxId),
|
||||||
gatherData
|
gatherData
|
||||||
)
|
)
|
||||||
let workbook = XLSX.write(grid, {
|
let workbook = XLSX.write(grid, {
|
||||||
bookType: 'xlsx',
|
bookType: 'xlsx',
|
||||||
|
@ -467,10 +467,10 @@ export default {
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
FileSaver.saveAs(
|
FileSaver.saveAs(
|
||||||
new Blob([workbook], {
|
new Blob([workbook], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}),
|
}),
|
||||||
excelName + '.xlsx'
|
excelName + '.xlsx'
|
||||||
)
|
)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, workbook)
|
if (typeof console !== 'undefined') console.log(e, workbook)
|
||||||
|
@ -500,8 +500,8 @@ export default {
|
||||||
// item.newstate4 = this.dist_state[item.newstate4]
|
// item.newstate4 = this.dist_state[item.newstate4]
|
||||||
// })
|
// })
|
||||||
this.mainTableData = this.dataDispose(
|
this.mainTableData = this.dataDispose(
|
||||||
res.attribute,
|
res.attribute,
|
||||||
this.tableDataMergeList
|
this.tableDataMergeList
|
||||||
)
|
)
|
||||||
this.tableLoading = false
|
this.tableLoading = false
|
||||||
},
|
},
|
||||||
|
@ -533,10 +533,10 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Object.keys(sortObj)
|
Object.keys(sortObj)
|
||||||
.sort()
|
.sort()
|
||||||
.forEach((key) => {
|
.forEach((key) => {
|
||||||
newArr = [...newArr, ...sortObj[key]]
|
newArr = [...newArr, ...sortObj[key]]
|
||||||
})
|
})
|
||||||
// 开始循环
|
// 开始循环
|
||||||
newArr.forEach((item) => {
|
newArr.forEach((item) => {
|
||||||
transformedArray.forEach((key) => {
|
transformedArray.forEach((key) => {
|
||||||
|
@ -555,7 +555,7 @@ export default {
|
||||||
})
|
})
|
||||||
// 计算总数
|
// 计算总数
|
||||||
tempObj[keyValue][0][`${key[key.length - 1]}Length`] =
|
tempObj[keyValue][0][`${key[key.length - 1]}Length`] =
|
||||||
tempObj[keyValue].length
|
tempObj[keyValue].length
|
||||||
|
|
||||||
if (key.length === 1) {
|
if (key.length === 1) {
|
||||||
result = [...tempObj[keyValue], ...result]
|
result = [...tempObj[keyValue], ...result]
|
||||||
|
|
Loading…
Reference in New Issue