123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <div class="app-container">
- <search-form
- :list-loading="listLoading"
- @change="searchHandle"
- />
- <table-list
- :list-loading="listLoading"
- :data="tableData2"
- :columns="listConfig"
- :current-page="currentPage"
- :page-size="pageSize"
- :total-records="totalRecords"
- @currentChange="pageHandle"
- :operationsDefaultLength="6"
- />
- <popup-edit
- :isShow="isDtlShow"
- :curObj="curObj"
- @close="closePopup"
- />
- </div>
- </template>
- <script>
- import { arrToObj } from '@/utils'
- import SearchForm from './components/searchForm/Lineup'
- import PopupEdit from './components/popup/LineupEdit'
- import baseTable from '_m/baseTable.js'
- export default {
- name: 'index',
- components: {
- SearchForm,
- PopupEdit,
- },
- provide() {
- return {
- parentData: this
- }
- },
- mixins: [baseTable],
- data() {
- return {
- apiStr: 'user.admreceptsalelist',
- searchForm: {},
- isDtlShow: false,
- curObj: {},
- noCreated: true,
- }
- },
- computed: {
- tableData2() {
- const arr = [...this.tableData]
- arr.map(item => {
- })
- return arr
- }
- },
- created() {
- this.searchForm = {
- store_type: 'hqc1'
- }
- this.fetchData()
- },
- mounted() {
- this.listConfig = {
- rows: [
- { label: '最新轮值', prop: 'recept_create_at' },
- { label: '轮值总次数', prop: 'recept_count' },
- { label: '置业经理', prop: 'sale_name' },
- { label: '头像', prop: 'sale_avatar', type: 'img' },
- { label: '门店', prop: 'store_type', type: 'flag', flags: arrToObj(this.$dictData.store_type ) },
- { label: '分类', prop: 'sale_type', type: 'flag', flags: arrToObj(this.$dictData.sale_type ) },
- { label: '操作', width: 90, type: 'handle2', operations:
- [
- { label: '轮值记录', func: this.linkRecord, btnType: 'success' },
- ]
- }
- ]
- }
- },
- methods: {
- linkRecord (row) {
- this.$router.push(`/cust/lineUpRecord?id=${row.id}&name=${row.sale_name}`)
- },
- delHandle(row) {
- this.$msg(`您确定要删除该规则吗?`, 'confirm', () => {
- this.$api.user.admsaleuserdel({
- id: row.id
- }).then(data => {
- this.$msgs(`已删除!`)
- this.fetchData()
- })
- }, null, true)
- },
- openPopup(row) {
- if (row && row.id) {
- this.curObj = row
- } else {
- this.curObj = {}
- }
- this.isDtlShow = true
- },
- closePopup(obj) {
- this.isDtlShow = false
- if (obj) {
- this.fetchData()
- }
- }
- }
- }
- </script>
|