index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <div>
  3. <el-breadcrumb class="heading">
  4. <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
  5. <el-breadcrumb-item :to="{ path: '/oilsupplier/companyaudit' }">公司审核</el-breadcrumb-item>
  6. </el-breadcrumb>
  7. <el-card class="box-card">
  8. <div slot="header">
  9. <span>
  10. <i class="icon icon-table2"> 公司审核列表</i>
  11. </span>
  12. <el-form ref="form"
  13. v-model="searchForm"
  14. :inline="true"
  15. style="float: right; margin-top: -10px">
  16. <el-form-item label="公司名称">
  17. <el-input v-model="searchForm.Name"
  18. placeholder="请输入公司名称"
  19. size="mini"></el-input>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button @click="initData"
  23. size="mini"
  24. type="primary">查 询</el-button>
  25. </el-form-item>
  26. <el-form-item>
  27. <el-button type="primary"
  28. class="el-button--small"
  29. @click="clearSearch"
  30. size="mini">重 置</el-button>
  31. </el-form-item>
  32. </el-form>
  33. </div>
  34. <el-row :gutter="20">
  35. <el-col :span="24">
  36. <!-- <el-collapse>
  37. <el-collapse-item title="查询公司">
  38. <el-form ref="form"
  39. :model="searchForm"
  40. label-width="120px">
  41. <el-row>
  42. <el-col :span="8">
  43. <el-form-item label="公司名称">
  44. <el-input v-model="searchForm.Name"
  45. placeholder="请输入公司名称"> ></el-input>
  46. </el-form-item>
  47. </el-col>
  48. </el-row>
  49. <el-row>
  50. <el-col class="line"
  51. :span="24"
  52. style="background-color:lightgrey; line-height: 1px">&nbsp;</el-col>
  53. </el-row>
  54. <el-row :gutter="0"
  55. style="text-align:right;margin-top:10px;">
  56. <el-button @click="initData"
  57. size="small"
  58. type="primary">查询</el-button>
  59. <el-button type="primary"
  60. class="el-button--small"
  61. @click="clearSearch"
  62. style="margin-left:8px">重 置</el-button>
  63. </el-row>
  64. </el-form>
  65. </el-collapse-item>
  66. </el-collapse> -->
  67. <el-table :data="list"
  68. stripe
  69. highlight-current-row
  70. size="mini"
  71. border
  72. style="width: 100%">
  73. <el-table-column label="操作"
  74. width="120"
  75. align="center"
  76. header-align="center"
  77. fixed="right">
  78. <template slot-scope="scope">
  79. <el-button size="mini"
  80. type="text"
  81. title="审核"
  82. @click="checkData(scope.row)"
  83. v-if="scope.row.CheckStatus == 0 && auditBtn">审核</el-button>
  84. <el-button size="mini"
  85. type="text"
  86. title="查看"
  87. @click="checkData(scope.row)"
  88. v-else>查看</el-button>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="CheckStatus"
  92. label="审核状态"
  93. width="120"
  94. align="center"
  95. header-align="center"
  96. show-overflow-tooltip>
  97. <template slot-scope="scope">
  98. <span v-if="scope.row.CheckStatus == 1"
  99. style="color:#E6A23C">待审核</span>
  100. <span v-if="scope.row.CheckStatus == 11"
  101. style="color:#67C23A">审核通过</span>
  102. <span v-if="scope.row.CheckStatus == -1"
  103. style="color:#F56C6C">审核未通过</span>
  104. </template>
  105. <!--TODO 新注册账号待审核状态不对-->
  106. </el-table-column>
  107. <el-table-column prop="SupplierName"
  108. label="公司名称"
  109. align="center"
  110. header-align="center"
  111. show-overflow-tooltip></el-table-column>
  112. <el-table-column prop="CommercialNo"
  113. label="统一社会信用代码"
  114. align="center"
  115. header-align="center"
  116. show-overflow-tooltip></el-table-column>
  117. <el-table-column prop="LegalPerson"
  118. label="法定代表人"
  119. align="center"
  120. header-align="center"
  121. show-overflow-tooltip></el-table-column>
  122. <el-table-column prop="ContactName"
  123. label="联系人"
  124. align="center"
  125. header-align="center"
  126. show-overflow-tooltip></el-table-column>
  127. <el-table-column prop="EMail"
  128. label="邮箱"
  129. align="center"
  130. header-align="center"
  131. show-overflow-tooltip></el-table-column>
  132. <el-table-column prop="UserName"
  133. label="用户名"
  134. align="center"
  135. header-align="center"
  136. show-overflow-tooltip></el-table-column>
  137. <el-table-column prop="UserTelephone"
  138. label="用户手机号"
  139. align="center"
  140. header-align="center"
  141. show-overflow-tooltip></el-table-column>
  142. <el-table-column prop="CheckUnitName"
  143. label="审核单位"
  144. align="center"
  145. header-align="center"
  146. show-overflow-tooltip></el-table-column>
  147. <el-table-column prop="ModifiedBy"
  148. label="审核人"
  149. align="center"
  150. header-align="center"
  151. show-overflow-tooltip></el-table-column>
  152. </el-table>
  153. <el-pagination style="float:right;margin:10px 0 10px 0;"
  154. @size-change="handleSizeChange"
  155. @current-change="handleCurrentChange"
  156. :current-page="currentPage"
  157. :page-size="size"
  158. :page-sizes="[10, 15, 20 ]"
  159. layout="total, sizes, prev, pager, next, jumper"
  160. :total="currentItemCount">
  161. </el-pagination>
  162. </el-col>
  163. </el-row>
  164. </el-card>
  165. <!-- 公司审核信息 -->
  166. <el-dialog title="企业注册信息"
  167. :visible.sync="dialogVisible">
  168. <el-form label-width="135px"
  169. ref="formData"
  170. :model="formData"
  171. size="small">
  172. <el-row>
  173. <el-col :span="24">
  174. <el-form-item label="公司名称"
  175. label-width="150px"
  176. style="width: 100%"
  177. prop="SupplierName">
  178. <el-input v-model="formData.SupplierName"
  179. readonly></el-input>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="24">
  183. <el-form-item label="统一社会信用代码"
  184. label-width="150px"
  185. style="width: 100%"
  186. prop="CommercialNo">
  187. <el-input v-model="formData.CommercialNo"
  188. readonly></el-input>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="24">
  192. <el-form-item label="法定代表人姓名"
  193. label-width="150px"
  194. style="width: 100%"
  195. prop="LegalPerson">
  196. <el-input v-model="formData.LegalPerson"
  197. readonly></el-input>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="24">
  201. <el-form-item label="法定代表人身份证号"
  202. label-width="150px"
  203. style="width: 100%"
  204. prop="LegalPersonId">
  205. <el-input v-model="formData.LegalPersonId"
  206. readonly></el-input>
  207. </el-form-item>
  208. </el-col>
  209. <el-col :span="24">
  210. <el-form-item label="法定代表人身份证扫描件"
  211. label-width="170px"
  212. prop="LegalPersonImg">
  213. <div class="block"
  214. style="overflow: auto;">
  215. <template>
  216. <el-row>
  217. <el-col :span="12"
  218. v-for="(url, index) in urlList"
  219. :key="index">
  220. <span @click="bigImg(url)">
  221. <el-image style="width: 170px; height: 100px; cursor: pointer"
  222. :src="url"></el-image>
  223. </span>
  224. </el-col>
  225. </el-row>
  226. </template>
  227. </div>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="24">
  231. <el-form-item label="联系人姓名"
  232. label-width="150px"
  233. style="width: 100%"
  234. prop="ContactName">
  235. <el-input v-model="formData.ContactName"
  236. readonly></el-input>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="24">
  240. <el-form-item label="联系人身份证号"
  241. label-width="150px"
  242. style="width: 100%"
  243. prop="ContactId">
  244. <el-input v-model="formData.ContactId"
  245. readonly></el-input>
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="24">
  249. <el-form-item label="联系人身份证扫描件"
  250. label-width="170px"
  251. prop="ContactImg">
  252. <div class="block"
  253. style="overflow: auto;">
  254. <template>
  255. <el-row>
  256. <el-col :span="12"
  257. v-for="(url, index) in urlList2"
  258. :key="index">
  259. <span @click="bigImg(url)">
  260. <el-image style="width: 170px; height: 100px; cursor: pointer"
  261. :src="url"></el-image>
  262. </span>
  263. </el-col>
  264. </el-row>
  265. </template>
  266. </div>
  267. </el-form-item>
  268. </el-col>
  269. </el-row>
  270. <el-row>
  271. <el-col :span="12">
  272. <el-form-item label="邮箱"
  273. label-width="150px"
  274. style="width: 100%"
  275. prop="EMail">
  276. <el-input v-model="formData.EMail"
  277. readonly></el-input>
  278. </el-form-item>
  279. </el-col>
  280. <el-col :span="12">
  281. <el-form-item label="手机号"
  282. style="width: 100%"
  283. prop="UserTelephone">
  284. <el-input v-model="formData.UserTelephone"
  285. readonly></el-input>
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="12">
  289. <el-form-item label="用户名"
  290. label-width="150px"
  291. style="width: 100%"
  292. prop="UserName">
  293. <el-input v-model="formData.UserName"
  294. readonly></el-input>
  295. </el-form-item>
  296. </el-col>
  297. </el-row>
  298. <!-- <el-row style="margin-top: 10px; margin-bottom: 20px;"> -->
  299. <!-- <el-button type="primary" size="mini" @click="ComAudit">审核</el-button> -->
  300. <!-- <el-button size="mini" @click="cancelOption">审核未通过</el-button> -->
  301. <!-- <el-button size="mini" type="primary" @click="ensureOption" style="margin-left: 20%;">审核通过</el-button> -->
  302. <!-- </el-row> -->
  303. </el-form>
  304. <div slot="footer"
  305. class="dialog-footer"
  306. style="margin-top: -25px">
  307. <el-button type="primary"
  308. size="mini"
  309. v-if="showorhid==0 && auditBtn"
  310. @click="ComAudit">审核</el-button>
  311. </div>
  312. </el-dialog>
  313. <el-dialog title="审核"
  314. :visible.sync="Auditshow">
  315. <el-form :model="shenheForm"
  316. label-width="100px"
  317. ref="shenheForm">
  318. <el-form-item label="审核状态">
  319. <template>
  320. <el-radio class="radio"
  321. v-model="shenheForm.SuccessStatus"
  322. :label="1">通过</el-radio>
  323. <el-radio class="radio"
  324. v-model="shenheForm.SuccessStatus"
  325. :label="2">未通过</el-radio>
  326. </template>
  327. </el-form-item>
  328. <el-form-item label="意见"
  329. :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
  330. <el-input type="textarea"
  331. v-model="shenheForm.AuditorRemark"
  332. placeholder="请输入审核意见"></el-input>
  333. </el-form-item>
  334. </el-form>
  335. <div slot="footer"
  336. class="dialog-footer"
  337. style="margin-top: -25px">
  338. <el-button size="small"
  339. @click="Auditshow = false">取 消</el-button>
  340. <el-button type="primary"
  341. size="small"
  342. @click="makeSure()" :loading="btnLoading">确 定</el-button>
  343. </div>
  344. </el-dialog>
  345. <!--点击图片放大区域-->
  346. <el-dialog title="法定代表人身份证扫描件"
  347. :visible.sync="legalPersonImgVisible"
  348. width="40%">
  349. <el-image :src="bigUrl"></el-image>
  350. </el-dialog>
  351. </div>
  352. </template>
  353. <script>
  354. import apiCert from '@/api/oilsupplier/suppliercert'
  355. export default {
  356. name: 'companyaudit',
  357. data () {
  358. return {
  359. btnLoading: false,
  360. btntitle: '查看',
  361. auditBtn: false,
  362. Auditshow: false,
  363. shenheForm: {
  364. SuccessStatus: 1,
  365. AuditorRemark: ''
  366. },
  367. bigUrl: '',
  368. legalPersonImgVisible: false,
  369. currentItemCount: 0,
  370. currentPage: 1,
  371. size: 10,
  372. list: [], // 公司列表
  373. searchForm: {
  374. Name: '' // 公司名称
  375. },
  376. dialogVisible: false,
  377. showorhid: 0,
  378. urlList: [], // 照片地址数组
  379. urlList2: [], // 照片地址数组2
  380. formData: {
  381. Id: '', // int
  382. UserId: '', // int
  383. UserName: '', // 账号/Email
  384. UserRealName: '', // 用户真实姓名
  385. UserTelephone: '', // 用户手机号
  386. UserPass: '',
  387. UserPass2: '',
  388. SupplierName: '',
  389. OilCertificateNo: '',
  390. Grade: '',
  391. MgrUnit: '',
  392. OperType: '',
  393. Country: '',
  394. CommercialNo: '',
  395. OrganCode: '',
  396. CountryTaxNo: '',
  397. LocalTaxNo: '',
  398. Address: '',
  399. DetailAddress: '',
  400. Province: '',
  401. City: '',
  402. Street: '',
  403. HouseNo: '',
  404. ZipCode: '',
  405. BusinessScope: '',
  406. LegalPerson: '',
  407. LegalPersonId: '',
  408. LegalPersonURL: '',
  409. CategoryCode: '',
  410. CategoryName: '',
  411. RegCapital: 0, // float32
  412. Currency: '',
  413. ContactName: '',
  414. ContactId: '',
  415. ContactURL: '',
  416. CompanyType: '',
  417. SetupTime: '', // time
  418. DepositBank: '',
  419. BankAccount: '',
  420. EMail: '',
  421. BankCreditRating: '',
  422. Mobile: '',
  423. Telphone: '',
  424. Fax: '',
  425. CompanyTel: '',
  426. QQ: '',
  427. CompanyUrl: '',
  428. Remark: '',
  429. CheckStatus: 0, // 二级单位审核状态,0:未通过,1:通过 默认0
  430. IsDelete: 0, // 删除状态,0正常,1已删除
  431. LinkAddress: '',
  432. LinkProvince: '',
  433. LinkCity: '',
  434. LinkStreet: '',
  435. LinkHouseNo: '',
  436. LinkZipCode: '',
  437. HseTraining: ''
  438. }
  439. }
  440. },
  441. created () {
  442. this.initData()
  443. this.isAccess()
  444. },
  445. methods: {
  446. isAccess () {
  447. let params = {
  448. id: this.formData.CertId,
  449. auditstepcode: 'COMPONY_AUDIT',
  450. processkey: 'oil_register_apply'
  451. }
  452. apiCert.isAccess(params, this.$axios).then(res => {
  453. this.auditBtn = res.data
  454. if (this.auditBtn) {
  455. this.btntitle = '审核'
  456. } else {
  457. this.btntitle = '查看'
  458. }
  459. }).catch(err => {
  460. console.log(err)
  461. })
  462. },
  463. bigImg (url) {
  464. this.bigUrl = url
  465. this.legalPersonImgVisible = true
  466. },
  467. initData () {
  468. let _this = this
  469. const params = {
  470. _currentPage: this.currentPage,
  471. _size: this.size,
  472. Name: this.searchForm.Name
  473. }
  474. this.$axios.get('/register/getcompanylist', {
  475. params
  476. })
  477. .then(function (response) {
  478. _this.list = response.data.items
  479. _this.currentItemCount = response.data.currentItemCount
  480. })
  481. .catch(function (error) {
  482. console.log(error)
  483. })
  484. },
  485. // 审核公司信息
  486. checkData (row) {
  487. let _this = this
  488. _this.formData = row
  489. _this.dialogVisible = true
  490. _this.showorhid = row.CheckStatus
  491. // 处理URL
  492. _this.urlList = []
  493. let urlArr = _this.formData.LegalPersonURL.split('&')
  494. if (urlArr) {
  495. for (let i = 0; i < urlArr.length; i++) {
  496. let tempURL = urlArr[i].split('|')
  497. if (tempURL[0].indexOf('/upfile') === 0) {
  498. const myDomain = window.location.host
  499. _this.urlList.push('http://' + myDomain + tempURL[0])
  500. } else {
  501. _this.urlList.push('http://' + tempURL[0])
  502. }
  503. }
  504. }
  505. _this.urlList2 = []
  506. let urlArr2 = _this.formData.ContactURL.split('&')
  507. if (urlArr2) {
  508. for (let i = 0; i < urlArr2.length; i++) {
  509. let tempURL = urlArr2[i].split('|')
  510. if (tempURL[0].indexOf('/upfile') === 0) {
  511. const myDomain = window.location.host
  512. _this.urlList2.push('http://' + myDomain + tempURL[0])
  513. } else {
  514. _this.urlList2.push('http://' + tempURL[0])
  515. }
  516. }
  517. }
  518. },
  519. ComAudit () {
  520. this.Auditshow = true
  521. },
  522. // 审核
  523. makeSure () {
  524. if (this.shenheForm.AuditorRemark.trim().length < 1) {
  525. this.$message({
  526. type: 'warning',
  527. message: '请填写审批意见!'
  528. })
  529. return
  530. }
  531. this.checkstatus()
  532. },
  533. checkstatus () {
  534. let _this = this
  535. const params = _this.shenheForm
  536. this.btnLoading = true
  537. _this.$axios.post('/register/comaudit/', _this.formData, { params })
  538. .then(res => {
  539. if (res.data.code === 0) {
  540. _this.$message({
  541. type: 'success',
  542. message: res.data.message
  543. })
  544. // 关闭dialog
  545. _this.Auditshow = false
  546. _this.dialogVisible = false
  547. this.shenheForm.AuditorRemark = ''
  548. this.shenheForm.SuccessStatus = 1
  549. // 更新列表
  550. _this.initData()
  551. } else {
  552. _this.$message({
  553. type: 'warning',
  554. message: res.data.message
  555. })
  556. }
  557. this.btnLoading = false
  558. })
  559. .catch(err => {
  560. console.error(err)
  561. })
  562. },
  563. // 审核未通过
  564. cancelOption () {
  565. let _this = this
  566. _this.$axios.delete('/register/deleteinfo/' + _this.formData.Id, {})
  567. .then(function (response) {
  568. if (response.data.code === 0) {
  569. _this.$message({
  570. type: 'success',
  571. message: response.data.message
  572. })
  573. // 关闭dialog
  574. _this.dialogVisible = false
  575. // 更新界面
  576. _this.initData()
  577. } else {
  578. _this.$message({
  579. type: 'warning',
  580. message: response.data.message
  581. })
  582. }
  583. })
  584. .catch(function (error) {
  585. console.log(error)
  586. })
  587. },
  588. // 审核通过
  589. ensureOption () {
  590. let _this = this
  591. _this.$axios.post('/register/adduser/', _this.formData)
  592. .then(res => {
  593. if (res.data.code === 0) {
  594. _this.$message({
  595. type: 'success',
  596. message: res.data.message
  597. })
  598. // 关闭dialog
  599. _this.dialogVisible = false
  600. // 更新列表
  601. _this.initData()
  602. } else {
  603. _this.$message({
  604. type: 'warning',
  605. message: res.data.message
  606. })
  607. }
  608. })
  609. .catch(err => {
  610. console.error(err)
  611. })
  612. },
  613. handleSizeChange (value) {
  614. this.size = value
  615. this.currentPage = 1
  616. this.initData()
  617. },
  618. handleCurrentChange (value) {
  619. this.currentPage = value
  620. this.initData()
  621. },
  622. clearSearch () {
  623. this.searchForm.Name = ''
  624. this.initData()
  625. }
  626. }
  627. }
  628. </script>
  629. <style lang="scss">
  630. .time {
  631. font-size: 13px;
  632. color: #999;
  633. }
  634. .bottom {
  635. margin-top: 13px;
  636. line-height: 12px;
  637. }
  638. .button {
  639. padding: 0;
  640. float: right;
  641. }
  642. .image {
  643. width: 100%;
  644. display: block;
  645. }
  646. .clearfix:before,
  647. .clearfix:after {
  648. display: table;
  649. content: "";
  650. }
  651. .clearfix:after {
  652. clear: both;
  653. }
  654. .el-pagination {
  655. margin: 1rem 0 2rem;
  656. text-align: right;
  657. }
  658. .plab {
  659. font-size: 13px;
  660. color: #999;
  661. }
  662. .triggerone {
  663. font-size: 13px;
  664. margin-left: 80px;
  665. }
  666. .plab {
  667. font-size: 13px;
  668. color: #999;
  669. }
  670. .docdelete .el-radio {
  671. padding: 8px 15px 0 0;
  672. margin-left: -2px;
  673. }
  674. </style>