tranManagementVehicleDispatching.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989
  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. inputValue:this.deptBudgetList.tranPriceIng
  571. }).then(({ value }) => {
  572. var tranProcessInfo = {}
  573. tranProcessInfo.reviewer = sessionStorage.getItem('ws-pf_roleName') +
  574. sessionStorage.getItem('ws-pf_staffName')
  575. tranProcessInfo.id = this.deptBudgetList.id
  576. tranProcessInfo.flag = "2"
  577. tranProcessInfo.tranPriceIng = value
  578. tranProcessInfo.tranTypeKey=1
  579. setUpTranPrice(tranProcessInfo)
  580. .toPromise()
  581. .then((response) => {
  582. this.$message.success('审核成功')
  583. this.getList()
  584. });
  585. }).catch(() => {
  586. this.$message.warning(
  587. '取消审核'
  588. );
  589. });
  590. },
  591. priceSubmit(){
  592. this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
  593. cancelButtonText: '取消',
  594. confirmButtonText: '确定',
  595. type: 'warning',
  596. })
  597. .then(() => {
  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.tranPriceIng==0){
  689. this.deptBudgetList.tranPriceIng=''
  690. }
  691. if (this.deptBudgetList.tranCarInfoList.length == 0) {
  692. this.deptBudgetList.tranCarInfoList = [
  693. {
  694. driverName: '',
  695. driverPhone: '',
  696. carLength: 0,
  697. carLengthKey: '',
  698. loadWeight: null,
  699. carModel: '',
  700. carModelKey: '',
  701. carNumber: '',
  702. disabled: false,
  703. tranType: '1',
  704. tranCarNo: 'C001',
  705. tranPrice:this.deptBudgetList.tranPrice
  706. },
  707. ]
  708. }
  709. })
  710. nameXiala({ compId: this.compId })
  711. .toPromise()
  712. .then((response) => {
  713. this.carList = response
  714. })
  715. },
  716. carchange(val, index) {
  717. for (var i = 0; i < this.carList.length; i++) {
  718. if (this.carList[i].driverName == val) {
  719. this.deptBudgetList.tranCarInfoList[index].driverPhone =
  720. this.carList[i].driverPhone
  721. arrange({ id: this.carList[i].id })
  722. .toPromise()
  723. .then((response) => {
  724. console.log(this, response)
  725. this.deptBudgetList.tranCarInfoList[index].carNo =
  726. response.carNumber
  727. if (response.carLoad != null) {
  728. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  729. response.carLoad
  730. } else {
  731. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  732. }
  733. this.deptBudgetList.tranCarInfoList[index].carModel =
  734. response.carModel
  735. this.deptBudgetList.tranCarInfoList[index].carLength =
  736. response.carLength
  737. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  738. response.carLengthKey
  739. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  740. response.carModelKey
  741. })
  742. }
  743. }
  744. },
  745. phonechange(val, index) {
  746. for (var i = 0; i < this.carList.length; i++) {
  747. if (this.carList[i].driverPhone == val) {
  748. this.deptBudgetList.tranCarInfoList[index].driver =
  749. this.carList[i].driverName
  750. arrange({ id: this.carList[i].id })
  751. .toPromise()
  752. .then((response) => {
  753. console.log(this, response)
  754. this.deptBudgetList.tranCarInfoList[index].carNo =
  755. response.carNumber
  756. if (response.carLoad != null) {
  757. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  758. response.carLoad
  759. } else {
  760. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  761. }
  762. this.deptBudgetList.tranCarInfoList[index].carModel =
  763. response.carModel
  764. this.deptBudgetList.tranCarInfoList[index].carLength =
  765. response.carLength
  766. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  767. response.carLengthKey
  768. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  769. response.carModelKey
  770. })
  771. }
  772. }
  773. },
  774. },
  775. }
  776. </script>
  777. <style lang="scss" scoped>
  778. /deep/.basicInformation {
  779. // height: 87vh;
  780. // overflow: scroll;
  781. .ws-info-table {
  782. border: none;
  783. }
  784. .myTest{
  785. width: 800px;
  786. display: flex;
  787. height: 40px;
  788. }
  789. .el-form-item {
  790. width: 33.3333%;
  791. border: none;
  792. height: 50px;
  793. .el-form-item__label {
  794. background: transparent;
  795. border: none;
  796. }
  797. .el-form-item__content {
  798. border: none;
  799. }
  800. }
  801. }
  802. .title {
  803. position: relative;
  804. padding-left: 10px;
  805. }
  806. .title::before {
  807. content: '';
  808. display: inline-block;
  809. width: 5px;
  810. height: 30px;
  811. background: #5473e8;
  812. position: absolute;
  813. left: 0;
  814. }
  815. .el-form {
  816. padding: 0 10%;
  817. }
  818. .el-button--primary {
  819. background-color: #5878e8;
  820. border-color: #5878e8;
  821. }
  822. .el-col {
  823. background: #f6f7fc;
  824. }
  825. .bg-right {
  826. text-align: right;
  827. padding: 16px 20px;
  828. }
  829. .center {
  830. width: 90%;
  831. margin: 0 auto;
  832. }
  833. //表格文字
  834. /deep/.ws-info-table .el-form-item .el-form-item__label {
  835. text-align: center;
  836. font-size: 14px;
  837. font-weight: 400;
  838. color: #8890b1;
  839. line-height: 16px;
  840. }
  841. //蓝标
  842. .small-title {
  843. position: relative;
  844. padding: 10px;
  845. font-weight: 600;
  846. }
  847. .small-title::before {
  848. position: absolute;
  849. content: '';
  850. display: block;
  851. background: #5473e8;
  852. width: 4px;
  853. height: 14px;
  854. left: 0px;
  855. top: 13px;
  856. padding: 4px 2px;
  857. }
  858. .position {
  859. position: relative;
  860. }
  861. .position .zaizhong {
  862. width: 16%;
  863. }
  864. //减号
  865. .del {
  866. position: absolute;
  867. // right: -38px;
  868. top: 9px;
  869. cursor: pointer;
  870. right: 0;
  871. display: inline-block;
  872. font-size: 20px;
  873. width: 20px;
  874. height: 10px;
  875. line-height: 0px;
  876. }
  877. .driver .el-form-item {
  878. width: 16.63%;
  879. }
  880. /deep/.ws-info-table .el-form-item .el-form-item__content {
  881. background: #f5f7fa;
  882. border-radius: 4px;
  883. color: #8890b1;
  884. font-size: 14px;
  885. padding: 0 25px;
  886. }
  887. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  888. width: 72px;
  889. }
  890. /deep/.liaison .ws-info-table .el-form-item {
  891. width: 220px;
  892. color: #8890b1;
  893. font-size: 14px;
  894. }
  895. /deep/.ws-info-table .el-form-item {
  896. border: none;
  897. height: 50px;
  898. }
  899. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  900. width: 50%;
  901. border: 0px solid #d8dce6;
  902. background: #f5f7fa;
  903. text-align: center;
  904. }
  905. /deep/.liaison {
  906. background: #f5f7fa;
  907. border-radius: 4px;
  908. border: 0px solid #d8dce6;
  909. }
  910. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  911. border: none;
  912. background: #f5f7fa;
  913. padding: 0px;
  914. }
  915. .catNos {
  916. width: 100%;
  917. height: 30px;
  918. margin-top: 10px;
  919. margin-left: 20px;
  920. font-size: 14px;
  921. }
  922. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  923. // border: 0px solid #d8dce6;
  924. border-radius: 0px;
  925. border-left: none;
  926. border-bottom: none;
  927. border-top: none;
  928. }
  929. /deep/.liaison .ws-info-table {
  930. background: #f6f7fc;
  931. border-radius: 4px;
  932. border: 1px solid #d8dce6;
  933. margin-top: 20px;
  934. }
  935. //送达/未送达
  936. .noservice,
  937. .service {
  938. display: inline-block;
  939. border-radius: 4px;
  940. border: 1px solid #d8dce6;
  941. padding: 2px;
  942. font-size: 12px;
  943. }
  944. .noservice {
  945. background: #c4cada;
  946. color: #ffffff;
  947. }
  948. .service {
  949. background: #e5f1f7;
  950. color: #50cad4;
  951. }
  952. .serviced {
  953. display: inline-block;
  954. border-radius: 4px;
  955. border: 1px solid #d8dce6;
  956. padding: 2px;
  957. font-size: 12px;
  958. background: #e5f1f7;
  959. color: #2c81cf;
  960. }
  961. //添加司机
  962. .add {
  963. width: 100px;
  964. height: 34px;
  965. background: #f6f7fb;
  966. border-radius: 17px;
  967. color: #5473e8;
  968. font-size: 14px;
  969. border: none;
  970. }
  971. .add img {
  972. display: inline-block;
  973. margin-top: 3px;
  974. margin-left: -12px;
  975. }
  976. .add .spans {
  977. display: table-caption;
  978. width: 56px;
  979. height: 20px;
  980. line-height: 18px;
  981. }
  982. </style>