tranManagementVehicleDispatching.vue 31 KB

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