list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <template>
  2. <div>
  3. <a-card size="small" :bordered="false" class="promotionList-wrap searchBoxNormal">
  4. <!-- 搜索条件 -->
  5. <div ref="tableSearch" class="table-page-search-wrapper">
  6. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  7. <a-row :gutter="15">
  8. <a-col :md="6" :sm="24">
  9. <a-form-item label="创建时间">
  10. <rangeDate ref="rangeDate" @change="dateChange" />
  11. </a-form-item>
  12. </a-col>
  13. <a-col :md="6" :sm="24">
  14. <a-form-item label="促销名称/简称">
  15. <a-input id="promotionList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入促销名称/简称"/>
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="6" :sm="24">
  19. <a-form-item label="发布状态">
  20. <v-select
  21. v-model="queryParam.enabledFlag"
  22. ref="enabledFlag"
  23. id="promotionList-enabledFlag"
  24. code="PUBLISH_STATE"
  25. placeholder="请选择发布状态"
  26. allowClear></v-select>
  27. </a-form-item>
  28. </a-col>
  29. <a-col :md="6" :sm="24">
  30. <a-form-item label="活动状态">
  31. <v-select
  32. v-model="queryParam.state"
  33. ref="state"
  34. id="promotionList-state"
  35. code="PROMOTION_STATE"
  36. placeholder="请选择活动状态"
  37. allowClear
  38. ></v-select>
  39. </a-form-item>
  40. </a-col>
  41. <a-col :md="6" :sm="24">
  42. <a-form-item label="创建人">
  43. <creatorList ref="creatorList" id="promotionList-creatorId" @change="creatorChange" />
  44. </a-form-item>
  45. </a-col>
  46. <a-col :md="6" :sm="24">
  47. <span class="table-page-search-submitButtons">
  48. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionList-refresh">查询</a-button>
  49. <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="promotionList-reset">重置</a-button>
  50. <!-- <a-button
  51. style="margin-left: 10px"
  52. type="primary"
  53. class="button-warning"
  54. @click="handleExport"
  55. :disabled="disabled"
  56. :loading="exportLoading"
  57. >导出</a-button> -->
  58. <!-- v-if="$hasPermissions('B_promotionListExport')" -->
  59. </span>
  60. </a-col>
  61. </a-row>
  62. </a-form>
  63. </div>
  64. </a-card>
  65. <a-card size="small" :bordered="false">
  66. <a-spin :spinning="spinning" tip="Loading...">
  67. <!-- 操作按钮 -->
  68. <div class="table-operator tableBtnSet" >
  69. <a-button v-if="$hasPermissions('B_dealerPromotionAdd')" id="promotionList-add" type="primary" @click="handleAdd">新增</a-button>
  70. <a-checkbox @change="handleDealerAudit" v-if="$hasPermissions('B_dealerAudit')" :checked="queryParam.dealerAuditFlag &&queryParam.dealerAuditFlag==1">
  71. 待审核(修改参与客户)
  72. </a-checkbox>
  73. </div>
  74. <!-- 列表 -->
  75. <s-table
  76. class="sTable fixPagination"
  77. ref="table"
  78. :style="{ height: tableHeight+70+'px' }"
  79. size="small"
  80. :rowKey="(record) => record.sparePartsReturnNo"
  81. :columns="columns"
  82. :data="loadData"
  83. :scroll="{ y: tableHeight }"
  84. :defaultLoadData="false"
  85. bordered>
  86. <!-- 促销名称 -->
  87. <template slot="promotionName" slot-scope="text, record">
  88. <div v-if="$hasPermissions('B_dealerPromotionDetail')" class="link-bule nameBox text-overflows2" @click="handleDetail(record)">{{ record.title }}</div>
  89. <div v-else class="nameBox text-overflows2">{{ record.title }}</div>
  90. </template>
  91. <!-- 促销时间-->
  92. <template slot="promotionTime" slot-scope="text, record">
  93. <div>{{ record.promotionDateStart }}-{{ record.promotionDateEnd }}</div>
  94. </template>
  95. <!-- 参与客户 -->
  96. <template slot="joinCustomers" slot-scope="text, record">
  97. <span class="joinCustomer" v-if="record.dealerScope ==='ALL_DEALER'" @click="handleCustomers(record)">全部客户</span>
  98. <span class="joinCustomer" v-else @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</span>
  99. <a-badge count="审" v-show="record.dealerAuditFlag == 1" :number-style="{ backgroundColor: '#f30', zoom:'80%' }" />
  100. <!-- dealerAuditFlag 1 是 0否 -->
  101. </template>
  102. <!-- 发布状态 -->
  103. <template slot="releaseStatus" slot-scope="text, record">
  104. <a-switch
  105. v-if="$hasPermissions('B_dealerPromotionStatus')"
  106. id="promotionList-enable"
  107. @change="changeStatus(record)"
  108. :disabled="record.state!='NOT_START' && record.state!='RUNNING'"
  109. :checked="record.enabledFlag == 1 ? true : false"></a-switch>
  110. <span v-else>--</span>
  111. </template>
  112. <!-- 操作 -->
  113. <template slot="action" slot-scope="text, record">
  114. <a-button
  115. size="small"
  116. type="link"
  117. class="button-warning"
  118. @click="handleSetRules(record)"
  119. v-if="$hasPermissions('B_dealerPromotionRules')&&(record.state =='WAIT_SUBMIT'||record.state == 'AUDIT_REJECT')"
  120. id="allocateBillList-examine-btn">规则设置</a-button>
  121. <a-button
  122. size="small"
  123. type="link"
  124. v-if="$hasPermissions('B_dealerPromotionEdit')&&(record.state == 'WAIT_SUBMIT' ||record.state == 'AUDIT_REJECT')"
  125. @click="handleEdit(record)"
  126. class="button-info"
  127. id="promotionList-edit-btn">编辑</a-button>
  128. <a-button
  129. size="small"
  130. type="link"
  131. v-if="$hasPermissions('B_dealerPromotionAudit')&&record.state == 'WAIT_AUDIT'"
  132. @click="handleCheck(record)"
  133. class="button-info"
  134. id="promotionList-edit-btn">审核</a-button>
  135. <a-button
  136. size="small"
  137. type="link"
  138. v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING' ||record.state == 'IS_OVER')"
  139. @click="handleTime(record)"
  140. class="button-info"
  141. id="promotionList-edit-btn">时间变更</a-button>
  142. <a-button
  143. size="small"
  144. type="link"
  145. v-if="$hasPermissions('B_overActive')&&(record.state == 'NO_START' || record.state=='RUNNING')"
  146. @click="handleEnd(record)"
  147. class="button-info"
  148. id="promotionList-edit-btn">终止</a-button>
  149. <a-button
  150. size="small"
  151. type="link"
  152. v-if="$hasPermissions('B_dealerPromotionDel')&&(record.state == 'WAIT_SUBMIT'||record.state == 'AUDIT_REJECT')"
  153. @click="handleDel(record)"
  154. class="button-error"
  155. id="promotionList-del-btn">删除</a-button>
  156. <a-button
  157. size="small"
  158. type="link"
  159. v-if="record.state != 'AUDIT_REJECT' &&$hasPermissions('B_dealerPromotionCopy')"
  160. @click="handleCopyModal(record)"
  161. class="button-info"
  162. id="promotionList-edit-btn">复制</a-button>
  163. </template>
  164. </s-table>
  165. </a-spin>
  166. <!-- 参与客户 -->
  167. <lookUp-customers-modal
  168. :itemSn="itemPromotionSn"
  169. :showType="itemStatusType"
  170. ref="lookUpCustomers"
  171. :openModal="openCustomerModal"
  172. :chooseDealerList="chooseDealerArr"
  173. @submitAudit="editCustomerOk"
  174. @handleAudit="auditCustomerOk"
  175. @close="closeCustomer"></lookUp-customers-modal>
  176. <!-- 新增/编辑弹窗-->
  177. <add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
  178. <!-- 促销时间变更 -->
  179. <edit-active-end-time ref="editTime" v-drag :openModal="editEndModal" @ok="$refs.table.refresh()" @close="editEndModal=false" />
  180. <!-- 审核弹窗 -->
  181. <a-modal
  182. closable
  183. v-model="openAuditModal"
  184. :footer="null"
  185. width="416px"
  186. centered>
  187. <div style="display:flex;margin:30px 0 20px 20px;">
  188. <a-icon type="question-circle" :style="{fontSize:'23px',color:'#faad14'}"/>
  189. <div style="margin-left:10px;">
  190. <p style="font-size:16px;font-wight:bold;">提示</p>
  191. <p>请点击下方按钮确认操作?</p>
  192. </div>
  193. </div>
  194. <!-- 按钮 -->
  195. <div style="text-align: right;">
  196. <a-button
  197. id="auditModal-cancel"
  198. class="button-cancel"
  199. @click="closeAuditModal"
  200. style="margin-right: 15px;">审核不通过</a-button>
  201. <a-button
  202. type="primary"
  203. id="auditModal-save"
  204. class="button-primary"
  205. @click="handleAuditModal"
  206. >审核通过</a-button>
  207. </div>
  208. </a-modal>
  209. <!-- 复制弹窗 -->
  210. <a-modal
  211. closable
  212. v-model="openCopyModal"
  213. :footer="null"
  214. width="416px"
  215. centered>
  216. <div class="copyContent">
  217. <p>提示:</p>
  218. <p>复制选择的促销活动,将在列表生成一条相同的【待提交】的促销活动,可进行编辑!</p>
  219. <p>是否确认生成?</p>
  220. <p>附件无法复制,请重新上传</p>
  221. </div>
  222. <!-- 按钮 -->
  223. <div class="copyBtn">
  224. <a-button
  225. id="copyModal-cancel"
  226. class="button-cancel"
  227. @click="closeCopyModal"
  228. style="margin-right: 15px;">取消</a-button>
  229. <a-button
  230. type="primary"
  231. id="copyModal-save"
  232. class="button-primary"
  233. @click="handleCopy"
  234. >确定</a-button>
  235. </div>
  236. </a-modal>
  237. </a-card>
  238. </div>
  239. </template>
  240. <script>
  241. import { commonMixin } from '@/utils/mixin'
  242. import { STable, VSelect } from '@/components'
  243. import addModal from './addModal.vue'
  244. import lookUpCustomersModal from './lookUpCustomersModal'
  245. import rangeDate from '@/views/common/rangeDate.vue'
  246. import creatorList from '@/views/common/creatorList.vue'
  247. import editActiveEndTime from './editActiveEndTime.vue'
  248. import supplier from '@/views/common/supplier.js'
  249. import warehouse from '@/views/common/chooseWarehouse.js'
  250. import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, midwaySubmit, dealerMidwayAudit, allDealerSnList } from '@/api/promotion'
  251. export default {
  252. name: 'PromotionManagementList',
  253. mixins: [commonMixin],
  254. components: { STable, supplier, VSelect, rangeDate, warehouse, lookUpCustomersModal, addModal, editActiveEndTime, creatorList },
  255. data () {
  256. return {
  257. spinning: false,
  258. disabled: false, // 查询、重置按钮是否可操作
  259. openModal: false, // 新增弹框是否显示
  260. openCustomerModal: false, // 参与客户弹窗
  261. editEndModal: false, // 更改促销时间
  262. openDetailModal: false, // 详情弹窗
  263. tableHeight: 0,
  264. // 查询参数
  265. queryParam: {
  266. beginDate: undefined,
  267. endDate: undefined,
  268. queryWord: '',
  269. enabledFlag: undefined, // 发布状态
  270. state: undefined,
  271. creatorId: undefined,
  272. dealerAuditFlag: undefined
  273. },
  274. columns: [
  275. { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
  276. { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  277. { title: '促销名称', scopedSlots: { customRender: 'promotionName' }, width: '18%', align: 'left' },
  278. { title: '促销简称', dataIndex: 'description', width: '14%', align: 'left', customRender: function (text) { return text || '--' } },
  279. { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '13%', align: 'center' },
  280. { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '7%', align: 'center', ellipsis: true },
  281. { title: '促销描述', dataIndex: 'content', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  282. { title: '创建人', dataIndex: 'creatorName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  283. { title: '活动状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
  284. { title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '7%', align: 'center', ellipsis: true },
  285. { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
  286. ],
  287. // 加载数据方法 必须为 Promise 对象
  288. loadData: parameter => {
  289. this.disabled = true
  290. this.spinning = true
  291. console.log('1111111111:', this.queryParam)
  292. return dealerPromotionList(Object.assign(parameter, this.queryParam)).then(res => {
  293. let data
  294. if (res.status == 200) {
  295. data = res.data
  296. const no = (data.pageNo - 1) * data.pageSize
  297. for (var i = 0; i < data.list.length; i++) {
  298. data.list[i].no = no + i + 1
  299. }
  300. this.disabled = false
  301. }
  302. this.spinning = false
  303. return data
  304. })
  305. },
  306. itemSn: null, // 经销商促销活动SN
  307. openAuditModal: false, // 审核弹窗,
  308. openCopyModal: false, // 复制弹窗
  309. itemPromotionSn: '',
  310. itemStatusType: '',
  311. chooseDealerArr: [] // 所选择经销商列表
  312. }
  313. },
  314. methods: {
  315. // 创建人
  316. creatorChange (val) {
  317. this.queryParam.creatorId = val.key
  318. },
  319. // 详情
  320. handleDetail (row) {
  321. this.$router.push({ name: 'dealerPromotionManagementDetail', query: { sn: row.promotionSn } })
  322. },
  323. // 创建时间
  324. dateChange (date) {
  325. this.queryParam.beginDate = date[0]
  326. this.queryParam.endDate = date[1]
  327. },
  328. // 新增
  329. handleAdd () {
  330. this.itemSn = null
  331. this.openModal = true
  332. },
  333. // 参与客户
  334. handleCustomers (row) {
  335. this.openCustomerModal = true
  336. this.itemPromotionSn = row.promotionSn
  337. if ((row.state === 'NOT_START' || row.state === 'RUNNING') && row.dealerAuditFlag && (row.dealerAuditFlag == 0 || row.dealerAuditFlag == 2)) {
  338. this.itemStatusType = 'isEdit'
  339. } else if ((row.state === 'NOT_START' || row.state === 'RUNNING') && row.dealerAuditFlag && row.dealerAuditFlag == 1) {
  340. this.itemStatusType = 'isAudit'
  341. } else {
  342. this.itemStatusType = 'isClose'
  343. }
  344. if (row.dealerScope != 'ALL_DEALER') {
  345. this.chooseDealerArr = row.dealerSnList
  346. } else {
  347. this.getAllDealerSnList()
  348. }
  349. },
  350. async getAllDealerSnList () {
  351. const dealerSnArr = await allDealerSnList({})
  352. this.chooseDealerArr = dealerSnArr.data
  353. },
  354. // 基本信息 保存
  355. handleOk () {
  356. this.itemSn = null
  357. this.resetSearchForm()
  358. },
  359. // 编辑
  360. handleEdit (row) {
  361. this.openModal = true
  362. this.itemSn = row.promotionSn
  363. },
  364. // 发布状态
  365. changeStatus (record) {
  366. const params = {
  367. promotionSn: record.promotionSn,
  368. enabledFlag: record.enabledFlag == 1 ? '0' : '1'
  369. }
  370. this.spinning = true
  371. modifyEnabledFlag(params).then(res => {
  372. if (res.status == 200) {
  373. this.$message.success(res.message)
  374. this.$refs.table.refresh()
  375. this.spinning = false
  376. } else {
  377. this.$refs.table.refresh()
  378. this.spinning = false
  379. }
  380. })
  381. },
  382. // 规则设置
  383. handleSetRules (row) {
  384. this.$router.push({ name: 'dealerPromotionManagementRule', query: { type: 'rule', sn: row.promotionSn } })
  385. },
  386. // 审核参与客户
  387. handleDealerAudit (val) {
  388. this.queryParam.dealerAuditFlag = val.target.checked ? '1' : undefined
  389. this.$nextTick(() => {
  390. this.$refs.table.refresh(true)
  391. })
  392. },
  393. // 审核
  394. handleCheck (row) {
  395. const _this = this
  396. _this.itemSn = row.promotionSn
  397. _this.openAuditModal = true
  398. },
  399. handleAuditModal () {
  400. this.handleAudit({ promotionSn: this.itemSn, auditFlag: 1 })
  401. },
  402. closeAuditModal () {
  403. this.handleAudit({ promotionSn: this.itemSn, auditFlag: 0 })
  404. },
  405. handleAudit (ajaxData) {
  406. const _this = this
  407. _this.spinning = true
  408. promotionAudit(ajaxData).then(res => {
  409. if (res.status == 200) {
  410. _this.$message.success(res.message)
  411. _this.$refs.table.refresh()
  412. }
  413. _this.itemSn = null
  414. _this.openAuditModal = false
  415. _this.spinning = false
  416. })
  417. },
  418. // 复制
  419. handleCopyModal (row) {
  420. this.itemSn = row.promotionSn
  421. this.$nextTick(() => {
  422. this.openCopyModal = true
  423. })
  424. },
  425. handleCopy () {
  426. const _this = this
  427. _this.spinning = true
  428. handleCopyData({ promotionSn: this.itemSn }).then(res => {
  429. if (res.status == 200) {
  430. _this.$message.success(res.message)
  431. _this.$refs.table.refresh()
  432. }
  433. _this.itemSn = null
  434. _this.openCopyModal = false
  435. _this.spinning = false
  436. })
  437. },
  438. closeCopyModal () {
  439. this.itemSn = null
  440. this.openCopyModal = false
  441. },
  442. // 促销时间变更
  443. handleTime (row) {
  444. this.editEndModal = true
  445. const showData = {
  446. sn: row.promotionSn,
  447. name: row.title,
  448. timeStart: row.promotionDateStart,
  449. timeEnd: row.promotionDateEnd
  450. }
  451. this.$refs.editTime.setData(showData)
  452. },
  453. // 终止
  454. handleEnd (row) {
  455. const _this = this
  456. this.$confirm({
  457. title: '提示',
  458. content: '确定要终止该促销?',
  459. centered: true,
  460. onOk () {
  461. _this.spinning = true
  462. promotionIsOver({ sn: row.promotionSn }).then(res => {
  463. if (res.status == 200) {
  464. _this.$message.success(res.message)
  465. _this.$refs.table.refresh()
  466. _this.spinning = false
  467. } else {
  468. _this.spinning = false
  469. }
  470. })
  471. }
  472. })
  473. },
  474. // 关闭采购退货详情弹框
  475. closeDetailModal () {
  476. this.itemSn = null
  477. this.openDetailModal = false
  478. },
  479. // 删除
  480. handleDel (row) {
  481. const _this = this
  482. this.$confirm({
  483. title: '提示',
  484. content: '确认要删除该活动吗?',
  485. centered: true,
  486. onOk () {
  487. _this.spinning = true
  488. dealerPromotionDel({ sn: row.promotionSn }).then(res => {
  489. if (res.status == 200) {
  490. _this.$message.success(res.message)
  491. _this.$refs.table.refresh()
  492. _this.spinning = false
  493. } else {
  494. _this.spinning = false
  495. }
  496. })
  497. }
  498. })
  499. },
  500. // 修改参与客户 参与客户提交审核
  501. editCustomerOk () {
  502. const _this = this
  503. midwaySubmit({ promotionSn: _this.itemPromotionSn }).then(res => {
  504. if (res.status == 200) {
  505. _this.$message.success(res.message)
  506. _this.$refs.table.refresh()
  507. }
  508. })
  509. },
  510. auditCustomerOk (con) {
  511. const _this = this
  512. dealerMidwayAudit({ promotionSn: _this.itemPromotionSn, dealerAuditStatus: con }).then(res => {
  513. if (res.status == 200) {
  514. _this.$message.success(res.message)
  515. _this.$refs.table.refresh()
  516. }
  517. })
  518. },
  519. closeCustomer () {
  520. this.openCustomerModal = false
  521. this.itemPromotionSn = ''
  522. this.chooseDealerArr = []
  523. },
  524. // 重置
  525. resetSearchForm () {
  526. // 获取创建人默认值
  527. const creatorObj = this.$store.state.user.info
  528. const newObj = {
  529. key: creatorObj.userid,
  530. name: creatorObj.userNameCN,
  531. label: creatorObj.userNameCN
  532. }
  533. this.$refs.creatorList.setDefaultVal(newObj)
  534. this.queryParam = {
  535. beginDate: undefined,
  536. endDate: undefined,
  537. queryWord: '',
  538. enabledFlag: undefined, // 发布状态
  539. state: undefined,
  540. creatorId: creatorObj.userid,
  541. dealerAuditFlag: undefined
  542. }
  543. this.$refs.rangeDate.resetDate()
  544. this.$refs.table.refresh(true)
  545. },
  546. pageInit () {
  547. const _this = this
  548. this.$nextTick(() => { // 页面渲染完成后的回调
  549. _this.setTableH()
  550. })
  551. this.openModal = false
  552. this.openDetailModal = false
  553. this.itemSn = null
  554. this.$refs.table.clearTable()
  555. },
  556. setTableH () {
  557. const tableSearchH = this.$refs.tableSearch.offsetHeight
  558. this.tableHeight = window.innerHeight - tableSearchH - 235
  559. }
  560. },
  561. watch: {
  562. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  563. this.setTableH()
  564. }
  565. },
  566. mounted () {
  567. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  568. this.pageInit()
  569. this.resetSearchForm()
  570. }
  571. },
  572. activated () {
  573. // 如果是新页签打开,则重置当前页面
  574. if (this.$store.state.app.isNewTab) {
  575. this.pageInit()
  576. this.resetSearchForm()
  577. }
  578. // 仅刷新列表,不重置页面
  579. if (this.$store.state.app.updateList) {
  580. this.pageInit()
  581. this.$refs.table.refresh()
  582. }
  583. },
  584. beforeRouteEnter (to, from, next) {
  585. next(vm => {})
  586. }
  587. }
  588. </script>
  589. <style lang="less" scoped>
  590. .promotionList-wrap{
  591. .nameBox{
  592. padding:0 5px;
  593. }
  594. }
  595. .joinCustomer{
  596. cursor:pointer;
  597. }
  598. .copyContent{
  599. margin:30px 10px 20px;
  600. p{
  601. margin-bottom:6px !important;
  602. font-size:14px;
  603. }
  604. p:last-child{
  605. font-size:12px;
  606. color:#666;
  607. text-align:right;
  608. }
  609. }
  610. .copyBtn{
  611. text-align:center;
  612. button{
  613. width: 45%;
  614. height:40px;
  615. line-height:40px;
  616. }
  617. }
  618. .tableBtnSet{
  619. display: flex;
  620. align-items: center;
  621. justify-content: space-between;
  622. }
  623. </style>