|
@@ -35,12 +35,6 @@
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="客户">
|
|
|
<a-input placeholder="请输入客户" v-model="queryParam.customer"></a-input>
|
|
|
-
|
|
|
- <!-- <a-select placeholder="请选择客户" v-model="queryParam.customer">
|
|
|
- <a-select-option :value="''">请选择</a-select-option>
|
|
|
- <a-select-option :value="0">FD</a-select-option>
|
|
|
- <a-select-option :value="1">PMK</a-select-option>
|
|
|
- </a-select> -->
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -48,8 +42,15 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
|
+ <a-button type="primary" @click="searchQuery" :disabled="isDisabled" icon="search">查询</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ @click="searchReset"
|
|
|
+ :disabled="isDisabled"
|
|
|
+ icon="reload"
|
|
|
+ style="margin-left: 8px"
|
|
|
+ >重置</a-button
|
|
|
+ >
|
|
|
<a @click="handleToggleSearch" style="margin-left: 8px">
|
|
|
{{ toggleSearchStatus ? '收起' : '展开' }}
|
|
|
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
|
|
@@ -64,25 +65,25 @@
|
|
|
<!-- 引入 echarts -->
|
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
|
<div class="chart">
|
|
|
- <!-- 部门 "-->
|
|
|
- <div class="departmentChart" style="background:rgba(255, 165, 0,.09);">
|
|
|
- <departmentChart />
|
|
|
+ <!-- 部门 -->
|
|
|
+ <div class="depChartStyle" style="background:rgba(255, 165, 0,.09);">
|
|
|
+ <departmentChart ref="departmentChart" />
|
|
|
</div>
|
|
|
<!-- 客户 -->
|
|
|
- <div class="customerChart" style="background:rgba(134, 151, 201,.08);">
|
|
|
- <customerChart />
|
|
|
+ <div class="cusChartStyle" style="background:rgba(134, 151, 201,.08);">
|
|
|
+ <customerChart ref="customerChart" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
|
|
|
- <!-- table :scroll="{ x: 1500 }" v-if="data"-->
|
|
|
+ <!-- table -->
|
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
|
<a-table
|
|
|
- v-if="intdata"
|
|
|
+ v-if="extStadata"
|
|
|
bordered
|
|
|
rowKey="index"
|
|
|
- :columns="intColumns"
|
|
|
- :data-source="intdata"
|
|
|
+ :columns="extStaColumns"
|
|
|
+ :data-source="extStadata"
|
|
|
:loading="loading"
|
|
|
:pagination="pagination"
|
|
|
@change="handleTableChange"
|
|
@@ -110,7 +111,8 @@ export default {
|
|
|
data() {
|
|
|
// let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
|
|
|
return {
|
|
|
- intColumns: [
|
|
|
+ description: '订单外部统计表',
|
|
|
+ extStaColumns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
width: 90,
|
|
@@ -169,17 +171,17 @@ export default {
|
|
|
},
|
|
|
{ title: '本币金额', width: 150, dataIndex: 'inatMoney', className: 'replacecolor' }
|
|
|
],
|
|
|
- intdata: [],
|
|
|
+ extStadata: [],
|
|
|
loading: false, // 表格加载
|
|
|
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
vendorType: '内部',
|
|
|
- pageNo: ''
|
|
|
- // startYearMonth: '',
|
|
|
- // endYearMonth: '',
|
|
|
- // department: '',
|
|
|
- // customer: ''
|
|
|
+ pageNo: '',
|
|
|
+ startYearMonth: '',
|
|
|
+ endYearMonth: '',
|
|
|
+ department: '',
|
|
|
+ customer: ''
|
|
|
},
|
|
|
|
|
|
pagination: {
|
|
@@ -188,34 +190,37 @@ export default {
|
|
|
// pageSize: '' //一页多少
|
|
|
},
|
|
|
mode2: ['month', 'month'],
|
|
|
- value: [] //起始月份
|
|
|
+ value: [], //起始月份
|
|
|
+ isDisabled: false //按钮禁止
|
|
|
// dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// html渲染出来后,操作dom
|
|
|
mounted() {
|
|
|
- this.cancelLoading()
|
|
|
+ // this.cancelLoading()
|
|
|
},
|
|
|
created() {
|
|
|
- this.getIntData() // 查询订单统计
|
|
|
+ this.getExternalData()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- cancelLoading() {
|
|
|
- setTimeout(() => {
|
|
|
- this.loading = false
|
|
|
- }, 500)
|
|
|
- },
|
|
|
+ // cancelLoading() {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // let that = this
|
|
|
+ // that.loading = false
|
|
|
+ // }, 500)
|
|
|
+ // },
|
|
|
|
|
|
- // 查询订单内部统计
|
|
|
- getIntData() {
|
|
|
+ // 查询订单统计
|
|
|
+ getExternalData() {
|
|
|
this.$nextTick(() => {
|
|
|
+ this.queryParam.vendorType = '内部'
|
|
|
externalList(this.queryParam).then(res => {
|
|
|
if (res.success) {
|
|
|
- console.log('99')
|
|
|
- this.intData = res.result.records
|
|
|
- console.log('订单外部列表', this.intData)
|
|
|
+ this.extStadata = res.result.records
|
|
|
+ console.log('订单内部列表', this.extStadata)
|
|
|
+
|
|
|
this.pagination = {
|
|
|
total: res.result.total,
|
|
|
current: res.result.current,
|
|
@@ -229,11 +234,65 @@ export default {
|
|
|
searchQuery() {
|
|
|
this.queryParam.pageNo = ''
|
|
|
if (this.queryParam) {
|
|
|
- console.log('指定查询条件,渲染chart', this.queryParam)
|
|
|
+ // 清空部门chart数据
|
|
|
+ this.$refs.departmentChart.cdepNameArr = []
|
|
|
+ this.$refs.departmentChart.iquantityArr = []
|
|
|
+ this.$refs.departmentChart.inatMoneyArr = []
|
|
|
+ // 清空客户chart数据
|
|
|
+ this.$refs.customerChart.cvenAbbNameArr = []
|
|
|
+ this.$refs.customerChart.iquantityArr = []
|
|
|
+ this.$refs.customerChart.inatMoneyArr = []
|
|
|
+ this.getExternalData()
|
|
|
+
|
|
|
+ //查询条件 传给 部门chart + 渲染
|
|
|
this.$refs.departmentChart.queryParam = this.queryParam
|
|
|
+ // this.$refs.departmentChart.queryParam.vendorType = ''
|
|
|
this.$refs.departmentChart.getDepChartData()
|
|
|
+
|
|
|
+ console.log('部门chart是否外部', this.$refs.departmentChart.queryParam.vendorType)
|
|
|
+
|
|
|
+ //查询条件 传给 客户chart + 渲染
|
|
|
+ this.$refs.customerChart.queryParam = this.queryParam
|
|
|
+ // this.$refs.customerChart.queryParam.vendorType = ''
|
|
|
+ this.$refs.customerChart.getCusChartData()
|
|
|
}
|
|
|
- this.getIntData()
|
|
|
+
|
|
|
+ this.isDisabled = true
|
|
|
+ setTimeout(() => {
|
|
|
+ let that = this
|
|
|
+ that.isDisabled = false
|
|
|
+ }, 3000)
|
|
|
+ },
|
|
|
+
|
|
|
+ searchReset() {
|
|
|
+ this.queryParam = {}
|
|
|
+ this.value = [] //起始年月重置
|
|
|
+ this.queryParam.startYearMonth = []
|
|
|
+ this.queryParam.endYearMonth = []
|
|
|
+
|
|
|
+ // 清空部门chart数据 + 查询条件 + 重新渲染
|
|
|
+ this.$refs.departmentChart.cdepNameArr = []
|
|
|
+ this.$refs.departmentChart.iquantityArr = []
|
|
|
+ this.$refs.departmentChart.inatMoneyArr = []
|
|
|
+ this.$refs.departmentChart.queryParam = {}
|
|
|
+ this.$refs.departmentChart.getDepChartData()
|
|
|
+
|
|
|
+ // 清空客户chart数据 + 查询条件 + 重新渲染
|
|
|
+ this.$refs.customerChart.cvenAbbNameArr = []
|
|
|
+ this.$refs.customerChart.iquantityArr = []
|
|
|
+ this.$refs.customerChart.inatMoneyArr = []
|
|
|
+ this.$refs.customerChart.queryParam = {}
|
|
|
+ this.$refs.customerChart.getCusChartData()
|
|
|
+
|
|
|
+ // 重新渲染列表数据
|
|
|
+ this.getExternalData()
|
|
|
+
|
|
|
+ // 按钮置灰
|
|
|
+ this.isDisabled = true
|
|
|
+ setTimeout(() => {
|
|
|
+ let that = this
|
|
|
+ that.isDisabled = false
|
|
|
+ }, 3000)
|
|
|
},
|
|
|
// 日期面板变化时的回调
|
|
|
handlePanelChange(value, mode) {
|
|
@@ -241,26 +300,18 @@ export default {
|
|
|
this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
|
|
|
this.queryParam.startYearMonth = value[0].format('YYYY-MM')
|
|
|
this.queryParam.endYearMonth = value[1].format('YYYY-MM')
|
|
|
- console.log('开始年月:', this.queryParam.startYearMonth)
|
|
|
- console.log('结束年月:', this.queryParam.endYearMonth)
|
|
|
+ // console.log('开始年月:', this.queryParam.startYearMonth)
|
|
|
+ // console.log('结束年月:', this.queryParam.endYearMonth)
|
|
|
},
|
|
|
|
|
|
// 时间发生变化的回调,发生在用户选择时间时
|
|
|
monthChange(value) {
|
|
|
this.value = value
|
|
|
- // console.log('what------monthChange')
|
|
|
- },
|
|
|
-
|
|
|
- searchReset() {
|
|
|
- this.queryParam = {}
|
|
|
- this.value = [] //起始年月重置
|
|
|
- this.getIntData()
|
|
|
},
|
|
|
|
|
|
handleTableChange(pagination, filters, sorter) {
|
|
|
- console.log('当前页信息>>>>', pagination)
|
|
|
this.queryParam.pageNo = pagination.current
|
|
|
- this.getIntData()
|
|
|
+ this.getExternalData()
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
@@ -283,14 +334,14 @@ export default {
|
|
|
// background-color: #ccc;
|
|
|
// }
|
|
|
|
|
|
-.departmentChart,
|
|
|
-.customerChart {
|
|
|
+.depChartStyle,
|
|
|
+.cusChartStyle {
|
|
|
// width: 100%;
|
|
|
height: 600px;
|
|
|
text-align: center;
|
|
|
padding-top: 10px;
|
|
|
}
|
|
|
-.departmentChart {
|
|
|
+.depChartStyle {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
</style>
|