|
@@ -12,6 +12,7 @@
|
|
|
style="width: 100%"
|
|
|
:placeholder="['开始年月', '结束年月']"
|
|
|
format="YYYY-MM"
|
|
|
+ defaultPickerValue="[moment(defaultMonth),moment(defaultMonth)]"
|
|
|
:mode="mode2"
|
|
|
:value="value"
|
|
|
@panelChange="handlePanelChange"
|
|
@@ -31,15 +32,12 @@
|
|
|
</a-select> -->
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
-
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="客户">
|
|
|
<a-input placeholder="请输入客户" v-model="queryParam.customer"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
-
|
|
|
<template v-if="toggleSearchStatus"></template>
|
|
|
-
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="searchQuery" :disabled="isDisabled" icon="search">查询</a-button>
|
|
@@ -173,7 +171,6 @@ export default {
|
|
|
],
|
|
|
extStadata: [],
|
|
|
loading: false, // 表格加载
|
|
|
-
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
vendorType: '外部'
|
|
@@ -191,31 +188,64 @@ export default {
|
|
|
},
|
|
|
mode2: ['month', 'month'],
|
|
|
value: [], //起始月份
|
|
|
- isDisabled: false //按钮禁止
|
|
|
- // dateFormat: 'YYYY-MM-DD'
|
|
|
+ isDisabled: false, //按钮禁止
|
|
|
+ monthFormat: 'YYYY-MM',
|
|
|
+ defaultMonth: [] //默认当前月
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // html渲染出来后,操作dom
|
|
|
- mounted() {
|
|
|
- this.cancelLoading()
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
created() {
|
|
|
- this.getExternalData()
|
|
|
+ // 初次加载当月数据
|
|
|
+ this.getThisMonthData()
|
|
|
},
|
|
|
-
|
|
|
+ computed: {},
|
|
|
methods: {
|
|
|
- cancelLoading() {
|
|
|
- let that = this
|
|
|
- setTimeout(() => {
|
|
|
- that.loading = false
|
|
|
- }, 500)
|
|
|
+ // 初次加载当月数据(列表、图)
|
|
|
+ getThisMonthData() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let nowDate = new Date()
|
|
|
+ let date = {
|
|
|
+ year: nowDate.getFullYear(),
|
|
|
+ month: nowDate.getMonth() + 1
|
|
|
+ }
|
|
|
+ if (date.month >= 1 && date.month <= 9) {
|
|
|
+ date.month = '0' + date.month
|
|
|
+ }
|
|
|
+ this.defaultMonth = date.year + '-' + date.month
|
|
|
+
|
|
|
+ this.queryParam.startYearMonth = this.defaultMonth
|
|
|
+ this.queryParam.endYearMonth = this.defaultMonth
|
|
|
+ this.queryParam.vendorType = '外部'
|
|
|
+
|
|
|
+ externalList(this.queryParam).then(res => {
|
|
|
+ // 参数给 chart
|
|
|
+ this.$refs.departmentChart.queryParam = this.queryParam
|
|
|
+ this.$refs.customerChart.queryParam = this.queryParam
|
|
|
+ console.log(this.$refs.departmentChart.queryParam)
|
|
|
+
|
|
|
+ if (res.success) {
|
|
|
+ this.extStadata = res.result.records
|
|
|
+ console.log('图、列表当月数据', this.extStadata)
|
|
|
+ this.pagination = {
|
|
|
+ total: res.result.total,
|
|
|
+ current: res.result.current,
|
|
|
+ pageSize: res.result.size
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 查询订单统计
|
|
|
getExternalData() {
|
|
|
this.$nextTick(() => {
|
|
|
+ this.queryParam.vendorType = '外部'
|
|
|
externalList(this.queryParam).then(res => {
|
|
|
+ // 参数给 chart
|
|
|
+ this.$refs.departmentChart.queryParam = this.queryParam
|
|
|
+ this.$refs.customerChart.queryParam = this.queryParam
|
|
|
+
|
|
|
if (res.success) {
|
|
|
this.extStadata = res.result.records
|
|
|
console.log('订单外部列表', this.extStadata)
|
|
@@ -230,6 +260,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 查询
|
|
|
searchQuery() {
|
|
|
this.queryParam.pageNo = ''
|
|
|
if (this.queryParam) {
|
|
@@ -238,14 +269,14 @@ export default {
|
|
|
this.$refs.departmentChart.iquantityArr = []
|
|
|
this.$refs.departmentChart.inatMoneyArr = []
|
|
|
// 清空客户chart数据
|
|
|
- this.$refs.customerChart.cvenAbbNameArr = []
|
|
|
+ this.$refs.customerChart.ccusNameArr = []
|
|
|
this.$refs.customerChart.iquantityArr = []
|
|
|
this.$refs.customerChart.inatMoneyArr = []
|
|
|
|
|
|
this.getExternalData()
|
|
|
|
|
|
//查询条件 传给 部门chart + 渲染
|
|
|
- this.$refs.departmentChart.prop = this.queryParam
|
|
|
+ this.$refs.departmentChart.queryParam = this.queryParam
|
|
|
this.$refs.departmentChart.getDepChartData()
|
|
|
|
|
|
//查询条件 传给 客户chart + 渲染
|
|
@@ -259,22 +290,22 @@ export default {
|
|
|
that.isDisabled = false
|
|
|
}, 3000)
|
|
|
},
|
|
|
-
|
|
|
+ // 重置
|
|
|
searchReset() {
|
|
|
this.queryParam = {}
|
|
|
this.value = [] //起始年月重置
|
|
|
this.queryParam.startYearMonth = []
|
|
|
this.queryParam.endYearMonth = []
|
|
|
|
|
|
- // 清空部门chart数据 + 查询条件 + 重新渲染
|
|
|
+ // 清空部门 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 = []
|
|
|
+ // 清空客户 chart 数据 + 查询条件 + 重新渲染
|
|
|
+ this.$refs.customerChart.ccusNameArr = []
|
|
|
this.$refs.customerChart.iquantityArr = []
|
|
|
this.$refs.customerChart.inatMoneyArr = []
|
|
|
this.$refs.customerChart.queryParam = {}
|