tranManagementDriverEdit.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  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. >
  15. <img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt
  21. />返回
  22. </el-button>
  23. </el-col>
  24. </el-row>
  25. <ws-form
  26. ref="deptBudgetList"
  27. :rules="mainReportAdd"
  28. :model="deptBudgetList"
  29. >
  30. <div class="small-title">司机信息</div>
  31. <div class="drivermessage">
  32. <ws-info-table>
  33. <!--司机姓名-->
  34. <ws-form-item
  35. label="姓名"
  36. span="1"
  37. prop="contractNo"
  38. class="readonly bg-right"
  39. >
  40. <ws-input
  41. v-model="deptBudgetList.driverName"
  42. placeholder="请输入司机姓名"
  43. maxlength="20"
  44. size="small"
  45. />
  46. </ws-form-item>
  47. <!--手机号-->
  48. <ws-form-item
  49. label="手机号"
  50. span="1"
  51. prop="driverPhone"
  52. class="readonly"
  53. >
  54. <ws-input
  55. v-model="deptBudgetList.driverPhone"
  56. placeholder="请输入手机号"
  57. maxlength="100"
  58. size="small"
  59. />
  60. </ws-form-item>
  61. <!--常驻城市-->
  62. <ws-form-item label="常驻城市" span="1" prop="acceptanceMethod">
  63. <el-cascader
  64. :options="options_"
  65. v-model="selectedOptions"
  66. clearable
  67. size="large"
  68. placeholder="请选择常驻城市"
  69. style="width: 200%"
  70. class="el-cascader"
  71. @change="handleChange"
  72. />
  73. </ws-form-item>
  74. <!--身份证号-->
  75. <ws-form-item
  76. label="身份证号"
  77. span="1"
  78. prop="driverNo"
  79. class="readonly"
  80. >
  81. <ws-input
  82. v-model="deptBudgetList.numberCard"
  83. placeholder="请输入身份证号"
  84. maxlength="100"
  85. size="small"
  86. />
  87. </ws-form-item>
  88. </ws-info-table>
  89. <span v-if="age && age < 60" class="small">{{ age }}岁</span>
  90. <span v-if="age && age > 60" class="big">{{ age }}岁</span>
  91. </div>
  92. </ws-form>
  93. <ws-form
  94. ref="deptBudgetList"
  95. :rules="mainReportAdd"
  96. :model="deptBudgetList"
  97. >
  98. <div class="small-title">货车信息</div>
  99. <div
  100. style="width: 100%"
  101. class="flex position"
  102. v-for="(item, index) in deptBudgetList.driverCarInfoList"
  103. >
  104. <div class="trucks">
  105. <div class="driver">
  106. 货车信息-{{ index + 1 }}
  107. <img
  108. width="22"
  109. height="22"
  110. class="add"
  111. @click="add"
  112. src="../../../public/img/add.png"
  113. alt
  114. />
  115. <img
  116. width="22"
  117. height="22"
  118. class="del"
  119. @click="del(item, index)"
  120. src="../../../public/img/del.png"
  121. alt
  122. />
  123. </div>
  124. <ws-info-table class="el-table">
  125. <!--车牌号-->
  126. <ws-form-item
  127. label="车牌号"
  128. span="1"
  129. prop="carNumber"
  130. class="forlist"
  131. width="400px"
  132. >
  133. <ws-input
  134. v-model="item.carNumber"
  135. placeholder="请输入车牌号"
  136. maxlength="20"
  137. size="small"
  138. />
  139. </ws-form-item>
  140. <!--车型-->
  141. <ws-form-item label="车型" span="1" prop="carModel" class="forlist">
  142. <ws-select
  143. v-model="item.carModel"
  144. placeholder
  145. class="typeselect"
  146. @change="
  147. (value) => {
  148. selectcarModel(value, index)
  149. }
  150. "
  151. >
  152. <ws-option
  153. v-for="item in carModelList"
  154. :key="item.constKey"
  155. :label="item.constValue"
  156. :value="item.constValue"
  157. />
  158. </ws-select>
  159. </ws-form-item>
  160. <!--车长-->
  161. <ws-form-item
  162. label="不含车头车长(米)"
  163. span="1"
  164. prop="carLength"
  165. class="forlist"
  166. >
  167. <ws-select
  168. v-model="item.carLength"
  169. placeholder
  170. class="typeselect"
  171. @change="
  172. (value) => {
  173. selectcarLength(value, index)
  174. }
  175. "
  176. >
  177. <ws-option
  178. v-for="item in carLengthList"
  179. :key="item.constKey"
  180. :label="item.constValue"
  181. :value="item.constValue"
  182. />
  183. </ws-select>
  184. </ws-form-item>
  185. <!--载重-->
  186. <ws-form-item label="载重" span="1" prop="carLoad" class="forlist">
  187. <ws-input
  188. v-model="item.carLoad"
  189. placeholder="请输入载重"
  190. maxlength="100"
  191. size="small"
  192. />
  193. </ws-form-item>
  194. <!--出厂年份-->
  195. <ws-form-item
  196. label="出厂年份"
  197. span="1"
  198. prop="yearManufacture"
  199. class="forlist"
  200. >
  201. <ws-input
  202. v-model="item.yearManufacture"
  203. placeholder="请输入年份"
  204. maxlength="100"
  205. size="small"
  206. />
  207. </ws-form-item>
  208. </ws-info-table>
  209. </div>
  210. </div>
  211. </ws-form>
  212. <ws-form
  213. ref="deptBudgetList"
  214. :rules="mainReportAdd"
  215. :model="deptBudgetList"
  216. >
  217. <div class="small-title">收款人账户信息</div>
  218. <div
  219. style="width: 100%"
  220. class="flex position"
  221. v-for="(item, index) in deptBudgetList.driverPayeeInfoList"
  222. >
  223. <div class="gathering">
  224. <div class="driver">
  225. 收款人账户信息-{{ index + 1 }}
  226. <img
  227. width="22"
  228. height="22"
  229. class="add"
  230. @click="add1"
  231. src="../../../public/img/add.png"
  232. alt
  233. />
  234. <img
  235. width="22"
  236. height="22"
  237. class="del"
  238. @click="del1(item, index)"
  239. src="../../../public/img/del.png"
  240. alt
  241. />
  242. </div>
  243. <ws-info-table class="el-table">
  244. <!--账户类型-->
  245. <ws-form-item
  246. label="账户类型"
  247. span="1"
  248. prop="contractNo"
  249. class="el-car bg-right"
  250. >
  251. <el-radio v-model="item.accountTypeFlag" label="1"
  252. >私人账号</el-radio
  253. >
  254. <el-radio v-model="item.accountTypeFlag" label="2"
  255. >企业账户</el-radio
  256. >
  257. </ws-form-item>
  258. <!--账号-->
  259. <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
  260. <ws-input
  261. v-model="item.bankCard"
  262. placeholder="请输入账号"
  263. maxlength="100"
  264. size="small"
  265. />
  266. <el-upload
  267. action="https://www.zthymaoyi.com/upload/admin"
  268. :show-file-list="false"
  269. :on-success="
  270. (res, file) => {
  271. uploadSuccessHandle1(index, res, file)
  272. }
  273. "
  274. class="avatar-uploader"
  275. accept=".jpg, .jpeg, .png, .gif"
  276. >
  277. <img
  278. width="18"
  279. height="20"
  280. style="
  281. vertical-align: text-top;
  282. position: relative;
  283. top: -1px;
  284. "
  285. src="../../../public/img/fujian.png"
  286. alt
  287. />
  288. </el-upload>
  289. </ws-form-item>
  290. <!--开户行-->
  291. <ws-form-item
  292. label="开户行"
  293. span="1"
  294. prop="bankDeposit"
  295. class="el-car"
  296. >
  297. <ws-input
  298. v-model="item.bankDeposit"
  299. placeholder="请输入开户行"
  300. maxlength="100"
  301. size="small"
  302. />
  303. </ws-form-item>
  304. <!--姓名-->
  305. <ws-form-item
  306. label="姓名"
  307. v-if="item.accountTypeFlag == 1"
  308. span="1"
  309. prop="payeeName"
  310. class="el-car"
  311. width="150px"
  312. >
  313. <ws-input
  314. v-model="item.payeeName"
  315. placeholder="请输入姓名"
  316. maxlength="100"
  317. size="small"
  318. />
  319. </ws-form-item>
  320. <!--企业名称-->
  321. <ws-form-item
  322. label="企业名称"
  323. v-else
  324. span="1"
  325. prop="compName"
  326. class="el-car"
  327. width="150px"
  328. >
  329. <ws-input
  330. v-model="item.compName"
  331. placeholder="请输入企业名称"
  332. maxlength="100"
  333. size="small"
  334. />
  335. </ws-form-item>
  336. <!--身份证号-->
  337. <ws-form-item
  338. label="身份证号"
  339. v-if="item.accountTypeFlag == 1"
  340. span="1"
  341. prop="payeeNumberCard"
  342. class="el-car"
  343. >
  344. <ws-input
  345. v-model="item.payeeNumberCard"
  346. placeholder="请输入身份证号"
  347. maxlength="100"
  348. size="small"
  349. />
  350. <el-upload
  351. action="https://www.zthymaoyi.com/upload/admin"
  352. :show-file-list="false"
  353. :on-success="
  354. (res, file) => {
  355. uploadSuccessHandle(index, res, file)
  356. }
  357. "
  358. class="avatar-uploader"
  359. accept=".jpg, .jpeg, .png, .gif"
  360. >
  361. <img
  362. width="18"
  363. height="20"
  364. style="
  365. vertical-align: text-top;
  366. position: relative;
  367. top: -1px;
  368. "
  369. src="../../../public/img/fujian.png"
  370. alt
  371. />
  372. </el-upload>
  373. </ws-form-item>
  374. <ws-form-item
  375. label="开户支行"
  376. span="1"
  377. prop="bankDepositBranch"
  378. class="el-car"
  379. >
  380. <ws-select
  381. v-model="item.bankDepositBranch"
  382. placeholder
  383. class="typeselect"
  384. @change="
  385. (value) => {
  386. selectbankDepositBranch(value, index)
  387. }
  388. "
  389. >
  390. <ws-option
  391. v-for="(items, index) in item.bankDepositBranchList"
  392. :key="index"
  393. :label="items"
  394. :value="items"
  395. />
  396. </ws-select>
  397. </ws-form-item>
  398. </ws-info-table>
  399. </div>
  400. </div>
  401. </ws-form>
  402. <ws-form
  403. ref="deptBudgetList"
  404. :rules="mainReportAdd"
  405. :model="deptBudgetList"
  406. >
  407. <div class="small-title">相关附件</div>
  408. <div class="flex">
  409. <!-- <div v-for="(item,index) in deptBudgetList.addressUrlArray"> -->
  410. <div>
  411. <el-upload
  412. action="https://www.zthymaoyi.com/upload/admin"
  413. :show-file-list="false"
  414. :on-success="uploadSuccessHandletravel"
  415. class="avatar-uploader"
  416. accept=".jpg, .jpeg, .png, .gif"
  417. >
  418. <el-button class="upload button" size="small" type="primary"
  419. >行驶证</el-button
  420. >
  421. </el-upload>
  422. <img
  423. v-show="addressUrls.travel"
  424. width="100"
  425. height="100"
  426. :src="addressUrls.travel"
  427. alt
  428. />
  429. </div>
  430. <div>
  431. <el-upload
  432. action="https://www.zthymaoyi.com/upload/admin"
  433. :show-file-list="false"
  434. :on-success="uploadSuccessHandledrive"
  435. class="avatar-uploader"
  436. accept=".jpg, .jpeg, .png, .gif"
  437. >
  438. <el-button class="upload button" size="small" type="primary"
  439. >驾驶证</el-button
  440. >
  441. </el-upload>
  442. <img
  443. v-if="addressUrls.drive"
  444. width="100"
  445. height="100"
  446. :src="addressUrls.drive"
  447. alt
  448. />
  449. </div>
  450. <div>
  451. <el-upload
  452. action="https://www.zthymaoyi.com/upload/admin"
  453. :show-file-list="false"
  454. :on-success="uploadSuccessHandleway"
  455. class="avatar-uploader"
  456. accept=".jpg, .jpeg, .png, .gif"
  457. >
  458. <el-button class="upload button-green" size="small" type="primary"
  459. >道路运营证</el-button
  460. >
  461. </el-upload>
  462. <img
  463. v-if="addressUrls.way"
  464. width="100"
  465. height="100"
  466. :src="addressUrls.way"
  467. alt
  468. />
  469. </div>
  470. <div>
  471. <el-upload
  472. action="https://www.zthymaoyi.com/upload/admin"
  473. :show-file-list="false"
  474. :on-success="uploadSuccessHandlequalification"
  475. class="avatar-uploader"
  476. accept=".jpg, .jpeg, .png, .gif"
  477. >
  478. <el-button class="upload button-green" size="small" type="primary"
  479. >从业资格证</el-button
  480. >
  481. </el-upload>
  482. <img
  483. v-if="addressUrls.qualification"
  484. width="100"
  485. height="100"
  486. :src="addressUrls.qualification"
  487. alt
  488. />
  489. </div>
  490. <div>
  491. <el-upload
  492. action="https://www.zthymaoyi.com/upload/admin"
  493. :show-file-list="false"
  494. :on-success="uploadSuccessHandleidentityjust"
  495. class="avatar-uploader"
  496. accept=".jpg, .jpeg, .png, .gif"
  497. >
  498. <el-button class="upload button-yellow" size="small" type="primary"
  499. >身份证正面</el-button
  500. >
  501. </el-upload>
  502. <img
  503. v-if="addressUrls.identityjust"
  504. width="100"
  505. height="100"
  506. :src="addressUrls.identityjust"
  507. alt
  508. />
  509. </div>
  510. <div>
  511. <el-upload
  512. action="https://www.zthymaoyi.com/upload/admin"
  513. :show-file-list="false"
  514. :on-success="uploadSuccessHandleidentityagainst"
  515. class="avatar-uploader"
  516. accept=".jpg, .jpeg, .png, .gif"
  517. >
  518. <el-button class="upload button-yellow" size="small" type="primary"
  519. >身份证反面</el-button
  520. >
  521. </el-upload>
  522. <img
  523. v-if="addressUrls.identityagainst"
  524. width="100"
  525. height="100"
  526. :src="addressUrls.identityagainst"
  527. alt
  528. />
  529. </div>
  530. <!-- <img width="100" height="100" :src="item" alt="" /> -->
  531. <!-- </div> -->
  532. </div>
  533. </ws-form>
  534. <!-- 提交 -->
  535. <div style="text-align: right; padding: 10px" class="center">
  536. <el-button
  537. class="bg-bottom"
  538. type="primary"
  539. size="small"
  540. @click="submit(deptBudgetList)"
  541. >提交</el-button
  542. >
  543. </div>
  544. </div>
  545. </template>
  546. <script>
  547. import {
  548. provinceAndCityData,
  549. CodeToText,
  550. TextToCode,
  551. } from 'element-china-area-data'
  552. import {
  553. lookDriver,
  554. deltrancar,
  555. deltranprocess,
  556. getidentity,
  557. getbank,
  558. packList,
  559. editdriver,
  560. } from '@/model/transport/index'
  561. import WsUpload from '@/components/WsUpload'
  562. import mapDrag from '@/components/mapdrag/mapdrag'
  563. export default {
  564. name: 'viewSpareMoney',
  565. components: {
  566. WsUpload,
  567. mapDrag,
  568. },
  569. watch: {
  570. vesselId(val) {
  571. this.getVesselData()
  572. },
  573. isShow(val) {
  574. this.showType = val
  575. },
  576. },
  577. data() {
  578. let self = this
  579. return {
  580. deptBudgetList: {
  581. totalStorage: 0,
  582. drivercarInfo: {
  583. goodsName: '',
  584. },
  585. driverPayeeInfo: {},
  586. addressUrlArray: [],
  587. },
  588. radio: '1',
  589. carModelList: [],
  590. carLengthList: [],
  591. options_: provinceAndCityData,
  592. heightData: '600px',
  593. zoom: 7,
  594. selectedOptions: [],
  595. window: '',
  596. district: null,
  597. citylist: [],
  598. compId: sessionStorage.getItem('ws-pf_compId'),
  599. mainReportAdd: {},
  600. appendixIdsAdd: '',
  601. size: 10,
  602. value1: '',
  603. fileList: [],
  604. unitList: [],
  605. accessoryBankTFs: false,
  606. freightspace: [
  607. {
  608. carNumber: '',
  609. carModel: '高栏',
  610. carModelKey: '1',
  611. carLength: '13',
  612. carLengthKey: '1',
  613. carLoad: '',
  614. yearManufacture: '',
  615. },
  616. ],
  617. freightspace1: [
  618. {
  619. accountTypeFlag: '1',
  620. cardAddressUrl: '',
  621. cardAddressUrlArray: [],
  622. payeeName: '',
  623. payeeNumberCard: '',
  624. compName: '',
  625. bankDeposit: '',
  626. addressUrlArray: [],
  627. bankCard: '',
  628. },
  629. ],
  630. name: '',
  631. age: '',
  632. addressUrls: {},
  633. }
  634. },
  635. activated() {
  636. this.loaddata()
  637. this.showType = this.isShow
  638. },
  639. computed: {},
  640. methods: {
  641. IdCard(UUserCard) {
  642. //获取年龄
  643. var myDate = new Date()
  644. var month = myDate.getMonth() + 1
  645. var day = myDate.getDate()
  646. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  647. if (
  648. UUserCard.substring(10, 12) < month ||
  649. (UUserCard.substring(10, 12) == month &&
  650. UUserCard.substring(12, 14) <= day)
  651. ) {
  652. age++
  653. }
  654. this.age = age
  655. },
  656. bankcardfujian(item) {
  657. this.accessoryBankTFs = true
  658. },
  659. loaddata() {
  660. lookDriver({ id: this.$route.query.id })
  661. .toPromise()
  662. .then((response) => {
  663. // this.selectedOptions.push()
  664. this.deptBudgetList.addressUrlArray = response.cardAddressUrl.split(',')
  665. this.deptBudgetList.addressUrlArray1 = response.addressUrl.split(',')
  666. this.$set(this.addressUrls, 'travel', this.deptBudgetList.addressUrlArray1[0])
  667. this.$set(this.addressUrls, 'drive', this.deptBudgetList.addressUrlArray1[1])
  668. if(this.deptBudgetList.addressUrlArray1[2]!='$'){
  669. this.$set(this.addressUrls, 'way', this.deptBudgetList.addressUrlArray1[2])
  670. }else{
  671. this.$set(this.addressUrls, 'way', '')
  672. }
  673. if(this.deptBudgetList.addressUrlArray1[3]!='$'){
  674. this.$set(this.addressUrls, 'qualification', this.deptBudgetList.addressUrlArray1[3])
  675. }else{
  676. this.$set(this.addressUrls, 'qualification', '')
  677. }
  678. this.$set(this.addressUrls, 'identityjust', this.deptBudgetList.addressUrlArray[0])
  679. this.$set(this.addressUrls, 'identityagainst', this.deptBudgetList.addressUrlArray[1])
  680. for (var i = 0; i < response.driverPayeeInfoList.length; i++) {
  681. if (response.driverPayeeInfoList[i].cardAddressUrl != null) {
  682. response.driverPayeeInfoList[i].cardAddressUrlArray =
  683. response.driverPayeeInfoList[i].cardAddressUrl.split(',')
  684. } else {
  685. response.driverPayeeInfoList[i].cardAddressUrlArray = []
  686. }
  687. }
  688. this.IdCard(response.numberCard)
  689. this.deptBudgetList = Object.assign({}, response)
  690. var tmp = []
  691. tmp[0] = TextToCode[this.deptBudgetList.residentCityProvincial].code
  692. tmp[1] =
  693. TextToCode[this.deptBudgetList.residentCityProvincial][
  694. this.deptBudgetList.residentCityMunicipal
  695. ].code
  696. this.selectedOptions = tmp
  697. })
  698. // 车型
  699. packList({ constId: 'TRAN1' })
  700. .toPromise()
  701. .then((response) => {
  702. this.carModelList = response
  703. })
  704. // 车长
  705. packList({ constId: 'TRAN2' })
  706. .toPromise()
  707. .then((response) => {
  708. this.carLengthList = response
  709. })
  710. },
  711. confirmPositioncity() {
  712. this.listDate.level = 'city'
  713. this.listDate.country = this.name
  714. },
  715. uploadSuccessHandle(index, e, fileList) {
  716. const that = this
  717. getidentity({ personImg: e.url })
  718. .toPromise()
  719. .then((response) => {
  720. for (
  721. var i = 0;
  722. i < this.deptBudgetList.driverPayeeInfoList.length;
  723. i++
  724. ) {
  725. if (i == index) {
  726. this.deptBudgetList.driverPayeeInfoList[i].cardAddressUrl = e.url
  727. this.deptBudgetList.driverPayeeInfoList[i].payeeName =
  728. response.recPerson
  729. this.deptBudgetList.driverPayeeInfoList[i].payeeNumberCard =
  730. response.recPersonNo
  731. }
  732. }
  733. })
  734. },
  735. uploadSuccessHandle1(index, e, fileList) {
  736. const that = this
  737. // this.deptBudgetList.cardAddressUrl = e.url
  738. getbank({ bankImg: e.url })
  739. .toPromise()
  740. .then((response) => {
  741. for (
  742. var i = 0;
  743. i < this.deptBudgetList.driverPayeeInfoList.length;
  744. i++
  745. ) {
  746. if (i == index) {
  747. this.deptBudgetList.driverPayeeInfoList[i].payeeAddressUrl = e.url
  748. this.deptBudgetList.driverPayeeInfoList[i].bankCard =
  749. response.bankNo
  750. this.deptBudgetList.driverPayeeInfoList[i].bankDeposit =
  751. response.bankName
  752. this.deptBudgetList.driverPayeeInfoList[i].bankDepositBranchList =
  753. response.bankNameZhihang
  754. }
  755. }
  756. })
  757. },
  758. uploadSuccessHandletravel(e) {
  759. console.log(e.url)
  760. this.$set(this.addressUrls, 'travel', e.url)
  761. },
  762. uploadSuccessHandledrive(e) {
  763. this.$set(this.addressUrls, 'drive', e.url)
  764. },
  765. uploadSuccessHandleway(e) {
  766. this.$set(this.addressUrls, 'way', e.url)
  767. this.addressUrls.way = e.url
  768. },
  769. uploadSuccessHandlequalification(e) {
  770. this.$set(this.addressUrls, 'qualification', e.url)
  771. },
  772. uploadSuccessHandleidentityjust(e) {
  773. this.$set(this.addressUrls, 'identityjust', e.url)
  774. },
  775. uploadSuccessHandleidentityagainst(e) {
  776. this.$set(this.addressUrls, 'identityagainst', e.url)
  777. },
  778. // 关闭 dialog时 处理文件url 初始化upload组件
  779. handleClose() {
  780. this.dialogViewSpareMoney = false
  781. },
  782. add() {
  783. this.deptBudgetList.driverCarInfoList.push({
  784. carNumber: '',
  785. carModel: '高栏',
  786. carModelKey: '1',
  787. carLength: '13',
  788. carLengthKey: '1',
  789. carLoad: '',
  790. yearManufacture: '',
  791. })
  792. },
  793. del(row, index) {
  794. if (this.deptBudgetList.driverCarInfoList.length > 1) {
  795. if (row.id) {
  796. deltrancar({ id: row.id })
  797. .toPromise()
  798. .then((response) => {
  799. this.$message.success('删除成功')
  800. })
  801. }
  802. this.deptBudgetList.driverCarInfoList.splice(index, 1)
  803. }
  804. },
  805. add1() {
  806. this.deptBudgetList.driverPayeeInfoList.push({
  807. accountTypeFlag: '1',
  808. cardAddressUrl: '',
  809. cardAddressUrlArray: [],
  810. payeeName: '',
  811. payeeNumberCard: '',
  812. compName: '',
  813. bankDeposit: '',
  814. bankCard: '',
  815. })
  816. },
  817. del1(row, index) {
  818. if (this.deptBudgetList.driverPayeeInfoList.length > 1) {
  819. if (row.id) {
  820. deltranprocess({ id: row.id })
  821. .toPromise()
  822. .then((response) => {
  823. this.$message.success('删除成功')
  824. })
  825. }
  826. this.deptBudgetList.driverPayeeInfoList.splice(index, 1)
  827. }
  828. },
  829. identitycardfujian(item) {},
  830. handleChange(value) {
  831. this.selectedOptions = value
  832. },
  833. returnsales() {
  834. this.$router.go(-1)
  835. },
  836. // confirmPosition() {
  837. // this.draggable = false
  838. // },
  839. // 上传附件
  840. selectcarModel(e, index) {
  841. for (var i = 0; i < this.carModelList.length; i++) {
  842. if (this.carModelList[i].constValue == e) {
  843. this.deptBudgetList.driverCarInfoList[index].carModelKey =
  844. this.carModelList[i].constKey
  845. }
  846. }
  847. },
  848. selectcarLength(e, index) {
  849. for (var i = 0; i < this.carLengthList.length; i++) {
  850. if (this.carLengthList[i].constValue == e) {
  851. this.deptBudgetList.driverCarInfoList[index].carLengthKey =
  852. this.carLengthList[i].constKey
  853. }
  854. }
  855. },
  856. selectbankDepositBranch(e, index) {
  857. this.deptBudgetList.driverPayeeInfoList[index].bankDepositBranch = e
  858. },
  859. onChange(files) {
  860. this.fileNum = files
  861. this.$refs.upload.handleSaveBill().then((res) => {
  862. })
  863. },
  864. submit() {
  865. if (!this.addressUrls.way) {
  866. this.addressUrls.way='$'
  867. }
  868. if (!this.addressUrls.qualification) {
  869. this.addressUrls.qualification='$'
  870. }
  871. var arr = []
  872. var arr1=[]
  873. for (let key in this.addressUrls) {
  874. if(key=='identityjust'||key=='identityagainst'){
  875. arr.push(this.addressUrls[key])
  876. }else{
  877. arr1.push(this.addressUrls[key])
  878. }
  879. }
  880. this.$refs.deptBudgetList.validate((valid) => {
  881. if (valid) {
  882. this.deptBudgetList.addressUrl = arr1.toString()
  883. this.deptBudgetList.cardAddressUrl = arr.toString()
  884. this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
  885. this.deptBudgetList.residentCityProvincial =
  886. CodeToText[this.selectedOptions[0]]
  887. this.deptBudgetList.residentCityMunicipal =
  888. CodeToText[this.selectedOptions[1]]
  889. editdriver(this.deptBudgetList)
  890. .toPromise()
  891. .then((response) => {
  892. this.$message.success('添加成功')
  893. this.$router.go(-1)
  894. })
  895. } else {
  896. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  897. return false
  898. }
  899. })
  900. },
  901. resetForm(deptBudgetList) {
  902. this.$refs[deptBudgetList].resetFields()
  903. },
  904. },
  905. }
  906. </script>
  907. <style lang="scss" scoped>
  908. .position {
  909. position: relative;
  910. }
  911. .add,
  912. .del {
  913. position: absolute;
  914. margin-left: 23px;
  915. top: 27px;
  916. cursor: pointer;
  917. }
  918. .del {
  919. margin-left: 70px;
  920. }
  921. .el-form {
  922. padding: 0 10%;
  923. }
  924. /deep/.ws-info-table .el-form-item {
  925. border-right: 1px solid #cdd2dc;
  926. border-bottom: 1px solid #cdd2dc;
  927. }
  928. .readonly {
  929. position: relative;
  930. }
  931. .title {
  932. position: relative;
  933. }
  934. .title::before {
  935. content: '';
  936. display: inline-block;
  937. width: 5px;
  938. height: 30px;
  939. background: #5473e8;
  940. position: absolute;
  941. left: 0;
  942. }
  943. //蓝标
  944. .small-title {
  945. position: relative;
  946. padding: 10px;
  947. font-weight: 600;
  948. }
  949. .small-title::before {
  950. position: absolute;
  951. content: '';
  952. display: block;
  953. background: #5473e8;
  954. width: 4px;
  955. height: 14px;
  956. left: 0px;
  957. top: 13px;
  958. padding: 4px 2px;
  959. }
  960. .el-col {
  961. background: #f6f7fc;
  962. }
  963. /deep/.ws-info-table .el-form-item .el-form-item__content {
  964. padding: 0 25px;
  965. border-left: 1px solid #cdd2dc;
  966. }
  967. /deep/.ws-info-table .el-form-item .el-form-item__label {
  968. width: 140px;
  969. text-align: center;
  970. background: #f0f2f6;
  971. // border: 1px solid #cdd2dc;
  972. }
  973. .button-container {
  974. display: flex;
  975. flex-wrap: nowrap;
  976. justify-content: space-between;
  977. align-items: center;
  978. background-color: #fff;
  979. width: 100%;
  980. height: 50px;
  981. padding: 0 10px;
  982. & > div {
  983. margin-left: 10px;
  984. display: flex;
  985. flex-wrap: nowrap;
  986. flex-direction: row;
  987. & > span {
  988. line-height: 50px;
  989. }
  990. }
  991. /deep/.auditFlow-box {
  992. position: unset;
  993. margin-left: 10px;
  994. &/deep/.auditFlow-icon {
  995. width: auto;
  996. padding-right: 30px;
  997. }
  998. &/deep/.auditFlow-main {
  999. position: absolute;
  1000. }
  1001. }
  1002. }
  1003. .box-app {
  1004. display: inline-block;
  1005. float: left;
  1006. margin-left: 30px;
  1007. line-height: 50px;
  1008. }
  1009. /deep/.el-dialog {
  1010. .el-form-item {
  1011. margin-bottom: 0 !important;
  1012. .el-input--medium {
  1013. textarea {
  1014. min-height: 100px !important;
  1015. }
  1016. }
  1017. }
  1018. }
  1019. .collapse-bottom {
  1020. margin-bottom: 20px;
  1021. }
  1022. .input-main .textarea .el-textarea__inner {
  1023. width: 100%;
  1024. z-index: 1;
  1025. }
  1026. .bg-left {
  1027. padding-left: 30px;
  1028. }
  1029. .bg-right {
  1030. padding-right: 10px;
  1031. text-align: right;
  1032. }
  1033. .bg-bottom {
  1034. margin: 15px 0px;
  1035. }
  1036. .el-form-item__label {
  1037. text-align: center;
  1038. }
  1039. .ce {
  1040. width: 900px;
  1041. margin: 0 auto;
  1042. }
  1043. .driver {
  1044. margin-top: 10px;
  1045. font-weight: bold;
  1046. }
  1047. // 控制select为只读的时候显示样式
  1048. /deep/.ws-class-table-col {
  1049. height: auto;
  1050. padding: 0px 2px;
  1051. /deep/.el-input__inner {
  1052. padding: 0px 2px;
  1053. }
  1054. }
  1055. .winseaview-view {
  1056. padding: 0 0 20px;
  1057. }
  1058. .container {
  1059. overflow: scroll;
  1060. height: 93vh;
  1061. }
  1062. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1063. width: 80px;
  1064. }
  1065. /deep/.ws-info-table .el-form-item {
  1066. width: 25%;
  1067. }
  1068. .el-textarea__inner {
  1069. display: none;
  1070. }
  1071. .el-form {
  1072. margin-top: 50px;
  1073. }
  1074. .el-cascader {
  1075. width: 145px;
  1076. }
  1077. .forlist {
  1078. width: 20%;
  1079. }
  1080. .el-form-item.forlist.is-success.el-form-item--small {
  1081. width: 20%;
  1082. }
  1083. .el-form-item.forlist.el-form-item--small {
  1084. width: 20%;
  1085. }
  1086. .el-form-item.el-car.el-form-item--small {
  1087. width: 33.333%;
  1088. }
  1089. .trucks {
  1090. color: #69708c;
  1091. border: 1px solid #d8dce6;
  1092. width: 100%;
  1093. padding: 12px;
  1094. border-radius: 3px;
  1095. margin: 10px 0;
  1096. background: #f6f7fc;
  1097. }
  1098. /deep/.trucks .ws-info-table,
  1099. /deep/.trucks .ws-info-table .el-form-item,
  1100. /deep/.trucks .ws-info-table .el-form-item .el-form-item__content {
  1101. border: none;
  1102. }
  1103. /deep/.trucks .el-table__expanded-cell,
  1104. /deep/.trucks .ws-info-table .el-form-item .el-form-item__label,
  1105. /deep/.trucks .ws-info-table .el-form-item .el-form-item__content {
  1106. background: #f6f7fc;
  1107. }
  1108. /deep/.trucks .ws-info-table .el-form-item .el-form-item__label {
  1109. color: #8890b1;
  1110. width: 40%;
  1111. }
  1112. /deep/.trucks .el-table:before {
  1113. height: 0;
  1114. }
  1115. .gathering {
  1116. background: #f5f7fa;
  1117. border: 1px solid #d8dce6;
  1118. border-radius: 3px;
  1119. width: 100%;
  1120. margin-top: 15px;
  1121. }
  1122. /deep/.gathering .ws-info-table {
  1123. border-left: none;
  1124. border-top: 1px solid #d8dce6;
  1125. }
  1126. /deep/.gathering .driver {
  1127. padding: 10px;
  1128. }
  1129. /deep/.gathering .el-form-item .el-form-item__label {
  1130. background: #f5f7fa;
  1131. text-align: center;
  1132. }
  1133. /deep/.gathering .ws-info-table .el-form-item .el-form-item__content {
  1134. border-left: 1px solid #d8dce6;
  1135. }
  1136. /deep/.gathering .ws-info-table .el-form-item.compname,
  1137. /deep/.gathering .ws-info-table .el-form-item.bankDeposit,
  1138. /deep/.gathering .ws-info-table .el-form-item.bankDeposit1 {
  1139. border-right: 1px solid transparent;
  1140. }
  1141. /deep/.gathering .ws-info-table .el-form-item.compname {
  1142. width: 100%;
  1143. }
  1144. .button.el-button--primary,
  1145. .button-green.el-button--primary,
  1146. .button-yellow.el-button--primary {
  1147. height: 28px;
  1148. background: #edf1ff;
  1149. border-radius: 4px;
  1150. color: #5473e8;
  1151. font-size: 12px;
  1152. text-align: center;
  1153. line-height: 28px;
  1154. margin: 0 10px;
  1155. padding: 0 10px;
  1156. border: 1px solid transparent;
  1157. }
  1158. .button-green.el-button--primary {
  1159. background: #ecf8f9;
  1160. color: #50cad4;
  1161. }
  1162. .button-yellow.el-button--primary {
  1163. background: #fff6eb;
  1164. color: #ff9f24;
  1165. }
  1166. .el-button--primary {
  1167. background: #5878e8;
  1168. border-color: #5878e8;
  1169. }
  1170. .drivermessage {
  1171. position: relative;
  1172. }
  1173. .drivermessage .ws-info-table {
  1174. border: none;
  1175. }
  1176. /deep/.drivermessage .ws-info-table .el-form-item__label {
  1177. background: #fff;
  1178. width: 80px;
  1179. }
  1180. /deep/.drivermessage .ws-info-table .el-form-item__content,
  1181. /deep/.drivermessage .ws-info-table .el-form-item {
  1182. border: none;
  1183. }
  1184. .small,
  1185. .big {
  1186. color: #ccc;
  1187. line-height: 16px;
  1188. position: absolute;
  1189. right: -50px;
  1190. top: 6px;
  1191. border: 1px solid #ccc;
  1192. padding: 5px 10px;
  1193. border-radius: 20px;
  1194. }
  1195. .big {
  1196. color: #f46060;
  1197. background: #ffeeee;
  1198. }
  1199. </style>