|
@@ -0,0 +1,469 @@
|
|
|
+<style>
|
|
|
+.detail_img{
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ height: 200px;
|
|
|
+}
|
|
|
+.detail_img img{
|
|
|
+ object-fit: cover;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.detail_img_block
|
|
|
+{
|
|
|
+ justify-content: start;
|
|
|
+}
|
|
|
+</style>
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <Row type="flex" justify="center" align="middle">
|
|
|
+ <Col span="24">
|
|
|
+ <Form ref="searchForm" :model="searchData" inline>
|
|
|
+ <Col span="20">
|
|
|
+ <Form-item prop="wname">
|
|
|
+ <Input type="text" style="width:150px" v-model="searchData.company" placeholder="企业名称">
|
|
|
+ </Input>
|
|
|
+ </Form-item>
|
|
|
+ <Form-item prop="ispass">
|
|
|
+ <Select v-model="searchData.ispass" style="width:100px" placeholder="审核状态">
|
|
|
+ <Option value="">全部</Option>
|
|
|
+ <Option value="0">{{ $t('ispass_0') }}</Option>
|
|
|
+ <Option value="1">{{ $t('ispass_1') }}</Option>
|
|
|
+ <Option value="2">{{ $t('ispass_2') }}</Option>
|
|
|
+ </Select>
|
|
|
+ </Form-item>
|
|
|
+ <Form-item prop="createdate">
|
|
|
+ <Date-picker v-model="searchData.createdate" format="yyyy-MM-dd HH:mm:ss" type="datetimerange" placement="bottom-end"
|
|
|
+ placeholder="选择日期" style="width: 400px" @on-change="createdateChange"></Date-picker>
|
|
|
+ </Form-item>
|
|
|
+ <Form-item>
|
|
|
+ <Button type="primary" @click="search">搜索</Button>
|
|
|
+ </Form-item>
|
|
|
+ </Col>
|
|
|
+ </Form>
|
|
|
+ <Col span="24">
|
|
|
+ <Button type="primary" @click="passsuccess">批量审核通过</Button>
|
|
|
+ <Button type="warning" @click="setpassfailinfo">批量审核失败</Button>
|
|
|
+ </Col>
|
|
|
+ </Col>
|
|
|
+ <Col span="24">
|
|
|
+ <Table :columns="column" :data="list" @on-selection-change="setpasslistchange"></Table>
|
|
|
+ <Page :total="pagedata.total" size="small" :current="pagedata.current" :page-size="pagedata.pageSize" :page-size-opts="pagedata.pageSizeOpts"
|
|
|
+ @on-change="pageChange" @on-page-size-change="sizeChange"
|
|
|
+ show-elevator show-sizer show-total></Page>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <Modal v-if="logs" v-model="showlog" title="日志" width="1000">
|
|
|
+ <Table :columns="column2" :data="logs"></Table>
|
|
|
+ <Page :total="pagedata2.total" size="small" :current="pagedata2.current"
|
|
|
+ :page-size="pagedata2.pageSize" :page-size-opts="pagedata2.pageSizeOpts"
|
|
|
+ @on-change="pageChange2" @on-page-size-change="sizeChange2"
|
|
|
+ show-elevator show-sizer show-total>
|
|
|
+ </Page>
|
|
|
+ </Modal>
|
|
|
+ <Modal v-if="detail" v-model="showdetail" title="详细" width="1000">
|
|
|
+ <Row :gutter="16">
|
|
|
+ <Col span="3">
|
|
|
+ 企业名
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.companyname }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 组织结构代码
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.organization_code }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 审核状态
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{$t("ispass_"+detail.ispass)}}
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <br/>
|
|
|
+ <Row :gutter="16">
|
|
|
+ <Col span="3">
|
|
|
+ 创建时间
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.create_time }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 联系人
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.contactname }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 电话
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.contacttel }}
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <br/>
|
|
|
+ <Row :gutter="16">
|
|
|
+ <Col span="3">
|
|
|
+ 行业
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.enterprisetrade }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 规模
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.enterprisesize }}
|
|
|
+ </Col>
|
|
|
+ <Col span="3">
|
|
|
+ 地址
|
|
|
+ </Col>
|
|
|
+ <Col span="5">
|
|
|
+ {{ detail.location }}
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <br/>
|
|
|
+ <Row :gutter="16">
|
|
|
+ <Col span="4">
|
|
|
+ 营业执照
|
|
|
+ </Col>
|
|
|
+ <Col span="8">
|
|
|
+ <div class="detail_img" v-viewer>
|
|
|
+ <img v-for="src in [detail.license_photo]" :key="src" :src="src">
|
|
|
+ </div>
|
|
|
+ </Col>
|
|
|
+ <Col span="4">
|
|
|
+ logo
|
|
|
+ </Col>
|
|
|
+ <Col span="8">
|
|
|
+ <div class="detail_img" v-viewer>
|
|
|
+ <img v-for="src in [detail.logo]" :key="src" :src="src">
|
|
|
+ </div>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <br/>
|
|
|
+ <Row :gutter="16">
|
|
|
+ <Col span="4">
|
|
|
+ 企业照片
|
|
|
+ </Col>
|
|
|
+ <Col span="20">
|
|
|
+ <div class="detail_img detail_img_block" v-viewer>
|
|
|
+ <img v-for="src in [detail.enterprisephoto]" :key="src" :src="src">
|
|
|
+ </div>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </Modal>
|
|
|
+ <Modal v-model="ispassfail" title="审核失败">
|
|
|
+ <Input v-model="passfailinfo" type="textarea" :rows="4" placeholder="审核失败原因"></Input>
|
|
|
+ <div slot="footer">
|
|
|
+ <Button type="success" @click="passfail">保存</Button>
|
|
|
+
|
|
|
+ <Button type="error" @click="closepassfailmodel">取消</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { getCompanyList, getCompanyInfoById, auditCompany, getAuditCompanyLog } from '@/api/data'
|
|
|
+export default {
|
|
|
+ name: 'companylist',
|
|
|
+ data () {
|
|
|
+ var self = this
|
|
|
+ return {
|
|
|
+ ispassfail: false,
|
|
|
+ passfailinfo: '',
|
|
|
+ selectmore: false,
|
|
|
+ showlog: false,
|
|
|
+ showdetail: false,
|
|
|
+ detail: {},
|
|
|
+ wuid: this.$store.state.user.userId,
|
|
|
+ list: [],
|
|
|
+ logs: [],
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ type: 'selection',
|
|
|
+ width: 40,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'ID',
|
|
|
+ key: 'id',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '企业名称',
|
|
|
+ key: 'companyname'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系人',
|
|
|
+ key: 'contactname',
|
|
|
+ width: 250,
|
|
|
+ render: function (h, params) {
|
|
|
+ const contactname = params.row.contactname
|
|
|
+ const contacttel = params.row.contacttel
|
|
|
+ const html = '<p>' + contactname + '</p><p>' + contacttel + '</p>'
|
|
|
+ var div = h('div', {
|
|
|
+ domProps: {
|
|
|
+ innerHTML: html
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return div
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '组织机构代码',
|
|
|
+ key: 'organization_code',
|
|
|
+ width: 250
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创建时间',
|
|
|
+ key: 'create_time',
|
|
|
+ width: 250
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '审核状态',
|
|
|
+ key: 'isactive',
|
|
|
+ width: 160,
|
|
|
+ render: function (h, params) {
|
|
|
+ const pass = self.$t('ispass_' + params.row.ispass)
|
|
|
+ const html = '<p>' + pass + '</p>'
|
|
|
+ var div = h('div', {
|
|
|
+ domProps: {
|
|
|
+ innerHTML: html
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return div
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'option',
|
|
|
+ align: 'left',
|
|
|
+ width: 200,
|
|
|
+ render: function (h, params) {
|
|
|
+ var btn2 = h('Button', {
|
|
|
+ props: {
|
|
|
+ type: 'text',
|
|
|
+ size: 'small'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: (data) => {
|
|
|
+ self.showdetailinfo(params.row.id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, '详细')
|
|
|
+ var btn5 = h('Button', {
|
|
|
+ props: {
|
|
|
+ type: 'text',
|
|
|
+ size: 'small'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: (data) => {
|
|
|
+ self.showloglist(params.row.id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, '日志')
|
|
|
+ var btns = []
|
|
|
+ btns.push(btn2)
|
|
|
+ if (params.row.ispass !== 0) {
|
|
|
+ btns.push(btn5)
|
|
|
+ }
|
|
|
+ return btns
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ column2: [
|
|
|
+ {
|
|
|
+ title: '操作人',
|
|
|
+ key: 'username',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ key: 'node'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'IP',
|
|
|
+ key: 'ip',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作时间',
|
|
|
+ key: 'createtime',
|
|
|
+ width: 160
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ searchData: {
|
|
|
+ company: '',
|
|
|
+ ispass: '',
|
|
|
+ createdate: []
|
|
|
+ },
|
|
|
+ pagedata: {
|
|
|
+ total: 10,
|
|
|
+ current: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ pageSizeOpts: [10, 50, 100]
|
|
|
+ },
|
|
|
+ pagedata2: {
|
|
|
+ total: 10,
|
|
|
+ current: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ pageSizeOpts: [10, 50, 100]
|
|
|
+ },
|
|
|
+ passlist: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ search () {
|
|
|
+ this.pagedata.current = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ getList () {
|
|
|
+ this.searchData.page = this.pagedata.current
|
|
|
+ this.searchData.size = this.pagedata.pageSize
|
|
|
+ getCompanyList(this.searchData).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ this.list = []
|
|
|
+ this.pagedata.total = 0
|
|
|
+ this.pagedata.current = 1
|
|
|
+ } else {
|
|
|
+ const usedata = data.data
|
|
|
+ this.pagedata.total = usedata.count
|
|
|
+ this.list = usedata.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pageChange (current) {
|
|
|
+ this.pagedata.current = current
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ sizeChange (pageSize) {
|
|
|
+ this.pagedata.pageSize = pageSize
|
|
|
+ this.pagedata.current = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ pageChange2 (current) {
|
|
|
+ this.pagedata2.current = current
|
|
|
+ this.showloglist()
|
|
|
+ },
|
|
|
+ sizeChange2 (pageSize) {
|
|
|
+ this.pagedata2.pageSize = pageSize
|
|
|
+ this.pagedata2.current = 1
|
|
|
+ this.showloglist()
|
|
|
+ },
|
|
|
+ passsuccess () {
|
|
|
+ if (this.passlist.length <= 0) {
|
|
|
+ this.$Message.error('无提交数据')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const idlist = this.passlist
|
|
|
+ const ispass = 1
|
|
|
+ const wuid = this.wuid
|
|
|
+ auditCompany({ idlist, ispass, wuid }).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ } else {
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ passfail () {
|
|
|
+ if (this.passlist.length <= 0) {
|
|
|
+ this.$Message.error('无提交数据')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const idlist = this.passlist
|
|
|
+ const ispass = 2
|
|
|
+ const wuid = this.wuid
|
|
|
+ const node = this.passfailinfo
|
|
|
+ auditCompany({ idlist, ispass, wuid, node }).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ } else {
|
|
|
+ this.getList()
|
|
|
+ this.closepassfailmodel()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setpasslistchange (selection) {
|
|
|
+ if (selection.length >= 0) {
|
|
|
+ this.passlist = []
|
|
|
+ }
|
|
|
+ for (var j = 0, len = selection.length; j < len; j++) {
|
|
|
+ this.passlist.push(selection[j].id)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* showdetailinfo (id) {
|
|
|
+ getinventinfo(id).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ } else {
|
|
|
+ const usedata = data.data
|
|
|
+ this.detailinfo = usedata
|
|
|
+ this.showdetail = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, */
|
|
|
+ showloglist (id) {
|
|
|
+ const data = {
|
|
|
+ refid: id,
|
|
|
+ page: this.pagedata2.current,
|
|
|
+ size: this.pagedata2.pageSize
|
|
|
+ }
|
|
|
+ getAuditCompanyLog(data).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ this.logs = []
|
|
|
+ this.pagedata2.total = 0
|
|
|
+ this.pagedata2.current = 1
|
|
|
+ } else {
|
|
|
+ const usedata = data.data
|
|
|
+ this.pagedata2.total = usedata.count
|
|
|
+ this.logs = usedata.list
|
|
|
+ this.showlog = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showdetailinfo (id) {
|
|
|
+ getCompanyInfoById(id).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ if (data.code !== 200) {
|
|
|
+ this.$Message.error(data.msg)
|
|
|
+ this.detail = {}
|
|
|
+ this.showdetail = false
|
|
|
+ } else {
|
|
|
+ const detail = data.data
|
|
|
+ this.detail = detail
|
|
|
+ this.showdetail = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createdateChange (values) {
|
|
|
+ this.searchData.createdate = values
|
|
|
+ },
|
|
|
+ show () {
|
|
|
+ this.$viewerApi({
|
|
|
+ images: this.images
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setpassfailinfo () {
|
|
|
+ this.ispassfail = true
|
|
|
+ },
|
|
|
+ closepassfailmodel () {
|
|
|
+ this.ispassfail = false
|
|
|
+ this.passfailinfo = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|