tranManagementShippingLook.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. // 船运调度详情
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">船运调度详情</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <div class="center">
  25. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  26. <div class="basicInformation">
  27. <h2> 任务编号 </h2>
  28. <ws-info-table>
  29. <!-- 任务编号 -->
  30. <ws-form-item label="任务编号" span="1" prop="processNo">
  31. <ws-input
  32. v-model="deptBudgetList.processNo"
  33. placeholder="请输入任务编号"
  34. maxlength="20"
  35. size="small"
  36. />
  37. <!-- {{deptBudgetList.processNo}} -->
  38. </ws-form-item>
  39. <!-- 货名 -->
  40. <ws-form-item label="货名" span="1" prop="goodsName">
  41. <ws-input
  42. v-model="deptBudgetList.goodsName"
  43. placeholder="请输入货名"
  44. maxlength="20"
  45. size="small"
  46. />
  47. <!-- {{deptBudgetList.goodsName}} -->
  48. </ws-form-item>
  49. <!--重量(吨)-->
  50. <ws-form-item
  51. label="重量(吨)"
  52. span="1"
  53. prop="weight"
  54. class="readonly"
  55. >
  56. <ws-input
  57. v-model="deptBudgetList.weight"
  58. placeholder="请输入重重"
  59. maxlength="100"
  60. size="small"
  61. />
  62. <!-- {{deptBudgetList.weight}} -->
  63. </ws-form-item>
  64. <!--发货地址-->
  65. <ws-form-item label="发货地址" span="1">
  66. <!-- <ws-input
  67. readonly="readonly"
  68. v-model="deptBudgetList.sendDetailedAddress"
  69. placeholder=""
  70. maxlength="120"
  71. size="small"
  72. /> -->
  73. {{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}
  74. </ws-form-item>
  75. <!--发货人-->
  76. <ws-form-item label="发货人" span="1" prop="sender">
  77. <ws-input
  78. v-model="deptBudgetList.sender"
  79. placeholder="请输入发货人姓名"
  80. maxlength="100"
  81. size="small"
  82. />
  83. <!-- {{deptBudgetList.sender}} -->
  84. </ws-form-item>
  85. <!--发货人电话-->
  86. <ws-form-item label="发货人电话" span="1" prop="senderPhone">
  87. <ws-input
  88. v-model="deptBudgetList.senderPhone"
  89. placeholder="请输入发货人电话"
  90. maxlength="100"
  91. size="small"
  92. />
  93. <!-- {{deptBudgetList.senderPhone}} -->
  94. </ws-form-item>
  95. <!--收货地址-->
  96. <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
  97. <!-- <el-cascader
  98. v-model="deptBudgetList.receiveDetailedAddress"
  99. clearable
  100. size="large"
  101. placeholder="请选择发货地址"
  102. style="width: 200%"
  103. /> -->
  104. {{deptBudgetList.receivePrivate}}{{deptBudgetList.receiveCity}}{{deptBudgetList.receiveArea}}
  105. </ws-form-item>
  106. <!--收货人-->
  107. <ws-form-item label="收货人" span="1" prop="receiver">
  108. <ws-input
  109. v-model="deptBudgetList.receiver"
  110. placeholder="请输入发货人"
  111. maxlength="100"
  112. size="small"
  113. />
  114. <!-- {{deptBudgetList.receiver}} -->
  115. </ws-form-item>
  116. <!--收货人电话-->
  117. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
  118. <ws-input
  119. v-model="deptBudgetList.receiverPhone"
  120. placeholder="请输入收货人电话"
  121. maxlength="100"
  122. size="small"
  123. />
  124. <!-- {{deptBudgetList.receiverPhone}} -->
  125. </ws-form-item>
  126. <!--发船日期-->
  127. <ws-form-item label="发船日期" span="1" prop="deliveryDateStart">
  128. <ws-input
  129. v-model="deptBudgetList.deliveryDateStart"
  130. placeholder=""
  131. maxlength="20"
  132. size="small"
  133. />
  134. </ws-form-item>
  135. <!--最晚发货日期-->
  136. <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
  137. <ws-input
  138. v-model="deptBudgetList.deliveryDateEnd"
  139. placeholder=""
  140. maxlength="20"
  141. size="small"
  142. />
  143. </ws-form-item>
  144. <!--合同编号-->
  145. <ws-form-item label="合同编号" span="1" prop="contractNo">
  146. <ws-input
  147. v-model="deptBudgetList.contractNo"
  148. placeholder="请输入合同编号"
  149. maxlength="20"
  150. size="small"
  151. />
  152. </ws-form-item>
  153. </ws-info-table>
  154. <div class="small-title"><h2>联络员及航次</h2></div>
  155. <div
  156. style="width: 100%"
  157. class="flex position"
  158. v-for="(item, index) in deptBudgetList.tranCarInfoList"
  159. :key="index.id"
  160. >
  161. <ws-info-table>
  162. <!-- 姓名 -->
  163. <ws-form-item label="姓名" span="1" prop="driver" class="siji">
  164. <ws-input
  165. v-model="item.driver"
  166. placeholder="请选择联络员"
  167. size="small"
  168. ></ws-input>
  169. </ws-form-item>
  170. <!-- 电话 -->
  171. <ws-form-item label="电话" span="1" prop="driverPhone" class="siji">
  172. <ws-input
  173. v-model="item.driverPhone"
  174. placeholder="联络员电话"
  175. size="small"
  176. ></ws-input>
  177. </ws-form-item>
  178. <!--发船日期-->
  179. <ws-form-item label="发船日期" span="1" prop="sendDateStart" class="siji">
  180. <ws-input
  181. v-model="item.sendDateStart"
  182. placeholder="请选择日期"
  183. ></ws-input>
  184. </ws-form-item>
  185. <ws-form-item label="预计到港日期" span="1" prop="receiveDateEnd" class="siji">
  186. <ws-input
  187. v-model="item.receiveDateEnd"
  188. placeholder="请选择日期"
  189. value-format="yyyy-MM-dd"
  190. size="small"
  191. />
  192. </ws-form-item>
  193. <!-- 船名 -->
  194. <ws-form-item label="船名" span="1" prop="shipName" class="siji">
  195. <ws-input
  196. v-model="item.shipName"
  197. placeholder="请输入船名"
  198. maxlength="100"
  199. size="small"
  200. ></ws-input>
  201. </ws-form-item>
  202. <!-- 航次 -->
  203. <ws-form-item label="航次" span="1" prop="shipNo" class="siji">
  204. <ws-input
  205. v-model="item.shipNo"
  206. placeholder="请选择航次"
  207. maxlength="100"
  208. size="small"
  209. ></ws-input>
  210. </ws-form-item>
  211. <!-- 类型 -->
  212. <ws-form-item label="类型" span="1" prop="shipType" class="siji">
  213. <ws-input
  214. v-model="item.shipType"
  215. placeholder=""
  216. size="small"
  217. ></ws-input>
  218. </ws-form-item>
  219. <ws-form-item label="数量" span="1" prop="boxNumber" class="siji" v-show="item.shipType=='集装箱'">
  220. <ws-input
  221. v-model="item.boxNumber"
  222. placeholder="请输入数量"
  223. size="small"
  224. ></ws-input>
  225. </ws-form-item>
  226. </ws-info-table>
  227. </div>
  228. <div
  229. style="width: 100%"
  230. class="flex position"
  231. v-for="(item, index) in freightspace"
  232. :key="index"
  233. >
  234. <ws-info-table>
  235. <ws-form-item :label="'仓位号-'+ (index + 1 )" span="1" prop="impurity" class="bot">
  236. <ws-input
  237. v-model="item.impurity"
  238. placeholder="请输入仓位号"
  239. size="small"
  240. ></ws-input>
  241. </ws-form-item>
  242. <!-- 重量(吨) -->
  243. <ws-form-item label="重量(吨)" span="1" prop="positionWeight" class="bot">
  244. <ws-input
  245. v-model="item.positionWeight"
  246. placeholder="请输入装仓重量"
  247. size="small"
  248. ></ws-input>
  249. </ws-form-item>
  250. </ws-info-table>
  251. <!-- <img
  252. width="22"
  253. height="22"
  254. class="del"
  255. @click="del(index)"
  256. src="../../../public/img/del.png"
  257. alt=""
  258. /> -->
  259. </div>
  260. <!-- <el-button
  261. class="add"
  262. type="primary"
  263. size="small"
  264. @click="add()"
  265. >添加仓位</el-button
  266. > -->
  267. <div style="text-align: right; padding: 10px">
  268. <el-button
  269. class="bg-bottom-up"
  270. type="primary"
  271. size="small"
  272. @click="returnsales()"
  273. >关闭</el-button
  274. >
  275. </div>
  276. </div>
  277. </ws-form>
  278. </div>
  279. </div>
  280. </template>
  281. <script>
  282. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  283. import {shippingList,shippingLook } from '@/model/transport/index'
  284. import Pagination from '@/components/Pagination'
  285. import WsUpload from '@/components/WsUpload'
  286. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  287. import { dayjs, EventBus } from 'base-core-lib'
  288. export default {
  289. name: 'viewSpareMoney',
  290. components: {
  291. WsUpload,
  292. Pagination,
  293. },
  294. watch: {
  295. // vesselId(val) {
  296. // this.getList()
  297. // },
  298. isShow(val) {
  299. this.showType = val
  300. },
  301. },
  302. data() {
  303. return {
  304. //弹出框
  305. dialogViewSpareMoney: false,
  306. dialogApproveFormVisible: false,
  307. // 船舶类型
  308. monetaryKey: null,
  309. // 表格显示数据
  310. tableDate: [],
  311. // 是否显示
  312. showType: true,
  313. // 年
  314. year: '',
  315. deptBudgetTotal: 0,
  316. currentPage: 1,
  317. pageSize: 10,
  318. searchType: 1,
  319. searchKeyWord: '',
  320. contractType: 2,
  321. startDate: null,
  322. endDate: null,
  323. goodnameList: {},
  324. // 提交类型
  325. submitType: true,
  326. storageType: [],
  327. readonly: true,
  328. appendixIdsAdd: '',
  329. uploadSuccess: {},
  330. onChange: {},
  331. gradeList: [],
  332. tranCarInfoList: [],
  333. list:[],
  334. arr:[],
  335. freightspace: [{ binNumber: '', maxStorage: '', remark: '' }],
  336. rules: {
  337. netWeight: [
  338. {
  339. required: true,
  340. type: 'number',
  341. message: '请输入活动名称',
  342. trigger: 'blur',
  343. },
  344. ],
  345. },
  346. size: 10,
  347. compId: sessionStorage.getItem('ws-pf_compId'),
  348. deptCircularPage: {},
  349. packtypeList: {},
  350. date: {
  351. year: dayjs().format('YYYY'),
  352. month: dayjs().format('MM'),
  353. },
  354. contractList: [],
  355. deptBudgetList: {
  356. warehouseInOutDetail: {},
  357. tranCarInfoList:[]
  358. },
  359. historyList: [],
  360. pickerBeginDateBefore: {
  361. disabledDate: (time) => {
  362. return time.getTime() > Date.now()
  363. },
  364. },
  365. accessoryTFs: false,
  366. }
  367. },
  368. mounted() {
  369. this.deptBudgetList.baseId = this.$route.query.baseId
  370. this.deptBudgetList.positionId = this.$route.query.positionId
  371. this.deptBudgetList.warehouseName = this.$route.query.warehouseName
  372. this.deptBudgetList.binNumber = this.$route.query.binNumber
  373. this.getList()
  374. },
  375. activated(){
  376. this.loaddata()
  377. },
  378. methods: {
  379. loaddata() {
  380. shippingLook({ id: this.$route.query.id })
  381. .toPromise()
  382. .then((response) => {
  383. this.deptBudgetList = response
  384. // this.deptBudgetList.driver = this.deptBudgetList.tranCarInfoList[0].driver
  385. // this.deptBudgetList.driverPhone = this.deptBudgetList.tranCarInfoList[0].driverPhone
  386. // this.deptBudgetList.sendDateStart = this.deptBudgetList.tranCarInfoList[0].sendDateStart
  387. // this.deptBudgetList.sendDateStart = this.deptBudgetList.tranCarInfoList[0].sendDateStart
  388. // this.deptBudgetList.receiveDateEnd = this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
  389. // this.deptBudgetList.shipName = this.deptBudgetList.tranCarInfoList[0].shipName
  390. // this.deptBudgetList.shipNo = this.deptBudgetList.tranCarInfoList[0].shipNo
  391. // this.deptBudgetList.shipType = this.deptBudgetList.tranCarInfoList[0].shipType
  392. // this.deptBudgetList. boxNumber =this.deptBudgetList.tranCarInfoList[0].boxNumber
  393. for(var i = 0; i<this.deptBudgetList.tranCarInfoList.length;i++){
  394. var num = this.deptBudgetList.tranCarInfoList[i].positionWeight.split("," )
  395. for(var j = 0;j<num.length;j++){
  396. var num2 = num[j].split("/")
  397. this.freightspace.push({
  398. 'impurity': num2[i],
  399. 'positionWeight':num2[num2.length-1]
  400. })
  401. }
  402. }
  403. })
  404. },
  405. getList(){
  406. shippingList({
  407. compId: sessionStorage.getItem('ws-pf_compId'),
  408. currentPage:this.currentPage,
  409. pageSize:this.pageSize,
  410. contractType:this.contractType,
  411. tranTypeKey: this.tranTypeKey,
  412. })
  413. .toPromise()
  414. .then((response)=>{
  415. this.warehouseList = response
  416. })
  417. },
  418. //返回按钮
  419. revert() {
  420. this.freightspace=[]
  421. this.$router.push({ path: 'tranManagementShipping' })
  422. },
  423. del(index){
  424. if(this.freightspace.length > 1 ){
  425. this.freightspace.splice(index,1)
  426. }
  427. },
  428. add() {
  429. this.freightspace.push({
  430. binNumber: '',
  431. maxStorage: '',
  432. remark: '',
  433. })
  434. },
  435. //提交按钮
  436. submit() {
  437. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  438. cancelButtonText: '取消',
  439. confirmButtonText: '确定',
  440. type: 'warning',
  441. })
  442. .then(() => {
  443. this.$refs.deptBudgetList.validate((valid) => {
  444. if (valid) {
  445. this.deptBudgetList.compId = sessionStorage.getItem(
  446. 'ws-pf_compId'
  447. )
  448. this.deptBudgetList.inOutFlag = 2
  449. this.deptBudgetList.statusFlag = 1
  450. addstorageputList(this.deptBudgetList)
  451. .toPromise()
  452. .then((response) => {
  453. this.$message.success('暂存成功')
  454. this.$router.push({ path: 'warehouseManagementList' })
  455. })
  456. } else {
  457. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  458. return false
  459. }
  460. })
  461. })
  462. .catch(() => {
  463. return false
  464. })
  465. },
  466. returnsales(){
  467. this.$router.push({ path: 'tranManagementShipping' })
  468. },
  469. handleClose() {
  470. this.accessoryTFs = false
  471. },
  472. handleSizeChange(val) {
  473. console.log(`每页 ${val} 条`)
  474. this.pageSize = val
  475. this.getList()
  476. },
  477. handleCurrentChange(val) {
  478. this.currentPage = val
  479. console.log(`当前页: ${val}`)
  480. this.getList()
  481. },
  482. // getList() {
  483. // // 货名
  484. // pullDown({ constId: 'CON2' })
  485. // .toPromise()
  486. // .then((response) => {
  487. // this.goodnameList = response
  488. // })
  489. // // 品级
  490. // pullDown({ constId: 'CON3' })
  491. // .toPromise()
  492. // .then((response) => {
  493. // this.gradeList = response
  494. // })
  495. // // 类型
  496. // pullDown({ constId: 'CON5' })
  497. // .toPromise()
  498. // .then((response) => {
  499. // this.storageType = response
  500. // })
  501. // },
  502. selecttaskType(e) {
  503. for (var i = 0; i < this.taskTypeList.length; i++) {
  504. if (this.taskTypeList[i].value == e) {
  505. this.searchType = this.taskTypeList[i].type
  506. }
  507. }
  508. },
  509. // fujian(row) {
  510. // if (
  511. // row.receiveAttachmentPath === null ||
  512. // row.receiveAttachmentPath === ''
  513. // ) {
  514. // EventBus.$emit(
  515. // 'warning',
  516. // this.$t('system.noticeCircular.NoInformation')
  517. // )
  518. // } else {
  519. // this.accessoryTFs = true
  520. // }
  521. // this.appendixIdss = row.receiveAttachmentPath
  522. // },
  523. approve() {},
  524. listQuery() {},
  525. },
  526. }
  527. </script>
  528. <style lang="scss" scoped>
  529. /deep/.basicInformation {
  530. .ws-info-table {
  531. border: none;
  532. }
  533. .el-form-item {
  534. width: 33.3333%;
  535. border: none;
  536. .el-form-item__label {
  537. background: transparent;
  538. border: none;
  539. }
  540. .el-form-item__content {
  541. border: none;
  542. }
  543. }
  544. }
  545. .title {
  546. position: relative;
  547. padding-left: 10px;
  548. }
  549. .title::before {
  550. content: '';
  551. display: inline-block;
  552. width: 5px;
  553. height: 30px;
  554. background: #5473e8;
  555. position: absolute;
  556. left: 0;
  557. }
  558. .el-form {
  559. padding: 0 10%;
  560. }
  561. .el-button--primary {
  562. background-color: #5878e8;
  563. border-color: #5878e8;
  564. }
  565. .el-col {
  566. background: #f6f7fc;
  567. }
  568. .bg-right {
  569. text-align: right;
  570. padding: 16px 20px;
  571. }
  572. .center{
  573. width: 80%;
  574. margin: 0 auto;
  575. }
  576. //表格文字
  577. /deep/.ws-info-table .el-form-item .el-form-item__label {
  578. text-align: left;
  579. font-size: 14px;
  580. font-weight: 400;
  581. color: #8890b1;
  582. line-height: 16px;
  583. }
  584. //蓝标
  585. .small-title {
  586. position: relative;
  587. padding: 10px;
  588. font-weight: 600;
  589. }
  590. .small-title::before {
  591. position: absolute;
  592. content: '';
  593. display: block;
  594. background: #5473e8;
  595. width: 4px;
  596. height: 14px;
  597. left: 0px;
  598. top: 13px;
  599. padding: 4px 2px;
  600. }
  601. .position{
  602. width: 90%;
  603. }
  604. .position .siji{
  605. width: 16%;
  606. }
  607. /deep/.position .ws-info-table .el-form-item .el-form-item__label{
  608. width: 40%;
  609. text-align: center;
  610. }
  611. .position .zaizhong{
  612. width: 16%;
  613. }
  614. //减号
  615. .del {
  616. right: -70px;
  617. }
  618. .bot{
  619. width: 30%;
  620. }
  621. .siji{
  622. width: 300px;
  623. }
  624. /deep/.el-form-item {
  625. border-right: 0px;
  626. border-bottom: 0px;
  627. }
  628. /deep/.ws-info-table {
  629. border-left: 0px;
  630. border-top: 0px;
  631. }
  632. .ws-info-table .el-form-item .el-form-item__content {
  633. border-right: 0px;
  634. border-bottom: 0px;
  635. border-left: 0px;
  636. border-top: 0px;
  637. }
  638. /deep/.ws-info-table .el-form-item {
  639. border-right: 0px;
  640. border-bottom: 0px;
  641. border-left: 0px;
  642. border-top: 0px;
  643. }
  644. /deep/.ws-info-table .el-form-item .el-form-item__content {
  645. background: #f5f7fa;
  646. border-radius: 4px;
  647. border: 1px solid #d8dce6;
  648. font-family: PingFangSC-Regular, PingFang SC;
  649. margin-bottom: 5px;
  650. background-color: #fff;
  651. font-size: 14px;
  652. font-weight: 400;
  653. color: #8890b1;
  654. line-height: 16px;
  655. }
  656. /deep/.ws-info-table .el-form-item .el-form-item__label {
  657. background-color: #fff;
  658. font-size: 14px;
  659. font-family: PingFangSC-Regular, PingFang SC;
  660. font-weight: 400;
  661. color: #8890b1;
  662. line-height: 16px;
  663. }
  664. /deep/.ws-info-table .el-form-item .el-form-item__content {
  665. background: #f5f7fa;
  666. border-radius: 4px;
  667. border: 1px solid #d8dce6;
  668. }
  669. /deep/.flex .ws-info-table .el-form-item .el-form-item__content{
  670. border: 0px;
  671. }
  672. /deep/.ws-class-table-col {
  673. height: auto;
  674. padding: 0px 2px;
  675. /deep/.el-input__inner {
  676. padding: 0px 2px;
  677. }
  678. }
  679. /deep/.is-disabled {
  680. .el-input__prefix,
  681. .el-input__suffix {
  682. display: none;
  683. }
  684. .el-input__inner {
  685. background-color: #fff;
  686. border-color: #fff !important;
  687. color: #000 !important;
  688. font-size: 14px;
  689. cursor: text;
  690. padding: 0 !important;
  691. }
  692. }
  693. </style>