tranManagementVehicleDispatching.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. // 汽车调度派车
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">汽车调度</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  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. <div class="center">
  25. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  26. <div class="basicInformation">
  27. <div class="small-title" style="font-size: 16px">任务详情</div>
  28. <ws-info-table>
  29. <!-- 任务编号 -->
  30. <ws-form-item label="任务编号" span="1" prop="processNo">
  31. {{ deptBudgetList.processNo }}
  32. </ws-form-item>
  33. <!-- 货名 -->
  34. <ws-form-item label="货名" span="1">
  35. {{ deptBudgetList.goodsName }}
  36. </ws-form-item>
  37. <!--重量(吨)-->
  38. <ws-form-item
  39. label="重量(吨)"
  40. span="1"
  41. prop="tare"
  42. class="readonly"
  43. >
  44. {{ deptBudgetList.weight }}
  45. </ws-form-item>
  46. <!--发货地址-->
  47. <ws-form-item label="发货地址" span="1" prop="netWeight">
  48. {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
  49. }}{{ deptBudgetList.sendArea
  50. }}{{ deptBudgetList.sendDetailedAddress }}
  51. </ws-form-item>
  52. <!--发货人-->
  53. <ws-form-item label="发货人" span="1" prop="agent">
  54. {{ deptBudgetList.sender }}
  55. </ws-form-item>
  56. <!--发货人电话-->
  57. <ws-form-item label="发货人电话" span="1" prop="agent">
  58. {{ deptBudgetList.senderPhone }}
  59. </ws-form-item>
  60. <!--收货地址-->
  61. <ws-form-item label="收货地址" span="1" prop="netWeight">
  62. {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
  63. }}{{ deptBudgetList.receiveArea
  64. }}{{ deptBudgetList.receiveDetailedAddress }}
  65. </ws-form-item>
  66. <!--收货人-->
  67. <ws-form-item label="收货人" span="1" prop="receiver">
  68. {{ deptBudgetList.receiver }}
  69. </ws-form-item>
  70. <!--收货人电话-->
  71. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
  72. {{ deptBudgetList.receiverPhone }}
  73. </ws-form-item>
  74. <!--发货日期-->
  75. <ws-form-item
  76. label="发货日期"
  77. span="1"
  78. prop="inOutDate"
  79. class="deliverydate"
  80. >
  81. {{ deptBudgetList.deliveryDateStart }}
  82. </ws-form-item>
  83. <!--最晚发货日期-->
  84. <ws-form-item
  85. label="最晚发货日期"
  86. span="1"
  87. prop="inOutDate"
  88. class="deliverydate"
  89. >
  90. {{ deptBudgetList.deliveryDateEnd }}
  91. </ws-form-item>
  92. <!--合同编号-->
  93. <ws-form-item label="合同编号" span="1" prop="contractNo">
  94. {{ deptBudgetList.contractNo }}
  95. </ws-form-item>
  96. </ws-info-table>
  97. <div class="small-title" style="font-size: 16px">派车</div>
  98. <div class="myTest">
  99. <!--当前运输单价-->
  100. <ws-form-item label="当前运输单价(元/吨):" span="1" prop="tranPrice">
  101. <ws-input
  102. v-model="deptBudgetList.tranPrice"
  103. maxlength="70"
  104. :disabled="readonly"
  105. size="small"
  106. style="width:70px"
  107. />
  108. </ws-form-item>
  109. <!--审核中的运输单价-->
  110. <ws-form-item label="审核中的运输单价(元/吨):" span="1" prop="tranPriceIng">
  111. <ws-input
  112. v-if="deptBudgetList.priceStatus=='审核中'"
  113. :disabled="readonly"
  114. v-model="deptBudgetList.tranPriceIng"
  115. maxlength="70"
  116. size="small"
  117. style="width:70px"
  118. />
  119. <ws-input
  120. v-else
  121. v-model="deptBudgetList.tranPriceIng"
  122. maxlength="70"
  123. size="small"
  124. style="width:70px"
  125. />
  126. </ws-form-item>
  127. <ws-form-item>
  128. <el-button
  129. v-if="deptBudgetList.priceStatus=='审核中'"
  130. type="primary"
  131. v-hasPermission="`transportationTask.transportation.transportationInfo.exe`"
  132. size="small"
  133. @click="examine()"
  134. >审核中</el-button
  135. >
  136. <el-button
  137. v-else
  138. type="primary"
  139. size="small"
  140. @click="priceSubmit()"
  141. >提交</el-button
  142. >
  143. </ws-form-item>
  144. </div>
  145. <div
  146. class="driver position liaison"
  147. v-for="(item, index) in deptBudgetList.tranCarInfoList"
  148. :key="index"
  149. >
  150. <ws-info-table>
  151. <div class="catNos">
  152. 司机-{{ index + 1 }}
  153. <span class="noservice" v-show="item.status == '未装车'">{{
  154. item.status
  155. }}</span>
  156. <span class="service" v-show="item.status == '已装车'">{{
  157. item.status
  158. }}</span>
  159. <span class="serviced" v-show="item.status == '已送达'">{{
  160. item.status
  161. }}</span>
  162. </div>
  163. <!--司机-->
  164. <ws-form-item
  165. label="姓名:"
  166. span="1"
  167. prop="driverName"
  168. class="siji"
  169. >
  170. <el-select
  171. v-show="!item.temporaryDriverFlag"
  172. v-model="item.driver"
  173. placeholder="请选择司机"
  174. class="typeselect"
  175. @change="
  176. (val) => {
  177. carchange(val, index)
  178. }
  179. "
  180. >
  181. <el-option
  182. v-for="(items, index) in carList"
  183. :key="index"
  184. :label="items.driverName"
  185. :value="items.driverName"
  186. />
  187. </el-select>
  188. <span
  189. v-show="
  190. item.temporaryDriverFlag == 0 ||
  191. item.temporaryDriverFlag == 1
  192. "
  193. >{{ item.driver }}</span
  194. >
  195. </ws-form-item>
  196. <!--司机电话-->
  197. <ws-form-item
  198. label="司机电话:"
  199. span="1"
  200. prop="impurity"
  201. class="siji"
  202. >
  203. <el-select
  204. v-show="!item.temporaryDriverFlag"
  205. v-model="item.driverPhone"
  206. placeholder="请选择司机电话"
  207. class="typeselect"
  208. @change="
  209. (val) => {
  210. phonechange(val, index)
  211. }
  212. "
  213. >
  214. <el-option
  215. v-for="(items, index) in carList"
  216. :key="index"
  217. :label="items.driverPhone"
  218. :value="items.driverPhone"
  219. />
  220. </el-select>
  221. <span
  222. v-show="
  223. item.temporaryDriverFlag == 0 ||
  224. item.temporaryDriverFlag == 1
  225. "
  226. >{{ item.driverPhone }}</span
  227. >
  228. </ws-form-item>
  229. <!--车牌号-->
  230. <ws-form-item label="车牌号:" span="1" prop="carNo" class="siji">
  231. <ws-input
  232. :disabled="readonly"
  233. v-model="item.carNo"
  234. placeholder="请输入车牌号"
  235. maxlength="120"
  236. size="small"
  237. />
  238. </ws-form-item>
  239. <!--派车编号-->
  240. <ws-form-item
  241. label="派车编号:"
  242. span="1"
  243. prop="carModel"
  244. class="siji"
  245. style="width:245px"
  246. >
  247. <ws-input
  248. :disabled="readonly"
  249. v-model="item.tranCarNo"
  250. maxlength="120"
  251. size="small"
  252. />
  253. </ws-form-item>
  254. <!--箱号-->
  255. <ws-form-item
  256. label="箱号:"
  257. span="1"
  258. prop="carModel"
  259. class="siji"
  260. >
  261. <ws-input
  262. v-if="item.status == '已装车'||item.status == '已送达'"
  263. :disabled="readonly"
  264. v-model="item.caseNo"
  265. maxlength="120"
  266. size="small"
  267. />
  268. <ws-input
  269. v-else
  270. v-model="item.caseNo"
  271. placeholder="请输入箱号"
  272. maxlength="120"
  273. size="small"
  274. />
  275. </ws-form-item>
  276. <!--封号-->
  277. <ws-form-item
  278. label="封号:"
  279. span="1"
  280. prop="carModel"
  281. class="siji"
  282. >
  283. <ws-input
  284. v-if="item.status == '已装车'||item.status == '已送达'"
  285. v-model="item.titleNo"
  286. placeholder="请输入封号"
  287. :disabled="readonly"
  288. maxlength="120"
  289. size="small"
  290. />
  291. <ws-input
  292. v-model="item.titleNo"
  293. placeholder="请输入封号"
  294. v-else
  295. maxlength="120"
  296. size="small"
  297. />
  298. </ws-form-item>
  299. <!--车型-->
  300. <ws-form-item
  301. label="车型:"
  302. span="1"
  303. prop="carModel"
  304. class="siji"
  305. >
  306. <ws-input
  307. :disabled="readonly"
  308. v-model="item.carModel"
  309. placeholder="请输入车型"
  310. maxlength="120"
  311. size="small"
  312. />
  313. </ws-form-item>
  314. <!--车长-->
  315. <ws-form-item
  316. label="车长:"
  317. span="1"
  318. prop="carLength"
  319. class="siji"
  320. >
  321. <ws-input
  322. :disabled="readonly"
  323. v-model="item.carLength"
  324. placeholder="请输入车长"
  325. maxlength="120"
  326. size="small"
  327. />
  328. </ws-form-item>
  329. <!--载重吨-->
  330. <ws-form-item
  331. label="载重(吨):"
  332. span="1"
  333. prop="loadWeight"
  334. class="siji zaizhong"
  335. >
  336. <ws-input
  337. :disabled="readonly"
  338. v-model="item.loadWeight"
  339. placeholder="请输入载重(吨)"
  340. maxlength="120"
  341. size="small"
  342. />
  343. </ws-form-item>
  344. <!--运输单价-->
  345. <ws-form-item
  346. label="运输单价(元/吨):"
  347. span="1"
  348. prop="carModel"
  349. class="siji"
  350. style="width:250px"
  351. >
  352. <ws-input
  353. :disabled="readonly"
  354. v-model="item.tranPrice"
  355. maxlength="120"
  356. size="small"
  357. />
  358. </ws-form-item>
  359. </ws-info-table>
  360. <span
  361. v-if="item.status == '未装车'||item.temporaryDriverFlag!=0"
  362. width="22"
  363. height="22"
  364. class="del"
  365. @click="del(index, item)"
  366. src="../../../public/img/del.png"
  367. alt=""
  368. >×</span
  369. >
  370. </div>
  371. <div style="text-align: right; color: #8890b1; font-size: 16px">
  372. 共{{ total }}/{{ deptBudgetList.weight }}
  373. </div>
  374. <el-button class="add" type="primary" size="small" @click="add()">
  375. <img
  376. width="22"
  377. height="22"
  378. src="../../../public/img/add.png"
  379. alt=""
  380. />
  381. <div class="spans">添加司机</div>
  382. </el-button>
  383. <div style="text-align: right; padding: 10px">
  384. <el-button
  385. class="bg-bottom-up"
  386. type="primary"
  387. size="small"
  388. @click="submit()"
  389. >提交</el-button
  390. >
  391. </div>
  392. </div>
  393. </ws-form>
  394. </div>
  395. </div>
  396. </template>
  397. <script>
  398. import Pagination from '@/components/Pagination'
  399. import WsUpload from '@/components/WsUpload'
  400. import {
  401. seeCat,
  402. nameXiala,
  403. arrange,
  404. dispatchCat,
  405. delhaulagestage,
  406. setUpTranPrice
  407. } from '@/model/transport/index'
  408. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  409. import { dayjs, EventBus } from 'base-core-lib'
  410. export default {
  411. name: 'viewSpareMoney',
  412. components: {
  413. WsUpload,
  414. Pagination,
  415. },
  416. watch: {
  417. // vesselId(val) {
  418. // this.getList()
  419. // },
  420. isShow(val) {
  421. this.showType = val
  422. },
  423. },
  424. data() {
  425. return {
  426. // 是否显示
  427. showType: true,
  428. deptBudgetTotal: 0,
  429. currentPage: 1,
  430. pageSize: 10,
  431. searchType: 1,
  432. startDate: null,
  433. endDate: null,
  434. carList: [],
  435. // 提交类型
  436. readonly: true,
  437. tranPriceApprove:{},
  438. rules: {
  439. netWeight: [
  440. {
  441. required: true,
  442. type: 'number',
  443. message: '请输入活动名称',
  444. trigger: 'blur',
  445. },
  446. ],
  447. },
  448. size: 10,
  449. compId: sessionStorage.getItem('ws-pf_compId'),
  450. date: {
  451. year: dayjs().format('YYYY'),
  452. month: dayjs().format('MM'),
  453. },
  454. deptBudgetList: {
  455. tranCarInfoList: [],
  456. },
  457. pickerBeginDateBefore: {
  458. disabledDate: (time) => {
  459. return time.getTime() > Date.now()
  460. },
  461. },
  462. accessoryTFs: false,
  463. index:0,
  464. }
  465. },
  466. activated() {
  467. this.getList()
  468. },
  469. computed: {
  470. total: function () {
  471. if (this.deptBudgetList.tranCarInfoList.length > 0) {
  472. var maxStorage = 0
  473. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  474. maxStorage += Number(
  475. this.deptBudgetList.tranCarInfoList[i].loadWeight
  476. )
  477. }
  478. return maxStorage
  479. }
  480. },
  481. },
  482. methods: {
  483. //返回按钮
  484. revert() {
  485. this.$router.go(-1)
  486. },
  487. del(index, row) {
  488. if(row.status == null){
  489. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  490. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  491. }
  492. }else{
  493. this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
  494. confirmButtonText: '确定',
  495. cancelButtonText: '取消',
  496. type: 'warning',
  497. }).then(() => {
  498. delhaulagestage({ id: row.id })
  499. .toPromise()
  500. .then((response) => {
  501. this.$message.success('删除成功')
  502. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  503. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  504. }
  505. this.getList()
  506. })
  507. })
  508. }
  509. },
  510. add() {
  511. if(!this.deptBudgetList.tranPrice){
  512. this.$message({
  513. message: '请设置运输单价!',
  514. type: 'warning',
  515. })
  516. }
  517. else{
  518. var tmp1='C00'
  519. this.deptBudgetList.count++
  520. if(this.deptBudgetList.tranCarInfoList.length<10){
  521. this.deptBudgetList.tranCarInfoList.push({
  522. driverName: '',
  523. driverPhone: '',
  524. carLength: 0,
  525. carLengthKey: '',
  526. loadWeight: null,
  527. carModel: '',
  528. carModelKey: '',
  529. carNumber: '',
  530. disabled: false,
  531. tranType: '1',
  532. tranCarNo: tmp1+(this.deptBudgetList.count),
  533. tranPrice:this.deptBudgetList.tranPrice
  534. })
  535. }
  536. else if(this.deptBudgetList.tranCarInfoList.length<100&&this.deptBudgetList.tranCarInfoList.length>=10){
  537. tmp1='C0'
  538. this.deptBudgetList.count++
  539. this.deptBudgetList.tranCarInfoList.push({
  540. driverName: '',
  541. driverPhone: '',
  542. carLength: 0,
  543. carLengthKey: '',
  544. loadWeight: null,
  545. carModel: '',
  546. carModelKey: '',
  547. carNumber: '',
  548. disabled: false,
  549. tranType: '1',
  550. tranCarNo: tmp1+(this.deptBudgetList.count),
  551. tranPrice:this.deptBudgetList.tranPrice
  552. })
  553. }
  554. else if(this.deptBudgetList.tranCarInfoList.length<1000&&this.deptBudgetList.tranCarInfoList.length>=100){
  555. tmp1='C'
  556. this.deptBudgetList.count++
  557. this.deptBudgetList.tranCarInfoList.push({
  558. driverName: '',
  559. driverPhone: '',
  560. carLength: 0,
  561. carLengthKey: '',
  562. loadWeight: null,
  563. carModel: '',
  564. carModelKey: '',
  565. carNumber: '',
  566. disabled: false,
  567. tranType: '1',
  568. tranCarNo: tmp1+(this.deptBudgetList.count),
  569. tranPrice:this.deptBudgetList.tranPrice
  570. })
  571. }
  572. }
  573. },
  574. //审核
  575. examine(){
  576. this.$prompt('运输单价审核', {
  577. cancelButtonText: '取消',
  578. confirmButtonText: '确定',
  579. }).then(({ value }) => {
  580. var tranProcessInfo = {}
  581. tranProcessInfo.reviewer = sessionStorage.getItem('ws-pf_roleName') +
  582. sessionStorage.getItem('ws-pf_staffName')
  583. tranProcessInfo.id = this.deptBudgetList.id
  584. tranProcessInfo.flag = "2"
  585. tranProcessInfo.tranPriceIng = value
  586. setUpTranPrice(tranProcessInfo)
  587. .toPromise()
  588. .then((response) => {
  589. this.$message.success('审核成功')
  590. this.getList()
  591. });
  592. }).catch(() => {
  593. this.$message.warning(
  594. '取消审核'
  595. );
  596. });
  597. },
  598. priceSubmit(){
  599. this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
  600. cancelButtonText: '取消',
  601. confirmButtonText: '确定',
  602. type: 'warning',
  603. })
  604. .then(() => {
  605. var tranProcessInfo = {}
  606. tranProcessInfo.id = this.deptBudgetList.id
  607. tranProcessInfo.flag = "1"
  608. tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
  609. setUpTranPrice(tranProcessInfo)
  610. .toPromise()
  611. .then((response) => {
  612. this.$message.success('提交成功')
  613. this.getList()
  614. })
  615. })
  616. .catch(() => {
  617. return false
  618. })
  619. },
  620. //提交按钮
  621. submit() {
  622. if(!this.deptBudgetList.tranPrice){
  623. this.$message({
  624. message: '请设置运输单价!',
  625. type: 'warning',
  626. })
  627. }
  628. else{
  629. for (var i = this.index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  630. if (!this.deptBudgetList.tranCarInfoList[i].driver) {
  631. this.$message({
  632. message: '姓名不能为空!',
  633. type: 'warning',
  634. })
  635. return
  636. }
  637. for(var j = 0 ; j < this.carList.length ; j++){
  638. if (this.carList[j].driverName == this.deptBudgetList.tranCarInfoList[i].driver && this.carList[j].disableStatusFlag == 1) {
  639. this.$message({
  640. message: this.deptBudgetList.tranCarInfoList[i].driver+'该司机已被禁用!',
  641. type: 'warning',
  642. })
  643. return
  644. }
  645. }
  646. }
  647. this.$confirm(`提交成功后,任务将下发给司机,是否确定提交?`, {
  648. cancelButtonText: '取消',
  649. confirmButtonText: '确定',
  650. type: 'warning',
  651. })
  652. .then(() => {
  653. this.$refs.deptBudgetList.validate((valid) => {
  654. if (valid) {
  655. var tranCarInfo = {}
  656. tranCarInfo.id = this.deptBudgetList.id
  657. tranCarInfo.infoId = this.deptBudgetList.infoId
  658. tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
  659. dispatchCat(tranCarInfo)
  660. .toPromise()
  661. .then((response) => {
  662. this.$message.success('提交成功')
  663. this.$router.go(-1)
  664. })
  665. } else {
  666. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  667. return false
  668. }
  669. })
  670. })
  671. .catch(() => {
  672. return false
  673. })
  674. }
  675. },
  676. handleClose() {
  677. this.accessoryTFs = false
  678. },
  679. getList() {
  680. seeCat({ id: this.$route.query.id })
  681. .toPromise()
  682. .then((response) => {
  683. if (response.tranCarInfoList.length > 0) {
  684. this.index = response.tranCarInfoList.length
  685. for (var i = 0; i < response.tranCarInfoList.length; i++) {
  686. if (response.tranCarInfoList[i].id) {
  687. response.tranCarInfoList[i].disabled = true
  688. }
  689. }
  690. }
  691. this.deptBudgetList = response
  692. if (this.deptBudgetList.tranCarInfoList.length == 0) {
  693. this.deptBudgetList.tranCarInfoList = [
  694. {
  695. driverName: '',
  696. driverPhone: '',
  697. carLength: 0,
  698. carLengthKey: '',
  699. loadWeight: null,
  700. carModel: '',
  701. carModelKey: '',
  702. carNumber: '',
  703. disabled: false,
  704. tranType: '1',
  705. tranCarNo: 'C001',
  706. tranPrice:this.deptBudgetList.tranPrice
  707. },
  708. ]
  709. }
  710. })
  711. nameXiala({ compId: this.compId })
  712. .toPromise()
  713. .then((response) => {
  714. this.carList = response
  715. })
  716. },
  717. carchange(val, index) {
  718. for (var i = 0; i < this.carList.length; i++) {
  719. if (this.carList[i].driverName == val) {
  720. this.deptBudgetList.tranCarInfoList[index].driverPhone =
  721. this.carList[i].driverPhone
  722. arrange({ id: this.carList[i].id })
  723. .toPromise()
  724. .then((response) => {
  725. console.log(this, response)
  726. this.deptBudgetList.tranCarInfoList[index].carNo =
  727. response.carNumber
  728. if (response.carLoad != null) {
  729. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  730. response.carLoad
  731. } else {
  732. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  733. }
  734. this.deptBudgetList.tranCarInfoList[index].carModel =
  735. response.carModel
  736. this.deptBudgetList.tranCarInfoList[index].carLength =
  737. response.carLength
  738. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  739. response.carLengthKey
  740. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  741. response.carModelKey
  742. })
  743. }
  744. }
  745. },
  746. phonechange(val, index) {
  747. for (var i = 0; i < this.carList.length; i++) {
  748. if (this.carList[i].driverPhone == val) {
  749. this.deptBudgetList.tranCarInfoList[index].driver =
  750. this.carList[i].driverName
  751. arrange({ id: this.carList[i].id })
  752. .toPromise()
  753. .then((response) => {
  754. console.log(this, response)
  755. this.deptBudgetList.tranCarInfoList[index].carNo =
  756. response.carNumber
  757. if (response.carLoad != null) {
  758. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  759. response.carLoad
  760. } else {
  761. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  762. }
  763. this.deptBudgetList.tranCarInfoList[index].carModel =
  764. response.carModel
  765. this.deptBudgetList.tranCarInfoList[index].carLength =
  766. response.carLength
  767. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  768. response.carLengthKey
  769. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  770. response.carModelKey
  771. })
  772. }
  773. }
  774. },
  775. },
  776. }
  777. </script>
  778. <style lang="scss" scoped>
  779. /deep/.basicInformation {
  780. // height: 87vh;
  781. // overflow: scroll;
  782. .ws-info-table {
  783. border: none;
  784. }
  785. .myTest{
  786. width: 800px;
  787. display: flex;
  788. height: 40px;
  789. }
  790. .el-form-item {
  791. width: 33.3333%;
  792. border: none;
  793. height: 50px;
  794. .el-form-item__label {
  795. background: transparent;
  796. border: none;
  797. }
  798. .el-form-item__content {
  799. border: none;
  800. }
  801. }
  802. }
  803. .title {
  804. position: relative;
  805. padding-left: 10px;
  806. }
  807. .title::before {
  808. content: '';
  809. display: inline-block;
  810. width: 5px;
  811. height: 30px;
  812. background: #5473e8;
  813. position: absolute;
  814. left: 0;
  815. }
  816. .el-form {
  817. padding: 0 10%;
  818. }
  819. .el-button--primary {
  820. background-color: #5878e8;
  821. border-color: #5878e8;
  822. }
  823. .el-col {
  824. background: #f6f7fc;
  825. }
  826. .bg-right {
  827. text-align: right;
  828. padding: 16px 20px;
  829. }
  830. .center {
  831. width: 90%;
  832. margin: 0 auto;
  833. }
  834. //表格文字
  835. /deep/.ws-info-table .el-form-item .el-form-item__label {
  836. text-align: center;
  837. font-size: 14px;
  838. font-weight: 400;
  839. color: #8890b1;
  840. line-height: 16px;
  841. }
  842. //蓝标
  843. .small-title {
  844. position: relative;
  845. padding: 10px;
  846. font-weight: 600;
  847. }
  848. .small-title::before {
  849. position: absolute;
  850. content: '';
  851. display: block;
  852. background: #5473e8;
  853. width: 4px;
  854. height: 14px;
  855. left: 0px;
  856. top: 13px;
  857. padding: 4px 2px;
  858. }
  859. .position {
  860. position: relative;
  861. }
  862. .position .zaizhong {
  863. width: 16%;
  864. }
  865. //减号
  866. .del {
  867. position: absolute;
  868. // right: -38px;
  869. top: 9px;
  870. cursor: pointer;
  871. right: 0;
  872. display: inline-block;
  873. font-size: 20px;
  874. width: 20px;
  875. height: 10px;
  876. line-height: 0px;
  877. }
  878. .driver .el-form-item {
  879. width: 16.63%;
  880. }
  881. /deep/.ws-info-table .el-form-item .el-form-item__content {
  882. background: #f5f7fa;
  883. border-radius: 4px;
  884. color: #8890b1;
  885. font-size: 14px;
  886. padding: 0 25px;
  887. }
  888. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  889. width: 72px;
  890. }
  891. /deep/.liaison .ws-info-table .el-form-item {
  892. width: 16.66%;
  893. color: #8890b1;
  894. font-size: 14px;
  895. }
  896. /deep/.ws-info-table .el-form-item {
  897. border: none;
  898. height: 50px;
  899. }
  900. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  901. width: 50%;
  902. border: 0px solid #d8dce6;
  903. background: #f5f7fa;
  904. text-align: center;
  905. }
  906. /deep/.liaison {
  907. background: #f5f7fa;
  908. border-radius: 4px;
  909. border: 0px solid #d8dce6;
  910. }
  911. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  912. border: none;
  913. background: #f5f7fa;
  914. padding: 0px;
  915. }
  916. .catNos {
  917. width: 100%;
  918. height: 30px;
  919. margin-top: 10px;
  920. margin-left: 20px;
  921. font-size: 14px;
  922. }
  923. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  924. // border: 0px solid #d8dce6;
  925. border-radius: 0px;
  926. border-left: none;
  927. border-bottom: none;
  928. border-top: none;
  929. }
  930. /deep/.liaison .ws-info-table {
  931. background: #f6f7fc;
  932. border-radius: 4px;
  933. border: 1px solid #d8dce6;
  934. margin-top: 20px;
  935. }
  936. //送达/未送达
  937. .noservice,
  938. .service {
  939. display: inline-block;
  940. border-radius: 4px;
  941. border: 1px solid #d8dce6;
  942. padding: 2px;
  943. font-size: 12px;
  944. }
  945. .noservice {
  946. background: #c4cada;
  947. color: #ffffff;
  948. }
  949. .service {
  950. background: #e5f1f7;
  951. color: #50cad4;
  952. }
  953. .serviced {
  954. display: inline-block;
  955. border-radius: 4px;
  956. border: 1px solid #d8dce6;
  957. padding: 2px;
  958. font-size: 12px;
  959. background: #e5f1f7;
  960. color: #2c81cf;
  961. }
  962. //添加司机
  963. .add {
  964. width: 100px;
  965. height: 34px;
  966. background: #f6f7fb;
  967. border-radius: 17px;
  968. color: #5473e8;
  969. font-size: 14px;
  970. border: none;
  971. }
  972. .add img {
  973. display: inline-block;
  974. margin-top: 3px;
  975. margin-left: -12px;
  976. }
  977. .add .spans {
  978. display: table-caption;
  979. width: 56px;
  980. height: 20px;
  981. line-height: 18px;
  982. }
  983. </style>