tranManagementVehicleDispatching.vue 29 KB

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