tranManagementDriverLook.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. //添加司机
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">添加新司机</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="returnsales()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList"
  25. ><div class="small-title">司机信息</div>
  26. <div class="flex drivermessage">
  27. <ws-info-table>
  28. <!--司机姓名-->
  29. <ws-form-item
  30. label="姓名"
  31. span="1"
  32. prop="contractNo"
  33. class="readonly bg-right"
  34. >
  35. <ws-input
  36. disabled
  37. v-model="deptBudgetList.driverName"
  38. placeholder="请输入司机姓名"
  39. maxlength="20"
  40. size="small"
  41. />
  42. </ws-form-item>
  43. <!--手机号-->
  44. <ws-form-item
  45. label="手机号"
  46. span="1"
  47. prop="driverPhone"
  48. class="readonly"
  49. >
  50. <ws-input
  51. disabled
  52. v-model="deptBudgetList.driverPhone"
  53. placeholder="请输入手机号"
  54. maxlength="100"
  55. size="small"
  56. />
  57. </ws-form-item>
  58. <!--常驻城市-->
  59. <ws-form-item label="常驻城市" span="1" prop="acceptanceMethod">
  60. {{ deptBudgetList.residentCityProvincial
  61. }}{{ deptBudgetList.residentCityMunicipal }}
  62. </ws-form-item>
  63. <!--身份证号-->
  64. <ws-form-item
  65. label="身份证号"
  66. span="1"
  67. prop="driverNo"
  68. class="readonly"
  69. >
  70. <ws-input
  71. disabled
  72. v-model="deptBudgetList.numberCard"
  73. placeholder="请输入身份证号"
  74. maxlength="100"
  75. size="small"
  76. />
  77. </ws-form-item>
  78. </ws-info-table>
  79. <span v-if="age && age < 60" class="small">{{ age }}岁</span>
  80. <span v-if="age && age > 60" class="big">{{ age }}岁</span>
  81. </div>
  82. </ws-form>
  83. <ws-form
  84. ref="deptBudgetList"
  85. :rules="mainReportAdd"
  86. :model="deptBudgetList"
  87. >
  88. <div class="small-title">货车信息</div>
  89. <div
  90. style="width: 100%"
  91. class="flex position"
  92. v-for="(item, index) in deptBudgetList.driverCarInfoList"
  93. >
  94. <div class="trucks">
  95. <div class="driver">货车信息-{{ index + 1 }}</div>
  96. <div class="truckswrap">车牌号: {{ item.carNumber }}</div>
  97. <div class="truckswrap">车型: {{ item.carModel }}</div>
  98. <div class="truckswrap">不含车头车长(米): {{ item.carLength }}</div>
  99. <div class="truckswrap">载重: {{ item.carLoad }}</div>
  100. <div class="truckswrap">出厂年份: {{ item.yearManufacture }}</div>
  101. </div>
  102. </div>
  103. </ws-form>
  104. <ws-form
  105. ref="deptBudgetList"
  106. :rules="mainReportAdd"
  107. :model="deptBudgetList"
  108. >
  109. <div class="small-title">收款人账户信息</div>
  110. <div
  111. class="gathering"
  112. v-for="(item, index) in deptBudgetList.driverPayeeInfoList"
  113. >
  114. <div>
  115. <div class="driver">收款人账户信息-{{ index + 1 }}</div>
  116. <ws-info-table class="el-table">
  117. <!--账户类型-->
  118. <ws-form-item
  119. label="账户类型"
  120. span="1"
  121. prop="contractNo"
  122. class="el-car bg-right"
  123. >
  124. <span v-if="item.accountTypeFlag == 1">私人账号</span>
  125. <span v-if="item.accountTypeFlag == 2">企业账户</span>
  126. </ws-form-item>
  127. <!--账号-->
  128. <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
  129. {{ item.bankCard }}
  130. </ws-form-item>
  131. <!--开户行-->
  132. <ws-form-item
  133. label="开户行"
  134. span="1"
  135. prop="bankDeposit"
  136. class="el-car bankDeposit"
  137. >
  138. {{ item.bankDeposit }}
  139. </ws-form-item>
  140. <!--姓名-->
  141. <ws-form-item
  142. label="姓名"
  143. v-if="item.accountTypeFlag == 1"
  144. span="1"
  145. prop="payeeName"
  146. class="el-car"
  147. width="150px"
  148. >
  149. {{ item.payeeName }}
  150. </ws-form-item>
  151. <!--企业名称-->
  152. <ws-form-item
  153. label="企业名称"
  154. v-else
  155. span="1"
  156. prop="compName"
  157. class="el-car compname"
  158. width="150px"
  159. >
  160. {{ item.compName }}
  161. </ws-form-item>
  162. <!--身份证号-->
  163. <ws-form-item
  164. label="身份证号"
  165. v-if="item.accountTypeFlag == 1"
  166. span="1"
  167. prop="payeeNumberCard"
  168. class="el-car"
  169. >
  170. {{ item.payeeNumberCard }}
  171. </ws-form-item>
  172. <ws-form-item
  173. label="开户支行"
  174. span="1"
  175. prop="bankDepositBranch"
  176. class="el-car bankDeposit1"
  177. >
  178. {{ item.bankDepositBranch }}
  179. </ws-form-item>
  180. </ws-info-table>
  181. </div>
  182. </div>
  183. </ws-form>
  184. <ws-form
  185. ref="deptBudgetList"
  186. :rules="mainReportAdd"
  187. :model="deptBudgetList"
  188. >
  189. <div class="small-title">相关附件</div>
  190. <div class="flex">
  191. <div
  192. style="margin: 10px"
  193. v-for="(item, index) in deptBudgetList.addressUrlArray"
  194. >
  195. <div class="button" v-if="index == 0">行驶证</div>
  196. <div class="button" v-if="index == 1">驾驶证</div>
  197. <div class="button-green" v-if="index == 2">道路运营证</div>
  198. <div class="button-green" v-if="index == 3">从业资格证</div>
  199. <div class="button-yellow" v-if="index == 4">身份证正面</div>
  200. <div class="button-yellow" v-if="index == 5">身份证反面</div>
  201. <img width="100" height="100" :src="item" alt="" />
  202. </div>
  203. </div>
  204. </ws-form>
  205. <!-- 提交 -->
  206. <div style="text-align: right; padding: 10px" class="center">
  207. <el-button
  208. class="bg-bottom"
  209. type="primary"
  210. size="small"
  211. @click="returnsales()"
  212. >关闭</el-button
  213. >
  214. </div>
  215. </div>
  216. </template>
  217. <script>
  218. import { provinceAndCityData, CodeToText } from 'element-china-area-data'
  219. import { lookDriver } from '@/model/transport/index'
  220. import WsUpload from '@/components/WsUpload'
  221. import mapDrag from '@/components/mapdrag/mapdrag'
  222. export default {
  223. name: 'viewSpareMoney',
  224. components: {
  225. WsUpload,
  226. mapDrag,
  227. },
  228. watch: {
  229. vesselId(val) {
  230. this.getVesselData()
  231. },
  232. isShow(val) {
  233. this.showType = val
  234. },
  235. },
  236. data() {
  237. let self = this
  238. return {
  239. deptBudgetList: {
  240. totalStorage: 0,
  241. drivercarInfo: {
  242. goodsName: '',
  243. },
  244. driverPayeeInfo: {},
  245. },
  246. radio: '1',
  247. carModelList: [],
  248. carLengthList: [],
  249. options_: provinceAndCityData,
  250. heightData: '600px',
  251. zoom: 7,
  252. selectedOptions: [],
  253. center: [116.244694, 39.517344],
  254. window: '',
  255. district: null,
  256. listDate: { country: '中国', level: 'country', city: '' },
  257. citylist: [],
  258. compId: sessionStorage.getItem('ws-pf_compId'),
  259. mainReportAdd: {},
  260. appendixIdsAdd: '',
  261. size: 10,
  262. value1: '',
  263. unitList: [],
  264. accessoryBankTFs: false,
  265. freightspace: [
  266. {
  267. carNumber: '',
  268. carModel: '高栏',
  269. carModelKey: '1',
  270. carLength: '13',
  271. carLengthKey: '1',
  272. carLoad: '',
  273. yearManufacture: '',
  274. },
  275. ],
  276. freightspace1: [
  277. {
  278. account_type: '',
  279. radio: '1',
  280. payeeName: '',
  281. payeeNumberCard: '',
  282. compName: '',
  283. bankDeposit: '',
  284. addressUrlArray: [],
  285. bankCard: '',
  286. },
  287. ],
  288. name: '',
  289. age: '',
  290. }
  291. },
  292. activated() {
  293. this.loaddata()
  294. this.showType = this.isShow
  295. },
  296. computed: {},
  297. methods: {
  298. IdCard(UUserCard) {
  299. //获取年龄
  300. var myDate = new Date()
  301. var month = myDate.getMonth() + 1
  302. var day = myDate.getDate()
  303. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  304. if (
  305. UUserCard.substring(10, 12) < month ||
  306. (UUserCard.substring(10, 12) == month &&
  307. UUserCard.substring(12, 14) <= day)
  308. ) {
  309. age++
  310. }
  311. this.age = age
  312. },
  313. bankcardfujian(item) {
  314. this.accessoryBankTFs = true
  315. },
  316. loaddata() {
  317. lookDriver({ id: this.$route.query.id })
  318. .toPromise()
  319. .then((response) => {
  320. this.IdCard(response.numberCard)
  321. response.addressUrlArray = response.addressUrl.split(',')
  322. this.deptBudgetList = response
  323. })
  324. // // 车型
  325. // packList({ constId: 'TRAN1' })
  326. // .toPromise()
  327. // .then((response) => {
  328. // this.carModelList = response
  329. // })
  330. // // 车长
  331. // packList({ constId: 'TRAN2' })
  332. // .toPromise()
  333. // .then((response) => {
  334. // this.carLengthList = response
  335. // })
  336. },
  337. confirmPositioncity() {
  338. this.listDate.level = 'city'
  339. this.listDate.country = this.name
  340. },
  341. uploadSuccessHandle(e, file) {
  342. const that = this
  343. this.upForm.personNoImg = e.url
  344. this.upForm.type = 'driver'
  345. this.submiting = true
  346. // personShibie(this.upForm).then((response) => {
  347. // this.list.unshift(response.data.data)
  348. // this.upForm.driver = response.data.data.driver
  349. // this.upForm.driverNo = response.data.data.driverNo
  350. // this.upForm.driverAddress = response.data.data.driverAddress
  351. // this.upFormVisible = true
  352. // this.submiting = false
  353. // })
  354. },
  355. // 关闭 dialog时 处理文件url 初始化upload组件
  356. handleClose() {
  357. this.dialogViewSpareMoney = false
  358. },
  359. identitycardfujian(item) {},
  360. handleChange(value) {
  361. this.selectedOptions = value
  362. },
  363. returnsales() {
  364. this.$router.push({ path: 'tranManagementDriver' })
  365. },
  366. resetForm(deptBudgetList) {
  367. this.$refs[deptBudgetList].resetFields()
  368. },
  369. },
  370. }
  371. </script>
  372. <style lang="scss" scoped>
  373. .position {
  374. position: relative;
  375. }
  376. .add,
  377. .del {
  378. position: absolute;
  379. right: -38px;
  380. top: 9px;
  381. cursor: pointer;
  382. }
  383. .del {
  384. right: -70px;
  385. }
  386. .amap-page-container {
  387. width: 300px;
  388. height: 300px;
  389. }
  390. .el-form {
  391. padding: 0 10%;
  392. }
  393. /deep/.ws-info-table .el-form-item {
  394. border-right: 1px solid #cdd2dc;
  395. border-bottom: 1px solid #cdd2dc;
  396. }
  397. .title {
  398. position: relative;
  399. }
  400. .el-car {
  401. width: 413px;
  402. }
  403. .title::before {
  404. content: '';
  405. display: inline-block;
  406. width: 5px;
  407. height: 30px;
  408. background: #5473e8;
  409. position: absolute;
  410. left: 0;
  411. }
  412. .el-col {
  413. background: #f6f7fc;
  414. }
  415. .drivermessage {
  416. position: relative;
  417. }
  418. .button-container {
  419. display: flex;
  420. flex-wrap: nowrap;
  421. justify-content: space-between;
  422. align-items: center;
  423. background-color: #fff;
  424. width: 100%;
  425. height: 50px;
  426. padding: 0 10px;
  427. & > div {
  428. margin-left: 10px;
  429. display: flex;
  430. flex-wrap: nowrap;
  431. flex-direction: row;
  432. & > span {
  433. line-height: 50px;
  434. }
  435. }
  436. /deep/.auditFlow-box {
  437. position: unset;
  438. margin-left: 10px;
  439. &/deep/.auditFlow-icon {
  440. width: auto;
  441. padding-right: 30px;
  442. }
  443. &/deep/.auditFlow-main {
  444. position: absolute;
  445. }
  446. }
  447. }
  448. .box-app {
  449. display: inline-block;
  450. float: left;
  451. margin-left: 30px;
  452. line-height: 50px;
  453. }
  454. /deep/.el-dialog {
  455. .el-form-item {
  456. margin-bottom: 0 !important;
  457. .el-input--medium {
  458. textarea {
  459. min-height: 100px !important;
  460. }
  461. }
  462. }
  463. }
  464. .collapse-bottom {
  465. margin-bottom: 20px;
  466. }
  467. .input-main .textarea .el-textarea__inner {
  468. width: 100%;
  469. z-index: 1;
  470. }
  471. .bg-left {
  472. padding-left: 30px;
  473. }
  474. .bg-right {
  475. padding-right: 10px;
  476. text-align: right;
  477. }
  478. .bg-bottom {
  479. margin: 15px 0px;
  480. }
  481. .el-form-item__label {
  482. text-align: center;
  483. }
  484. //蓝标
  485. .small-title {
  486. position: relative;
  487. padding: 10px;
  488. font-weight: 600;
  489. }
  490. .small-title::before {
  491. position: absolute;
  492. content: '';
  493. display: block;
  494. background: #5473e8;
  495. width: 4px;
  496. height: 14px;
  497. left: 0px;
  498. top: 13px;
  499. padding: 4px 2px;
  500. }
  501. // 控制select为只读的时候显示样式
  502. /deep/.ws-class-table-col {
  503. height: auto;
  504. padding: 0px 2px;
  505. /deep/.el-input__inner {
  506. padding: 0px 2px;
  507. }
  508. }
  509. .container {
  510. overflow: scroll;
  511. height: 93vh;
  512. }
  513. /deep/.ws-info-table .el-form-item {
  514. width: 25%;
  515. }
  516. .el-textarea__inner {
  517. display: none;
  518. }
  519. .el-form {
  520. margin-top: 50px;
  521. }
  522. .el-cascader {
  523. width: 145px;
  524. }
  525. .forlist {
  526. width: 20%;
  527. }
  528. .el-form-item.forlist.is-success.el-form-item--small {
  529. width: 20%;
  530. }
  531. .el-form-item.forlist.el-form-item--small {
  532. width: 20%;
  533. }
  534. .el-form-item.readonly.is-success.el-form-item--small.showLableToopTip {
  535. width: 20%;
  536. }
  537. .el-form-item.el-car.el-form-item--small {
  538. width: 33.3%;
  539. }
  540. .trucks {
  541. background: #f5f7fa;
  542. color: #69708c;
  543. border: 1px solid #d8dce6;
  544. width: 90%;
  545. padding: 12px;
  546. border-radius: 3px;
  547. }
  548. .truckswrap {
  549. width: 19.7%;
  550. display: inline-block;
  551. margin: 0;
  552. padding: 9px 0;
  553. }
  554. .gathering {
  555. background: #f5f7fa;
  556. border: 1px solid #d8dce6;
  557. border-radius: 3px;
  558. width: 90%;
  559. border-bottom: 1px solid transparent;
  560. }
  561. /deep/.gathering .ws-info-table {
  562. border-left: none;
  563. border-top: 1px solid #d8dce6;
  564. }
  565. /deep/.gathering .driver {
  566. padding: 10px;
  567. }
  568. /deep/.gathering .el-form-item .el-form-item__label {
  569. background: #f5f7fa;
  570. text-align: center;
  571. }
  572. /deep/.gathering .ws-info-table .el-form-item .el-form-item__content {
  573. border-left: 1px solid #d8dce6;
  574. }
  575. /deep/.gathering .ws-info-table .el-form-item.compname,
  576. /deep/.gathering .ws-info-table .el-form-item.bankDeposit,
  577. /deep/.gathering .ws-info-table .el-form-item.bankDeposit1 {
  578. border-right: 1px solid transparent;
  579. }
  580. /deep/.gathering .ws-info-table .el-form-item.compname {
  581. width: 100%;
  582. }
  583. .button,
  584. .button-green,
  585. .button-yellow {
  586. height: 28px;
  587. background: #edf1ff;
  588. border-radius: 4px;
  589. color: #5473e8;
  590. font-size: 12px;
  591. text-align: center;
  592. line-height: 28px;
  593. margin: 7px auto;
  594. padding: 0 10px;
  595. }
  596. .button-green {
  597. background: #ecf8f9;
  598. color: #50cad4;
  599. }
  600. .button-yellow {
  601. background: #fff6eb;
  602. color: #ff9f24;
  603. }
  604. .el-button--primary {
  605. background: #5878e8;
  606. }
  607. .drivermessage .ws-info-table {
  608. border: none;
  609. }
  610. /deep/.drivermessage .ws-info-table .el-form-item__label {
  611. background: #fff;
  612. width: 80px;
  613. }
  614. /deep/.drivermessage .ws-info-table .el-form-item__content,
  615. /deep/.drivermessage .ws-info-table .el-form-item {
  616. border: none;
  617. }
  618. .small,
  619. .big {
  620. color: #ccc;
  621. line-height: 16px;
  622. position: absolute;
  623. right: -50px;
  624. top: 5px;
  625. border: 1px solid #ccc;
  626. padding: 5px 10px;
  627. border-radius: 20px;
  628. }
  629. .big {
  630. color: #f46060;
  631. background: #ffeeee;
  632. }
  633. </style>