list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <a-card size="small" :bordered="false" class="allocationDetailsList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 搜索条件 -->
  5. <div class="table-page-search-wrapper">
  6. <a-form-model
  7. id="allocationDetailsList-form"
  8. ref="ruleForm"
  9. class="form-model-con"
  10. layout="inline"
  11. :model="queryParam"
  12. :rules="rules"
  13. :labelCol="labelCol"
  14. :wrapperCol="wrapperCol"
  15. @keyup.enter.native="handleSearch" >
  16. <a-row :gutter="15">
  17. <a-col :md="6" :sm="24">
  18. <a-form-model-item label="调拨开单日期" prop="time">
  19. <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
  20. </a-form-model-item>
  21. </a-col>
  22. <a-col :md="5" :sm="24">
  23. <a-form-model-item label="产品名称">
  24. <a-input id="allocationDetailsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
  25. </a-form-model-item>
  26. </a-col>
  27. <a-col :md="5" :sm="24">
  28. <a-form-model-item label="品牌分类">
  29. <v-select code="BRAND_TYPE" id="allocationDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
  30. </a-form-model-item>
  31. </a-col>
  32. <template v-if="advanced">
  33. <a-col :md="7" :sm="24">
  34. <a-form-model-item label="产品品牌">
  35. <ProductBrand id="allocationDetailsList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
  36. </a-form-model-item>
  37. </a-col>
  38. <a-col :md="6" :sm="24">
  39. <a-form-model-item label="产品编码">
  40. <a-input id="allocationDetailsList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
  41. </a-form-model-item>
  42. </a-col>
  43. <a-col :md="6" :sm="24">
  44. <a-form-model-item label="费用/调拨类型">
  45. <AllocateType id="allocationDetailsList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
  46. </a-form-model-item>
  47. </a-col>
  48. <a-col :md="6" :sm="24">
  49. <a-form-model-item label="操作员">
  50. <a-select id="allocationDetailsList-creatorId" v-model="queryParam.creatorId" placeholder="请选择操作员" allowClear >
  51. <a-select-option v-for="item in operatorList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
  52. </a-select>
  53. </a-form-model-item>
  54. </a-col>
  55. <a-col :md="6" :sm="24">
  56. <a-form-model-item label="调拨单号">
  57. <a-input id="allocationDetailsList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
  58. </a-form-model-item>
  59. </a-col>
  60. <a-col :md="6" :sm="24">
  61. <a-form-model-item label="产品分类">
  62. <a-cascader
  63. @change="changeProductType"
  64. expand-trigger="hover"
  65. change-on-select
  66. :options="productTypeList"
  67. :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
  68. id="allocationDetailsList-productType"
  69. placeholder="请选择产品分类"
  70. allowClear
  71. v-model="productType" />
  72. </a-form-model-item>
  73. </a-col>
  74. <a-col :md="6" :sm="24">
  75. <a-form-model-item label="客户名称">
  76. <a-input id="allocationDetailsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
  77. </a-form-model-item>
  78. </a-col>
  79. <a-col :md="6" :sm="24">
  80. <a-form-model-item label="客户级别">
  81. <v-select code="DEALER_LEVEL" id="allocationDetailsList-dealerLevel" v-model="queryParam.dealerLevel" allowClear placeholder="请选择客户级别"></v-select>
  82. </a-form-model-item>
  83. </a-col>
  84. <a-col :md="6" :sm="24">
  85. <a-form-model-item label="所在区域">
  86. <subarea id="allocationDetailsList-subarea" v-model="queryParam.subareaSn"></subarea>
  87. </a-form-model-item>
  88. </a-col>
  89. <a-col :md="6" :sm="24">
  90. <a-form-model-item label="地区">
  91. <a-form-model-item prop="dealerProvinceSn">
  92. <a-select id="allocationDetailsList-dealerProvinceSn" allowClear v-model="queryParam.dealerProvinceSn" placeholder="请选择省">
  93. <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
  94. </a-select>
  95. </a-form-model-item>
  96. </a-form-model-item>
  97. </a-col>
  98. </template>
  99. <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
  100. <a-button
  101. style="margin-left: 0px"
  102. type="primary"
  103. class="button-info"
  104. size="small"
  105. @click="handleStock"
  106. id="allocationDetailsList-stockDate">盘点区间日期</a-button>
  107. <a-button type="primary" @click="handleSearch" :disabled="disabled" id="allocationDetailsList-refresh">查询</a-button>
  108. <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationDetailsList-reset">重置</a-button>
  109. <a-button
  110. style="margin-left: 5px"
  111. type="primary"
  112. class="button-warning"
  113. @click="handleExport"
  114. :disabled="disabled"
  115. :loading="exportLoading"
  116. v-if="$hasPermissions('B_allocationDetails_Export')"
  117. id="allocationDetailsList-export">导出</a-button>
  118. <a @click="advanced=!advanced">
  119. {{ advanced ? '收起' : '展开' }}
  120. <a-icon :type="advanced ? 'up' : 'down'"/>
  121. </a>
  122. </a-col>
  123. </a-row>
  124. </a-form-model>
  125. </div>
  126. <!-- 列表 -->
  127. <s-table
  128. class="sTable"
  129. ref="table"
  130. size="small"
  131. :rowKey="(record) => record.id"
  132. :columns="columns"
  133. :data="loadData"
  134. :defaultLoadData="false"
  135. :scroll="{ x: 2610 }"
  136. bordered>
  137. <template slot="footer">
  138. <a-row :gutter="15">
  139. <a-col :md="4" :sm="24">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
  140. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
  141. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')&&$hasPermissions('M_allocationDetailsList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</a-col>
  142. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_allocationDetailsList_salesPrice')">总售价:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</a-col>
  143. </a-row>
  144. </template>
  145. </s-table>
  146. </a-spin>
  147. <!-- 导出提示框 -->
  148. <reportModal :visible="showExport" @close="showExport=false"></reportModal>
  149. </a-card>
  150. </template>
  151. <script>
  152. import { commonMixin } from '@/utils/mixin'
  153. import getDate from '@/libs/getDate.js'
  154. import { STable, VSelect } from '@/components'
  155. import rangeDate from '@/views/common/rangeDate.vue'
  156. import reportModal from '@/views/common/reportModal.vue'
  157. import subarea from '@/views/common/subarea.js'
  158. import { productBrandQuery } from '@/api/productBrand'
  159. import { productTypeQuery } from '@/api/productType'
  160. import { getArea } from '@/api/data'
  161. import { allocateTypeAllList } from '@/api/allocateType'
  162. import ProductBrand from '@/views/common/productBrand.js'
  163. import { hdExportExcel } from '@/libs/exportExcel'
  164. import { userQueryList } from '@/api/power-user'
  165. import AllocateType from '@/views/common/allocateType.js'
  166. import { allocateReportDetailList, allocateReportDetailCount, allocateReportDetailExport } from '@/api/allocateReport'
  167. export default {
  168. name: 'AllocationDetailsList',
  169. mixins: [commonMixin],
  170. components: { STable, VSelect, rangeDate, subarea, ProductBrand, reportModal, AllocateType },
  171. data () {
  172. return {
  173. spinning: false,
  174. advanced: false, // 高级搜索 展开/关闭
  175. exportLoading: false,
  176. tableHeight: 0,
  177. showExport: false,
  178. allocateTypeVal: [],
  179. queryParam: { // 查询条件
  180. time: [
  181. getDate.getCurrMonthDays().starttime,
  182. getDate.getCurrMonthDays().endtime
  183. ],
  184. beginDate: getDate.getCurrMonthDays().starttime,
  185. endDate: getDate.getCurrMonthDays().endtime,
  186. productName: '',
  187. productBrandTypeSn: undefined,
  188. productBrandSn: undefined, // 产品品牌
  189. productCode: '',
  190. costTypeSn: undefined, // 费用类型
  191. allocateSortSn: undefined, // 调拨类型1
  192. allocateTypeSn: undefined, // 调拨类型2
  193. creatorId: undefined,
  194. allocateNo: '',
  195. productTypeSn1: '', // 产品一级分类
  196. productTypeSn2: '', // 产品二级分类
  197. productTypeSn3: '', // 产品三级分类
  198. dealerName: '',
  199. dealerLevel: undefined,
  200. subareaSn: undefined,
  201. dealerProvinceSn: undefined
  202. },
  203. productType: [],
  204. labelCol: { span: 8 },
  205. wrapperCol: { span: 16 },
  206. rules: {
  207. 'time': [{ required: true, message: '请选择调拨开单日期', trigger: 'change' }]
  208. },
  209. disabled: false, // 查询、重置按钮是否可操作
  210. // 加载数据方法 必须为 Promise 对象
  211. loadData: parameter => {
  212. this.disabled = true
  213. const params = Object.assign(parameter, this.queryParam)
  214. delete params.time
  215. this.spinning = true
  216. if (params.beginDate) {
  217. return allocateReportDetailList(params).then(res => {
  218. let data
  219. if (res.status == 200) {
  220. data = res.data
  221. // 总计
  222. this.getCount(params)
  223. const no = (data.pageNo - 1) * data.pageSize
  224. for (var i = 0; i < data.list.length; i++) {
  225. data.list[i].no = no + i + 1
  226. }
  227. this.disabled = false
  228. }
  229. this.spinning = false
  230. return data
  231. })
  232. } else {
  233. const _this = this
  234. return new Promise(function (resolve, reject) {
  235. const data = {
  236. pageNo: 1,
  237. pageSize: 10,
  238. list: [],
  239. count: 0
  240. }
  241. _this.disabled = false
  242. _this.spinning = false
  243. _this.$message.info('请选择调拨开单日期')
  244. resolve(data)
  245. })
  246. }
  247. },
  248. allocateTypeList: [], // 调拨类型
  249. productBrandList: [], // 品牌下拉数据
  250. productTypeList: [], // 分类下拉数据
  251. operatorList: [], // 操作员下拉数据
  252. addrProvinceList: [], // 省下拉
  253. totalData: null // 合计
  254. }
  255. },
  256. computed: {
  257. columns () {
  258. const _this = this
  259. const arr = [
  260. { title: '区域', dataIndex: 'subareaNames', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
  261. { title: '调拨单号', dataIndex: 'allocateNo', width: 160, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
  262. { title: '调拨开单日期', dataIndex: 'allocateDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
  263. { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  264. { title: '客户名称', dataIndex: 'targetName', width: 120, align: 'center', sorter: true, customRender: function (text) { return text || '--' }, ellipsis: true },
  265. { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  266. { title: '品牌', dataIndex: 'productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  267. { title: '二级分类', dataIndex: 'productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
  268. { title: '产品名称', dataIndex: 'productName', align: 'left', sorter: true, customRender: function (text) { return text || '--' }, ellipsis: true },
  269. { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
  270. { title: '调拨数量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  271. { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
  272. // { title: '成本价', dataIndex: 'cost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  273. // { title: '售价', dataIndex: 'price', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  274. // { title: '总成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  275. // { title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  276. ]
  277. if (this.$hasPermissions('M_allocationDetailsList_costPrice')) { // 成本价权限
  278. arr.push({ title: '成本价', dataIndex: 'cost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  279. }
  280. if (this.$hasPermissions('M_allocationDetailsList_salesPrice')) { // 售价权限
  281. arr.push({ title: '售价', dataIndex: 'price', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  282. }
  283. if (this.$hasPermissions('M_allocationDetailsList_costPrice')) { // 成本价权限
  284. arr.push({ title: '总成本价', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  285. if (this.$hasPermissions('M_allocationDetailsList_salesPrice')) {
  286. arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  287. }
  288. }
  289. arr.concat([
  290. { title: '仓库', dataIndex: 'warehouseName', width: 90, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
  291. { title: '仓位', dataIndex: 'warehouseLocationName', width: 90, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
  292. { title: '操作员', dataIndex: 'creatorName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  293. { title: '费用类型', dataIndex: 'costTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  294. { title: '调拨类型(一级)', dataIndex: 'allocateSortName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  295. { title: '调拨类型(二级)', dataIndex: 'allocateTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  296. { title: '费用归属品牌', dataIndex: 'costProductBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  297. { title: '费用归属品类(二级)', dataIndex: 'costProductTypeName2', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  298. { title: '费用归属品类(三级)', dataIndex: 'costProductTypeName3', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  299. { title: '费用归属部门', dataIndex: 'departmentName', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
  300. ])
  301. return arr
  302. }
  303. },
  304. methods: {
  305. // 盘点库存日期
  306. handleStock () {
  307. this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
  308. },
  309. // 创建时间 change
  310. dateChange (date) {
  311. if (date[0] && date[1]) {
  312. this.queryParam.time = date
  313. } else {
  314. this.queryParam.time = []
  315. }
  316. this.queryParam.beginDate = date[0] || ''
  317. this.queryParam.endDate = date[1] || ''
  318. },
  319. changeAllocatype (val, opts) {
  320. this.allocateTypeVal = val || []
  321. this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
  322. this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
  323. this.queryParam.allocateTypeSn = val && val[2] ? val[2] : ''
  324. },
  325. // 合计
  326. getCount (params) {
  327. allocateReportDetailCount(params).then(res => {
  328. if (res.status == 200) {
  329. this.totalData = res.data
  330. } else {
  331. this.totalData = null
  332. }
  333. })
  334. },
  335. // 查询
  336. handleSearch () {
  337. const _this = this
  338. this.$refs.ruleForm.validate(valid => {
  339. if (valid) {
  340. _this.$refs.table.refresh(true)
  341. } else {
  342. console.log('error submit!!')
  343. return false
  344. }
  345. })
  346. },
  347. // 重置
  348. resetSearchForm () {
  349. this.queryParam.time = [
  350. getDate.getCurrMonthDays().starttime,
  351. getDate.getCurrMonthDays().endtime
  352. ]
  353. this.$refs.rangeDate.resetDate(this.queryParam.time)
  354. this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
  355. this.queryParam.endDate = getDate.getCurrMonthDays().endtime
  356. this.queryParam.productName = ''
  357. this.queryParam.productBrandTypeSn = undefined
  358. this.queryParam.productBrandSn = undefined
  359. this.queryParam.productCode = ''
  360. this.queryParam.costTypeSn = undefined
  361. this.queryParam.allocateSortSn = undefined
  362. this.queryParam.allocateTypeSn = undefined
  363. this.queryParam.creatorId = undefined
  364. this.queryParam.allocateNo = ''
  365. this.queryParam.productTypeSn1 = ''
  366. this.queryParam.productTypeSn2 = ''
  367. this.queryParam.productTypeSn3 = ''
  368. this.queryParam.dealerName = ''
  369. this.queryParam.dealerLevel = undefined
  370. this.queryParam.subareaSn = undefined
  371. this.queryParam.dealerProvinceSn = undefined
  372. this.productType = []
  373. this.allocateTypeVal = []
  374. this.$refs.ruleForm.resetFields()
  375. this.totalData = null
  376. this.$refs.table.clearTable()
  377. },
  378. // 导出
  379. handleExport () {
  380. const _this = this
  381. this.$refs.ruleForm.validate(valid => {
  382. if (valid) {
  383. const params = _this.queryParam
  384. params.showCostFlag = this.$hasPermissions('B_allocationDetails_Export_costPrice')
  385. params.showPriceFlag = this.$hasPermissions('B_allocationDetails_Export_salesPrice')
  386. _this.showExport = true
  387. _this.exportLoading = true
  388. _this.spinning = true
  389. hdExportExcel(allocateReportDetailExport, params, '调拨明细报表', function () {
  390. _this.exportLoading = false
  391. _this.spinning = false
  392. })
  393. } else {
  394. console.log('error submit!!')
  395. return false
  396. }
  397. })
  398. },
  399. // 产品分类 change
  400. changeProductType (val, opt) {
  401. this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
  402. this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
  403. this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
  404. },
  405. // 产品品牌 列表
  406. getProductBrand () {
  407. productBrandQuery({}).then(res => {
  408. if (res.status == 200) {
  409. this.productBrandList = res.data
  410. } else {
  411. this.productBrandList = []
  412. }
  413. })
  414. },
  415. // 产品分类 列表
  416. getProductType () {
  417. productTypeQuery({}).then(res => {
  418. if (res.status == 200) {
  419. this.productTypeList = res.data
  420. } else {
  421. this.productTypeList = []
  422. }
  423. })
  424. },
  425. // 调拨类型
  426. getAllocateTypeAllList () {
  427. allocateTypeAllList().then(res => {
  428. if (res.status == 200) {
  429. this.allocateTypeList = res.data
  430. } else {
  431. this.allocateTypeList = []
  432. }
  433. })
  434. },
  435. // 操作员
  436. getUserList () {
  437. userQueryList({}).then(res => {
  438. if (res.status == 200) {
  439. this.operatorList = res.data
  440. } else {
  441. this.operatorList = []
  442. }
  443. })
  444. },
  445. // 省/市/区
  446. getArea (leve, sn) {
  447. let params
  448. if (leve == 'province') {
  449. params = { type: '2' }
  450. } else {
  451. params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
  452. }
  453. getArea(params).then(res => {
  454. if (res.status == 200) {
  455. if (leve == 'province') {
  456. this.addrProvinceList = res.data || []
  457. } else if (leve == 'city') {
  458. this.addrCityList = res.data || []
  459. } else if (leve == 'district') {
  460. this.addrDistrictList = res.data || []
  461. }
  462. } else {
  463. if (leve == 'province') {
  464. this.addrProvinceList = []
  465. } else if (leve == 'city') {
  466. this.addrCityList = []
  467. } else if (leve == 'district') {
  468. this.addrDistrictList = []
  469. }
  470. }
  471. })
  472. },
  473. pageInit () {
  474. this.getProductBrand()
  475. this.getProductType()
  476. this.getAllocateTypeAllList()
  477. this.getUserList()
  478. this.getArea('province')
  479. }
  480. },
  481. mounted () {
  482. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  483. this.pageInit()
  484. this.resetSearchForm()
  485. }
  486. },
  487. activated () {
  488. // 如果是新页签打开,则重置当前页面
  489. if (this.$store.state.app.isNewTab) {
  490. this.pageInit()
  491. this.resetSearchForm()
  492. }
  493. },
  494. beforeRouteEnter (to, from, next) {
  495. next(vm => {})
  496. }
  497. }
  498. </script>