tranManagementDriverEdit.vue 28 KB

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