tranManagementVehicleDispatching.vue 30 KB

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