tranManagementDriverEdit.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071
  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. addressUrls:{},
  591. freightspace1: [
  592. {
  593. accountTypeFlag: '1',
  594. cardAddressUrl: '',
  595. cardAddressUrlArray: [],
  596. payeeName: '',
  597. payeeNumberCard: '',
  598. compName: '',
  599. bankDeposit: '',
  600. bankCard: '',
  601. },
  602. ],
  603. name: '',
  604. age: '',
  605. }
  606. },
  607. activated() {
  608. this.loaddata()
  609. this.showType = this.isShow
  610. },
  611. computed: {},
  612. methods: {
  613. IdCard(UUserCard) {
  614. //获取年龄
  615. var myDate = new Date()
  616. var month = myDate.getMonth() + 1
  617. var day = myDate.getDate()
  618. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  619. if (
  620. UUserCard.substring(10, 12) < month ||
  621. (UUserCard.substring(10, 12) == month &&
  622. UUserCard.substring(12, 14) <= day)
  623. ) {
  624. age++
  625. }
  626. this.age = age
  627. },
  628. bankcardfujian(item) {
  629. this.accessoryBankTFs = true
  630. },
  631. loaddata() {
  632. lookDriver({ id: this.$route.query.id })
  633. .toPromise()
  634. .then((response) => {
  635. // this.selectedOptions.push()
  636. for (var i = 0; i < response.driverPayeeInfoList.length; i++) {
  637. if (response.driverPayeeInfoList[i].cardAddressUrl != null) {
  638. response.driverPayeeInfoList[i].cardAddressUrlArray =
  639. response.driverPayeeInfoList[i].cardAddressUrl.split(',')
  640. } else {
  641. response.driverPayeeInfoList[i].cardAddressUrlArray = []
  642. }
  643. }
  644. this.deptBudgetList = Object.assign({}, response)
  645. var tmp = []
  646. tmp[0] = TextToCode[this.deptBudgetList.residentCityProvincial].code
  647. tmp[1] =
  648. TextToCode[this.deptBudgetList.residentCityProvincial][
  649. this.deptBudgetList.residentCityMunicipal
  650. ].code
  651. this.selectedOptions = tmp
  652. })
  653. console.log(11111)
  654. // 车型
  655. packList({ constId: 'TRAN1' })
  656. .toPromise()
  657. .then((response) => {
  658. this.carModelList = response
  659. })
  660. // 车长
  661. packList({ constId: 'TRAN2' })
  662. .toPromise()
  663. .then((response) => {
  664. this.carLengthList = response
  665. })
  666. },
  667. confirmPositioncity() {
  668. this.listDate.level = 'city'
  669. this.listDate.country = this.name
  670. },
  671. uploadSuccessHandle(index, e, fileList) {
  672. console.log(index, e, fileList)
  673. const that = this
  674. getidentity({ personImg: e.url })
  675. .toPromise()
  676. .then((response) => {
  677. for (
  678. var i = 0;
  679. i < this.deptBudgetList.driverPayeeInfoList.length;
  680. i++
  681. ) {
  682. if (i == index) {
  683. this.deptBudgetList.driverPayeeInfoList[i].cardAddressUrl = e.url
  684. this.deptBudgetList.driverPayeeInfoList[i].payeeName =
  685. response.recPerson
  686. this.deptBudgetList.driverPayeeInfoList[i].payeeNumberCard =
  687. response.recPersonNo
  688. }
  689. }
  690. })
  691. },
  692. uploadSuccessHandle1(index, e, fileList) {
  693. console.log(index, e, fileList)
  694. const that = this
  695. // this.deptBudgetList.cardAddressUrl = e.url
  696. getbank({ bankImg: e.url })
  697. .toPromise()
  698. .then((response) => {
  699. for (
  700. var i = 0;
  701. i < this.deptBudgetList.driverPayeeInfoList.length;
  702. i++
  703. ) {
  704. if (i == index) {
  705. this.deptBudgetList.driverPayeeInfoList[i].payeeAddressUrl = e.url
  706. this.deptBudgetList.driverPayeeInfoList[i].bankCard =
  707. response.bankNo
  708. this.deptBudgetList.driverPayeeInfoList[i].bankDeposit =
  709. response.bankName
  710. this.deptBudgetList.driverPayeeInfoList[i].bankDepositBranchList =
  711. response.bankNameZhihang
  712. }
  713. }
  714. })
  715. },
  716. uploadSuccessHandletravel(e) {
  717. this.$set(this.addressUrls, 'travel', e.url)
  718. },
  719. uploadSuccessHandledrive(e) {
  720. this.$set(this.addressUrls, 'drive', e.url)
  721. },
  722. uploadSuccessHandleway(e) {
  723. this.$set(this.addressUrls, 'way', e.url)
  724. this.addressUrls.way = e.url
  725. },
  726. uploadSuccessHandlequalification(e) {
  727. this.$set(this.addressUrls, 'qualification', e.url)
  728. },
  729. uploadSuccessHandleidentityjust(e) {
  730. this.$set(this.addressUrls, 'identityjust', e.url)
  731. },
  732. uploadSuccessHandleidentityagainst(e) {
  733. this.$set(this.addressUrls, 'identityagainst', e.url)
  734. },
  735. // 关闭 dialog时 处理文件url 初始化upload组件
  736. handleClose() {
  737. this.dialogViewSpareMoney = false
  738. },
  739. add() {
  740. this.deptBudgetList.driverCarInfoList.push({
  741. carNumber: '',
  742. carModel: '高栏',
  743. carModelKey: '1',
  744. carLength: '13',
  745. carLengthKey: '1',
  746. carLoad: '',
  747. yearManufacture: '',
  748. })
  749. },
  750. del(row, index) {
  751. if (this.deptBudgetList.driverCarInfoList.length > 1) {
  752. if (row.id) {
  753. deltrancar({ id: row.id })
  754. .toPromise()
  755. .then((response) => {
  756. this.$message.success('删除成功')
  757. })
  758. }
  759. this.deptBudgetList.driverCarInfoList.splice(index, 1)
  760. }
  761. },
  762. add1() {
  763. this.deptBudgetList.driverPayeeInfoList.push({
  764. accountTypeFlag: '1',
  765. cardAddressUrl: '',
  766. cardAddressUrlArray: [],
  767. payeeName: '',
  768. payeeNumberCard: '',
  769. compName: '',
  770. bankDeposit: '',
  771. bankCard: '',
  772. })
  773. },
  774. del1(row, index) {
  775. if (this.deptBudgetList.driverPayeeInfoList.length > 1) {
  776. if (row.id) {
  777. deltranprocess({ id: row.id })
  778. .toPromise()
  779. .then((response) => {
  780. this.$message.success('删除成功')
  781. })
  782. }
  783. this.deptBudgetList.driverPayeeInfoList.splice(index, 1)
  784. }
  785. },
  786. identitycardfujian(item) {},
  787. handleChange(value) {
  788. this.selectedOptions = value
  789. console.log(this.selectedOptions)
  790. },
  791. returnsales() {
  792. this.$router.push({ path: 'tranManagementDriver' })
  793. },
  794. // confirmPosition() {
  795. // this.draggable = false
  796. // },
  797. // 上传附件
  798. uploadSuccess(data, files, url) {
  799. console.log(data, files, url)
  800. // this.deptBudgetList.
  801. // this.formData.append('files', files)
  802. // this.feedbackObj.uploadNameAttachment = data.appendixName
  803. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  804. // // this.newAppendixs = files
  805. // this.onChangeFlag = true
  806. },
  807. selectcarModel(e, index) {
  808. for (var i = 0; i < this.carModelList.length; i++) {
  809. if (this.carModelList[i].constValue == e) {
  810. this.deptBudgetList.driverCarInfoList[index].carModelKey =
  811. this.carModelList[i].constKey
  812. }
  813. }
  814. },
  815. selectcarLength(e, index) {
  816. for (var i = 0; i < this.carLengthList.length; i++) {
  817. if (this.carLengthList[i].constValue == e) {
  818. this.deptBudgetList.driverCarInfoList[index].carLengthKey =
  819. this.carLengthList[i].constKey
  820. }
  821. }
  822. },
  823. selectbankDepositBranch(e, index) {
  824. console.log(e, index)
  825. this.deptBudgetList.driverPayeeInfoList[index].bankDepositBranch = e
  826. },
  827. onChange(files) {
  828. this.fileNum = files
  829. this.$refs.upload.handleSaveBill().then((res) => {
  830. console.log(files)
  831. })
  832. },
  833. submit() {
  834. this.$refs.deptBudgetList.validate((valid) => {
  835. if (valid) {
  836. this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
  837. this.deptBudgetList.residentCityProvincial =
  838. CodeToText[this.selectedOptions[0]]
  839. this.deptBudgetList.residentCityMunicipal =
  840. CodeToText[this.selectedOptions[1]]
  841. editdriver(this.deptBudgetList)
  842. .toPromise()
  843. .then((response) => {
  844. this.$message.success('添加成功')
  845. this.$router.push({ path: 'tranManagementDriver' })
  846. })
  847. } else {
  848. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  849. return false
  850. }
  851. })
  852. },
  853. resetForm(deptBudgetList) {
  854. this.$refs[deptBudgetList].resetFields()
  855. },
  856. },
  857. }
  858. </script>
  859. <style lang="scss" scoped>
  860. .position {
  861. position: relative;
  862. }
  863. .add,
  864. .del {
  865. position: absolute;
  866. right: -38px;
  867. top: 9px;
  868. cursor: pointer;
  869. }
  870. .del {
  871. right: -70px;
  872. }
  873. .amap-page-container {
  874. width: 300px;
  875. height: 300px;
  876. }
  877. .el-form {
  878. padding: 0 10%;
  879. }
  880. /deep/.ws-info-table .el-form-item {
  881. border-right: 1px solid #cdd2dc;
  882. border-bottom: 1px solid #cdd2dc;
  883. }
  884. .readonly {
  885. position: relative;
  886. }
  887. .title {
  888. position: relative;
  889. }
  890. .el-car {
  891. width: 413px;
  892. }
  893. .title::before {
  894. content: '';
  895. display: inline-block;
  896. width: 5px;
  897. height: 30px;
  898. background: #5473e8;
  899. position: absolute;
  900. left: 0;
  901. }
  902. .el-col {
  903. background: #f6f7fc;
  904. }
  905. /deep/.ws-info-table .el-form-item .el-form-item__content {
  906. padding: 0 25px;
  907. border-left: 1px solid #cdd2dc;
  908. background: #fafbfc;
  909. }
  910. /deep/.ws-info-table .el-form-item .el-form-item__label {
  911. width: 140px;
  912. text-align: center;
  913. background: #f0f2f6;
  914. // border: 1px solid #cdd2dc;
  915. }
  916. .button-container {
  917. display: flex;
  918. flex-wrap: nowrap;
  919. justify-content: space-between;
  920. align-items: center;
  921. background-color: #fff;
  922. width: 100%;
  923. height: 50px;
  924. padding: 0 10px;
  925. & > div {
  926. margin-left: 10px;
  927. display: flex;
  928. flex-wrap: nowrap;
  929. flex-direction: row;
  930. & > span {
  931. line-height: 50px;
  932. }
  933. }
  934. /deep/.auditFlow-box {
  935. position: unset;
  936. margin-left: 10px;
  937. &/deep/.auditFlow-icon {
  938. width: auto;
  939. padding-right: 30px;
  940. }
  941. &/deep/.auditFlow-main {
  942. position: absolute;
  943. }
  944. }
  945. }
  946. .box-app {
  947. display: inline-block;
  948. float: left;
  949. margin-left: 30px;
  950. line-height: 50px;
  951. }
  952. /deep/.el-dialog {
  953. .el-form-item {
  954. margin-bottom: 0 !important;
  955. .el-input--medium {
  956. textarea {
  957. min-height: 100px !important;
  958. }
  959. }
  960. }
  961. }
  962. .collapse-bottom {
  963. margin-bottom: 20px;
  964. }
  965. .input-main .textarea .el-textarea__inner {
  966. width: 100%;
  967. z-index: 1;
  968. }
  969. .bg-left {
  970. padding-left: 30px;
  971. }
  972. .bg-right {
  973. padding-right: 10px;
  974. text-align: right;
  975. }
  976. .bg-bottom {
  977. margin: 15px 0px;
  978. }
  979. .wenzi {
  980. width: 900px;
  981. margin: 0 auto;
  982. }
  983. .wenzi h3 {
  984. display: inline-block;
  985. left: 10px;
  986. }
  987. .wenzi p {
  988. display: inline-block;
  989. }
  990. .center {
  991. width: 900px;
  992. margin: 0 auto;
  993. }
  994. .el-form-item__label {
  995. text-align: center;
  996. }
  997. .el-table {
  998. width: 1240px;
  999. }
  1000. .ce {
  1001. width: 900px;
  1002. margin: 0 auto;
  1003. }
  1004. .driver {
  1005. width: 120px;
  1006. margin-top: 10px;
  1007. font-weight: bold;
  1008. }
  1009. // 控制select为只读的时候显示样式
  1010. /deep/.ws-class-table-col {
  1011. height: auto;
  1012. padding: 0px 2px;
  1013. /deep/.el-input__inner {
  1014. padding: 0px 2px;
  1015. }
  1016. }
  1017. .winseaview-view {
  1018. padding: 0 0 20px;
  1019. }
  1020. .container {
  1021. overflow: scroll;
  1022. height: 93vh;
  1023. }
  1024. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1025. width: 80px;
  1026. }
  1027. /deep/.ws-info-table .el-form-item {
  1028. width: 25%;
  1029. }
  1030. .el-textarea__inner {
  1031. display: none;
  1032. }
  1033. .el-form {
  1034. margin-top: 50px;
  1035. }
  1036. .readonly {
  1037. width: 16%;
  1038. }
  1039. .el-cascader {
  1040. width: 145px;
  1041. }
  1042. .forlist {
  1043. width: 20%;
  1044. }
  1045. .el-form-item.forlist.is-success.el-form-item--small {
  1046. width: 20%;
  1047. }
  1048. .el-form-item.forlist.el-form-item--small {
  1049. width: 20%;
  1050. }
  1051. .el-form-item.readonly.is-success.el-form-item--small.showLableToopTip {
  1052. width: 20%;
  1053. }
  1054. .el-form-item.el-car.el-form-item--small {
  1055. width: 33.3%;
  1056. }
  1057. </style>