tranManagementTransporTrainDetails.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. //火运调度详情
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">火运调度详情</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="returnsales()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <ws-form
  25. class="position"
  26. ref="deptBudgetList"
  27. :rules="rules"
  28. :model="deptBudgetList"
  29. >
  30. <div class="small-title" style="font-size: 16px;">任务详情</div>
  31. <ws-info-table>
  32. <!--任务编号-->
  33. <ws-form-item label="任务编号" span="1" prop="processNo">
  34. {{ deptBudgetList.processNo }}
  35. </ws-form-item>
  36. <!--货名-->
  37. <ws-form-item label="货名" span="1" prop="goodsName">
  38. {{ deptBudgetList.goodsName }}
  39. </ws-form-item>
  40. <!--重量(吨)-->
  41. <ws-form-item label="重量(吨)" span="1" prop="weight">
  42. {{ deptBudgetList.weight }}
  43. </ws-form-item>
  44. <!--发货地址-->
  45. <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
  46. {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
  47. }}{{ deptBudgetList.sendArea }}
  48. </ws-form-item>
  49. <!--发货人-->
  50. <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
  51. {{ deptBudgetList.sender }}
  52. </ws-form-item>
  53. <!--发货人电话-->
  54. <ws-form-item
  55. label="发货人电话"
  56. span="1"
  57. prop="senderPhone"
  58. class="readonly"
  59. >
  60. {{ deptBudgetList.senderPhone }}
  61. </ws-form-item>
  62. <!--收货地址-->
  63. <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
  64. {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
  65. }}{{ deptBudgetList.receiveArea }}
  66. </ws-form-item>
  67. <!--收货人-->
  68. <ws-form-item label="收货人" span="1" prop="receiver">
  69. {{ deptBudgetList.receiver }}
  70. </ws-form-item>
  71. <!--收货人电话-->
  72. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
  73. {{ deptBudgetList.receiverPhone }}
  74. </ws-form-item>
  75. <!--发货日期-->
  76. <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
  77. {{ deptBudgetList.deliveryDateStart }}
  78. </ws-form-item>
  79. <!--最晚到货日期-->
  80. <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
  81. {{ deptBudgetList.deliveryDateEnd }}
  82. </ws-form-item>
  83. <!--合同编号-->
  84. <ws-form-item label="合同编号" span="1" prop="contractNo">
  85. {{ deptBudgetList.contractNo }}
  86. </ws-form-item>
  87. </ws-info-table>
  88. <div class="small-title" style="font-size: 16px;">联络员及车皮信息</div>
  89. <div class="liaison" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
  90. <ws-info-table>
  91. <!--姓名-->
  92. <ws-form-item label="姓名:" span="1" prop="driver">
  93. {{ item.driver }}
  94. </ws-form-item>
  95. <!--电话-->
  96. <ws-form-item label="电话:" span="1" prop="driverPhone">
  97. {{ item.driverPhone }}
  98. </ws-form-item>
  99. <!--发车日期-->
  100. <ws-form-item label="发车日期:" span="1" prop="sendDateStart">
  101. {{ item.sendDateStart }}
  102. </ws-form-item>
  103. <!--到站日期-->
  104. <ws-form-item label="到站日期:" span="1" prop="receiveDateEnd">
  105. {{ item.receiveDateEnd }}
  106. </ws-form-item>
  107. <!--车型-->
  108. <ws-form-item label="车型:" span="1" prop="carModel">
  109. {{item.carModel }}
  110. </ws-form-item>
  111. </ws-info-table>
  112. <ws-info-table>
  113. <div
  114. style="width: 100%"
  115. class="flex position"
  116. v-for="(items, index) in freightspace"
  117. :key="index"
  118. >
  119. <!--车厢号-->
  120. <ws-form-item
  121. :label="'车厢号-' + (index + 1)+':'"
  122. span="1"
  123. prop="trainNo"
  124. >
  125. {{ items.trainNo }}
  126. </ws-form-item>
  127. </div>
  128. </ws-info-table>
  129. </div>
  130. </ws-form>
  131. <!-- 提交 -->
  132. <div style="text-align: right; padding: 10px" class="center">
  133. <el-button
  134. class="bg-bottom"
  135. type="primary"
  136. size="small"
  137. @click="returnsales()"
  138. >关闭</el-button
  139. >
  140. </div>
  141. </div>
  142. </template>
  143. <script>
  144. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  145. import { seeCat, dispatchCat, packList } from '@/model/transport/index'
  146. import { getstaff } from '@/model/warehouse/index'
  147. import WsUpload from '@/components/WsUpload'
  148. import mapDrag from '@/components/mapdrag/mapdrag'
  149. export default {
  150. name: 'viewSpareMoney',
  151. components: {
  152. WsUpload,
  153. mapDrag,
  154. },
  155. watch: {
  156. vesselId(val) {
  157. this.getVesselData()
  158. },
  159. isShow(val) {
  160. this.showType = val
  161. },
  162. },
  163. data() {
  164. return {
  165. staffList: [],
  166. deptBudgetList: {
  167. totalStorage: 0,
  168. tranCarInfoList: [],
  169. },
  170. options_: regionData,
  171. heightData: '600px',
  172. zoom: 7,
  173. selectedOptions: [],
  174. center: [116.244694, 39.517344],
  175. window: '',
  176. radio: 1,
  177. personCharge: [],
  178. district: null,
  179. driverList: [],
  180. listDate: { country: '中国', level: 'country', city: '' },
  181. citylist: [],
  182. compId: sessionStorage.getItem('ws-pf_compId'),
  183. tranType: 2,
  184. rules: {
  185. warehouseName: [
  186. {
  187. required: true,
  188. message: '请输入仓库名称',
  189. trigger: 'blur',
  190. },
  191. {
  192. min: 2,
  193. max: 20,
  194. message: '仓库名长度不符合要求,请输入2-20字符之内',
  195. trigger: 'blur',
  196. },
  197. ],
  198. },
  199. appendixIdsAdd: '',
  200. size: 10,
  201. value1: '',
  202. unitList: [],
  203. freightspace: [
  204. // {
  205. // trainNo: '',
  206. // },
  207. ],
  208. name: '',
  209. list: [],
  210. staffList: [],
  211. options: [],
  212. carModel: [],
  213. tranCarInfoList: {},
  214. arr: [],
  215. }
  216. },
  217. mounted() {
  218. this.deptBudgetList.id = this.$route.query.id
  219. this.getList()
  220. },
  221. computed: {
  222. totalStorage: function () {
  223. var maxStorage = 0
  224. for (var i = 0; i < this.freightspace.length; i++) {
  225. maxStorage += Number(this.freightspace[i].maxStorage)
  226. }
  227. return maxStorage
  228. },
  229. },
  230. methods: {
  231. dataFilter(val) {
  232. this.deptBudgetList.personCharge = val
  233. if (val) {
  234. this.options = this.staffList.filter((item) => {
  235. if (
  236. !!~item.staffName.indexOf(val) ||
  237. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  238. ) {
  239. return true
  240. }
  241. })
  242. } else {
  243. this.options = this.staffList
  244. }
  245. },
  246. selectstaff(e) {
  247. for (var i = 0; i < this.staffList.length; i++) {
  248. if (this.staffList[i].staffName == e) {
  249. this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
  250. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  251. }
  252. }
  253. },
  254. marker: function (item) {
  255. this.deptBudgetList.warehousePositioning =
  256. item.lnglat.lat + ',' + item.lnglat.lng
  257. },
  258. selectedAddress(e) {
  259. this.deptBudgetList.warehousePositioning =
  260. e.center.lat + ',' + e.center.lng
  261. },
  262. confirmPositioncity() {
  263. this.listDate.level = 'city'
  264. this.listDate.country = this.name
  265. },
  266. // 关闭 dialog时 处理文件url 初始化upload组件
  267. handleClose() {
  268. this.dialogViewSpareMoney = false
  269. },
  270. //下拉司机姓名改变事件
  271. selectdriver() {},
  272. handleChange(value) {
  273. this.selectedOptions = value
  274. },
  275. returnsales() {
  276. this.deptBudgetList = {}
  277. this.freightspace = {}
  278. this.selectedOptions = ''
  279. this.$router.push({ path: 'tranManagementTransporTationFire' })
  280. },
  281. // confirmPosition() {
  282. // this.draggable = false
  283. // },
  284. // 上传附件
  285. uploadSuccess(data, files, url) {
  286. console.log(data, files, url)
  287. },
  288. resetForm(deptBudgetList) {
  289. this.$refs[deptBudgetList].resetFields()
  290. },
  291. getList() {
  292. seeCat({ id: this.deptBudgetList.id })
  293. .toPromise()
  294. .then((response) => {
  295. this.deptBudgetList = response
  296. this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
  297. if (response.tranCarInfoList[0].boxNo) {
  298. this.list = response.tranCarInfoList[0].boxNo.split(',')
  299. for (var i = 0; i < this.list.length; i++) {
  300. var num = this.list[i]
  301. this.freightspace.push({
  302. trainNo: num,
  303. })
  304. }
  305. }
  306. })
  307. },
  308. handleExamine() {},
  309. approve() {},
  310. // returnsales() {
  311. // this.$router.push({ path: 'purchaseContract' })
  312. // },
  313. selectChapterTwo(e) {
  314. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  315. if (this.ChapterTwoList[i].constValue == e) {
  316. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  317. }
  318. }
  319. },
  320. selectunitList(e) {
  321. for (var i = 0; i < this.unitList.length; i++) {
  322. if (this.unitList[i].constValue == e) {
  323. this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
  324. }
  325. }
  326. },
  327. selectgrade(e) {
  328. for (var i = 0; i < this.gradeList.length; i++) {
  329. if (this.gradeList[i].constValue == e) {
  330. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  331. }
  332. }
  333. },
  334. selectgoodsName(e) {
  335. for (var i = 0; i < this.goodnameList.length; i++) {
  336. if (this.goodnameList[i].constValue == e) {
  337. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  338. }
  339. }
  340. },
  341. selectpackingMethod(e) {
  342. for (var i = 0; i < this.packtypeList.length; i++) {
  343. if (this.packtypeList[i].constValue == e) {
  344. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  345. }
  346. }
  347. },
  348. // 编辑
  349. editClick(item, index) {
  350. const map = JSON.parse(JSON.stringify(item))
  351. if (Object.is(item.id, 1)) {
  352. return
  353. }
  354. if (Object.is(this.unitList[index].flag, 'delete')) {
  355. map.flag = 'check'
  356. this.$set(this.unitList, index, map)
  357. } else {
  358. map.flag = 'delete'
  359. this.$set(this.unitList, index, map)
  360. }
  361. },
  362. // 删除
  363. deleteClick(item, index) {
  364. if (Object.is(item.constKey, 1)) {
  365. return
  366. }
  367. if (!item.constValue) {
  368. this.unitList.splice(index, 1)
  369. return
  370. }
  371. delxiala({ id: this.unitList[index].id })
  372. .toPromise()
  373. .then((response) => {
  374. this.getUnitList()
  375. this.pleaseChoose = ''
  376. })
  377. },
  378. },
  379. }
  380. </script>
  381. <style lang="scss" scoped>
  382. /deep/.totalStorage .el-input__inner {
  383. color: #afb5cb;
  384. background: #f5f7fa;
  385. }
  386. .small-title {
  387. position: relative;
  388. padding: 10px;
  389. font-weight: 600;
  390. }
  391. .small-title::before {
  392. position: absolute;
  393. content: '';
  394. display: block;
  395. background: #5473e8;
  396. width: 4px;
  397. height: 14px;
  398. left: 0px;
  399. top: 13px;
  400. }
  401. .position {
  402. position: relative;
  403. }
  404. .del {
  405. position: absolute;
  406. right: -38px;
  407. top: 9px;
  408. cursor: pointer;
  409. }
  410. .del {
  411. right: 0;
  412. }
  413. .amap-page-container {
  414. width: 300px;
  415. height: 300px;
  416. }
  417. .el-form {
  418. padding: 0 15%;
  419. }
  420. /deep/.ws-info-table .el-form-item {
  421. border-right: 1px solid transparent;
  422. border-bottom: 1px solid transparent;
  423. }
  424. .readonly {
  425. position: relative;
  426. }
  427. .readonly:after {
  428. content: '*';
  429. color: #ff2727;
  430. position: absolute;
  431. right: 8px;
  432. z-index: 10;
  433. top: 21%;
  434. font-size: 20px;
  435. }
  436. .title {
  437. position: relative;
  438. }
  439. .title::before {
  440. content: '';
  441. display: inline-block;
  442. width: 5px;
  443. height: 30px;
  444. background: #5473e8;
  445. position: absolute;
  446. left: 0;
  447. }
  448. .el-button--primary {
  449. background-color: #5878e8;
  450. border-color: #5878e8;
  451. }
  452. .el-col {
  453. background: #f6f7fc;
  454. }
  455. /deep/.ws-info-table .el-form-item .el-form-item__content {
  456. padding: 0 25px;
  457. border-left: 1px solid transparent;
  458. background: #fff;
  459. }
  460. /deep/.ws-info-table .el-form-item .el-form-item__label {
  461. width: 100px;
  462. text-align: center;
  463. background: #fff;
  464. // border: 1px solid #cdd2dc;
  465. }
  466. .button-container {
  467. display: flex;
  468. flex-wrap: nowrap;
  469. justify-content: space-between;
  470. align-items: center;
  471. background-color: #fff;
  472. width: 100%;
  473. height: 50px;
  474. padding: 0 10px;
  475. & > div {
  476. margin-left: 10px;
  477. display: flex;
  478. flex-wrap: nowrap;
  479. flex-direction: row;
  480. & > span {
  481. line-height: 50px;
  482. }
  483. }
  484. /deep/.auditFlow-box {
  485. position: unset;
  486. margin-left: 10px;
  487. &/deep/.auditFlow-icon {
  488. width: auto;
  489. padding-right: 30px;
  490. }
  491. &/deep/.auditFlow-main {
  492. position: absolute;
  493. }
  494. }
  495. }
  496. .box-app {
  497. display: inline-block;
  498. float: left;
  499. margin-left: 30px;
  500. line-height: 50px;
  501. }
  502. /deep/.el-dialog {
  503. .el-form-item {
  504. margin-bottom: 0 !important;
  505. .el-input--medium {
  506. textarea {
  507. min-height: 100px !important;
  508. }
  509. }
  510. }
  511. }
  512. .collapse-bottom {
  513. margin-bottom: 20px;
  514. }
  515. .input-main .textarea .el-textarea__inner {
  516. width: 100%;
  517. z-index: 1;
  518. }
  519. .bg-left {
  520. padding-left: 30px;
  521. }
  522. .bg-right {
  523. padding-right: 10px;
  524. text-align: right;
  525. }
  526. .bg-bottom {
  527. margin: 15px 0px;
  528. }
  529. .wenzi {
  530. width: 900px;
  531. margin: 0 auto;
  532. }
  533. .wenzi h3 {
  534. display: inline-block;
  535. left: 10px;
  536. }
  537. .wenzi p {
  538. display: inline-block;
  539. }
  540. .center {
  541. width: 900px;
  542. margin: 0 auto;
  543. }
  544. .el-form-item {
  545. width: 50%;
  546. }
  547. .el-form-item__label {
  548. text-align: center;
  549. }
  550. .ce {
  551. width: 900px;
  552. margin: 0 auto;
  553. }
  554. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  555. /* height: 82px;*/
  556. /*}*/
  557. // 控制select为只读的时候显示样式
  558. .hide-sel {
  559. .el-input__inner {
  560. border: 0px;
  561. }
  562. .el-icon-arrow-up {
  563. display: none;
  564. }
  565. .el-textarea__inner {
  566. background-color: #fff !important;
  567. border: 0;
  568. }
  569. .el-date-editor {
  570. i {
  571. display: none;
  572. }
  573. }
  574. .is-disabled {
  575. .el-input__inner:hover {
  576. background-color: #fff !important;
  577. border: 0;
  578. }
  579. color: #606266;
  580. .el-input__inner {
  581. background-color: #fff !important;
  582. border: 0;
  583. color: #606266;
  584. }
  585. .el-textarea__inner {
  586. background-color: #fff !important;
  587. border: 0;
  588. color: #606266;
  589. }
  590. }
  591. }
  592. // 控制select为只读的时候显示样式
  593. /deep/.ws-class-table-col {
  594. height: auto;
  595. padding: 0px 2px;
  596. /deep/.el-input__inner {
  597. padding: 0px 2px;
  598. }
  599. }
  600. /deep/.is-disabled {
  601. .el-input__prefix,
  602. .el-input__suffix {
  603. display: none;
  604. }
  605. .el-input__inner {
  606. background-color: #fff;
  607. border-color: #fff !important;
  608. color: #000 !important;
  609. font-size: 14px;
  610. cursor: text;
  611. padding: 0 !important;
  612. }
  613. }
  614. .winseaview-view {
  615. padding: 0 0 20px;
  616. }
  617. .container {
  618. overflow: scroll;
  619. height: 93vh;
  620. }
  621. .ws-info-table .el-form-item {
  622. width: 33.3333%;
  623. }
  624. .readonly:after {
  625. display: none;
  626. }
  627. .el-textarea__inner {
  628. display: none;
  629. }
  630. .el-form {
  631. margin-top: 50px;
  632. }
  633. .readonly {
  634. width: 16%;
  635. }
  636. //去边框
  637. /deep/.el-form-item {
  638. border-right: 0px;
  639. border-bottom: 0px;
  640. }
  641. /deep/.ws-info-table {
  642. border-left: 0px;
  643. border-top: 0px;
  644. }
  645. .ws-info-table .el-form-item .el-form-item__content {
  646. border-right: 0px;
  647. border-bottom: 0px;
  648. border-left: 0px;
  649. border-top: 0px;
  650. }
  651. /deep/.ws-info-table .el-form-item {
  652. border-right: 0px;
  653. border-bottom: 0px;
  654. border-left: 0px;
  655. border-top: 0px;
  656. }
  657. /deep/.ws-info-table .el-form-item .el-form-item__content {
  658. background: #f5f7fa;
  659. border-radius: 4px;
  660. border: 1px solid #d8dce6;
  661. font-family: PingFangSC-Regular, PingFang SC;
  662. margin-bottom: 5px;
  663. background-color: #fff;
  664. font-size: 14px;
  665. font-weight: 400;
  666. color: #8890b1;
  667. line-height: 16px;
  668. }
  669. /deep/.ws-info-table .el-form-item .el-form-item__label {
  670. background-color: #fff;
  671. font-size: 14px;
  672. font-family: PingFangSC-Regular, PingFang SC;
  673. font-weight: 400;
  674. color: #8890b1;
  675. line-height: 16px;
  676. }
  677. /deep/.ws-info-table .el-form-item .el-form-item__content {
  678. background: #f5f7fa;
  679. border-radius: 4px;
  680. border: 1px solid #d8dce6;
  681. }
  682. /deep/.flex .ws-info-table .el-form-item .el-form-item__content {
  683. border: 0px;
  684. }
  685. //联络员及车次
  686. /deep/.liaison .ws-info-table .el-form-item {
  687. width: 20%;
  688. }
  689. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  690. width: 30%;
  691. background: #F5F7FA;
  692. border: none;
  693. }
  694. /deep/.liaison .flex {
  695. display: contents;
  696. }
  697. /deep/.liaison{
  698. background: #F5F7FA;
  699. border-radius: 4px;
  700. border: 0px solid #D8DCE6;
  701. }
  702. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  703. // border: 0px solid #d8dce6;
  704. border-radius: 0px;
  705. border-left: none;
  706. border-bottom: none;
  707. border-top: none;
  708. }
  709. </style>