list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <template>
  2. <a-card size="small" :bordered="false" class="salesManagementList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 搜索条件 -->
  5. <div ref="tableSearch" class="table-page-search-wrapper">
  6. <a-form layout="inline">
  7. <a-row :gutter="15">
  8. <a-col :md="6" :sm="24">
  9. <a-form-item label="创建时间">
  10. <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
  11. </a-form-item>
  12. </a-col>
  13. <a-col :md="6" :sm="24">
  14. <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
  15. <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="6" :sm="24">
  19. <a-form-item label="销售单号">
  20. <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
  21. </a-form-item>
  22. </a-col>
  23. <template v-if="advanced">
  24. <a-col :md="6" :sm="24">
  25. <a-form-item label="采购单号">
  26. <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
  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.printStatus"
  33. ref="printStatus"
  34. id="salesManagementList-printStatus"
  35. code="PRINT_STATUS"
  36. placeholder="请选择打印状态"
  37. allowClear></v-select>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :md="6" :sm="24">
  41. <a-form-item label="业务状态">
  42. <v-select
  43. v-model="queryParam.billStatus"
  44. ref="billStatus"
  45. id="salesManagementList-billStatus"
  46. code="SALES_BILL_STATUS"
  47. placeholder="请选择业务状态"
  48. allowClear></v-select>
  49. </a-form-item>
  50. </a-col>
  51. <a-col :md="6" :sm="24">
  52. <a-form-item label="财务状态">
  53. <v-select
  54. v-model="queryParam.financialStatus"
  55. ref="financialStatus"
  56. id="salesManagementList-financialStatus"
  57. code="FINANCIAL_RECEIVE_STATUS"
  58. placeholder="请选择财务状态"
  59. allowClear></v-select>
  60. </a-form-item>
  61. </a-col>
  62. <a-col :md="6" :sm="24">
  63. <a-form-item label="单据来源">
  64. <v-select
  65. v-model="queryParam.salesBillSource"
  66. ref="salesBillSource"
  67. id="salesManagementList-salesBillSource"
  68. code="SALES_SOURCE"
  69. placeholder="请选择单据来源"
  70. allowClear></v-select>
  71. </a-form-item>
  72. </a-col>
  73. <a-col :md="6" :sm="24">
  74. <a-form-model-item label="所在区域">
  75. <subarea id="salesManagementList-subarea" v-model="queryParam.subareaSn"></subarea>
  76. </a-form-model-item>
  77. </a-col>
  78. <a-col :md="6" :sm="24">
  79. <a-form-model-item label="地区">
  80. <a-form-model-item prop="shippingAddrProvinceSn">
  81. <a-select id="salesManagementList-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
  82. <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
  83. </a-select>
  84. </a-form-model-item>
  85. </a-form-model-item>
  86. </a-col>
  87. </template>
  88. <a-col :md="6" :sm="24">
  89. <span class="table-page-search-submitButtons">
  90. <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
  91. <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
  92. <a @click="advanced=!advanced" style="margin-left: 8px">
  93. {{ advanced ? '收起' : '展开' }}
  94. <a-icon :type="advanced ? 'up' : 'down'"/>
  95. </a>
  96. </span>
  97. </a-col>
  98. </a-row>
  99. </a-form>
  100. </div>
  101. <!-- 操作按钮 -->
  102. <div class="table-operator">
  103. <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesAdd')" @click="handleAdd">新增</a-button>
  104. </div>
  105. <!-- alert -->
  106. <a-alert type="info" style="margin-bottom:10px">
  107. <div slot="message">
  108. <div style="display: flex;justify-content: space-between;align-items: center;">
  109. <div>
  110. <div>
  111. 总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
  112. 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
  113. 总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
  114. 已下推数量:<strong>{{ totalData&&(totalData.totalPushedQty || totalData.totalPushedQty==0) ? totalData.totalPushedQty : '--' }}</strong>;
  115. 已发货数量:<strong>{{ totalData&&(totalData.totalDispatchQty || totalData.totalDispatchQty==0) ? totalData.totalDispatchQty : '--' }}</strong>;
  116. 已取消数量:<strong>{{ totalData&&(totalData.totalCancelQty || totalData.totalCancelQty==0) ? totalData.totalCancelQty : '--' }}</strong>;
  117. 待下推数量:<strong>{{ totalData&&(totalData.totalUnpushedQty || totalData.totalUnpushedQty==0) ? totalData.totalUnpushedQty : '--' }}</strong>;
  118. </div>
  119. <div v-if="$hasPermissions('B_isShowPrice')">
  120. 总售价:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? totalData.totalAmount : '--' }}</strong>元;
  121. 已下推金额::<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? totalData.totalPushedAmount : '--' }}</strong>元;
  122. 已取消金额::<strong>{{ totalData&&(totalData.totalCancelAmount || totalData.totalCancelAmount==0) ? totalData.totalCancelAmount : '--' }}</strong>元;
  123. 待下推金额::<strong>{{ totalData&&(totalData.totalUnpushedAmount || totalData.totalUnpushedAmount==0) ? totalData.totalUnpushedAmount : '--' }}</strong>元;
  124. 已发货金额::<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? totalData.totalDispatchAmount : '--' }}</strong>元;
  125. </div>
  126. </div>
  127. <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示取消数量</span></a-checkbox>
  128. </div>
  129. </div>
  130. </a-alert>
  131. <!-- 列表 -->
  132. <s-table
  133. class="sTable fixPagination"
  134. ref="table"
  135. :style="{ height: tableHeight+102.5+'px' }"
  136. size="small"
  137. :rowKey="(record) => record.id"
  138. :columns="columns"
  139. :data="loadData"
  140. :scroll="{ y: tableHeight }"
  141. :defaultLoadData="false"
  142. bordered>
  143. <!-- 销售单号 -->
  144. <template slot="salesBillNo" slot-scope="text, record">
  145. <div v-if="$hasPermissions('B_salesDetail')">
  146. <a-badge :count="'改'+record.changeTimes" :offset="[16,-13]" v-if="record.changeTimes>0" class="badge-con-t">
  147. <span style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
  148. </a-badge>
  149. <span v-else style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
  150. </div>
  151. <div v-else>{{ record.salesBillNo }}</div>
  152. </template>
  153. <!-- 总数量 -->
  154. <template slot="totalQty" slot-scope="text, record">
  155. {{ record.totalQty }}
  156. </template>
  157. <!-- 操作 -->
  158. <template slot="action" slot-scope="text, record">
  159. <a-button
  160. size="small"
  161. type="link"
  162. class="button-warning"
  163. v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
  164. @click="handleDetail(record)"
  165. >审核</a-button>
  166. <a-button
  167. size="small"
  168. type="link"
  169. class="button-warning"
  170. v-if="record.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')"
  171. @click="handleDispatch(record)"
  172. >下推</a-button>
  173. <a-button
  174. size="small"
  175. type="link"
  176. class="button-info"
  177. v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesEdit')"
  178. @click="handleEdit(record)"
  179. >
  180. 编辑
  181. </a-button>
  182. <a-button
  183. size="small"
  184. type="link"
  185. class="button-info"
  186. v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesEdit')"
  187. @click="handleEdit(record)"
  188. >
  189. 改单
  190. </a-button>
  191. <a-button
  192. size="small"
  193. type="link"
  194. class="button-error"
  195. v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesDel')"
  196. @click="handleDel(record)"
  197. >
  198. 删除
  199. </a-button>
  200. <a-button
  201. size="small"
  202. type="link"
  203. class="button-error"
  204. v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesDel')"
  205. @click="handleDel(record)"
  206. >
  207. 取消
  208. </a-button>
  209. <span
  210. v-if="!(record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')) &&
  211. !(record.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')) &&
  212. !(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE')&&($hasPermissions('B_salesEdit') || $hasPermissions('B_salesDel'))) &&
  213. !(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && ($hasPermissions('B_salesEdit') || $hasPermissions('B_salesDel')))">--</span>
  214. </template>
  215. </s-table>
  216. </a-spin>
  217. <!-- 选择客户弹框 -->
  218. <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
  219. </a-card>
  220. </template>
  221. <script>
  222. import moment from 'moment'
  223. import getDate from '@/libs/getDate.js'
  224. import subarea from '@/views/common/subarea.js'
  225. import { getArea } from '@/api/data'
  226. import rangeDate from '@/views/common/rangeDate.vue'
  227. import { STable, VSelect } from '@/components'
  228. import chooseCustomModal from './chooseCustomModal.vue'
  229. import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
  230. import { salesList, salesDel, salesCount } from '@/api/sales'
  231. import { findBySalesBillSn } from '@/api/dispatch'
  232. export default {
  233. name: 'TableList',
  234. components: { STable, VSelect, chooseCustomModal, dealerSubareaScopeList, rangeDate, subarea },
  235. data () {
  236. return {
  237. spinning: false,
  238. advanced: false, // 高级搜索 展开/关闭
  239. disabled: false, // 查询、重置按钮是否可操作
  240. openModal: false, // 选择客户弹框是否显示
  241. tableHeight: 0,
  242. time: [
  243. moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
  244. moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
  245. ],
  246. // 查询参数
  247. queryParam: {
  248. beginDate: getDate.getThreeMonthDays().starttime,
  249. endDate: getDate.getCurrMonthDays().endtime,
  250. buyerSn: undefined, // 客户名称
  251. salesBillNo: '', // 销售单号
  252. purchaseBillNo: '',
  253. printStatus: undefined,
  254. billStatus: undefined, // 业务状态
  255. financialStatus: undefined, // 财务状态
  256. salesBillSource: undefined,
  257. subareaSn: undefined,
  258. shippingAddrProvinceSn: undefined
  259. },
  260. totalData: {
  261. totalAmount: 0,
  262. totalCategory: 0,
  263. totalQty: 0,
  264. totalRecord: 0,
  265. totalPushedQty: 0,
  266. totalDispatchQty: 0,
  267. totalCancelQty: 0,
  268. totalUnpushedQty: 0,
  269. totalPushedAmount: 0,
  270. totalCancelAmount: 0,
  271. totalUnpushedAmount: 0,
  272. totalDispatchAmount: 0
  273. },
  274. // 加载数据方法 必须为 Promise 对象
  275. loadData: parameter => {
  276. this.disabled = true
  277. this.spinning = true
  278. delete parameter.tableId
  279. delete parameter.index
  280. // 查询总计
  281. salesCount(Object.assign(parameter, this.queryParam)).then(res => {
  282. this.totalData = Object.assign(this.totalData, res.data || {})
  283. })
  284. return salesList(Object.assign(parameter, this.queryParam)).then(res => {
  285. let data
  286. if (res.status == 200) {
  287. data = res.data
  288. const no = (data.pageNo - 1) * data.pageSize
  289. for (var i = 0; i < data.list.length; i++) {
  290. data.list[i].no = no + i + 1
  291. }
  292. this.disabled = false
  293. }
  294. this.spinning = false
  295. return data
  296. })
  297. },
  298. addrProvinceList: [], // 省下拉
  299. showCancelNum: false // 是否显示取消数量和待下推数量
  300. }
  301. },
  302. computed: {
  303. columns () {
  304. const arr = [
  305. { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
  306. { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
  307. // { title: '采购单号', dataIndex: 'purchaseBillNo', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
  308. { title: '提交时间', dataIndex: 'submitDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
  309. { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  310. { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
  311. // { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  312. { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  313. // { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  314. { title: '已发货数量', dataIndex: 'totalDispatchQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  315. { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
  316. { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
  317. { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
  318. { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  319. { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
  320. { title: '打印次数', dataIndex: 'detailPrintTimes', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  321. { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
  322. ]
  323. if (this.showCancelNum) {
  324. const ind = this.$hasPermissions('B_isShowPrice') ? 10 : 8
  325. arr.splice(ind, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  326. arr.splice(ind + 1, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  327. }
  328. if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
  329. arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  330. arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  331. }
  332. return arr
  333. }
  334. },
  335. methods: {
  336. // 时间 change
  337. dateChange (date) {
  338. this.queryParam.beginDate = date[0]
  339. this.queryParam.endDate = date[1]
  340. },
  341. custChange (val) {
  342. this.queryParam.buyerSn = val.key
  343. },
  344. // 新增
  345. handleAdd () {
  346. this.openModal = true
  347. },
  348. // 选择客户成功
  349. chooseCustomOk (data) {
  350. this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
  351. },
  352. // 下推
  353. handleDispatch (row) {
  354. this.spinning = true
  355. findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
  356. this.spinning = false
  357. if (res.status == 200) {
  358. this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn, dispatchBillSn: res.data.dispatchBillSn } })
  359. }
  360. })
  361. },
  362. // 详情
  363. handleDetail (row) {
  364. this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
  365. },
  366. // 编辑
  367. handleEdit (row) {
  368. this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
  369. },
  370. // 删除
  371. handleDel (row) {
  372. const _this = this
  373. this.$confirm({
  374. title: '提示',
  375. content: row.salesBillSource == 'PURCHASE' ? '确认要取消吗?' : '确认要删除吗?',
  376. centered: true,
  377. closable: true,
  378. onOk () {
  379. _this.spinning = true
  380. salesDel({ salesBillSn: row.salesBillSn }).then(res => {
  381. if (res.status == 200) {
  382. _this.$message.success(res.message)
  383. _this.$refs.table.refresh()
  384. _this.spinning = false
  385. } else {
  386. _this.spinning = false
  387. }
  388. })
  389. }
  390. })
  391. },
  392. // 重置
  393. resetSearchForm () {
  394. this.$refs.rangeDate.resetDate(this.time)
  395. this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
  396. this.queryParam.endDate = getDate.getCurrMonthDays().endtime
  397. this.$refs.dealerSubareaScopeList.resetForm()
  398. this.queryParam.buyerSn = undefined
  399. this.queryParam.salesBillNo = ''
  400. this.queryParam.purchaseBillNo = ''
  401. this.queryParam.printStatus = undefined
  402. this.queryParam.billStatus = undefined
  403. this.queryParam.financialStatus = undefined
  404. this.queryParam.salesBillSource = undefined
  405. this.queryParam.subareaSn = undefined
  406. this.queryParam.shippingAddrProvinceSn = undefined
  407. this.$refs.table.refresh(true)
  408. },
  409. // 省/市/区
  410. getArea (leve, sn) {
  411. let params
  412. if (leve == 'province') {
  413. params = { type: '2' }
  414. } else {
  415. params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
  416. }
  417. getArea(params).then(res => {
  418. if (res.status == 200) {
  419. if (leve == 'province') {
  420. this.addrProvinceList = res.data || []
  421. } else if (leve == 'city') {
  422. this.addrCityList = res.data || []
  423. } else if (leve == 'district') {
  424. this.addrDistrictList = res.data || []
  425. }
  426. } else {
  427. if (leve == 'province') {
  428. this.addrProvinceList = []
  429. } else if (leve == 'city') {
  430. this.addrCityList = []
  431. } else if (leve == 'district') {
  432. this.addrDistrictList = []
  433. }
  434. }
  435. })
  436. },
  437. pageInit () {
  438. const _this = this
  439. this.$nextTick(() => { // 页面渲染完成后的回调
  440. _this.setTableH()
  441. })
  442. this.getArea('province')
  443. },
  444. setTableH () {
  445. const tableSearchH = this.$refs.tableSearch.offsetHeight
  446. this.tableHeight = window.innerHeight - tableSearchH - 310
  447. }
  448. },
  449. watch: {
  450. advanced (newValue, oldValue) {
  451. const _this = this
  452. this.$nextTick(() => { // 页面渲染完成后的回调
  453. _this.setTableH()
  454. })
  455. },
  456. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  457. this.setTableH()
  458. }
  459. },
  460. mounted () {
  461. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  462. this.pageInit()
  463. this.resetSearchForm()
  464. }
  465. },
  466. activated () {
  467. // 如果是新页签打开,则重置当前页面
  468. if (this.$store.state.app.isNewTab) {
  469. this.pageInit()
  470. this.resetSearchForm()
  471. }
  472. // 仅刷新列表,不重置页面
  473. if (this.$store.state.app.updateList) {
  474. this.pageInit()
  475. this.$refs.table.refresh()
  476. }
  477. },
  478. beforeRouteEnter (to, from, next) {
  479. next(vm => {})
  480. }
  481. }
  482. </script>
  483. <style lang="less">
  484. .salesManagementList-wrap{
  485. .sTable{
  486. margin-top: 10px;
  487. .badge-con-t{
  488. .ant-badge-count{
  489. transform: scale(0.8);
  490. font-size: 13px;
  491. }
  492. }
  493. }
  494. }
  495. </style>