tranManagementDriverEdit.vue 29 KB

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