|
@@ -18,16 +18,30 @@
|
|
|
@resetColumn="resetColumn"
|
|
|
@search-criteria-switch="searchCriteriaSwitch"
|
|
|
>
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
|
|
|
- </template>
|
|
|
+ <!-- <template slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ @click="outExport"
|
|
|
+ icon="el-icon-download"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </template> -->
|
|
|
<template slot="corpNameSearch">
|
|
|
<crop-select v-model="search.corpId" corpType="KH"></crop-select>
|
|
|
</template>
|
|
|
<template slot="storageNameSearch">
|
|
|
<warehouse-select
|
|
|
v-model="search.storageId"
|
|
|
- :configuration="configurationWarehouse"/>
|
|
|
+ :configuration="configurationWarehouse"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="rankNo">
|
|
|
+ <span
|
|
|
+ style="color: #409EFF;cursor: pointer"
|
|
|
+ @click.stop="editOpen(row)"
|
|
|
+ >{{ row.rankNo }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -36,7 +50,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { getToken } from "@/util/auth";
|
|
|
-import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
|
|
|
+import {
|
|
|
+ getList,
|
|
|
+ exportExcel
|
|
|
+} from "@/api/statisticAnalysis/salesReconciliation";
|
|
|
import { micrometerFormat } from "@/util/validate";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
@@ -58,6 +75,7 @@ export default {
|
|
|
defaultOption: {
|
|
|
searchShow: true,
|
|
|
align: "center",
|
|
|
+ searchMenuSpan: 16,
|
|
|
searchSpan: 8,
|
|
|
border: true,
|
|
|
index: true,
|
|
@@ -71,83 +89,53 @@ export default {
|
|
|
menu: false,
|
|
|
column: [
|
|
|
{
|
|
|
+ label: "系统编号",
|
|
|
+ prop: "rankNo",
|
|
|
+ search: true,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "客户名称",
|
|
|
prop: "corpName",
|
|
|
search: true,
|
|
|
- overHidden: true,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "制单日期",
|
|
|
+ label: "业务日期",
|
|
|
prop: "businesDate",
|
|
|
search: true,
|
|
|
- type: 'date',
|
|
|
+ type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd",
|
|
|
unlinkPanels: true,
|
|
|
searchRange: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "商品名称",
|
|
|
- prop: "goodName",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "规格",
|
|
|
- prop: "typeno",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "级别",
|
|
|
- prop: "level",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "花纹",
|
|
|
- prop: "brandItem",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "批号",
|
|
|
- prop: "lotNo",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "销售数量",
|
|
|
- prop: "orderQuantity",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
+ label: "业务员",
|
|
|
+ prop: "a",
|
|
|
+ search: true,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "单价",
|
|
|
- prop: "price",
|
|
|
+ label: "收入",
|
|
|
+ prop: "b",
|
|
|
search: false,
|
|
|
- overHidden: true,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "应收金额",
|
|
|
- prop: "debitAmount",
|
|
|
+ label: "成本",
|
|
|
+ prop: "c",
|
|
|
search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "仓库名称",
|
|
|
- prop: "storageName", //storageId
|
|
|
- search: true,
|
|
|
- overHidden: true,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
+ label: "利润",
|
|
|
+ prop: "d",
|
|
|
search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- ],
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
// 仓库配置
|
|
|
configurationWarehouse: {
|
|
@@ -155,8 +143,8 @@ export default {
|
|
|
multiple: false,
|
|
|
collapseTags: false,
|
|
|
placeholder: "请点击右边按钮选择",
|
|
|
- dicData: [],
|
|
|
- },
|
|
|
+ dicData: []
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -165,13 +153,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(126), this.defaultOption);
|
|
|
+ this.option = await this.getColumnData(
|
|
|
+ this.getColumnName(126),
|
|
|
+ this.defaultOption
|
|
|
+ );
|
|
|
let i = 0;
|
|
|
this.option.column.forEach(item => {
|
|
|
- if (item.search) i++
|
|
|
- })
|
|
|
- if (i % 3 !== 0){
|
|
|
- const num = 3 - Number(i % 3)
|
|
|
+ if (item.search) i++;
|
|
|
+ });
|
|
|
+ if (i % 3 !== 0) {
|
|
|
+ const num = 3 - Number(i % 3);
|
|
|
this.option.searchMenuSpan = num * 8;
|
|
|
this.option.searchMenuPosition = "right";
|
|
|
}
|
|
@@ -196,7 +187,7 @@ export default {
|
|
|
},
|
|
|
refreshChange() {
|
|
|
delete this.search.corpName;
|
|
|
- delete this.search.storageName
|
|
|
+ delete this.search.storageName;
|
|
|
this.onLoad(this.page, this.search);
|
|
|
},
|
|
|
currentChange(val) {
|
|
@@ -215,16 +206,12 @@ export default {
|
|
|
if (queryParams.businesDate && queryParams.businesDate.length > 0) {
|
|
|
queryParams = {
|
|
|
...queryParams,
|
|
|
- orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
|
|
|
- orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
|
|
|
- }
|
|
|
+ orderStartDate: queryParams.businesDate[0] + " 00:00:00",
|
|
|
+ orderEndDate: queryParams.businesDate[1] + " 23:59:59"
|
|
|
+ };
|
|
|
delete queryParams.businesDate;
|
|
|
}
|
|
|
- getList(
|
|
|
- page.currentPage,
|
|
|
- page.pageSize,
|
|
|
- queryParams
|
|
|
- )
|
|
|
+ getList(page.currentPage, page.pageSize, queryParams)
|
|
|
.then(res => {
|
|
|
if (res.data.data.records) {
|
|
|
res.data.data.records.forEach(e => {
|
|
@@ -241,56 +228,50 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- editOpen(row) {
|
|
|
- if (row.billType == "BJ") {
|
|
|
- this.$router.push({
|
|
|
- path: "/exportTrade/customerInquiry/index",
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: "/exportTrade/salesContract/index",
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ editOpen() {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/statisticAnalysis/salesReconciliationDetails/index",
|
|
|
+ });
|
|
|
},
|
|
|
outExport() {
|
|
|
- if (!this.search.corpId) this.$set(this.search, 'corpId', '');
|
|
|
- if (!this.search.storageId) this.$set(this.search, 'storageId', '');
|
|
|
+ if (!this.search.corpId) this.$set(this.search, "corpId", "");
|
|
|
+ if (!this.search.storageId) this.$set(this.search, "storageId", "");
|
|
|
if (this.search.businesDate && this.search.businesDate.length > 0) {
|
|
|
this.search = {
|
|
|
...this.search,
|
|
|
- orderStartDate: this.search.businesDate[0] + ' 00:00:00',
|
|
|
- orderEndDate: this.search.businesDate[1] + ' 23:59:59',
|
|
|
- }
|
|
|
+ orderStartDate: this.search.businesDate[0] + " 00:00:00",
|
|
|
+ orderEndDate: this.search.businesDate[1] + " 23:59:59"
|
|
|
+ };
|
|
|
} else {
|
|
|
this.search = {
|
|
|
...this.search,
|
|
|
- orderStartDate: '',
|
|
|
- orderEndDate: '',
|
|
|
- }
|
|
|
+ orderStartDate: "",
|
|
|
+ orderEndDate: ""
|
|
|
+ };
|
|
|
}
|
|
|
// return console.log(this.search)
|
|
|
- this.$confirm('是否导出销售对账信息?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- window.open(
|
|
|
- `/api/blade-purchase-sales/dealerOrder/orderItemStat/export?${
|
|
|
- this.website.tokenHeader
|
|
|
- }=${getToken()}&corpId=${this.search.corpId}&storageId=${this.search.storageId}&orderStartDate=${this.search.orderStartDate}&orderEndDate=${this.search.orderEndDate}`
|
|
|
- );
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消' //
|
|
|
- });
|
|
|
+ this.$confirm("是否导出销售对账信息?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-purchase-sales/dealerOrder/orderItemStat/export?${
|
|
|
+ this.website.tokenHeader
|
|
|
+ }=${getToken()}&corpId=${this.search.corpId}&storageId=${
|
|
|
+ this.search.storageId
|
|
|
+ }&orderStartDate=${this.search.orderStartDate}&orderEndDate=${
|
|
|
+ this.search.orderEndDate
|
|
|
+ }`
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消" //
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
//列保存触发
|
|
|
async saveColumn() {
|
|
@@ -309,16 +290,19 @@ export default {
|
|
|
},
|
|
|
async resetColumn() {
|
|
|
this.option = this.defaultOption;
|
|
|
- const inSave = await this.delColumnData(this.getColumnName(126), this.defaultOption);
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(126),
|
|
|
+ this.defaultOption
|
|
|
+ );
|
|
|
if (inSave) {
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.crud.doLayout()
|
|
|
- })
|
|
|
+ this.$refs.crud.doLayout();
|
|
|
+ });
|
|
|
this.$message.success("重置成功");
|
|
|
//关闭窗口
|
|
|
this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|