tranManagementVehicleDispatching.vue 31 KB

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