|
@@ -15,14 +15,22 @@
|
|
|
<template slot="header">
|
|
|
<avue-crud :data="commodityData" :table-loading="itemLoading" :option="itemOption"></avue-crud>
|
|
|
</template>
|
|
|
- <template slot="corpCnName" slot-scope="{row}">
|
|
|
+ <template slot="corpName" slot-scope="{row}">
|
|
|
<span
|
|
|
style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
|
|
|
@click.stop="rowCell(row)">
|
|
|
- {{ row.corpCnName }}
|
|
|
+ {{ row.corpName }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+ <el-dialog title="销售订单" :visible.sync="dialogVisible" width="70%" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag append-to-body :before-close="saleClosed">
|
|
|
+ <span>
|
|
|
+ <avue-crud :data="saleData" :table-loading="saleLoading" :page.sync="salePage" :option="saleOption"
|
|
|
+ @current-change="saleCurrentChange" @size-change="saleSizeChange"
|
|
|
+ @on-load="saleOnLoad"></avue-crud>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="图表" name="second">
|
|
|
<div v-loading="loading" ref="echartsContainer" style="width: 90vw; height: 56vh;margin-top: 10px;"></div>
|
|
@@ -33,11 +41,15 @@
|
|
|
|
|
|
<script>
|
|
|
import { getList, corpBuySingularSum, corpBuySingularStatistics } from "@/api/tirePartsMall/salesManagement/customAnalysis";
|
|
|
+import { getList as getSaleList } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import * as echarts from 'echarts';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ saleLoading: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ saleForm: {},
|
|
|
activeName: 'first',
|
|
|
form: {},
|
|
|
search: {
|
|
@@ -55,8 +67,65 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
+ saleData: [],
|
|
|
+ salePage: {
|
|
|
+ pageSize: 20,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
selectionList: [],
|
|
|
option: {},
|
|
|
+ saleOption: {
|
|
|
+ height: '360px',
|
|
|
+ calcHeight: 30,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ header: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "客户名称",
|
|
|
+ prop: "customerName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "销售单号",
|
|
|
+ prop: "ordNo",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "来源单号",
|
|
|
+ prop: "srcOrdNo",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务日期",
|
|
|
+ prop: "businesDate",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务来源",
|
|
|
+ prop: "businessSource",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ prop: "goodsTotalNum",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务员",
|
|
|
+ prop: "salerName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "仓库",
|
|
|
+ prop: "storageName",
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
optionBack: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
@@ -350,6 +419,14 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ saleClosed(done) {
|
|
|
+ this.saleData = []
|
|
|
+ this.salePage.currentPage = 1
|
|
|
+ this.salePage.pageSize = 20
|
|
|
+ this.salePage.total = 0
|
|
|
+ this.saleForm = {}
|
|
|
+ done()
|
|
|
+ },
|
|
|
getChartData() {
|
|
|
this.loading = true
|
|
|
corpBuySingularStatistics(this.search).then(res => {
|
|
@@ -358,75 +435,34 @@ export default {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
+ saleCurrentChange(currentPage) {
|
|
|
+ this.salePage.currentPage = currentPage;
|
|
|
+ },
|
|
|
+ saleSizeChange(pageSize) {
|
|
|
+ this.salePage.pageSize = pageSize;
|
|
|
+ },
|
|
|
rowCell(row) {
|
|
|
- if (row.businessType == 'SE') {
|
|
|
- if (this.$store.getters.seaFEStatus) {
|
|
|
- this.$alert("海运出口页面已存在,请关闭海运出口再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: `/iosBasicData/SeafreightExportF/bills/index`,
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- if (row.businessType == 'ASE') {
|
|
|
- if (this.$store.getters.SFEStatus) {
|
|
|
- this.$alert("SEAMEND页面已存在,请关闭SEAMEND再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: `/iosBasicData/seamends/index`,
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.saleForm = {
|
|
|
+ customerName: row.corpName,
|
|
|
+ notComplete: 1,
|
|
|
}
|
|
|
- if (row.businessType == 'SI') {
|
|
|
- if (this.$store.getters.OceanFIStatus) {
|
|
|
- this.$alert("海运进口页面已存在,请关闭海运进口再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: `/iosBasicData/OceanFreightImport/bills/index`,
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- if (row.businessType == 'ASI') {
|
|
|
- if (this.$store.getters.OFIStatus) {
|
|
|
- this.$alert("SIAMEND页面已存在,请关闭SIAMEND再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: `/iosBasicData/siamends/index`,
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ this.saleOnLoad(this.salePage)
|
|
|
+ },
|
|
|
+ saleOnLoad(page, params = {}) {
|
|
|
+ params = {
|
|
|
+ current: page.currentPage,
|
|
|
+ size: page.pageSize,
|
|
|
+ bsType: "XS",
|
|
|
+ ...Object.assign(params, this.saleForm)
|
|
|
}
|
|
|
+ this.saleLoading = true
|
|
|
+ getSaleList(params).then(res => {
|
|
|
+ this.salePage.total = res.data.data.total;
|
|
|
+ this.saleData = res.data.data.records
|
|
|
+ }).finally(() => {
|
|
|
+ this.saleLoading = false;
|
|
|
+ })
|
|
|
},
|
|
|
handleClick() {
|
|
|
if (this.activeName == 'first') {
|
|
@@ -532,7 +568,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- toolbox: { },
|
|
|
+ toolbox: {},
|
|
|
legend: {
|
|
|
data: ['客户数量']
|
|
|
},
|