tranManagementVehicleDispatching.vue 28 KB

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