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