|
@@ -7,24 +7,16 @@
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="开始年月">
|
|
|
- <!-- :disabled-date="disabledDate" 不可选择的日期 -->
|
|
|
- <a-month-picker
|
|
|
- placeholder="请选择开始年月"
|
|
|
+ <a-form-item label="起始年月">
|
|
|
+ <a-range-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="queryParam.timeRange"
|
|
|
+ placeholder="['开始年月', '结束年月']"
|
|
|
format="YYYY-MM"
|
|
|
- style="width:100%;"
|
|
|
- v-model="queryParam.startYearMonth"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
-
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="结束年月">
|
|
|
- <a-month-picker
|
|
|
- placeholder="请选择结束年月"
|
|
|
- format="YYYY-MM"
|
|
|
- style="width:100%;"
|
|
|
- v-model="queryParam.endYearMonth"
|
|
|
+ :mode="mode2"
|
|
|
+ :value="value"
|
|
|
+ @panelChange="handlePanelChange"
|
|
|
+ @change="handleChange"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -36,25 +28,23 @@
|
|
|
<a-select-option :value="''">请选择</a-select-option>
|
|
|
<a-select-option :value="0">业务一部</a-select-option>
|
|
|
<a-select-option :value="1">业务二部</a-select-option>
|
|
|
- <a-select-option :value="2">业务三部</a-select-option>
|
|
|
- <a-select-option :value="2">业务四部</a-select-option>
|
|
|
</a-select> -->
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
- <template v-if="toggleSearchStatus">
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="客户">
|
|
|
- <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-option :value="2">AUCHAN</a-select-option>
|
|
|
- <a-select-option :value="2">BIOWORLD</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </template>
|
|
|
+ <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>
|
|
|
+
|
|
|
+ <template v-if="toggleSearchStatus"></template>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
@@ -105,11 +95,10 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
-
|
|
|
import departmentChart from '@views/reportForms/order-statistics/chart/external/departmentChart'
|
|
|
import customerChart from '@views/reportForms/order-statistics/chart/external/customerChart.vue'
|
|
|
|
|
|
-// import { external } from '@api/reportForms/order-statistics.js'
|
|
|
+import { external } from '@api/reportForms/order-statistics.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'ExternalStatistics', // 订单外部统计表
|
|
@@ -179,6 +168,7 @@ export default {
|
|
|
vendorType: '外部',
|
|
|
startYearMonth: '',
|
|
|
endYearMonth: '',
|
|
|
+ // timeRange: [],
|
|
|
department: '',
|
|
|
customer: ''
|
|
|
},
|
|
@@ -187,7 +177,9 @@ export default {
|
|
|
// total: '', //总条数
|
|
|
// current: '', //当前页
|
|
|
// pageSize: '' //一页多少
|
|
|
- }
|
|
|
+ },
|
|
|
+ mode2: ['month', 'month'],
|
|
|
+ value: []
|
|
|
// dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
@@ -197,21 +189,41 @@ export default {
|
|
|
methods: {
|
|
|
getExternalData() {
|
|
|
this.$nextTick(() => {
|
|
|
- // external(this.queryParam).then(res => {
|
|
|
- // if (res.success) {
|
|
|
- // this.ExternalData = res.result.records
|
|
|
- // console.log('订单外部列表', this.ExternalData)
|
|
|
- // this.pagination = {
|
|
|
- // total: res.result.total,
|
|
|
- // current: res.result.current,
|
|
|
- // pageSize: res.result.size
|
|
|
- // }
|
|
|
- // // console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
|
|
|
- // }
|
|
|
- // })
|
|
|
+ external(this.queryParam).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.ExternalData = res.result.records
|
|
|
+ console.log('订单外部列表', this.ExternalData)
|
|
|
+ this.pagination = {
|
|
|
+ total: res.result.total,
|
|
|
+ current: 1,
|
|
|
+ pageSize: res.result.size
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
+ // 日期面板变化时的回调
|
|
|
+ handlePanelChange(value, mode) {
|
|
|
+ this.value = value
|
|
|
+ this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
|
|
|
+ console.log('this.mode2', this.mode2)
|
|
|
|
|
|
+ console.log('value.dateString[0]', moment(value[0]))
|
|
|
+ console.log('value.dateString[1]', moment(value[0]))
|
|
|
+ // this.queryParam.startYearMonth = dateString[0]
|
|
|
+ // this.queryParam.endYearMonth = dateString[1]
|
|
|
+ },
|
|
|
+ // onDateChange(value, dateString) {
|
|
|
+ // console.log('起年月', dateString[0], '始年月', dateString[1])
|
|
|
+ // this.queryParam.startYearMonth = dateString[0]
|
|
|
+ // this.queryParam.endYearMonth = dateString[1]
|
|
|
+ // }
|
|
|
+ // 时间发生变化的回调,发生在用户选择时间时
|
|
|
+ handleChange(value) {
|
|
|
+ console.log('?', value)
|
|
|
+ this.value = value
|
|
|
+ console.log('this.value', this.value)
|
|
|
+ },
|
|
|
searchQuery() {
|
|
|
this.getExternalData()
|
|
|
},
|