tranManagementDriverEdit.vue 31 KB

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