tranManagementVehicleDispatching.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  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. for(let i = index;i<this.deptBudgetList.tranCarInfoList.length;i++){
  492. let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1])-1
  493. if(number < 10){
  494. this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C00" + number
  495. }else if(number < 100){
  496. this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C0" + number
  497. }else{
  498. this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C" + number
  499. }
  500. }
  501. }
  502. }else{
  503. this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
  504. confirmButtonText: '确定',
  505. cancelButtonText: '取消',
  506. type: 'warning',
  507. }).then(() => {
  508. delhaulagestage({ id: row.id })
  509. .toPromise()
  510. .then((response) => {
  511. this.$message.success('删除成功')
  512. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  513. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  514. }
  515. this.getList()
  516. })
  517. })
  518. }
  519. },
  520. add() {
  521. if(!this.deptBudgetList.tranPrice){
  522. this.$message({
  523. message: '请设置运输单价!',
  524. type: 'warning',
  525. })
  526. }
  527. else{
  528. var tmp1='C00'
  529. this.deptBudgetList.count++
  530. if(this.deptBudgetList.tranCarInfoList.length<10){
  531. this.deptBudgetList.tranCarInfoList.push({
  532. driverName: '',
  533. driverPhone: '',
  534. carLength: 0,
  535. carLengthKey: '',
  536. loadWeight: null,
  537. carModel: '',
  538. carModelKey: '',
  539. carNumber: '',
  540. disabled: false,
  541. tranType: '1',
  542. // tranCarNo: tmp1+(this.deptBudgetList.count),
  543. tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
  544. tranPrice:this.deptBudgetList.tranPrice
  545. })
  546. }
  547. else if(this.deptBudgetList.tranCarInfoList.length<100&&this.deptBudgetList.tranCarInfoList.length>=10){
  548. tmp1='C0'
  549. this.deptBudgetList.count++
  550. this.deptBudgetList.tranCarInfoList.push({
  551. driverName: '',
  552. driverPhone: '',
  553. carLength: 0,
  554. carLengthKey: '',
  555. loadWeight: null,
  556. carModel: '',
  557. carModelKey: '',
  558. carNumber: '',
  559. disabled: false,
  560. tranType: '1',
  561. // tranCarNo: tmp1+(this.deptBudgetList.count),
  562. tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
  563. tranPrice:this.deptBudgetList.tranPrice
  564. })
  565. }
  566. else if(this.deptBudgetList.tranCarInfoList.length<1000&&this.deptBudgetList.tranCarInfoList.length>=100){
  567. tmp1='C'
  568. this.deptBudgetList.count++
  569. this.deptBudgetList.tranCarInfoList.push({
  570. driverName: '',
  571. driverPhone: '',
  572. carLength: 0,
  573. carLengthKey: '',
  574. loadWeight: null,
  575. carModel: '',
  576. carModelKey: '',
  577. carNumber: '',
  578. disabled: false,
  579. tranType: '1',
  580. // tranCarNo: tmp1+(this.deptBudgetList.count),
  581. tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
  582. tranPrice:this.deptBudgetList.tranPrice
  583. })
  584. }
  585. }
  586. },
  587. //审核
  588. examine(){
  589. this.$prompt('运输单价审核', {
  590. cancelButtonText: '取消',
  591. confirmButtonText: '确定',
  592. }).then(({ value }) => {
  593. var tranProcessInfo = {}
  594. tranProcessInfo.reviewer = sessionStorage.getItem('ws-pf_roleName') +
  595. sessionStorage.getItem('ws-pf_staffName')
  596. tranProcessInfo.id = this.deptBudgetList.id
  597. tranProcessInfo.flag = "2"
  598. tranProcessInfo.tranPriceIng = value
  599. tranProcessInfo.tranTypeKey=1
  600. setUpTranPrice(tranProcessInfo)
  601. .toPromise()
  602. .then((response) => {
  603. this.$message.success('审核成功')
  604. this.getList()
  605. });
  606. }).catch(() => {
  607. this.$message.warning(
  608. '取消审核'
  609. );
  610. });
  611. },
  612. priceSubmit(){
  613. this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
  614. cancelButtonText: '取消',
  615. confirmButtonText: '确定',
  616. type: 'warning',
  617. })
  618. .then(() => {
  619. var tranProcessInfo = {}
  620. tranProcessInfo.id = this.deptBudgetList.id
  621. tranProcessInfo.flag = "1"
  622. tranProcessInfo.tranTypeKey = 1
  623. tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
  624. setUpTranPrice(tranProcessInfo)
  625. .toPromise()
  626. .then((response) => {
  627. this.$message.success('提交成功')
  628. this.getList()
  629. })
  630. })
  631. .catch(() => {
  632. return false
  633. })
  634. },
  635. //提交按钮
  636. submit() {
  637. if(!this.deptBudgetList.tranPrice){
  638. this.$message({
  639. message: '请设置运输单价!',
  640. type: 'warning',
  641. })
  642. }
  643. else{
  644. for (var i = this.index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  645. if (!this.deptBudgetList.tranCarInfoList[i].driver) {
  646. this.$message({
  647. message: '姓名不能为空!',
  648. type: 'warning',
  649. })
  650. return
  651. }
  652. for(var j = 0 ; j < this.carList.length ; j++){
  653. if (this.carList[j].driverName == this.deptBudgetList.tranCarInfoList[i].driver && this.carList[j].disableStatusFlag == 1) {
  654. this.$message({
  655. message: this.deptBudgetList.tranCarInfoList[i].driver+'该司机已被禁用!',
  656. type: 'warning',
  657. })
  658. return
  659. }
  660. }
  661. }
  662. this.$confirm(`提交成功后,任务将下发给司机,是否确定提交?`, {
  663. cancelButtonText: '取消',
  664. confirmButtonText: '确定',
  665. type: 'warning',
  666. })
  667. .then(() => {
  668. this.$refs.deptBudgetList.validate((valid) => {
  669. if (valid) {
  670. var tranCarInfo = {}
  671. tranCarInfo.id = this.deptBudgetList.id
  672. tranCarInfo.infoId = this.deptBudgetList.infoId
  673. tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
  674. dispatchCat(tranCarInfo)
  675. .toPromise()
  676. .then((response) => {
  677. this.$message.success('提交成功')
  678. this.$router.go(-1)
  679. })
  680. } else {
  681. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  682. return false
  683. }
  684. })
  685. })
  686. .catch(() => {
  687. return false
  688. })
  689. }
  690. },
  691. handleClose() {
  692. this.accessoryTFs = false
  693. },
  694. getList() {
  695. seeCat({ id: this.$route.query.id })
  696. .toPromise()
  697. .then((response) => {
  698. if (response.tranCarInfoList.length > 0) {
  699. this.index = response.tranCarInfoList.length
  700. for (var i = 0; i < response.tranCarInfoList.length; i++) {
  701. if (response.tranCarInfoList[i].id) {
  702. response.tranCarInfoList[i].disabled = true
  703. }
  704. }
  705. }
  706. this.deptBudgetList = response
  707. if (this.deptBudgetList.tranCarInfoList.length == 0) {
  708. this.deptBudgetList.tranCarInfoList = [
  709. {
  710. driverName: '',
  711. driverPhone: '',
  712. carLength: 0,
  713. carLengthKey: '',
  714. loadWeight: null,
  715. carModel: '',
  716. carModelKey: '',
  717. carNumber: '',
  718. disabled: false,
  719. tranType: '1',
  720. tranCarNo: 'C001',
  721. tranPrice:this.deptBudgetList.tranPrice
  722. },
  723. ]
  724. }
  725. })
  726. nameXiala({ compId: this.compId })
  727. .toPromise()
  728. .then((response) => {
  729. this.carList = response
  730. })
  731. },
  732. carchange(val, index) {
  733. for (var i = 0; i < this.carList.length; i++) {
  734. if (this.carList[i].driverName == val) {
  735. this.deptBudgetList.tranCarInfoList[index].driverPhone =
  736. this.carList[i].driverPhone
  737. arrange({ id: this.carList[i].id })
  738. .toPromise()
  739. .then((response) => {
  740. console.log(this, response)
  741. this.deptBudgetList.tranCarInfoList[index].carNo =
  742. response.carNumber
  743. if (response.carLoad != null) {
  744. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  745. response.carLoad
  746. } else {
  747. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  748. }
  749. this.deptBudgetList.tranCarInfoList[index].carModel =
  750. response.carModel
  751. this.deptBudgetList.tranCarInfoList[index].carLength =
  752. response.carLength
  753. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  754. response.carLengthKey
  755. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  756. response.carModelKey
  757. })
  758. }
  759. }
  760. },
  761. phonechange(val, index) {
  762. for (var i = 0; i < this.carList.length; i++) {
  763. if (this.carList[i].driverPhone == val) {
  764. this.deptBudgetList.tranCarInfoList[index].driver =
  765. this.carList[i].driverName
  766. arrange({ id: this.carList[i].id })
  767. .toPromise()
  768. .then((response) => {
  769. console.log(this, response)
  770. this.deptBudgetList.tranCarInfoList[index].carNo =
  771. response.carNumber
  772. if (response.carLoad != null) {
  773. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  774. response.carLoad
  775. } else {
  776. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  777. }
  778. this.deptBudgetList.tranCarInfoList[index].carModel =
  779. response.carModel
  780. this.deptBudgetList.tranCarInfoList[index].carLength =
  781. response.carLength
  782. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  783. response.carLengthKey
  784. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  785. response.carModelKey
  786. })
  787. }
  788. }
  789. },
  790. },
  791. }
  792. </script>
  793. <style lang="scss" scoped>
  794. /deep/.basicInformation {
  795. // height: 87vh;
  796. // overflow: scroll;
  797. .ws-info-table {
  798. border: none;
  799. }
  800. .myTest{
  801. width: 800px;
  802. display: flex;
  803. height: 40px;
  804. }
  805. .el-form-item {
  806. width: 33.3333%;
  807. border: none;
  808. height: 50px;
  809. .el-form-item__label {
  810. background: transparent;
  811. border: none;
  812. }
  813. .el-form-item__content {
  814. border: none;
  815. }
  816. }
  817. }
  818. .title {
  819. position: relative;
  820. padding-left: 10px;
  821. }
  822. .title::before {
  823. content: '';
  824. display: inline-block;
  825. width: 5px;
  826. height: 30px;
  827. background: #5473e8;
  828. position: absolute;
  829. left: 0;
  830. }
  831. .el-form {
  832. padding: 0 10%;
  833. }
  834. .el-button--primary {
  835. background-color: #5878e8;
  836. border-color: #5878e8;
  837. }
  838. .el-col {
  839. background: #f6f7fc;
  840. }
  841. .bg-right {
  842. text-align: right;
  843. padding: 16px 20px;
  844. }
  845. .center {
  846. width: 90%;
  847. margin: 0 auto;
  848. }
  849. //表格文字
  850. /deep/.ws-info-table .el-form-item .el-form-item__label {
  851. text-align: center;
  852. font-size: 14px;
  853. font-weight: 400;
  854. color: #8890b1;
  855. line-height: 16px;
  856. }
  857. //蓝标
  858. .small-title {
  859. position: relative;
  860. padding: 10px;
  861. font-weight: 600;
  862. }
  863. .small-title::before {
  864. position: absolute;
  865. content: '';
  866. display: block;
  867. background: #5473e8;
  868. width: 4px;
  869. height: 14px;
  870. left: 0px;
  871. top: 13px;
  872. padding: 4px 2px;
  873. }
  874. .position {
  875. position: relative;
  876. }
  877. .position .zaizhong {
  878. width: 16%;
  879. }
  880. //减号
  881. .del {
  882. position: absolute;
  883. // right: -38px;
  884. top: 9px;
  885. cursor: pointer;
  886. right: 0;
  887. display: inline-block;
  888. font-size: 20px;
  889. width: 20px;
  890. height: 10px;
  891. line-height: 0px;
  892. }
  893. .driver .el-form-item {
  894. width: 16.63%;
  895. }
  896. /deep/.ws-info-table .el-form-item .el-form-item__content {
  897. background: #f5f7fa;
  898. border-radius: 4px;
  899. color: #8890b1;
  900. font-size: 14px;
  901. padding: 0 25px;
  902. }
  903. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  904. width: 72px;
  905. }
  906. /deep/.liaison .ws-info-table .el-form-item {
  907. width: 220px;
  908. color: #8890b1;
  909. font-size: 14px;
  910. }
  911. /deep/.ws-info-table .el-form-item {
  912. border: none;
  913. height: 50px;
  914. }
  915. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  916. width: 50%;
  917. border: 0px solid #d8dce6;
  918. background: #f5f7fa;
  919. text-align: center;
  920. }
  921. /deep/.liaison {
  922. background: #f5f7fa;
  923. border-radius: 4px;
  924. border: 0px solid #d8dce6;
  925. }
  926. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  927. border: none;
  928. background: #f5f7fa;
  929. padding: 0px;
  930. }
  931. .catNos {
  932. width: 100%;
  933. height: 30px;
  934. margin-top: 10px;
  935. margin-left: 20px;
  936. font-size: 14px;
  937. }
  938. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  939. // border: 0px solid #d8dce6;
  940. border-radius: 0px;
  941. border-left: none;
  942. border-bottom: none;
  943. border-top: none;
  944. }
  945. /deep/.liaison .ws-info-table {
  946. background: #f6f7fc;
  947. border-radius: 4px;
  948. border: 1px solid #d8dce6;
  949. margin-top: 20px;
  950. }
  951. //送达/未送达
  952. .noservice,
  953. .service {
  954. display: inline-block;
  955. border-radius: 4px;
  956. border: 1px solid #d8dce6;
  957. padding: 2px;
  958. font-size: 12px;
  959. }
  960. .noservice {
  961. background: #c4cada;
  962. color: #ffffff;
  963. }
  964. .service {
  965. background: #e5f1f7;
  966. color: #50cad4;
  967. }
  968. .serviced {
  969. display: inline-block;
  970. border-radius: 4px;
  971. border: 1px solid #d8dce6;
  972. padding: 2px;
  973. font-size: 12px;
  974. background: #e5f1f7;
  975. color: #2c81cf;
  976. }
  977. //添加司机
  978. .add {
  979. width: 100px;
  980. height: 34px;
  981. background: #f6f7fb;
  982. border-radius: 17px;
  983. color: #5473e8;
  984. font-size: 14px;
  985. border: none;
  986. }
  987. .add img {
  988. display: inline-block;
  989. margin-top: 3px;
  990. margin-left: -12px;
  991. }
  992. .add .spans {
  993. display: table-caption;
  994. width: 56px;
  995. height: 20px;
  996. line-height: 18px;
  997. }
  998. </style>