|
@@ -0,0 +1,210 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="exa-list">
|
|
|
|
+ <h1>企业审核</h1>
|
|
|
|
+ <table-lists
|
|
|
|
+ ref="tableLists"
|
|
|
|
+ v-model="list"
|
|
|
|
+ :filter="filter"
|
|
|
|
+ :filterType="2"
|
|
|
|
+ :filterReset="0"
|
|
|
|
+ requestApi="/sales/examineList"
|
|
|
|
+ @loading="load"
|
|
|
|
+ >
|
|
|
|
+ <template slot="filterContent">
|
|
|
|
+ <FormItem>
|
|
|
|
+ <Input type="text" suffix="md-search" v-model="filter.search" placeholder="搜索名称或手机号" clearable/>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </template>
|
|
|
|
+ <Table
|
|
|
|
+ ellipsis
|
|
|
|
+ :loading="loading"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="list.lists"
|
|
|
|
+ @on-row-click="rowClick"
|
|
|
|
+ stripe
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ row }" slot="_status">
|
|
|
|
+ <field-map :class="aStatus(row.is_adopt)" :value="row.is_adopt" :map="map.status"></field-map>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="{ row }" slot="op">
|
|
|
|
+ <Button size="small" @click.stop="examined(row)" v-if="row.is_adopt == 0||row.is_adopt == null">审核</Button>
|
|
|
|
+ <Button size="small" type="primary" @click.stop="checkFind(row)" v-else>查看</Button>
|
|
|
|
+ </template>
|
|
|
|
+ </Table>
|
|
|
|
+ <template slot="options">
|
|
|
|
+ <div style="color:#d7d7d7;font-size:14px">共计{{list.total}}家企业</div>
|
|
|
|
+ </template>
|
|
|
|
+ </table-lists>
|
|
|
|
+ <!-- 审核弹框 -->
|
|
|
|
+ <Modal v-model="examine.show" title="审核" :width="500" :mask-closable="false" @on-visible-change="visibled">
|
|
|
|
+ <div class="conts">
|
|
|
|
+ <RadioGroup v-model="examine.radios">
|
|
|
|
+ <Radio label="通过" style="marginRight:60px"></Radio>
|
|
|
|
+ <Radio label="不通过"></Radio>
|
|
|
|
+ </RadioGroup>
|
|
|
|
+ <h3 style="margin: 20px 0 5px 0;fontSize: 14px">原因</h3>
|
|
|
|
+ <Input v-model="examine.vals" type="textarea" :rows="3" placeholder="请填写原因" />
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer">
|
|
|
|
+ <Button type="primary" size="large" @click="exaSave" v-show="adopts.is_adopt == 0||adopts.is_adopt == null">提交</Button>
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+ export default {
|
|
|
|
+ methods: {
|
|
|
|
+ load (val) {
|
|
|
|
+ this.loading = val
|
|
|
|
+ },
|
|
|
|
+ reload() {
|
|
|
|
+ this.$refs.tableLists.reload(true)
|
|
|
|
+ },
|
|
|
|
+ inited() {
|
|
|
|
+ this.examine.show = false
|
|
|
|
+ this.examine.radios = ''
|
|
|
|
+ this.examine.vals = ''
|
|
|
|
+ },
|
|
|
|
+ examined(row) {
|
|
|
|
+ this.adopts = row
|
|
|
|
+ this.exaId = row.id
|
|
|
|
+ this.examine.show = true
|
|
|
|
+ },
|
|
|
|
+ rowClick(row) {
|
|
|
|
+ const hrefs = this.$router.resolve({path: '/sales/examineList/examineDetail',query: {uid: row.uid, id: row.id, type: row.type, ents: 1}})
|
|
|
|
+ window.open(hrefs.href, '_blank')
|
|
|
|
+ },
|
|
|
|
+ checkFind(row) {
|
|
|
|
+ this.adopts = row
|
|
|
|
+ this.exaId = row.id
|
|
|
|
+ const datas = this.examine
|
|
|
|
+ datas.show = true
|
|
|
|
+ datas.id = row.id
|
|
|
|
+ datas.radios = row.is_adopt == 1?'通过':row.is_adopt == 2?'不通过':''
|
|
|
|
+ datas.vals = row.reason
|
|
|
|
+ },
|
|
|
|
+ exaSave() {
|
|
|
|
+ if (this.examine.radios == '') {
|
|
|
|
+ this.$Message.warning('请选择审核类型')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.examine.radios == '不通过'&&this.examine.vals == '') {
|
|
|
|
+ this.$Message.warning('请填写原因')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const obj = {
|
|
|
|
+ id: this.exaId,
|
|
|
|
+ adopt: this.examine.radios=='通过'?1:this.examine.radios=='不通过'?2:'',
|
|
|
|
+ reason: this.examine.vals
|
|
|
|
+ }
|
|
|
|
+ this.$request('/sales/partnerList/partnerExamine').data(
|
|
|
|
+ obj
|
|
|
|
+ ).showSuccessTip().success(() => {
|
|
|
|
+ this.inited()
|
|
|
|
+ this.reload()
|
|
|
|
+ }).post()
|
|
|
|
+ },
|
|
|
|
+ visibled(val) {
|
|
|
|
+ if (val == false) {
|
|
|
|
+ this.inited()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ aStatus(val) {
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ return 'primary'
|
|
|
|
+ } else if (val == 0) {
|
|
|
|
+ return 'warn'
|
|
|
|
+ } else if (val == 2) {
|
|
|
|
+ return 'fail'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ loading: false,
|
|
|
|
+ exaId: '',
|
|
|
|
+ adopts: '',
|
|
|
|
+ examine: {
|
|
|
|
+ show: false,
|
|
|
|
+ radios: '',
|
|
|
|
+ vals: ''
|
|
|
|
+ },
|
|
|
|
+ map: {
|
|
|
|
+ status: [
|
|
|
|
+ {v: 0, n: '待审核'},
|
|
|
|
+ {v: 1, n: '审核通过'},
|
|
|
|
+ {v: 2, n: '审核不通过'},
|
|
|
|
+ {v: null, n: '-'}
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ filter: {
|
|
|
|
+ search: ""
|
|
|
|
+ },
|
|
|
|
+ columns: [
|
|
|
|
+ {
|
|
|
|
+ title: '伙伴名称',
|
|
|
|
+ key: 'name',
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (h, {row}) => {
|
|
|
|
+ return h('span', row.name ? row.name : '-')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '手机号',
|
|
|
|
+ key: 'phone',
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (h, {row}) => {
|
|
|
|
+ return h('span', row.phone ? row.phone == '0'?'-':row.phone : '-')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '申请时间',
|
|
|
|
+ key: 'createtime',
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (h, {row}) => {
|
|
|
|
+ return h('span', row.createtime ? row.createtime : '-')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '状态',
|
|
|
|
+ slot: '_status',
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '审核时间',
|
|
|
|
+ key: 'adopt_time',
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (h, {row}) => {
|
|
|
|
+ return h('span', row.adopt_time ? row.adopt_time : '-')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ slot: 'op',
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ list: []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.exa-list {
|
|
|
|
+ h1 {
|
|
|
|
+ font-size:24px;
|
|
|
|
+ color:#3f4047;
|
|
|
|
+ padding: 10px 0 20px 10px;
|
|
|
|
+ }
|
|
|
|
+ .primary {
|
|
|
|
+ color: #34bfa3;
|
|
|
|
+ }
|
|
|
|
+ .warn {
|
|
|
|
+ color: #ffb822;
|
|
|
|
+ }
|
|
|
|
+ .fail {
|
|
|
|
+ color: #f4516c;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|