carCaptain.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. //车队长信息
  2. <template>
  3. <div class="center">
  4. <div class="center_css">
  5. <div class="top_css">
  6. <el-row>
  7. <el-col :span="14" style="height: 45px"> </el-col>
  8. <el-col :span="10">
  9. <div class="screen">
  10. <el-input class="find" placeholder="可按车队长姓名、账号查找" @keyup.enter.native="find" v-model="searchkeyWord"
  11. clearable @change="find"></el-input>
  12. <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
  13. src="../../../public/img/sousuo.png" /></el-button><span class="count_css">共{{
  14. deptBudgetTotal
  15. }}条</span>
  16. </div>
  17. </el-col>
  18. </el-row>
  19. <el-row>
  20. <el-col>
  21. <div class="search_btn">
  22. <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block"
  23. @click="searchBtn('')">
  24. 全部
  25. </div>
  26. <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(1)">
  27. 待审核
  28. </div>
  29. <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
  30. 已通过
  31. </div>
  32. <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
  33. 已驳回
  34. </div>
  35. <!-- <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
  36. 已禁用
  37. </div> -->
  38. </div>
  39. </el-col>
  40. </el-row>
  41. </div>
  42. <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="58vh" border
  43. highlight-current-row>
  44. <el-table-column type="index" width="60" label="序号" align="center">
  45. <template scope="scope">
  46. <span>{{ scope.$index + 1 }}</span>
  47. <!-- <span v-else>{{scope.$index}}</span> -->
  48. </template>
  49. </el-table-column>
  50. <el-table-column prop="name" label="车队长"></el-table-column>
  51. <el-table-column prop="accountNumber" label="账号"></el-table-column>
  52. <el-table-column prop="idCard" label="身份证号" min-width="110">
  53. <template scope="scope">
  54. <el-popover placement="top" trigger="hover" :content="
  55. scope.row.cardValidityStartDate +
  56. ' ~ ' +
  57. scope.row.cardValidityStartDate
  58. ">
  59. <div slot="reference">{{ scope.row.idCard }}</div>
  60. </el-popover>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="bankDeposit" label="开户行"></el-table-column>
  64. <el-table-column prop="bankCard" label="卡号" min-width="110"></el-table-column>
  65. <el-table-column prop="status" label="附件">
  66. <template slot-scope="scoped">
  67. <span class="btn_css" @click="lookInfo(scoped.row)">查看</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="status" label="成员">
  71. <template slot-scope="scoped">
  72. <span class="btn_css" @click="persionLook(scoped.row)">查看</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="status" label="账单">
  76. <template slot-scope="scoped">
  77. <span class="btn_css" @click="billLook(scoped.row)">查看</span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column prop="backStageStatus" label="状态"></el-table-column>
  81. <el-table-column label="操作" min-width="100">
  82. <template slot-scope="scope">
  83. <el-link target="_blank" type="primary" :underline="false" @click="adopt(scope.row)"
  84. :disabled="scope.row.backStageStatus != '待审核'">通过</el-link>
  85. <el-divider direction="vertical"></el-divider>
  86. <el-link target="_blank" type="primary" :underline="false" @click="reject(scope.row)"
  87. :disabled="scope.row.backStageStatus != '待审核'">驳回</el-link>
  88. <!-- <el-divider direction="vertical"></el-divider> -->
  89. <!-- <el-link target="_blank" type="primary" :underline="false" @click="lookInfo(scope.row)">查看</el-link>
  90. <el-divider direction="vertical"></el-divider>
  91. <el-link target="_blank" type="primary" :underline="false" @click="switchStatus(scope.row,1)"
  92. :disabled="scope.row.statusKey==7">禁用</el-link>
  93. <el-divider direction="vertical"></el-divider>
  94. <el-link target="_blank" type="primary" :underline="false" @click="switchStatus(scope.row,2)"
  95. :disabled="scope.row.status!='已禁用'">解禁</el-link> -->
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. </div>
  100. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  101. style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
  102. layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  103. </el-pagination>
  104. <el-dialog :close-on-click-modal="false" title="附件" :visible.sync="fujianInfo" width="830px"
  105. :before-close="fujianClose">
  106. <div class="file">
  107. <div class="fujian_css">
  108. <div class="fujian_item" :class="count == 1 ? 'file_btn' : ''" @click="btnChange(1)">
  109. 身份证
  110. </div>
  111. <div class="fujian_item" :class="count == 2 ? 'file_btn' : ''" @click="btnChange(2)">
  112. 银行卡
  113. </div>
  114. <!-- <div class="fujian_item" :class="count == 3 ? 'file_btn' : ''" @click="btnChange(3)">
  115. 行驶证
  116. </div> -->
  117. <!-- <div class="fujian_item" :class="count == 4 ? 'file_btn' : ''" @click="btnChange(4)">
  118. 从业资格证
  119. </div> -->
  120. <!-- <div v-if='file.carCategory=="挂车"' class="fujian_item" :class="count == 5 ? 'file_btn' : ''" @click="btnChange(5)">
  121. 挂车行驶证
  122. </div>
  123. <div class="fujian_item" :class="count == 6 ? 'file_btn' : ''" @click="btnChange(6)">
  124. 道路运输证
  125. </div>
  126. <div v-if='file.carCategory=="挂车"' class="fujian_item" :class="count == 7 ? 'file_btn' : ''" @click="btnChange(7)">
  127. 挂车道路运输证
  128. </div>
  129. <div class="fujian_item" :class="count == 8 ? 'file_btn' : ''" @click="btnChange(8)">
  130. 人车合影
  131. </div>
  132. <div class="fujian_item" :class="count == 9 ? 'file_btn' : ''" @click="btnChange(9)">
  133. 人和挂车合影
  134. </div> -->
  135. </div>
  136. <div class="file_tips">
  137. <span v-if="count == 3">有效期:{{ file.drivingLicenseValidityDate }} </span><span v-if="count == 3">
  138. 注册日期:{{ file.drivingLicenseRegistrationDate }}
  139. </span>
  140. <span v-if="count == 3">
  141. 发证日期:{{ file.drivingLicenseIssueDate }}
  142. </span>
  143. <span v-if="count == 3"> 发证机关:{{ file.lssuingAuthority }}</span>
  144. <span v-if="count == 5">有效期:{{ file.trailerLicenseValidityDate }} </span><span v-if="count == 5">
  145. 注册日期:{{ file.trailerLicenseRegistrationDate }}
  146. </span>
  147. <span v-if="count == 5">
  148. 发证日期:{{ file.trailerLicenseIssueDate }}
  149. </span>
  150. <span v-if="count == 5">
  151. 发证机关:{{ file.guaLssuingAuthority }}</span>
  152. <span v-if="count == 6">
  153. 运输证号:{{ file.operationCertificateNumber }} </span><span v-if="count == 6">有效期:{{
  154. file.operationCertificateValidityDate
  155. }}
  156. </span>
  157. <span v-if="count == 7">
  158. 挂车运输证号:{{ file.trailerOperationCertificateNumber }} </span><span v-if="count == 7">有效期:{{
  159. file.trailerOperationCertificateValidityDate
  160. }}
  161. </span>
  162. </div>
  163. <div class="file_img">
  164. <img :src="img[index]" class="img_css" @click="enlarge(img[index])" />
  165. </div>
  166. <div class="btn">
  167. <el-button style="margin-right: 120px" @click="index = 0" v-if="count == 1">{{ abilityName }}</el-button>
  168. <el-button @click="index = 1" v-if="count == 1">{{ abilityName1 }}
  169. </el-button>
  170. </div>
  171. </div>
  172. </el-dialog>
  173. <!-- 成员 -->
  174. <el-dialog :close-on-click-modal="false" :title="'成员信息' + ' (' + totalLength + ')'" :visible.sync="persioninfo"
  175. width="500px" :before-close="persioninfoClose">
  176. <div class="persionlist_css">
  177. <div v-for="(item, index) in persionList" :key="index">
  178. <div class="persion_css">
  179. <div class="persion_left">{{ item.driverName }}</div>
  180. <div class="persion_right">{{ item.accountNumber }}</div>
  181. </div>
  182. <el-divider></el-divider>
  183. </div>
  184. </div>
  185. </el-dialog>
  186. <!-- 账单 -->
  187. <el-dialog :close-on-click-modal="false" title="账单信息" :visible.sync="billShow" width="500px"
  188. :before-close="billShowClose">
  189. <div class="billList_css">
  190. <div v-for="(item, index) in billList" :key="index">
  191. <div class="bill_css">
  192. <div class="bill_left">
  193. {{ item.orderNo }}({{ item.paymentType }})
  194. </div>
  195. <div class="bill_right">{{ item.amountMoney }} 元</div>
  196. </div>
  197. <div class="bill_css">
  198. <div class="bill_left">
  199. {{ item.driverName }}({{ item.driverAccountNumber }})
  200. </div>
  201. <div class="bill_right">{{ item.paymentDate }}</div>
  202. </div>
  203. <el-divider></el-divider>
  204. </div>
  205. </div>
  206. </el-dialog>
  207. <!-- //附图 -->
  208. <!-- <el-dialog :close-on-click-modal='false' title="车队信息" :visible.sync="seeinfo" width="500px" :before-close="seeinfoClose">
  209. <div>{{dataInfo.fleetName}}({{dataInfo.fleetMemberNum}})</div>
  210. <div>队长: {{dataInfo.driverName}} {{dataInfo.driverNumber}}</div>
  211. <div>车队简介:</div>
  212. <div>{{dataInfo.fleetProfile}}</div>
  213. <div>车队公告:</div>
  214. <div>{{dataInfo.notice?dataInfo.notice:'暂无'}}</div>
  215. 队友:
  216. <div v-for="(item,index) in dataInfo.fleetMemberInfoList" :key="index">
  217. <span>{{item.driverNickname}} 电话{{item.driverPhone}}</span>
  218. </div>
  219. </el-dialog> -->
  220. <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index: 9999" />
  221. </div>
  222. </template>
  223. <script>
  224. import {
  225. getCarCaptainList,
  226. carCaptainAudit,
  227. getpersionList,
  228. getBillList,
  229. } from "@/api/driverManagement";
  230. export default {
  231. components: {
  232. "el-image-viewer": () =>
  233. import("element-ui/packages/image/src/image-viewer"),
  234. },
  235. data() {
  236. return {
  237. tableData: [],
  238. //分页
  239. searchkeyWord: "",
  240. currentPage: 1,
  241. pageSize: 10,
  242. deptBudgetTotal: 0,
  243. deptCircularPage: {},
  244. search: "",
  245. Info: {},
  246. sendInfo: false,
  247. titleInfo: "",
  248. dataInfo: {},
  249. fujianInfo: false,
  250. img: [],
  251. index: "0",
  252. count: "1",
  253. abilityName: "身份证人像面",
  254. abilityName1: "身份证国徽面",
  255. srcList: [],
  256. imgsVisible: false,
  257. //成员
  258. persioninfo: false,
  259. persionList: [],
  260. totalLength: "",//总人数
  261. //账单
  262. billList: [],
  263. billShow: false,
  264. };
  265. },
  266. mounted() {
  267. this.getList();
  268. },
  269. methods: {
  270. billLook(val) {
  271. getBillList({
  272. carCaptainCommonId: val.commonId,
  273. currentPage: 1,
  274. pageSize: 100,
  275. })
  276. .then((response) => {
  277. if (response.code == 200) {
  278. this.billList = response.data.records;
  279. if (this.billList.length > 0) {
  280. this.billShow = true;
  281. } else {
  282. this.$message.error("该车队没有账单信息!");
  283. }
  284. }
  285. })
  286. .catch(() => {
  287. this.loading = false;
  288. });
  289. },
  290. billShowClose() {
  291. this.billShow = false;
  292. },
  293. closeImgViewer() {
  294. console.log(11111111111);
  295. this.srcList = [];
  296. this.imgsVisible = false;
  297. },
  298. enlarge(url) {
  299. this.imgsVisible = true;
  300. this.srcList.push(url);
  301. },
  302. lookInfo(val) {
  303. this.fujianInfo = true;
  304. // this.listLoading = true;
  305. this.dataInfo = val;
  306. this.btnChange(1);
  307. },
  308. persionLook(val) {
  309. getpersionList({
  310. carCaptainCommonId: val.commonId,
  311. currentPage: 1,
  312. pageSize: 100,
  313. houtaiSearch: 1,
  314. })
  315. .then((response) => {
  316. if (response.code == 200) {
  317. this.persionList = response.data.records;
  318. this.totalLength = response.data.total
  319. if (this.persionList.length > 0) {
  320. this.persioninfo = true;
  321. } else {
  322. this.$message.error("该车队没有成员信息!");
  323. }
  324. }
  325. })
  326. .catch(() => {
  327. this.loading = false;
  328. });
  329. },
  330. persioninfoClose() {
  331. this.persioninfo = false;
  332. },
  333. btnChange(num) {
  334. this.count = num;
  335. if (num == 1) {
  336. this.abilityName = "身份证人像面";
  337. this.abilityName1 = "身份证国徽面";
  338. this.img[0] = this.dataInfo.cardAddressUrl;
  339. this.img[1] = this.dataInfo.cardBackAddressUrl;
  340. } else if (num == 2) {
  341. this.index = 0;
  342. this.img[0] = this.dataInfo.payeeAddressUrl;
  343. }
  344. },
  345. fujianClose() {
  346. this.fujianInfo = false;
  347. },
  348. adopt(val) {
  349. //通过
  350. this.listLoading = true;
  351. this.$confirm("确定通过该车队长审核?", "提示", {
  352. confirmButtonText: "确定",
  353. cancelButtonText: "取消",
  354. type: "warning",
  355. }).then(() => {
  356. carCaptainAudit({
  357. id: val.id,
  358. examineFlag: 1,
  359. })
  360. .then((response) => {
  361. if (response.code == 200) {
  362. this.$notify({
  363. title: "成功",
  364. message: "通过成功!",
  365. type: "success",
  366. });
  367. }
  368. this.getList();
  369. })
  370. .catch(() => {
  371. this.loading = false;
  372. });
  373. });
  374. },
  375. reject(val) {
  376. //驳回
  377. this.listLoading = true;
  378. this.$confirm("确定驳回该车队长审核?", "提示", {
  379. confirmButtonText: "确定",
  380. cancelButtonText: "取消",
  381. type: "warning",
  382. }).then(() => {
  383. carCaptainAudit({
  384. id: val.id,
  385. examineFlag: 2,
  386. })
  387. .then((response) => {
  388. if (response.code == 200) {
  389. this.$notify({
  390. title: "成功",
  391. message: "驳回成功!",
  392. type: "success",
  393. });
  394. }
  395. this.getList();
  396. })
  397. .catch(() => {
  398. this.loading = false;
  399. });
  400. });
  401. },
  402. // switchStatus(val, num) {
  403. // //启用、禁用
  404. // this.listLoading = true;
  405. // this.$confirm(num == 1 ? '确定禁用' : '确定解禁' + "该车队?", "提示", {
  406. // confirmButtonText: "确定",
  407. // cancelButtonText: "取消",
  408. // type: "warning",
  409. // }).then(() => {
  410. // let sign = ""
  411. // if (num == 1) {
  412. // sign = 3
  413. // } else if (num == 2) {
  414. // sign = 4
  415. // }
  416. // auditFleet({
  417. // id: val.id,
  418. // examineFlag: sign,
  419. // })
  420. // .then((response) => {
  421. // if (response.code == 200) {
  422. // if (num == 1) {
  423. // this.$notify({
  424. // title: "成功",
  425. // message: "禁用成功!",
  426. // type: "success",
  427. // });
  428. // } else {
  429. // this.$notify({
  430. // title: "成功",
  431. // message: "解禁成功!",
  432. // type: "success",
  433. // });
  434. // }
  435. // this.getList()
  436. // }
  437. // })
  438. // .catch(() => {
  439. // this.loading = false;
  440. // });
  441. // });
  442. // },
  443. searchBtn(val) {
  444. this.search = val;
  445. this.getList();
  446. },
  447. getList() {
  448. this.listLoading = true;
  449. getCarCaptainList({
  450. searchType: this.search,
  451. searchKeyWord: this.searchkeyWord,
  452. currentPage: this.currentPage,
  453. pageSize: this.pageSize,
  454. })
  455. .then((response) => {
  456. this.tableData = response.data.records;
  457. this.deptBudgetTotal = response.data.total;
  458. this.listLoading = false;
  459. })
  460. .catch(() => {
  461. this.loading = false;
  462. });
  463. },
  464. find() {
  465. this.currentPage = 1;
  466. this.getList();
  467. },
  468. handleSizeChange(val) {
  469. console.log(`每页 ${val} 条`);
  470. this.pageSize = val;
  471. this.getList();
  472. },
  473. handleCurrentChange(val) {
  474. this.currentPage = val;
  475. console.log(`当前页: ${val}`);
  476. this.getList();
  477. },
  478. },
  479. };
  480. </script>
  481. <style lang="scss" scoped>
  482. .center {
  483. padding: 10px 20px;
  484. background: #f5f6f7;
  485. min-height: calc(100vh - 50px);
  486. .top_css {
  487. padding: 10px;
  488. .search_btn {
  489. height: 80px;
  490. background: linear-gradient(#fafbfb, #ffffff);
  491. display: flex;
  492. margin-top: 20px;
  493. .search_block {
  494. margin-left: 20px;
  495. }
  496. .search_item {
  497. text-align: center;
  498. font-size: 14px;
  499. font-weight: 600;
  500. line-height: 40px;
  501. width: 112px;
  502. height: 40px;
  503. background: #f7f8f9;
  504. cursor: pointer;
  505. margin-top: 30px;
  506. }
  507. .searchNo {
  508. color: #323233;
  509. }
  510. .search {
  511. color: #2f53eb;
  512. background: #ffffff;
  513. }
  514. }
  515. }
  516. .screen {
  517. display: flex;
  518. .search {
  519. width: 40px;
  520. height: 40px;
  521. background: #2f53eb;
  522. border-radius: 0px 2px 2px 0px;
  523. border: 1px solid #dcdfe6;
  524. margin-left: -1px;
  525. }
  526. .count_css {
  527. width: 80px;
  528. text-align: center;
  529. line-height: 40px;
  530. color: #666666;
  531. }
  532. }
  533. .el-button {
  534. padding: 10px 20px !important;
  535. }
  536. .center_css {
  537. background: #ffffff;
  538. border-radius: 1px;
  539. margin-top: 10px;
  540. padding-bottom: 10px;
  541. ::v-deep .el-table th,
  542. ::v-deep .el-table td {
  543. text-align: center;
  544. }
  545. .fujian {
  546. font-size: 24px;
  547. color: #409eff;
  548. }
  549. .warning {
  550. font-size: 14px;
  551. color: #ed1d1d;
  552. }
  553. }
  554. }
  555. ::v-deep .el-table--border .el-table__header th {
  556. background: #f7f8f9;
  557. }
  558. .btn_css {
  559. color: #409eff;
  560. cursor: pointer;
  561. }
  562. //查看附件
  563. .file {
  564. .fujian_css {
  565. width: 260px;
  566. display: flex;
  567. margin: 0 auto;
  568. text-align: center;
  569. line-height: 32px;
  570. border: 1px solid #f0f1f2;
  571. border-right: 0px;
  572. border-radius: 2px 0px 0px 2px;
  573. .fujian_item {
  574. cursor: pointer;
  575. width: 135px;
  576. height: 32px;
  577. border-right: 1px solid #f0f1f2;
  578. }
  579. .file_btn {
  580. color: #2f53eb;
  581. background-color: #cfdbfe;
  582. }
  583. }
  584. .file_tips {
  585. margin: 10px auto;
  586. width: 70%;
  587. }
  588. .file_img {
  589. width: 525px;
  590. height: 332px;
  591. margin: 20px auto;
  592. }
  593. .img_css {
  594. width: 525px;
  595. height: 332px;
  596. }
  597. .btn {
  598. width: 415px;
  599. margin: 0 auto;
  600. }
  601. }
  602. //查看车队长成员
  603. .persionlist_css {
  604. height: 500px;
  605. overflow-y: scroll;
  606. .persion_css {
  607. display: flex;
  608. margin: 10px 0;
  609. .persion_left,
  610. .persion_right {
  611. width: 50%;
  612. }
  613. .persion_right {
  614. text-align: right;
  615. margin-right: 10px;
  616. }
  617. }
  618. }
  619. //查看账单
  620. .billList_css {
  621. height: 500px;
  622. overflow-y: scroll;
  623. .bill_css {
  624. display: flex;
  625. margin: 10px 0;
  626. .bill_left,
  627. .bill_right {
  628. width: 50%;
  629. }
  630. .bill_right {
  631. text-align: right;
  632. margin-right: 10px;
  633. }
  634. }
  635. }
  636. </style>