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