|
@@ -19,22 +19,21 @@
|
|
|
@search-criteria-switch="searchCriteriaSwitch"
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="info"
|
|
|
icon="el-icon-printer"
|
|
|
size="small"
|
|
|
:loading="exportLoading"
|
|
|
@click.stop="statement"
|
|
|
>报表打印
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
+ <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
|
|
|
</template>
|
|
|
<template slot="brandSearch">
|
|
|
<el-select
|
|
|
v-model="search.brand"
|
|
|
filterable
|
|
|
clearable
|
|
|
- multiple
|
|
|
- collapse-tags
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in brandOption"
|
|
@@ -46,18 +45,12 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
- <report-dialog
|
|
|
- :switchDialog="switchDialog"
|
|
|
- :searchValue="statementData"
|
|
|
- :reportName="'经销商-可用库存表'"
|
|
|
- @onClose="onClose()"
|
|
|
- />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getToken } from "@/util/auth";
|
|
|
-import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
|
|
|
+import { getList, exportExcel } from "@/api/statisticAnalysis/packFeeRecon";
|
|
|
import { micrometerFormat } from "@/util/validate";
|
|
|
import _ from "lodash";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
@@ -87,7 +80,7 @@ export default {
|
|
|
defaultOption: {
|
|
|
searchShow: true,
|
|
|
align: "center",
|
|
|
- searchSpan: 8,
|
|
|
+ searchMenuSpan: 8,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
addBtn: false,
|
|
@@ -95,8 +88,8 @@ export default {
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
|
showSummary: true,
|
|
|
- searchIcon: true,
|
|
|
- searchIndex: 2,
|
|
|
+ // searchIcon: true,
|
|
|
+ // searchIndex: 2,
|
|
|
menu: false,
|
|
|
column: [
|
|
|
{
|
|
@@ -109,28 +102,30 @@ export default {
|
|
|
label: "品牌",
|
|
|
prop: "brand",
|
|
|
search: true,
|
|
|
+ searchSpan: 8,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "制单日期",
|
|
|
- prop: "createTime",
|
|
|
+ prop: "careteTime",
|
|
|
search: true,
|
|
|
type: 'date',
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd",
|
|
|
unlinkPanels: true,
|
|
|
searchRange: true,
|
|
|
+ searchSpan: 8,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "数量",
|
|
|
- prop: "orderQuantity",
|
|
|
+ prop: "quantity",
|
|
|
search: false,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "包装费用",
|
|
|
- prop: "amount",
|
|
|
+ prop: "feesAmount",
|
|
|
search: false,
|
|
|
overHidden: true,
|
|
|
},
|
|
@@ -157,15 +152,6 @@ export default {
|
|
|
this.getWorkDicts('brand').then(res => {
|
|
|
this.brandOption = res.data.data;
|
|
|
})
|
|
|
- let i = 0;
|
|
|
- this.option.column.forEach(item => {
|
|
|
- if (item.search) i++
|
|
|
- })
|
|
|
- if (i % 3 !== 0){
|
|
|
- const num = 3 - Number(i % 3)
|
|
|
- this.option.searchMenuSpan = num * 8;
|
|
|
- this.option.searchMenuPosition = "right";
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
cellStyle() {
|
|
@@ -197,20 +183,52 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
|
this.page.pageSize = val;
|
|
|
},
|
|
|
+ outExport(){
|
|
|
+ let params = { ...this.search }
|
|
|
+ if (!params.brand) this.$set(params, 'brand', '');
|
|
|
+ if (params.createTime && params.createTime.length > 0) {
|
|
|
+ params = {
|
|
|
+ ...params,
|
|
|
+ beginCreateTime: params.createTime[0] + ' 00:00:00',
|
|
|
+ endCreateTime: params.createTime[1] + ' 23:59:59',
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ params = {
|
|
|
+ ...params,
|
|
|
+ beginCreateTime: '',
|
|
|
+ endCreateTime: '',
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm('是否导出数据明细?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-purchase-sales/exportOrder/selPackingFeeExport?${this.website.tokenHeader
|
|
|
+ }=${getToken()}&brand=${params.brand}&beginCreateTime=${params.beginCreateTime}&endCreateTime=${params.endCreateTime}`
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消' //
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
onLoad(page, params) {
|
|
|
this.loading = true;
|
|
|
this.dataList.forEach(item => {
|
|
|
this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
});
|
|
|
- let queryParams = Object.assign({}, params);
|
|
|
- if (queryParams.businesDate && queryParams.businesDate.length > 0) {
|
|
|
- queryParams = {
|
|
|
- ...queryParams,
|
|
|
- orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
|
|
|
- orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
|
|
|
- }
|
|
|
- delete queryParams.businesDate;
|
|
|
+ if (this.search.careteTime && this.search.careteTime.length > 0) {
|
|
|
+ params = {
|
|
|
+ ...params,
|
|
|
+ beginCreateTime: this.search.careteTime[0],
|
|
|
+ endCreateTime: this.search.careteTime[1]
|
|
|
+ };
|
|
|
}
|
|
|
+ let queryParams = Object.assign({}, params);
|
|
|
+ delete queryParams.careteTime;
|
|
|
getList(
|
|
|
page.currentPage,
|
|
|
page.pageSize,
|