list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <template>
  2. <div>
  3. <a-card size="small" :bordered="false" class="promotionSalesList-wrap searchBoxNormal">
  4. <!-- 搜索条件 -->
  5. <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
  6. <a-form-model
  7. id="promotionSalesList-form"
  8. ref="ruleForm"
  9. class="form-model-con"
  10. layout="inline"
  11. :model="form"
  12. :rules="rules"
  13. @keyup.enter.native="handleSearch">
  14. <a-row :gutter="15">
  15. <a-col :md="6" :sm="24">
  16. <a-form-model-item label="统计月份" prop="monthInfo">
  17. <div class="monthBox" style="display:flex;align-item:center;">
  18. <a-month-picker
  19. id="promotionSalesList-startValue"
  20. :disabled-date="disabledStartDate"
  21. format="YYYY-MM"
  22. v-model="startValue"
  23. placeholder="开始月份"
  24. @openChange="handleStartOpenChange"
  25. @change="getStartDate"
  26. />
  27. <span>~</span>
  28. <a-month-picker
  29. id="promotionSalesList-endValue"
  30. :disabled-date="disabledEndDate"
  31. format="YYYY-MM"
  32. v-model="endValue"
  33. placeholder="结束月份"
  34. :open="endOpen"
  35. @openChange="handleEndOpenChange"
  36. @change="getEndDate"
  37. />
  38. </div>
  39. </a-form-model-item>
  40. </a-col>
  41. <a-col :md="6" :sm="24">
  42. <a-form-model-item label="区域/分区">
  43. <subarea id="promotionSalesList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
  44. </a-form-model-item>
  45. </a-col>
  46. <a-col :md="6" :sm="24">
  47. <a-form-model-item label="区域负责人">
  48. <BizUser id="promotionSalesList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
  49. </a-form-model-item>
  50. </a-col>
  51. <template v-if="advanced">
  52. <a-form-model-item label="省份">
  53. <Area id="promotionSalesList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
  54. </a-form-model-item>
  55. <a-col :md="6" :sm="24">
  56. <a-form-model-item label="客户名称">
  57. <dealerSubareaScopeList ref="custList" id="salesAmountReportList-dealerSn" @change="custChange" />
  58. </a-form-model-item>
  59. </a-col>
  60. <a-col :md="6" :sm="24">
  61. <a-form-model-item label="客户级别">
  62. <v-select
  63. v-model="queryParam.dealerLevel"
  64. ref="dealerLevel"
  65. id="promotionSalesList-dealerLevel"
  66. code="DEALER_LEVEL"
  67. placeholder="请选择客户级别"
  68. allowClear></v-select>
  69. </a-form-model-item>
  70. </a-col>
  71. <a-col :md="6" :sm="24">
  72. <a-form-model-item label="产品品牌">
  73. <ProductBrand id="productInfoList-productBrand" v-model="queryParam.productBrand"></ProductBrand>
  74. </a-form-model-item>
  75. </a-col>
  76. <a-col :md="6" :sm="24">
  77. <a-form-model-item label="产品分类">
  78. <productTypeAll
  79. expandType="click"
  80. :changeOnSelect="false"
  81. placeholder="请选择产品分类"
  82. :level="2"
  83. @change="changeProductType"
  84. v-model="productType"
  85. id="productInfoList-productType"></productTypeAll>
  86. </a-form-model-item>
  87. </a-col>
  88. <a-col :md="6" :sm="24">
  89. <a-form-model-item label="新/老客户">
  90. <a-select id="productInfoList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
  91. <a-select-option value="1">新客户</a-select-option>
  92. <a-select-option value="0">老客户</a-select-option>
  93. </a-select>
  94. </a-form-model-item>
  95. </a-col>
  96. </template>
  97. <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
  98. <a-button type="primary" @click="handleSearch" :disabled="disabled" id="promotionSalesList-refresh">查询</a-button>
  99. <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="promotionSalesList-reset">重置</a-button>
  100. <a-button
  101. style="margin-left: 10px"
  102. type="primary"
  103. class="button-warning"
  104. @click="handleExport"
  105. :disabled="disabled"
  106. :loading="exportLoading"
  107. v-if="$hasPermissions('B_brandTypeReportExport')"
  108. id="promotionSalesList-export">导出</a-button>
  109. <a @click="advanced=!advanced" style="margin-left: 8px">
  110. {{ advanced ? '收起' : '展开' }}
  111. <a-icon :type="advanced ? 'up' : 'down'"/>
  112. </a>
  113. </a-col>
  114. </a-row>
  115. </a-form-model>
  116. </div>
  117. </a-card>
  118. <a-card size="small" :bordered="false">
  119. <a-spin :spinning="spinning" tip="Loading...">
  120. <!-- 列表 -->
  121. <s-table
  122. class="sTable fixPagination"
  123. ref="table"
  124. size="small"
  125. :defaultLoadData="true"
  126. :rowKey="(record) => record.no"
  127. rowKeyName="no"
  128. :columns="columns"
  129. :data="loadData"
  130. :pageSize="30"
  131. :style="{ height: tableHeight+84.5+'px' }"
  132. :scroll="{ x:1890,y: tableHeight-136 }"
  133. bordered>
  134. <!-- 品牌-->
  135. <template slot="brandName" slot-scope="text, record">
  136. {{ record.allProductBrandFlag==1?'全品牌':record.brandName?record.brandName:'--' }}
  137. </template>
  138. <!-- 分类 -->
  139. <template slot="brandtypeName" slot-scope="text, record">
  140. {{ record.allProductTypeFlag==1?'全分类':record.brandtypeName?record.brandtypeName:'--' }}
  141. </template>
  142. <template slot="footer" v-if="totalData">
  143. <a-row>
  144. <a-col span="24">
  145. <a-row>
  146. <a-col
  147. span="4"
  148. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">销售额:{{ (totalData.totalSaleAmount || totalData.totalSaleAmount==0) ? toThousands(totalData.totalSaleAmount) : '--' }}</a-col>
  149. <a-col
  150. span="4"
  151. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">促销成本费用:{{ (totalData.promoCostFee || totalData.promoCostFee==0) ? toThousands(totalData.promoCostFee) : '--' }}</a-col>
  152. <a-col
  153. span="4"
  154. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">促销成本费用比:{{ totalData.promoCostFeeRate ? (totalData.promoCostFeeRate*100).toFixed(2)+'%' : '--' }}</a-col>
  155. <a-col
  156. span="4"
  157. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">促销销售费用:{{ (totalData.promoSaleFee || totalData.promoSaleFee==0) ? toThousands(totalData.promoSaleFee) : '--' }}</a-col>
  158. <a-col
  159. span="4"
  160. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">促销销售费用比:{{ totalData.promoSaleFeeRate ? (totalData.promoSaleFeeRate*100).toFixed(2)+'%' : '--' }}</a-col>
  161. <a-col
  162. span="4"
  163. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">参与活动销售额:{{ (totalData.promoSaleAmount || totalData.promoSaleAmount==0) ? toThousands(totalData.promoSaleAmount) : '--' }}</a-col>
  164. <a-col
  165. span="4"
  166. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">未参与活动销售额:{{ (totalData.notpromotionSale || totalData.notpromotionSale==0) ? toThousands(totalData.notpromotionSale) : '--' }}</a-col>
  167. <a-col
  168. span="4"
  169. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">产品赠品成本费用:{{ (totalData.allocateGiftCost || totalData.allocateGiftCost==0) ? toThousands(totalData.allocateGiftCost) : '--' }}</a-col>
  170. <a-col
  171. span="4"
  172. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">产品赠品销售费用:{{ (totalData.allocateGiftAmount || totalData.allocateGiftAmount==0) ? toThousands(totalData.allocateGiftAmount) : '--' }}</a-col>
  173. <a-col
  174. span="4"
  175. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">物料赠品成本费用:{{ (totalData.allocateCost || totalData.allocateCost==0) ? toThousands(totalData.allocateCost) : '--' }}</a-col>
  176. <a-col
  177. span="4"
  178. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">物料赠品销售费用:{{ (totalData.allocateSaleAmount || totalData.allocateSaleAmount==0) ? toThousands(totalData.allocateSaleAmount) : '--' }}</a-col>
  179. <a-col
  180. span="4"
  181. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">成本费用合计(促销+产品+物料):{{ (totalData.promoCostFeeAndAllocateCost || totalData.promoCostFeeAndAllocateCost==0)? toThousands(totalData.promoCostFeeAndAllocateCost) : '--' }}</a-col>
  182. <a-col
  183. span="4"
  184. v-if="$hasPermissions('M_promotionSalesOrderReportList_costPrice')">成本合计占比:{{ totalData.totalCostRate ? (totalData.totalCostRate*100).toFixed(2)+'%' : '--' }}</a-col>
  185. <a-col
  186. span="4"
  187. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">销售费用合计(促销+产品+物料):{{ (totalData.promoSaleFeeAndAllocateAmount || totalData.promoSaleFeeAndAllocateAmount==0) ? toThousands(totalData.promoSaleFeeAndAllocateAmount) : '--' }}</a-col>
  188. <a-col
  189. span="4"
  190. v-if="$hasPermissions('M_promotionSalesOrderReportList_salesPrice')">销售合计占比:{{ totalData.totalSaleRate ? (totalData.totalSaleRate*100).toFixed(2)+'%' : '--' }}</a-col>
  191. </a-row>
  192. </a-col>
  193. </a-row>
  194. </template>
  195. </s-table>
  196. </a-spin>
  197. <!-- 导出提示框 -->
  198. <reportModal :visible="showExport" @close="showExport=false"></reportModal>
  199. </a-card>
  200. </div>
  201. </template>
  202. <script>
  203. import { commonMixin } from '@/utils/mixin'
  204. import moment from 'moment'
  205. import { hdExportExcel } from '@/libs/exportExcel'
  206. // 组件
  207. import { STable, VSelect } from '@/components'
  208. import ProductBrand from '@/views/common/productBrand.js'
  209. import productTypeAll from '@/views/common/productType.js'
  210. import subarea from '@/views/common/subarea.js'
  211. import reportModal from '@/views/common/reportModal.vue'
  212. import Area from '@/views/common/area.js'
  213. import BizUser from '@/views/common/bizUser.js'
  214. import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
  215. // 接口
  216. import { brandTypeReportList, brandTypeReportCount, brandTypeReportExport } from '@/api/reportData'
  217. export default {
  218. name: 'PromotionSalesOrderReport',
  219. mixins: [commonMixin],
  220. components: { STable, VSelect, subarea, dealerSubareaScopeList, reportModal, Area, BizUser, ProductBrand, productTypeAll },
  221. data () {
  222. return {
  223. spinning: false,
  224. advanced: true, // 高级搜索 展开/关闭
  225. tableHeight: 0, // 表格高度
  226. disabled: false, // 查询、重置按钮是否可操作
  227. exportLoading: false, // 导出按钮加载状态
  228. showExport: false, // 导出弹窗
  229. // 查询条件
  230. queryParam: {
  231. brandTypeBeginDate: moment().format('YYYYMM'), // 开始月份
  232. brandTypeEndDate: moment().format('YYYYMM'), // 结束月份
  233. dealerSn: undefined, // 客户 sn
  234. provinceSn: undefined, // 省份
  235. subareaArea: {
  236. subareaSn: undefined, // 区域
  237. subareaAreaSn: undefined, // 分区
  238. bizUserSn: undefined// 区域负责人
  239. },
  240. productBrand: undefined, // 产品品牌
  241. productTypeSn1: '', // 产品一级分类
  242. productType: '', // 产品二级分类
  243. dealerLevel: undefined, // 客户等级
  244. dealerNewFlag: undefined
  245. },
  246. productType: [], // 产品分类
  247. form: {
  248. monthInfo: [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
  249. },
  250. rules: {
  251. monthInfo: [{ required: true, message: '请选择统计月份', trigger: 'change' }]
  252. },
  253. startValue: moment().format('YYYY-MM'), // 统计月份 开始
  254. endValue: moment().format('YYYY-MM'), // 统计月份 结束
  255. endOpen: false, // 打开结束月份弹窗
  256. // 加载数据方法 必须为 Promise 对象
  257. loadData: parameter => {
  258. this.disabled = true
  259. this.spinning = true
  260. const newParamsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) // 有分页
  261. const paramsPage = JSON.parse(JSON.stringify(newParamsPage))
  262. delete paramsPage.productTypeSn1
  263. if (!paramsPage.subareaArea.subareaSn && !paramsPage.subareaArea.subareaAreaSn && !paramsPage.subareaArea.bizUserSn) {
  264. delete paramsPage.subareaArea
  265. }
  266. // 获取列表数据 有分页
  267. return brandTypeReportList(paramsPage).then(res => {
  268. let data
  269. if (res.status == 200) {
  270. data = res.data
  271. this.getCount(paramsPage)
  272. // 计算列表序号
  273. const no = (data.pageNo - 1) * data.pageSize
  274. for (var i = 0; i < data.list.length; i++) {
  275. data.list[i].no = no + i + 1
  276. }
  277. this.disabled = false
  278. }
  279. this.spinning = false
  280. return data
  281. })
  282. },
  283. totalData: null
  284. }
  285. },
  286. computed: {
  287. columns () {
  288. const _this = this
  289. const isCostFlag = this.$hasPermissions('M_promotionSalesOrderReportList_costPrice')
  290. const isSellFlag = this.$hasPermissions('M_promotionSalesOrderReportList_salesPrice')
  291. const arr = [
  292. { title: '区域', dataIndex: 'subareaArea.subareaName', show: true, width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
  293. { title: '分区', dataIndex: 'subareaArea.subareaAreaName', show: true, width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
  294. { title: '区域负责人', dataIndex: 'bizUserName', show: true, width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
  295. { title: '省份', dataIndex: 'dealerInfo.provinceName', show: true, width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
  296. { title: '客户名称', dataIndex: 'dealerInfo.dealerName', show: true, width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  297. { title: '客户级别', dataIndex: 'dealerInfo.dealerLevelDictValue', show: true, width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
  298. { title: '品牌', dataIndex: 'brandName', show: true, width: '80px', align: 'center', scopedSlots: { customRender: 'brandName' } },
  299. { title: '二级分类', dataIndex: 'brandtypeName', show: true, width: '90px', align: 'center', scopedSlots: { customRender: 'brandtypeName' } },
  300. { title: '销售额', dataIndex: 'totalSaleAmount', show: true, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  301. { title: '促销成本费用', dataIndex: 'promoCostFee', show: true, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
  302. { title: '促销成本费用比', dataIndex: 'promoCostFeeRate', show: true, width: '60px', align: 'center', customRender: text => (text ? (text * 100).toFixed(2) + '%' : '--') },
  303. { title: '促销销售费用', dataIndex: 'promoSaleFee', show: true, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  304. { title: '促销销售费用比', dataIndex: 'promoSaleFeeRate', show: true, width: '60px', align: 'center', customRender: text => (text ? (text * 100).toFixed(2) + '%' : '--') },
  305. { title: '参与活动销售额', dataIndex: 'promoSaleAmount', show: true, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  306. { title: '未参与活动销售额', dataIndex: 'notpromotionSale', show: true, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  307. { title: '产品赠品成本费用', dataIndex: 'allocateGiftCost', show: isCostFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  308. { title: '产品赠品销售费用', dataIndex: 'allocateGiftAmount', show: isSellFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  309. { title: '物料赠品成本费用', dataIndex: 'allocateCost', show: isCostFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  310. { title: '物料赠品销售费用', dataIndex: 'allocateSaleAmount', show: isSellFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  311. { title: '成本费用合计(促销+产品+物料)', dataIndex: 'promoCostFeeAndAllocateCost', show: isCostFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  312. { title: '成本合计占比', dataIndex: 'totalCostRate', show: isCostFlag, width: '60px', align: 'center', customRender: text => (text ? (text * 100).toFixed(2) + '%' : '--') },
  313. { title: '销售费用合计(促销+产品+物料)', dataIndex: 'promoSaleFeeAndAllocateAmount', show: isSellFlag, width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
  314. { title: '销售合计占比', dataIndex: 'totalSaleRate', show: isSellFlag, width: '60px', align: 'center', customRender: text => (text ? (text * 100).toFixed(2) + '%' : '--') }
  315. ]
  316. return arr.filter(item => item.show)
  317. }
  318. },
  319. watch: {
  320. // 展开关闭
  321. advanced (newValue, oldValue) {
  322. const _this = this
  323. this.$nextTick(() => { // 页面渲染完成后的回调
  324. _this.setTableH()
  325. })
  326. },
  327. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  328. this.setTableH()
  329. }
  330. },
  331. methods: {
  332. // 统计月份 选择月份限制
  333. disabledStartDate (current) {
  334. const endValue = this.endValue
  335. const md = moment(current).startOf('month').valueOf()
  336. const cd = moment().startOf('month').valueOf() // 当前月份
  337. if (!current || !endValue) {
  338. return md > cd
  339. }
  340. const ed = moment(endValue).startOf('month').valueOf()
  341. return md > ed || md > cd
  342. },
  343. disabledEndDate (current) {
  344. const startValue = this.startValue
  345. const md = moment(current).startOf('month').valueOf()
  346. const cd = moment().startOf('month').valueOf() // 当前月份
  347. if (!current || !startValue) {
  348. return md > cd
  349. }
  350. const sd = moment(startValue).startOf('month').valueOf()
  351. return md < sd || md > cd
  352. },
  353. // 开始时间
  354. handleStartOpenChange (open) {
  355. if (!open) {
  356. this.endOpen = true
  357. }
  358. },
  359. getStartDate (date, dateString) {
  360. this.form.monthInfo[0] = dateString
  361. this.queryParam.brandTypeBeginDate = date ? moment(dateString).startOf('month').format('YYYYMM') : ''
  362. },
  363. // 结束时间
  364. handleEndOpenChange (open) {
  365. this.endOpen = open
  366. },
  367. getEndDate (date, dateString) {
  368. this.form.monthInfo[1] = dateString
  369. this.queryParam.brandTypeEndDate = date ? moment(dateString).endOf('month').format('YYYYMM') : ''
  370. },
  371. // 导出
  372. handleExport () {
  373. const _this = this
  374. this.$refs.ruleForm.validate(valid => {
  375. if (valid) {
  376. const params = _this.queryParam
  377. _this.showExport = true
  378. _this.exportLoading = true
  379. _this.spinning = true
  380. _this.$store.state.app.curActionPermission = 'B_brandTypeReportExport'
  381. hdExportExcel(brandTypeReportExport, params, '促销销售单报表(统计)', function () {
  382. _this.exportLoading = false
  383. _this.spinning = false
  384. _this.$store.state.app.curActionPermission = ''
  385. })
  386. } else {
  387. return false
  388. }
  389. })
  390. },
  391. // 总计
  392. getCount (params) {
  393. brandTypeReportCount(params).then(res => {
  394. if (res.status == 200) {
  395. this.totalData = res.data || null
  396. } else {
  397. this.totalData = null
  398. }
  399. })
  400. },
  401. // 查询
  402. handleSearch () {
  403. const _this = this
  404. if (!_this.form.monthInfo[0] || !_this.form.monthInfo[1]) {
  405. _this.$message.error('请选择统计月份')
  406. return
  407. }
  408. this.$refs.ruleForm.validate(valid => {
  409. if (valid) {
  410. _this.$refs.table.refresh(true)
  411. } else {
  412. _this.$message.error('请选择统计月份')
  413. return false
  414. }
  415. })
  416. },
  417. // 客户名称
  418. custChange (val) {
  419. this.queryParam.dealerSn = val.key
  420. },
  421. // 区域分区
  422. subareaChange (val) {
  423. this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
  424. this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
  425. },
  426. // 产品分类 change
  427. changeProductType (val, opt) {
  428. this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
  429. this.queryParam.productType = val[1] ? val[1] : ''
  430. },
  431. // 重置
  432. resetSearchForm () {
  433. this.form.monthInfo = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
  434. this.startValue = moment().format('YYYY-MM')
  435. this.endValue = moment().format('YYYY-MM')
  436. this.queryParam.brandTypeBeginDate = moment().format('YYYYMM')
  437. this.queryParam.brandTypeEndDate = moment().format('YYYYMM')
  438. this.queryParam.dealerSn = undefined
  439. this.queryParam.provinceSn = undefined
  440. this.queryParam.subareaArea.subareaSn = undefined
  441. this.queryParam.subareaArea.subareaAreaSn = undefined
  442. this.queryParam.subareaArea.bizUserSn = undefined
  443. this.queryParam.productBrand = undefined
  444. this.queryParam.productTypeSn1 = undefined
  445. this.queryParam.productType = undefined
  446. this.queryParam.dealerLevel = undefined
  447. this.queryParam.dealerNewFlag = undefined
  448. this.productType = []
  449. this.totalData = null
  450. if (this.advanced) {
  451. this.$refs.custList.resetForm()
  452. }
  453. this.$refs.subarea.clearData()
  454. this.$refs.ruleForm.resetFields()
  455. this.$refs.table.refresh()
  456. },
  457. // 计算表格高度
  458. setTableH () {
  459. const tableSearchH = this.$refs.tableSearch.offsetHeight
  460. this.tableHeight = window.innerHeight - tableSearchH - 215
  461. }
  462. },
  463. mounted () {
  464. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  465. this.setTableH()
  466. }
  467. },
  468. activated () {
  469. // 如果是新页签打开,则重置当前页面
  470. if (this.$store.state.app.isNewTab) {
  471. this.setTableH()
  472. }
  473. },
  474. beforeRouteEnter (to, from, next) {
  475. next(vm => {})
  476. }
  477. }
  478. </script>
  479. <style lang="less" scoped>
  480. .monthBox{
  481. /deep/.ant-calendar-picker-icon{
  482. display:none !important;
  483. }
  484. /deep/.ant-calendar-picker input{
  485. text-align:center;
  486. }
  487. }
  488. </style>