list.vue 23 KB

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