driverInformationReporting.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  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">
  8. <el-button type="primary" class="batch_btn" @click="escalation">批量上报</el-button>
  9. <el-date-picker v-model="value1" value-format="yyyy-MM-dd" @change="dateChange" type="daterange"
  10. :default-time="['00:00:00', '23:59:59']" range-separator="至" start-placeholder="开始日期"
  11. end-placeholder="结束日期">
  12. </el-date-picker>
  13. </el-col>
  14. <el-col :span="10">
  15. <div class="screen">
  16. <el-input class='find' placeholder="可按司机姓名和账号查找" @keyup.enter.native="find" v-model="searchkeyWord"
  17. clearable @change="find"></el-input>
  18. <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
  19. src="../../../public/img/sousuo.png" /></el-button><span class="count_css">共{{ deptBudgetTotal
  20. }}条</span>
  21. </div>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col>
  26. <div class="search_btn">
  27. <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item search_block" @click="searchBtn(1)">
  28. 待上报
  29. </div>
  30. <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
  31. 未通过
  32. </div>
  33. <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
  34. 已通过
  35. </div>
  36. <!-- <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
  37. 已过期
  38. </div>-->
  39. <div :class="search == '' ? 'search' : 'searchNo'" class="search_item" @click="searchBtn('')">
  40. 全部
  41. </div>
  42. </div>
  43. </el-col>
  44. </el-row>
  45. </div>
  46. <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="60vh" border
  47. highlight-current-row @row-click="handleRowClick" @selection-change="handleSelectionChange">
  48. <el-table-column type="selection" width="55" :selectable="selectInit">
  49. </el-table-column>
  50. <el-table-column type="index" label="序号" width="50">
  51. <template scope="scope">
  52. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  53. <span v-else>{{ scope.$index + 1 }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="driverName" label="司机姓名"></el-table-column>
  57. <el-table-column prop="driverPhone" label="账号"></el-table-column>
  58. <el-table-column prop="driverLicenseValidityStartDate" label="驾驶证有效期">
  59. <template slot-scope="scope">
  60. <span :class="scope.row.driverOverdueFlag == 1 ? 'red_text' : ''">{{
  61. scope.row.driverLicenseValidityStartDate
  62. }}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column prop="qualificationCertificateValidityDate" label="从业资格证有效期">
  66. <template slot-scope="scope">
  67. <span :class="scope.row.qualificationOverdueFlag == 1 ? 'red_text' : ''">{{
  68. scope.row.qualificationCertificateValidityDate
  69. }}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column prop="cardValidityDate" label="身份证有效期">
  73. <template slot-scope="scope">
  74. <span :class="scope.row.overdueFlag == 1 ? 'red_text' : ''">{{ scope.row.cardValidityDate }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="reportedDate" label="上报时间" min-width="156"></el-table-column>
  78. <el-table-column prop="paymentDate" label="附件">
  79. <template slot-scope="scope" style="text-align: center" v-if="scope.row.backStageStatus != '未认证'">
  80. <span class="btn_css btn_css1" @click="fujianLook(scope.row)">查看</span>
  81. <el-tooltip placement="top" v-if="
  82. scope.row.overdueFlag == 1 ||
  83. scope.row.driverOverdueFlag == 1 ||
  84. scope.row.drivingOverdueFlag == 1 ||
  85. scope.row.trailerOverdueFlag == 1 ||
  86. scope.row.qualificationOverdueFlag == 1 ||
  87. scope.row.operationOverdueFlag == 1 ||
  88. scope.row.trailerOperationOverdueFlag == 1
  89. ">
  90. <div slot="content">
  91. <span v-if="scope.row.overdueFlag == 1">身份证已过有效期<br /></span>
  92. <span v-if="scope.row.driverOverdueFlag == 1">驾驶证已过有效期<br /></span><span
  93. v-if="scope.row.qualificationOverdueFlag == 1">从业资格证已过有效期<br /></span>
  94. </div>
  95. <span style="margin-top: 10px"></span>
  96. <img src="../../../public/img/wenhao.png" alt="" class="ask_css" />
  97. </el-tooltip>
  98. </template>
  99. </el-table-column>
  100. <el-table-column prop="reportedStatus" label="状态" min-width="100">
  101. <template scope="scope">
  102. {{ scope.row.reportedStatus }}
  103. <el-tooltip class="item" effect="dark" :content="scope.row.reportedFailureReason" placement="top"
  104. v-if="scope.row.reportedStatus == '未通过'">
  105. <i class="el-icon-warning-outline red_text"></i>
  106. </el-tooltip>
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="操作" min-width="200">
  110. <template slot-scope="scope">
  111. <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false">查看</el-link>
  112. <el-divider direction="vertical"></el-divider>
  113. <el-link target="_blank" @click="reportInfo(scope.row)" type="primary" :underline="false"
  114. :disabled="scope.row.reportedStatus != '未上报' && scope.row.reportedStatus != '未通过'">上报</el-link>
  115. <!-- <el-divider direction="vertical"></el-divider> -->
  116. <!-- <el-dropdown>
  117. <span class="btn_css">•••</span>
  118. <el-dropdown-menu slot="dropdown">
  119. <el-dropdown-item :disabled="
  120. scope.row.authenticationStatus == '已禁用' &&
  121. scope.row.authenticationStatus != '审核中'
  122. "><span @click="switchChange(scope.row, '1')">禁用</span>
  123. </el-dropdown-item>
  124. </el-dropdown-menu>
  125. </el-dropdown> -->
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. </div>
  130. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  131. style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
  132. layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  133. </el-pagination>
  134. <el-dialog :close-on-click-modal='false' title="附件" :visible.sync="fujianInfo" width="830px"
  135. :before-close="fujianClose">
  136. <div class="file">
  137. <div class="fujian_css">
  138. <div class="fujian_item" :class="count == 1 ? 'file_btn' : ''" @click="btnChange(1)">
  139. 身份证
  140. </div>
  141. <div class="fujian_item" :class="count == 2 ? 'file_btn' : ''" @click="btnChange(2)">
  142. 驾驶证
  143. </div>
  144. <!-- <div class="fujian_item" :class="count == 3 ? 'file_btn' : ''" @click="btnChange(3)">
  145. 行驶证
  146. </div> -->
  147. <div class="fujian_item" :class="count == 4 ? 'file_btn' : ''" @click="btnChange(4)">
  148. 从业资格证
  149. </div>
  150. <!-- <div class="fujian_item" :class="count == 5 ? 'file_btn' : ''" @click="btnChange(5)">
  151. 挂车行驶证
  152. </div>
  153. <div class="fujian_item" :class="count == 6 ? 'file_btn' : ''" @click="btnChange(6)">
  154. 运营证
  155. </div>
  156. <div class="fujian_item" :class="count == 7 ? 'file_btn' : ''" @click="btnChange(7)">
  157. 挂车运营证
  158. </div> -->
  159. </div>
  160. <div class="file_tips">
  161. <span v-if="count == 1">有效期:{{ file.cardValidityDate }} </span><span v-if="count == 2">
  162. 准驾车型:{{ file.quasiDrivingVehicle }} </span> <span v-if="count == 2"> 发证机关:{{ file.lssuingAuthority }}
  163. </span>
  164. <span v-if="count == 4"> 从业资格证号:{{ file.qualificationCertificateNumber }}</span>
  165. </div>
  166. <div class="file_img">
  167. <img :src="img[index]" class="img_css" @click="enlarge(img[index])" />
  168. </div>
  169. <div class="btn">
  170. <el-button style="margin-right: 120px" @click="index = 0"
  171. v-if="count == 1 || count == 2 || count == 3 || count == 5">{{ abilityName }}</el-button>
  172. <el-button @click="index = 1" v-if="count == 1 || count == 2 || count == 3 || count == 5">{{ abilityName1 }}
  173. </el-button>
  174. </div>
  175. </div>
  176. </el-dialog>
  177. <el-drawer title="司机信息" :visible.sync="rightSee" style="overflow-y: auto !important">
  178. <div class="right_css">
  179. <div class="title_name">基本信息</div>
  180. <div class="right_item">姓名:{{ costData.driverName }}</div>
  181. <div class="right_title">性别</div>
  182. <div class="right_item">{{ costData.driverSex }} </div>
  183. <div class="right_title">手机号码</div>
  184. <div class="right_item">{{ costData.driverPhone }} </div>
  185. <div class="right_title">身份证照片(人像面)</div>
  186. <img :src="costData.cardAddressUrl" alt="" class="img_css" @click="enlarge(costData.cardAddressUrl)">
  187. <div class="right_title">身份证照片(国徽面)</div>
  188. <img :src="costData.cardBackAddressUrl" alt="" class="img_css" @click="enlarge(costData.cardBackAddressUrl)">
  189. <div class="right_title">身份证号:</div>
  190. <div class="right_item">{{ costData.numberCard }}</div>
  191. <div class="right_title">身份证有效期</div>
  192. <div class="right_item">{{ costData.cardValidityDate }} </div>
  193. <div class="right_title">驾驶证照片(正页)</div>
  194. <img :src="costData.driverLicenseHomePage" alt="" class="img_css"
  195. @click="enlarge(costData.driverLicenseHomePage)">
  196. <div class="right_title">驾驶证照片(副页)</div>
  197. <img :src="costData.driverLicenseBackPage" alt="" class="img_css"
  198. @click="enlarge(costData.driverLicenseBackPage)">
  199. <div class="right_title">准驾车型</div>
  200. <div class="right_item">{{ costData.quasiDrivingVehicle }}</div>
  201. <div class="right_title">驾驶证发证机关</div>
  202. <div class="right_item">{{ costData.lssuingAuthority }}</div>
  203. <div class="right_title">驾驶证有效期</div>
  204. <div class="right_item">{{ costData.driverLicenseValidityDate }}</div>
  205. <div class="right_title">道路运输从业资格证照片</div>
  206. <img :src="costData.qualificationCertificate" alt="" class="img_css"
  207. @click="enlarge(costData.qualificationCertificate)">
  208. <div class="right_title">从业资格证有效期</div>
  209. <div class="right_item">{{ costData.qualificationCertificateValidityDate }} </div>
  210. <div class="right_title">从业资格证号</div>
  211. <div class="right_item">{{ costData.qualificationCertificateNumber }} </div>
  212. </div>
  213. </el-drawer>
  214. <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index:9999" />
  215. </div>
  216. </template>
  217. <script>
  218. import {
  219. getList,
  220. report,
  221. getInfo
  222. } from "@/api/administrationManagement";
  223. export default {
  224. components: {
  225. "el-image-viewer": () =>
  226. import("element-ui/packages/image/src/image-viewer"),
  227. },
  228. data() {
  229. return {
  230. tableData: [],
  231. //分页
  232. searchkeyWord: "",
  233. currentPage: 1,
  234. pageSize: 10,
  235. deptBudgetTotal: 0,
  236. deptCircularPage: {},
  237. search: "",
  238. disabled: false,
  239. userInfo: false,
  240. fujianInfo: false,
  241. file: {},
  242. img: [],
  243. index: "0",
  244. count: "1",
  245. abilityName: "身份证人像面",
  246. abilityName1: "身份证国徽面",
  247. //图片预览
  248. srcList: [],
  249. imgsVisible: false,
  250. //筛选时间
  251. startDate: "",
  252. endDate: "",
  253. value1: [],
  254. //侧边查看
  255. rightSee: false,
  256. costData: {
  257. publishTaskInfo: {}
  258. },
  259. musterList: [],
  260. };
  261. },
  262. mounted() {
  263. let date = new Date()
  264. let date1 = new Date().setTime(date.getTime() - 365 * 60 * 60 * 24 * 1000) //一年前的时间蹉
  265. date1 = new Date(parseInt(date1)).toLocaleString().split(" ")[0].replaceAll("/", "-")
  266. let nian = date1.split("-")[0]
  267. let yue = date1.split("-")[1]
  268. if (yue < 10) {
  269. yue = "0" + yue
  270. }
  271. let ri = date1.split("-")[2]
  272. if (ri < 10) {
  273. ri = "0" + ri
  274. }
  275. this.startDate = nian + "-" + yue + "-" + ri //一年前的時間
  276. this.endDate = date.getFullYear() + "-" + (Number(date.getMonth() + 1) < 10 ? "0" + (Number(date.getMonth() + 1)) : Number(date.getMonth() + 1)) + "-" + (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) //當前時間
  277. this.value1.push(this.startDate)
  278. this.value1.push(this.endDate)
  279. this.getList();
  280. },
  281. methods: {
  282. //上报
  283. escalation() {
  284. var that = this
  285. if (this.musterList.length == 0) {
  286. this.$message.error("请勾选要上报的条目")
  287. return
  288. }
  289. this.$confirm("确定上报司机信息?", "提示", {
  290. confirmButtonText: "确定",
  291. cancelButtonText: "取消",
  292. type: "warning",
  293. }).then(() => {
  294. report({ hyDriverInfoList: this.musterList })
  295. .then((response) => {
  296. if (response.code == 200) {
  297. that.$notify({
  298. title: "成功",
  299. message: "司机信息上报成功!",
  300. type: "success",
  301. });
  302. that.musterList = []
  303. setTimeout(function () { that.getList(); }, 2000);
  304. }
  305. }).catch(() => {
  306. that.musterList = []
  307. that.listLoading = false
  308. })
  309. })
  310. },
  311. handleRowClick(row) {
  312. return true
  313. },
  314. handleSelectionChange(val) {
  315. this.musterList = val;
  316. console.log(this.musterList)
  317. },
  318. see(row) {
  319. this.loading = true
  320. this.rightSee = true
  321. getInfo({
  322. commonId: row.commonId
  323. }).then(response => {
  324. this.costData = response.data
  325. this.listLoading = false
  326. })
  327. .catch(() => {
  328. this.listLoading = false
  329. })
  330. },
  331. reportInfo(row) { //上报
  332. this.musterList.push(row)
  333. this.escalation()
  334. },
  335. dateChange(e) {
  336. console.log(this.value1)
  337. this.startDate = e[0]
  338. this.endDate = e[1]
  339. this.getList()
  340. },
  341. closeImgViewer() {
  342. this.srcList = []
  343. this.imgsVisible = false;
  344. },
  345. enlarge(url) {
  346. this.imgsVisible = true;
  347. this.srcList.push(url)
  348. },
  349. getList() {
  350. this.listLoading = true;
  351. this.musterList = []
  352. let _obj = {};
  353. _obj.currentPage = this.currentPage;
  354. _obj.pageSize = this.pageSize;
  355. _obj.searchKeyWord = this.searchkeyWord;
  356. _obj.administrationType = this.search;
  357. _obj.startDate = this.startDate
  358. _obj.endDate = this.endDate
  359. getList(_obj)
  360. .then((response) => {
  361. this.tableData = response.data.records;
  362. for (let i = 0; i < this.tableData.length; i++) {
  363. this.tableData[i].iconShow = true;
  364. }
  365. this.deptBudgetTotal = response.data.total;
  366. this.listLoading = false;
  367. })
  368. .catch(() => {
  369. this.listLoading = false;
  370. });
  371. },
  372. btnChange(num) {
  373. this.count = num;
  374. if (num == 1) {
  375. this.abilityName = "身份证人像面";
  376. this.abilityName1 = "身份证国徽面";
  377. this.img[0] = this.file.cardAddressUrl;
  378. this.img[1] = this.file.cardBackAddressUrl;
  379. } else if (num == 2) {
  380. this.abilityName = "驾驶证主页";
  381. this.abilityName1 = "驾驶证副页";
  382. this.img[0] = this.file.driverLicenseHomePage;
  383. this.img[1] = this.file.driverLicenseBackPage;
  384. } else if (num == 3) {
  385. this.abilityName = "行驶证主页";
  386. this.abilityName1 = "行驶证副页";
  387. this.img[0] = this.file.drivingLicenseHomePage;
  388. this.img[1] = this.file.drivingLicenseBackPage;
  389. } else if (num == 4) {
  390. this.index = 0;
  391. this.img[0] = this.file.qualificationCertificate;
  392. } else if (num == 5) {
  393. this.abilityName = "挂车行驶证主页";
  394. this.abilityName1 = "挂车行驶证副页";
  395. this.img[0] = this.file.trailerLicenseHomePage;
  396. this.img[1] = this.file.trailerLicenseBackPage;
  397. } else if (num == 6) {
  398. this.index = 0;
  399. this.img[0] = this.file.operationCertificate;
  400. } else if (num == 7) {
  401. this.index = 0;
  402. this.img[0] = this.file.trailerOperationCertificate;
  403. }
  404. },
  405. fujianLook(row) {
  406. this.file = row;
  407. this.index = 0;
  408. this.img[0] = this.file.cardAddressUrl;
  409. this.img[1] = this.file.cardBackAddressUrl;
  410. this.fujianInfo = true;
  411. },
  412. fujianClose() {
  413. this.count = 1;
  414. this.fujianInfo = false;
  415. },
  416. searchBtn(num) {
  417. this.search = num;
  418. this.getList();
  419. },
  420. find() {
  421. this.currentPage = 1
  422. this.getList();
  423. },
  424. selectInit(row) {
  425. if (row.escalationStatus != '未上报' && row.escalationStatus != '未通过') {
  426. return false;
  427. } else {
  428. return true;
  429. }
  430. },
  431. handleSizeChange(val) {
  432. console.log(`每页 ${val} 条`);
  433. this.pageSize = val;
  434. this.getList();
  435. },
  436. handleCurrentChange(val) {
  437. this.currentPage = val;
  438. console.log(`当前页: ${val}`);
  439. this.getList();
  440. },
  441. },
  442. };
  443. </script>
  444. <style lang="scss" scoped>
  445. .center {
  446. padding: 10px 20px;
  447. background: #f5f6f7;
  448. min-height: calc(100vh - 50px);
  449. .top_css {
  450. padding: 10px;
  451. .search_btn {
  452. height: 80px;
  453. background: linear-gradient(#fafbfb, #ffffff);
  454. display: flex;
  455. margin-top: 20px;
  456. .search_block {
  457. margin-left: 20px;
  458. }
  459. .search_item {
  460. text-align: center;
  461. font-size: 14px;
  462. font-weight: 600;
  463. line-height: 40px;
  464. width: 112px;
  465. height: 40px;
  466. background: #f7f8f9;
  467. cursor: pointer;
  468. margin-top: 30px;
  469. }
  470. .searchNo {
  471. color: #323233;
  472. }
  473. .search {
  474. color: #2f53eb;
  475. background: #ffffff;
  476. }
  477. }
  478. }
  479. .ask_css {
  480. position: absolute;
  481. margin: 3px 0 0 10px;
  482. }
  483. .center_css {
  484. background: #ffffff;
  485. border-radius: 1px;
  486. margin-top: 10px;
  487. padding-bottom: 10px;
  488. }
  489. .screen {
  490. // float: right;
  491. display: flex;
  492. .search {
  493. width: 40px;
  494. height: 40px;
  495. background: #2f53eb;
  496. border-radius: 0px 2px 2px 0px;
  497. border: 1px solid #DCDFE6;
  498. margin-left: -1px;
  499. }
  500. .count_css {
  501. width: 80px;
  502. text-align: center;
  503. line-height: 40px;
  504. color: #666666;
  505. }
  506. }
  507. .el-button {
  508. padding: 10px 20px !important;
  509. }
  510. .center_css {
  511. ::v-deep .el-table th,
  512. ::v-deep .el-table td {
  513. text-align: center;
  514. }
  515. .fujian {
  516. font-size: 24px;
  517. color: #409eff;
  518. }
  519. .warning {
  520. font-size: 14px;
  521. color: #ed1d1d;
  522. }
  523. }
  524. }
  525. ::v-deep .el-table--border .el-table__header th {
  526. background: #f7f8f9;
  527. }
  528. .btn_css {
  529. color: #409eff;
  530. cursor: pointer;
  531. }
  532. .btn_css1 {
  533. margin-left: -20px;
  534. }
  535. //批量上报按钮
  536. .batch_btn {
  537. margin: 0 10px;
  538. }
  539. //附件
  540. .file {
  541. .fujian_css {
  542. width: 270px;
  543. display: flex;
  544. margin: 0 auto;
  545. text-align: center;
  546. line-height: 32px;
  547. border: 1px solid #f0f1f2;
  548. border-right: 0px;
  549. border-radius: 2px 0px 0px 2px;
  550. .fujian_item {
  551. cursor: pointer;
  552. width: 90px;
  553. height: 32px;
  554. border-right: 1px solid #f0f1f2;
  555. }
  556. .file_btn {
  557. color: #2f53eb;
  558. background-color: #cfdbfe;
  559. }
  560. }
  561. .file_tips {
  562. margin: 10px auto;
  563. width: 50%;
  564. }
  565. .file_img {
  566. width: 525px;
  567. height: 332px;
  568. margin: 20px auto;
  569. }
  570. .img_css {
  571. width: 525px;
  572. height: 332px;
  573. }
  574. .btn {
  575. width: 410px;
  576. margin: 0 auto;
  577. }
  578. }
  579. .right_css {
  580. .title_name,
  581. .right_title {
  582. color: #9D9D9D;
  583. margin-left: 20px;
  584. }
  585. .right_item {
  586. color: #333333;
  587. margin: 10px 0;
  588. margin-left: 20px;
  589. }
  590. .img_css {
  591. width: 100px;
  592. height: 100px;
  593. margin: 10px 0;
  594. margin-left: 20px;
  595. }
  596. }
  597. ::v-deep .el-drawer.rtl {
  598. overflow-y: scroll;
  599. }
  600. .red_text {
  601. color: red;
  602. }
  603. </style>