voyageDetail.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426
  1. <template>
  2. <div class="line-container-p24">
  3. <i class="el-icon-arrow-left"></i>
  4. <div
  5. class="dib go-back ml8 pointer"
  6. @click="router.replace('/voyage/voyageList')"
  7. >
  8. 返回航次列表
  9. </div>
  10. </div>
  11. <div class="container-title df aic jcsb">
  12. <div>航次信息</div>
  13. <el-button
  14. style="width: 220px; margin-right: 20px"
  15. type="primary"
  16. @click="downloadExcel"
  17. :loading="isLoadingExcel"
  18. >
  19. 下载船舶跟踪表
  20. </el-button>
  21. </div>
  22. <div class="line-container-p24">
  23. <div class="line">
  24. <div class="info-line">
  25. <div class="info-line-title">航次名称</div>
  26. <el-input
  27. class="info-line-text"
  28. v-model="voyage.voyageName"
  29. disabled
  30. ></el-input>
  31. </div>
  32. <div class="info-gap" v-if="shipAudits.length"></div>
  33. <div class="info-line">
  34. <div class="info-line-title">货主</div>
  35. <el-input
  36. class="info-line-text"
  37. v-model="voyage.cargoOwnerName"
  38. disabled
  39. ></el-input>
  40. </div>
  41. </div>
  42. <!-- <div class="line">
  43. <div class="info-line">
  44. <div class="info-line-title">船东</div>
  45. <el-input
  46. class="info-line-text"
  47. v-model="voyage.shipOwnerName"
  48. disabled
  49. ></el-input>
  50. </div>
  51. <div class="info-line">
  52. <div class="info-line-title">船东手机号</div>
  53. <el-input
  54. class="info-line-text"
  55. v-model="voyage.shipOwnerPhone"
  56. disabled
  57. ></el-input>
  58. </div>
  59. </div> -->
  60. <div class="line">
  61. <div class="info-line">
  62. <div class="info-line-title">船舶名称</div>
  63. <el-input
  64. class="info-line-text"
  65. v-model="voyage.shipName"
  66. disabled
  67. ></el-input>
  68. </div>
  69. <div
  70. class="info-gap"
  71. v-if="shipAudits.length"
  72. @click="isCertsVisable = true"
  73. >
  74. 汇很多认证
  75. </div>
  76. <el-dialog
  77. @open="showCerts"
  78. v-model="isCertsVisable"
  79. destroy-on-close
  80. width="30%"
  81. >
  82. <Certs ref="certs"></Certs>
  83. </el-dialog>
  84. <div class="info-line">
  85. <div class="info-line-title">MMSI</div>
  86. <el-input
  87. class="info-line-text"
  88. v-model="voyage.shipMmsi"
  89. disabled
  90. ></el-input>
  91. </div>
  92. </div>
  93. <div id="map-container" class="map-container"></div>
  94. <div class="line" style="margin-top: 30px">
  95. <div class="info-line">
  96. <div class="info-line-title">开始时间</div>
  97. <el-input
  98. class="info-line-text"
  99. v-model="voyage.startTime"
  100. disabled
  101. ></el-input>
  102. </div>
  103. <div class="info-line">
  104. <div class="info-line-title">结束时间</div>
  105. <el-input
  106. class="info-line-text"
  107. v-model="voyage.endTime"
  108. disabled
  109. ></el-input>
  110. </div>
  111. </div>
  112. <div class="line">
  113. <div class="info-line">
  114. <div class="info-line-title">装货港</div>
  115. <el-input
  116. class="info-line-text"
  117. v-model="voyage.loadPort"
  118. disabled
  119. ></el-input>
  120. </div>
  121. <div class="info-line">
  122. <div class="info-line-title">卸货港</div>
  123. <el-input
  124. class="info-line-text"
  125. v-model="voyage.dischargeProt"
  126. disabled
  127. ></el-input>
  128. </div>
  129. </div>
  130. <div class="line">
  131. <div class="info-line">
  132. <div class="info-line-title">货种</div>
  133. <el-input
  134. class="info-line-text"
  135. v-model="voyage.cargo"
  136. disabled
  137. ></el-input>
  138. </div>
  139. <div class="info-line">
  140. <div style="width: 120px !important" class="info-line-title">货量</div>
  141. <el-input
  142. style="width: 100px !important"
  143. class="info-line-text"
  144. v-model="voyage.tons"
  145. disabled
  146. ></el-input>
  147. <span class="unit">吨</span>
  148. <el-input
  149. style="width: 80px !important"
  150. class="info-line-text"
  151. v-model="voyage.Pieces"
  152. disabled
  153. ></el-input>
  154. <span class="unit">件</span>
  155. </div>
  156. </div>
  157. <div class="container-second-title df aic jcsb mt40">
  158. <div>船舶运输记录详情</div>
  159. <div style="margin-right: 20px">
  160. 信息更新时间 :
  161. <span style="font-size: 18px"> {{ voyage.infoUpdateTime }}</span>
  162. </div>
  163. </div>
  164. <div class="line-container-p24">
  165. <div class="line">
  166. <div class="info-line">
  167. <div class="info-line-title">到达装货港时间</div>
  168. <el-date-picker
  169. class="info-line-text"
  170. v-model="voyage.arrivalLoadPortTime"
  171. type="datetime"
  172. format="YYYY/MM/DD HH:mm:ss"
  173. value-format="YYYY/MM/DD HH:mm:ss"
  174. placeholder="到达装货港时间"
  175. :disabled="disabledStatus"
  176. ></el-date-picker>
  177. </div>
  178. <div class="info-line">
  179. <div class="info-line-title">实装货量</div>
  180. <el-input
  181. style="width: 100px !important"
  182. class="info-line-text"
  183. v-model="voyage.actualLoadTons"
  184. :disabled="disabledStatus"
  185. placeholder="实装吨位"
  186. ></el-input>
  187. <span class="unit">吨</span>
  188. <el-input
  189. style="width: 80px !important"
  190. class="info-line-text"
  191. v-model="voyage.actualLoadPieces"
  192. :disabled="disabledStatus"
  193. placeholder="实装件数"
  194. ></el-input>
  195. <span class="unit">件</span>
  196. </div>
  197. </div>
  198. <div class="line">
  199. <div class="info-line">
  200. <div class="info-line-title">装货开始时间</div>
  201. <el-date-picker
  202. class="info-line-text"
  203. v-model="voyage.loadStartTime"
  204. type="datetime"
  205. format="YYYY/MM/DD HH:mm:ss"
  206. value-format="YYYY/MM/DD HH:mm:ss"
  207. placeholder="装货开始时间"
  208. :disabled="disabledStatus"
  209. ></el-date-picker>
  210. </div>
  211. <div class="info-line">
  212. <div class="info-line-title">装货结束时间</div>
  213. <el-date-picker
  214. class="info-line-text"
  215. v-model="voyage.loadEndTime"
  216. type="datetime"
  217. format="YYYY/MM/DD HH:mm:ss"
  218. value-format="YYYY/MM/DD HH:mm:ss"
  219. placeholder="装货开始时间"
  220. :disabled="disabledStatus"
  221. ></el-date-picker>
  222. </div>
  223. </div>
  224. <div class="line">
  225. <div class="info-line">
  226. <div class="info-line-title">开航时间</div>
  227. <el-date-picker
  228. class="info-line-text"
  229. v-model="voyage.setSailTime"
  230. type="datetime"
  231. format="YYYY/MM/DD HH:mm:ss"
  232. value-format="YYYY/MM/DD HH:mm:ss"
  233. placeholder="开航时间"
  234. :disabled="disabledStatus"
  235. ></el-date-picker>
  236. </div>
  237. <div class="info-line">
  238. <div class="info-line-title">预计到港时间</div>
  239. <el-date-picker
  240. class="info-line-text"
  241. v-model="voyage.expectedArrivalTime"
  242. type="datetime"
  243. format="YYYY/MM/DD"
  244. value-format="YYYY/MM/DD HH:mm:ss"
  245. placeholder="预计到港时间"
  246. :disabled="disabledStatus"
  247. ></el-date-picker>
  248. </div>
  249. </div>
  250. <div class="line">
  251. <div class="info-line">
  252. <div class="info-line-title">实际到港时间</div>
  253. <el-date-picker
  254. class="info-line-text"
  255. v-model="voyage.actualArrivalTime"
  256. type="datetime"
  257. format="YYYY/MM/DD HH:mm:ss"
  258. value-format="YYYY/MM/DD HH:mm:ss"
  259. placeholder="实际到港时间"
  260. :disabled="disabledStatus"
  261. ></el-date-picker>
  262. </div>
  263. <!-- <div class="info-line">
  264. <div class="info-line-title">抵达目的地港时间</div>
  265. <el-date-picker
  266. class="info-line-text"
  267. v-model="voyage.arrivalPortTime"
  268. type="datetime"
  269. format="YYYY/MM/DD HH:mm:ss"
  270. value-format="YYYY/MM/DD HH:mm:ss"
  271. placeholder="抵达目的地港时间"
  272. :disabled="disabledStatus"
  273. ></el-date-picker>
  274. </div> -->
  275. </div>
  276. <div class="line">
  277. <div class="info-line">
  278. <div class="info-line-title">卸货开始时间</div>
  279. <el-date-picker
  280. class="info-line-text"
  281. v-model="voyage.dischargeStartTime"
  282. type="datetime"
  283. format="YYYY/MM/DD HH:mm:ss"
  284. value-format="YYYY/MM/DD HH:mm:ss"
  285. placeholder="卸货开始时间"
  286. :disabled="disabledStatus"
  287. ></el-date-picker>
  288. </div>
  289. <div class="info-line">
  290. <div class="info-line-title">卸货结束时间</div>
  291. <el-date-picker
  292. class="info-line-text"
  293. v-model="voyage.dischargeEndTime"
  294. type="datetime"
  295. format="YYYY/MM/DD HH:mm:ss"
  296. value-format="YYYY/MM/DD HH:mm:ss"
  297. placeholder="卸货结束时间"
  298. :disabled="disabledStatus"
  299. ></el-date-picker>
  300. </div>
  301. </div>
  302. <div class="line">
  303. <div class="info-line">
  304. <div class="info-line-title">实际卸货量</div>
  305. <el-input
  306. style="width: 100px !important"
  307. class="info-line-text"
  308. placeholder="实际卸货吨位"
  309. v-model="voyage.actualDischargeTons"
  310. :disabled="disabledStatus"
  311. ></el-input>
  312. <span class="unit">吨</span>
  313. <el-input
  314. style="width: 80px !important"
  315. class="info-line-text"
  316. placeholder="实际卸货件数"
  317. v-model="voyage.actualDischargePieces"
  318. :disabled="disabledStatus"
  319. ></el-input>
  320. <span class="unit">件</span>
  321. </div>
  322. </div>
  323. <div class="line">
  324. <div class="info-line">
  325. <div class="info-line-title">备注</div>
  326. <el-input
  327. class="info-line-textarea"
  328. v-model="voyage.remark"
  329. autosize
  330. type="textarea"
  331. :disabled="disabledStatus"
  332. ></el-input>
  333. </div>
  334. </div>
  335. </div>
  336. <hr class="hr m30-0" />
  337. <div class="container-second-title df aic jcsb">
  338. <div>卸货记录</div>
  339. <el-button
  340. @click="exportDischargeExcel"
  341. style="width: 220px; margin-right: 20px"
  342. type="primary"
  343. :loading="isDischargeLoadingExcel"
  344. >下载卸货信息</el-button
  345. >
  346. </div>
  347. <el-table :data="dischargeList" stripe style="width: 800px">
  348. <el-table-column
  349. type="index"
  350. label="序号"
  351. min-width="80"
  352. align="center"
  353. ></el-table-column>
  354. <el-table-column
  355. prop="dischargeTime"
  356. label="卸货时间"
  357. min-width="120"
  358. align="center"
  359. ></el-table-column>
  360. <el-table-column
  361. prop="dischargeTons"
  362. label="卸货吨位"
  363. min-width="100"
  364. align="center"
  365. ></el-table-column>
  366. <el-table-column
  367. prop="dischargePieces"
  368. label="卸货件数"
  369. min-width="100"
  370. align="center"
  371. ></el-table-column>
  372. <el-table-column label="磅单" min-width="150" align="center">
  373. <template v-slot="scope">
  374. <el-button
  375. @click="showUpdateDischarge(scope.row, scope.$index)"
  376. type="primary"
  377. size="small"
  378. v-if="scope.row.files"
  379. >
  380. 查看
  381. </el-button>
  382. </template>
  383. </el-table-column>
  384. </el-table>
  385. <el-dialog v-model="dialogVisible" title="图片预览" width="30%">
  386. <el-image
  387. :src="dialogImageUrl"
  388. style="height: 100%; width: 100%"
  389. ></el-image>
  390. </el-dialog>
  391. <div style="width: 100%; text-align: right; margin-top: 43px">
  392. <el-pagination
  393. background
  394. layout="prev, pager, next"
  395. :total="total"
  396. @current-change="pageChange"
  397. ></el-pagination>
  398. </div>
  399. <div class="hr m30-0"></div>
  400. <div class="container-second-title df aic jcsb mt40">
  401. <div>汽车装货记录详情</div>
  402. </div>
  403. <el-table :data="truckTableData" stripe>
  404. <el-table-column
  405. type="index"
  406. label="序号"
  407. min-width="120"
  408. align="center"
  409. ></el-table-column>
  410. <el-table-column
  411. prop="portName"
  412. label="港口名称"
  413. min-width="100"
  414. align="center"
  415. ></el-table-column>
  416. <el-table-column
  417. prop="weighTime"
  418. label="称重时间"
  419. min-width="120"
  420. align="center"
  421. ></el-table-column>
  422. <el-table-column
  423. prop="carNum"
  424. label="车号"
  425. min-width="100"
  426. align="center"
  427. ></el-table-column>
  428. <el-table-column
  429. prop="cargoName"
  430. label="货物名称"
  431. min-width="120"
  432. align="center"
  433. ></el-table-column>
  434. <el-table-column
  435. prop="shippingUnit"
  436. label="发货单位"
  437. min-width="100"
  438. align="center"
  439. ></el-table-column>
  440. <el-table-column
  441. prop="receivingUnit"
  442. label="收货单位"
  443. min-width="120"
  444. align="center"
  445. ></el-table-column>
  446. <el-table-column
  447. prop="grossWeight"
  448. label="毛重"
  449. min-width="100"
  450. align="center"
  451. ></el-table-column>
  452. <el-table-column
  453. prop="tare"
  454. label="皮重"
  455. min-width="120"
  456. align="center"
  457. ></el-table-column>
  458. <el-table-column
  459. prop="netWeight"
  460. label="净重"
  461. min-width="100"
  462. align="center"
  463. ></el-table-column>
  464. <el-table-column
  465. prop="shipName"
  466. label="货船名称"
  467. min-width="120"
  468. align="center"
  469. ></el-table-column>
  470. <el-table-column
  471. prop="weigher"
  472. label="司磅员"
  473. min-width="100"
  474. align="center"
  475. ></el-table-column>
  476. <el-table-column label="单据" min-width="150" align="center">
  477. <template v-slot="scope">
  478. <el-button
  479. @click="showTruckRecord(scope.row, scope.$index, '查看单据')"
  480. type="primary"
  481. size="small"
  482. >
  483. 查看
  484. </el-button>
  485. </template>
  486. </el-table-column>
  487. </el-table>
  488. <div style="text-align: right; margin-top: 43px">
  489. <el-pagination
  490. background
  491. layout="prev, pager, next"
  492. :total="truckTotal"
  493. @current-change="truckPageChange"
  494. ></el-pagination>
  495. </div>
  496. <el-dialog
  497. v-model="isAddTruckRecordVisable"
  498. title="查看记录"
  499. width="780px"
  500. center
  501. >
  502. <el-form
  503. :model="truckRecordForm"
  504. inline
  505. style="margin-bottom: 20px"
  506. label-width="100px"
  507. >
  508. <el-form-item label="港口名称">
  509. <el-input
  510. style="width: 240px"
  511. v-model="truckRecordForm.portName"
  512. placeholder="港口名称"
  513. ></el-input>
  514. </el-form-item>
  515. <el-form-item label="称重时间">
  516. <el-date-picker
  517. class="info-line-text"
  518. v-model="truckRecordForm.weighTime"
  519. type="datetime"
  520. format="YYYY/MM/DD HH:mm:ss"
  521. value-format="YYYY/MM/DD HH:mm:ss"
  522. placeholder="称重时间"
  523. ></el-date-picker>
  524. </el-form-item>
  525. <el-form-item label="车号">
  526. <el-input
  527. style="width: 240px"
  528. v-model="truckRecordForm.carNum"
  529. placeholder="车号"
  530. ></el-input>
  531. </el-form-item>
  532. <el-form-item label="货物名称">
  533. <el-input
  534. style="width: 240px"
  535. v-model="truckRecordForm.cargoName"
  536. placeholder="货物名称"
  537. ></el-input>
  538. </el-form-item>
  539. <el-form-item label="发货单位">
  540. <el-input
  541. style="width: 240px"
  542. v-model="truckRecordForm.shippingUnit"
  543. placeholder="发货单位"
  544. ></el-input>
  545. </el-form-item>
  546. <el-form-item label="毛重">
  547. <el-input
  548. style="width: 240px"
  549. v-model="truckRecordForm.grossWeight"
  550. placeholder="毛重"
  551. ></el-input>
  552. </el-form-item>
  553. <el-form-item label="收货单位">
  554. <el-input
  555. style="width: 240px"
  556. v-model="truckRecordForm.receivingUnit"
  557. placeholder="收货单位"
  558. ></el-input>
  559. </el-form-item>
  560. <el-form-item label="皮重">
  561. <el-input
  562. style="width: 240px"
  563. v-model="truckRecordForm.tare"
  564. placeholder="皮重"
  565. ></el-input>
  566. </el-form-item>
  567. <el-form-item label="运输单位">
  568. <el-input
  569. style="width: 240px"
  570. v-model="truckRecordForm.transUnit"
  571. placeholder="运输单位"
  572. ></el-input>
  573. </el-form-item>
  574. <el-form-item label="净重">
  575. <el-input
  576. style="width: 240px"
  577. v-model="truckRecordForm.netWeight"
  578. placeholder="净重"
  579. ></el-input>
  580. </el-form-item>
  581. <el-form-item label="货船名称">
  582. <el-input
  583. style="width: 240px"
  584. v-model="truckRecordForm.shipName"
  585. placeholder="货船名称"
  586. ></el-input>
  587. </el-form-item>
  588. <el-form-item label="司磅员">
  589. <el-input
  590. style="width: 240px"
  591. v-model="truckRecordForm.weigher"
  592. placeholder="司磅员"
  593. ></el-input>
  594. </el-form-item>
  595. <el-form-item label="汽车装货单">
  596. <Uploader
  597. actionUrl="#"
  598. :uploaderId="'truckLoad'"
  599. :params="truckLoadParams"
  600. @onSendFileList="getTruckLoadBillList"
  601. :fileList="truckRecordBillList"
  602. uploadText="上传装货单"
  603. :limit="1"
  604. disabled
  605. ></Uploader>
  606. </el-form-item>
  607. </el-form>
  608. </el-dialog>
  609. </div>
  610. <div class="container-title">单据信息</div>
  611. <div class="line-container-p24" style="padding-left: 60px">
  612. <div class="df aic">
  613. <div class="info-line-title">保险单:</div>
  614. <el-image
  615. style="width: 200px; height: 200px; margin-right: 20px"
  616. :src="item.viewUrl"
  617. v-for="item in policyList"
  618. :key="item"
  619. @click="openMediaModal(item.viewUrl, 1, '保险单查看')"
  620. ></el-image>
  621. </div>
  622. <hr class="hr m30-0" />
  623. <div class="df aic">
  624. <div class="info-line-title">运单:</div>
  625. <el-image
  626. style="width: 200px; height: 200px; margin-right: 20px"
  627. :src="item.viewUrl"
  628. v-for="item in voyageBill"
  629. :key="item"
  630. @click="openMediaModal(item.viewUrl, 1, '运单查看')"
  631. ></el-image>
  632. </div>
  633. </div>
  634. <div class="container-title">航次图片</div>
  635. <div class="line-container-p24">
  636. <div v-if="medias.length" class="medias-content df ffw">
  637. <div class="pic-container">
  638. <div v-for="(item, index) in medias" :key="item" class="pic-main">
  639. <div
  640. :class="[
  641. 'box',
  642. index % 2 == 0 ? '' : 'bottom-box',
  643. item.status == 1 ? 'now-box' : '',
  644. ]"
  645. >
  646. <div class="card-note">
  647. {{ item.shipName }} 拍摄于
  648. <br />
  649. {{ item.createTime }}
  650. </div>
  651. <div class="medias-box" style="position: relative">
  652. <el-image
  653. v-if="item.mediaType == 1"
  654. style="width: 100%; height: 100%"
  655. fit="contain"
  656. :src="item.downloadUrl"
  657. @click="openMediaModal(item.downloadUrl, 1, '图片审核')"
  658. ></el-image>
  659. <video
  660. style="width: 100%; height: 100%"
  661. v-else
  662. :src="item.downloadUrl"
  663. ></video>
  664. <img
  665. @click="openMediaModal(item.downloadUrl, 2, '视频审核')"
  666. v-if="item.mediaType == 2"
  667. src="../../assets/icon-player.png"
  668. style="
  669. object-fit: contain;
  670. width: 40px;
  671. height: 40px;
  672. position: absolute;
  673. top: calc(50% - 20px);
  674. left: calc(50% - 20px);
  675. background: #fff;
  676. border-radius: 50%;
  677. "
  678. alt=""
  679. />
  680. </div>
  681. </div>
  682. <div
  683. :class="[
  684. 's-line',
  685. index % 2 == 0 ? '' : 'top210px',
  686. item.status == 1 ? 'now-s-line' : '',
  687. ]"
  688. ></div>
  689. <div :class="['point', item.status == 1 ? '' : 'now-point']"></div>
  690. <div
  691. :class="['l-line', item.status == 1 ? 'now-l-line' : '']"
  692. v-if="index + 1 != medias.length"
  693. ></div>
  694. </div>
  695. </div>
  696. </div>
  697. <el-dialog v-model="mediaModal" :title="modalTitle">
  698. <el-image
  699. v-if="modalType == 1"
  700. style="height: 60vh; display: flex"
  701. fit="contain"
  702. :src="currentUrl"
  703. :preview-src-list="modalPreview"
  704. ></el-image>
  705. <video
  706. v-else
  707. autoplay
  708. controls
  709. style="width: 100%; height: 100%"
  710. :src="currentUrl"
  711. ></video>
  712. </el-dialog>
  713. <el-dialog
  714. v-model="updateDischargeDialog"
  715. title="查看记录"
  716. width="700px"
  717. center
  718. >
  719. <el-form :model="updateForm" style="margin-bottom: 20px">
  720. <!-- <el-form-item label="记录ID">
  721. <span style="padding-left: 20px">{{ updateForm.id }}</span>
  722. </el-form-item> -->
  723. <el-form-item label="卸货时间">
  724. <el-date-picker
  725. class="info-line-text"
  726. v-model="updateForm.dischargeTime"
  727. type="datetime"
  728. format="YYYY/MM/DD HH:mm:ss"
  729. value-format="YYYY/MM/DD HH:mm:ss"
  730. placeholder="卸货时间"
  731. disabled
  732. ></el-date-picker>
  733. </el-form-item>
  734. <el-form-item label="卸货吨位">
  735. <el-input
  736. style="width: 240px"
  737. v-model="updateForm.dischargeTons"
  738. placeholder="卸货吨位"
  739. disabled
  740. ></el-input>
  741. </el-form-item>
  742. <el-form-item label="磅单查看">
  743. <el-image
  744. style="width: 200px; height: 200px; margin-right: 20px"
  745. v-for="item in updatePoundBillList"
  746. :src="item.viewUrl"
  747. :key="item"
  748. @click="openMediaModal(item.viewUrl, 1, '磅单查看')"
  749. ></el-image>
  750. </el-form-item>
  751. </el-form>
  752. </el-dialog>
  753. </div>
  754. </template>
  755. <script setup>
  756. import { onMounted, reactive, ref, toRefs } from "vue";
  757. import api from "../../apis/fetch";
  758. import { useRoute } from "vue-router";
  759. import _ from "lodash";
  760. import router from "../../router";
  761. import store from "../../store";
  762. import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
  763. import downloadBlobFile from "../../utils/downloadBlobFile";
  764. import url from "../../apis/config";
  765. const route = useRoute();
  766. let map = ref();
  767. let voyage = ref({});
  768. let medias = ref([]);
  769. let coordinates = ref();
  770. let previewSrcList = ref([]);
  771. let policyList = ref([]);
  772. let previewPoundList = ref([]);
  773. let shipAudits = ref([]);
  774. let certs = ref(null);
  775. let isCertsVisable = ref(false);
  776. function showCerts() {
  777. setTimeout(() => {
  778. certs.value.initCerts(shipAudits.value);
  779. });
  780. }
  781. async function getVoyageDetail(type) {
  782. policyList.value = [];
  783. voyageBill.value = [];
  784. previewSrcList.value = [];
  785. let res = await api.getVoyageDetail({
  786. type: localStorage.userType,
  787. voyageId: route.query.id,
  788. });
  789. if (res.data.status == 0) {
  790. if (type) {
  791. ElNotification({
  792. type: "success",
  793. title: res.data.msg,
  794. });
  795. }
  796. coordinates.value = res.data.result.coordinates;
  797. voyage.value = res.data.result.voyage;
  798. medias.value = res.data.result.medias;
  799. shipAudits.value = res.data.result.shipAudits;
  800. for (let i of res.data.result.policys || []) {
  801. policyList.value.push({
  802. ...i,
  803. url: i.viewUrl,
  804. });
  805. }
  806. for (let i of res.data.result.waybills) {
  807. voyageBill.value.push({
  808. ...i,
  809. url: i.viewUrl,
  810. });
  811. }
  812. for (let i of medias.value) {
  813. previewSrcList.value.push(i.downloadUrl);
  814. }
  815. initMap();
  816. } else {
  817. console.log(res);
  818. ElNotification({
  819. type: "error",
  820. title: res.data.msg,
  821. });
  822. }
  823. }
  824. let total = ref(0);
  825. function pageChange(e) {
  826. dischargeCurrentPage.value = e;
  827. getDischargeList();
  828. }
  829. async function addDischarge() {
  830. if (!formInline.value.dischargeTime || !formInline.value.dischargeTons)
  831. return;
  832. let res = await api.addDischarge({
  833. ...formInline.value,
  834. voyageId: route.query.id,
  835. });
  836. if (res.data.status == 0) {
  837. getDischargeList(1);
  838. formInline.value = {};
  839. } else {
  840. console.log(res);
  841. }
  842. }
  843. async function deleteDischarge(id, index) {
  844. let res = await api.deleteDischarge({
  845. id,
  846. });
  847. if (res.data.status == 0) {
  848. dischargeList.value.splice(index, 1);
  849. ElNotification({
  850. type: "success",
  851. title: res.data.msg,
  852. });
  853. } else {
  854. console.log(res);
  855. ElNotification({
  856. type: "error",
  857. title: res.data.msg,
  858. });
  859. }
  860. }
  861. async function exportExcel() {}
  862. let dischargeCurrentPage = ref(1);
  863. let dischargeList = ref();
  864. let formInline = ref({});
  865. async function getDischargeList(type) {
  866. let res = await api.getDischargeList({
  867. voyageId: route.query.id,
  868. currentPage: dischargeCurrentPage.value,
  869. size: 10,
  870. });
  871. if (res.data.status == 0) {
  872. dischargeList.value = res.data.result;
  873. total.value = res.data.total;
  874. } else {
  875. console.log(res);
  876. }
  877. }
  878. let updateForm = ref({});
  879. let updateDischargeDialog = ref(false);
  880. let currentUpdateIndex = ref(-1);
  881. async function updateDischarge() {
  882. let res = await api.updateDischarge({
  883. ...updateForm.value,
  884. });
  885. if (res.data.status == 0) {
  886. dischargeList.value[currentUpdateIndex.value] = res.data.result;
  887. cancelUpdateDischarge();
  888. ElNotification({
  889. type: "success",
  890. title: res.data.msg,
  891. });
  892. } else {
  893. console.log(res);
  894. ElNotification({
  895. type: "error",
  896. title: res.data.msg,
  897. });
  898. }
  899. }
  900. let updatePoundParams = ref([]);
  901. let updatePoundBillList = ref([]);
  902. function showUpdateDischarge(item, index) {
  903. updateDischargeDialog.value = true;
  904. updatePoundBillList.value = [];
  905. let { id, dischargeTons, dischargeTime, voyageId, files } = item;
  906. updatePoundBillList.value = files;
  907. updateForm.value = {
  908. id,
  909. dischargeTons,
  910. dischargeTime,
  911. };
  912. currentUpdateIndex.value = index;
  913. }
  914. function cancelUpdateDischarge() {
  915. updateDischargeDialog.value = false;
  916. updateForm.value = {};
  917. currentUpdateIndex.value = -1;
  918. }
  919. function initMap() {
  920. map.value = new AMap.Map("map-container", {
  921. zoom: 11, //级别
  922. center: [120.563757, 31.891174], //中心点坐标
  923. mapStyle: "amap://styles/f48d96805f5fa7f5aada657c5ee37017",
  924. zoomEnable: false,
  925. dragEnable: false,
  926. });
  927. let toolBar = new AMap.ToolBar({
  928. position: {
  929. top: "40px",
  930. right: "40px",
  931. },
  932. });
  933. let hawkEye = new AMap.HawkEye({
  934. opened: false,
  935. });
  936. map.value.addControl(toolBar);
  937. map.value.addControl(hawkEye);
  938. let markers = [];
  939. for (let i of medias.value) {
  940. let content = `<div style='width:160px'>
  941. ${
  942. i.audit == 1
  943. ? `<img id='img${i.id}' style='width:160px;height:160px;object-fit:contain;' src='${i.viewUrl}'/>`
  944. : ``
  945. }
  946. <img src='https://hhd-pat-1255802371.cos.ap-shanghai.myqcloud.com/frontend/ship-red-icon.png' style='display:block;width:20px;height:20px;margin:6px auto'/
  947. </div>`;
  948. let marker = new AMap.Marker({
  949. content,
  950. position: new AMap.LngLat(i.longitude, i.latitude),
  951. offset: new AMap.Pixel(-75, i.audit == 1 ? -195 : -30),
  952. });
  953. if (i.audit == 1) {
  954. marker.on("click", () => {
  955. openMediaModal(i.viewUrl, 1, "航次图片", i);
  956. });
  957. }
  958. markers.push(marker);
  959. }
  960. let overlayGroups = new AMap.OverlayGroup(markers);
  961. map.value.on("complete", function () {
  962. let t = setTimeout(() => {
  963. map.value.add(overlayGroups);
  964. map.value.setFitView(markers, true, [200, 50, 0, 0], 18);
  965. clearTimeout(t);
  966. }, 2000);
  967. });
  968. }
  969. function setShipMarker(longitude = 121.524761, latitude = 31.228721) {
  970. map.value.setCenter([longitude, latitude]);
  971. var marker = new AMap.Marker({
  972. position: new AMap.LngLat(longitude, latitude),
  973. offset: new AMap.Pixel(-20, -20),
  974. size: new AMap.Size(80, 80),
  975. icon: "https://hhd-pat-1255802371.cos.ap-shanghai.myqcloud.com/frontend/ship-red-icon.png", // 添加 Icon 图标 URL
  976. title: "",
  977. });
  978. map.value.add(marker);
  979. }
  980. let disabledStatus = ref(true);
  981. let updateCache = {};
  982. function changeVoyageInfo() {
  983. updateCache = _.cloneDeep(voyage.value);
  984. disabledStatus.value = false;
  985. }
  986. function cancelVoyageChange() {
  987. voyage.value = updateCache;
  988. disabledStatus.value = true;
  989. }
  990. async function submitVoyageChange() {
  991. let {
  992. id,
  993. transStatus,
  994. loadStartTime,
  995. loadEndTime,
  996. dischargeStartTime,
  997. dischargeEndTime,
  998. actualDischargeTons,
  999. remark,
  1000. } = voyage.value;
  1001. let res = await api.updateVoyage({
  1002. id,
  1003. transStatus,
  1004. loadStartTime,
  1005. loadEndTime,
  1006. dischargeStartTime,
  1007. dischargeEndTime,
  1008. actualDischargeTons,
  1009. remark,
  1010. });
  1011. if (res.data.status == 0) {
  1012. ElNotification({
  1013. type: "success",
  1014. title: res.data.msg,
  1015. });
  1016. disabledStatus.value = true;
  1017. } else {
  1018. ElNotification({
  1019. type: "error",
  1020. title: res.data.msg,
  1021. });
  1022. console.log(res);
  1023. }
  1024. }
  1025. let options = ref([
  1026. { value: 0, label: "请选择" },
  1027. {
  1028. value: 1,
  1029. label: "航行",
  1030. },
  1031. {
  1032. value: 2,
  1033. label: "停泊",
  1034. },
  1035. {
  1036. value: 3,
  1037. label: "装货",
  1038. },
  1039. {
  1040. value: 4,
  1041. label: "运输中",
  1042. },
  1043. {
  1044. value: 5,
  1045. label: "卸货",
  1046. },
  1047. ]);
  1048. async function finishVoyage() {
  1049. if (!voyage.value.dischargeEndTime) return;
  1050. let res = await api.finishVoyage({
  1051. voyageId: route.query.id,
  1052. });
  1053. if (res.data.status == 0) {
  1054. voyage.value.voyageStatus = 2;
  1055. ElNotification({
  1056. type: "success",
  1057. title: res.data.msg,
  1058. });
  1059. } else {
  1060. ElNotification({
  1061. type: "error",
  1062. title: res.data.msg,
  1063. });
  1064. console.log(res);
  1065. }
  1066. }
  1067. let currentUrl = ref("");
  1068. let mediaModal = ref(false);
  1069. let modalType = ref(1);
  1070. let modalTitle = ref();
  1071. let modalPreview = ref([]);
  1072. function openMediaModal(url, type, title) {
  1073. console.log(url, type, title);
  1074. modalPreview.value = [url];
  1075. modalTitle.value = title;
  1076. modalType.value = type;
  1077. currentUrl.value = url;
  1078. mediaModal.value = true;
  1079. }
  1080. async function auditMedia(mediaId, a, index, mediaType) {
  1081. console.log(mediaId, a, index, mediaType);
  1082. let res = await api.auditMedia({
  1083. mediaId,
  1084. audit: a,
  1085. });
  1086. if (res.data.status == 0) {
  1087. medias.value[index].audit = a;
  1088. ElNotification({
  1089. type: "success",
  1090. title: res.data.msg,
  1091. });
  1092. } else {
  1093. console.log(res);
  1094. }
  1095. }
  1096. let dialogImageUrl = ref();
  1097. let dialogVisible = ref(false);
  1098. function handlePictureCardPreview(file) {
  1099. dialogVisible.value = true;
  1100. dialogImageUrl.value = file.url;
  1101. }
  1102. async function handleRemoveBill(file, list) {
  1103. let cache = _.cloneDeep(voyageBill.value);
  1104. console.log(cache);
  1105. ElMessageBox.confirm("确认删除运单?", "Warning", {
  1106. confirmButtonText: "删除",
  1107. cancelButtonText: "取消",
  1108. type: "warning",
  1109. })
  1110. .then(async () => {
  1111. let { id } = file;
  1112. let res = await api.deleteWaybill({
  1113. id,
  1114. });
  1115. if (res.data.status == 0) {
  1116. ElMessage({
  1117. message: "删除成功!",
  1118. type: "success",
  1119. });
  1120. voyageBill.value = list;
  1121. }
  1122. })
  1123. .catch(() => {
  1124. voyageBill.value = cache;
  1125. ElMessage({
  1126. type: "info",
  1127. message: "取消删除",
  1128. });
  1129. });
  1130. }
  1131. let voyageBill = ref([]);
  1132. function billUploadSuccess(response, file, list) {
  1133. list[list.length - 1] = {
  1134. ...response.result,
  1135. url: response.result.viewUrl,
  1136. };
  1137. console.log(list);
  1138. voyageBill.value = list;
  1139. }
  1140. let billParams = ref({
  1141. voyageId: route.query.id,
  1142. });
  1143. async function calExpectedArrivalTime() {
  1144. let res = await api.calExpectedArrivalTime({
  1145. voyageId: route.query.id,
  1146. setSailTime: voyage.value.setSailTime,
  1147. });
  1148. if (res.data.status == 0) {
  1149. voyage.value.expectedArrivalTime = res.data.result;
  1150. }
  1151. }
  1152. let isLoadingExcel = ref(false);
  1153. async function downloadExcel() {
  1154. isLoadingExcel.value = true;
  1155. let res = await downloadBlobFile(
  1156. `${url.baseurl}/voyage/exportExcel`,
  1157. { voyageId: route.query.id },
  1158. "船舶跟踪表",
  1159. "post"
  1160. );
  1161. if (res) {
  1162. isLoadingExcel.value = false;
  1163. }
  1164. }
  1165. let isDischargeLoadingExcel = ref(false);
  1166. async function exportDischargeExcel() {
  1167. isDischargeLoadingExcel.value = true;
  1168. let res = await downloadBlobFile(
  1169. `${url.baseurl}/voyage/exportDischargeExcel`,
  1170. { voyageId: route.query.id },
  1171. "卸货记录表",
  1172. "post"
  1173. );
  1174. if (res) {
  1175. isDischargeLoadingExcel.value = false;
  1176. }
  1177. }
  1178. function subStr(str = "") {
  1179. return str.substring(0, 10);
  1180. }
  1181. let truckTableData = ref([]);
  1182. let truckCurrentPage = ref(1);
  1183. let truckTotal = ref(0);
  1184. async function getTruckLoadRecord() {
  1185. let res = await api.getTruckLoadRecord({
  1186. voyageId: route.query.id,
  1187. currentPage: truckCurrentPage.value,
  1188. size: 10,
  1189. });
  1190. truckTableData.value = res.data.result;
  1191. truckTotal.value = res.data.total;
  1192. }
  1193. function truckPageChange(e) {
  1194. truckCurrentPage.value = e;
  1195. getTruckLoadRecord();
  1196. }
  1197. let truckRecordForm = ref({});
  1198. let isAddTruckRecordVisable = ref(false);
  1199. let truckRecordBillList = ref([]);
  1200. function showTruckRecord(item, index, text) {
  1201. isAddTruckRecordVisable.value = true;
  1202. if (item.file) {
  1203. truckRecordBillList.value[0] = {
  1204. ...item.file,
  1205. url: item.file.viewUrl,
  1206. };
  1207. }
  1208. truckRecordForm.value = { ...item };
  1209. }
  1210. let truckLoadParams = ref({});
  1211. function getTruckLoadBillList() {}
  1212. onMounted(() => {
  1213. getVoyageDetail(1);
  1214. getDischargeList(1);
  1215. getTruckLoadRecord();
  1216. });
  1217. </script>
  1218. <style scoped>
  1219. .map-container {
  1220. width: 100%;
  1221. height: 500px;
  1222. }
  1223. .card-note {
  1224. height: 30px;
  1225. font-size: 12px;
  1226. font-family: PingFangSC-Regular, PingFang SC;
  1227. font-weight: 400;
  1228. color: #777777;
  1229. }
  1230. .medias-box {
  1231. width: 200px;
  1232. height: 200px;
  1233. margin-top: 20px;
  1234. }
  1235. .checkbox-group {
  1236. width: 200px;
  1237. height: 50px;
  1238. margin-top: 20px;
  1239. }
  1240. .medias-content {
  1241. width: 100%;
  1242. height: 600px;
  1243. background: #f7f7f7;
  1244. border-radius: 2px;
  1245. }
  1246. .pic-container {
  1247. width: 100%;
  1248. height: 100%;
  1249. box-sizing: border-box;
  1250. display: flex;
  1251. padding: 30px;
  1252. overflow-x: scroll;
  1253. overflow-y: hidden;
  1254. white-space: nowrap;
  1255. }
  1256. .pic-main {
  1257. position: relative;
  1258. width: 120px;
  1259. }
  1260. .box {
  1261. position: absolute;
  1262. height: 240px;
  1263. width: var(--box-width);
  1264. border: 5px solid #dddddd;
  1265. transition: all 0.5s;
  1266. background: #fff;
  1267. z-index: 10;
  1268. }
  1269. .point {
  1270. position: relative;
  1271. left: 93px;
  1272. top: 258px;
  1273. width: 16px;
  1274. height: 16px;
  1275. background-image: url(../../assets/blue-circle.png);
  1276. }
  1277. .s-line {
  1278. position: absolute;
  1279. left: 100px;
  1280. top: 242px;
  1281. height: 20px;
  1282. border-left: 2px dashed;
  1283. box-sizing: border-box;
  1284. border-color: #ddd;
  1285. }
  1286. .l-line {
  1287. position: relative;
  1288. bottom: 30px;
  1289. left: 111px;
  1290. top: 249px;
  1291. height: 3px;
  1292. width: 100px;
  1293. background-color: #dddddd;
  1294. }
  1295. .bottom-box {
  1296. top: 290px;
  1297. }
  1298. .top210px {
  1299. top: 270px;
  1300. }
  1301. .box:hover {
  1302. transform: scale(1.2);
  1303. }
  1304. .medias-box {
  1305. width: 80px;
  1306. height: 80px;
  1307. margin-top: 10px;
  1308. }
  1309. .card-note {
  1310. height: 30px;
  1311. font-size: 12px;
  1312. font-family: PingFangSC-Regular, PingFang SC;
  1313. font-weight: 400;
  1314. color: #777777;
  1315. padding: 10px 20px;
  1316. }
  1317. .medias-box {
  1318. width: 100%;
  1319. height: 100px;
  1320. margin-top: 20px;
  1321. }
  1322. .checkbox-group {
  1323. width: 180px;
  1324. height: 50px;
  1325. margin-top: 20px;
  1326. }
  1327. .el-checkbox {
  1328. margin: 0;
  1329. }
  1330. .now-box {
  1331. border: 5px solid #0094fe;
  1332. }
  1333. .now-l-line {
  1334. background-color: #0094fe;
  1335. }
  1336. .now-s-line {
  1337. border-color: #97caf6;
  1338. }
  1339. .now-point {
  1340. filter: grayscale(1);
  1341. }
  1342. .info-line-text-table {
  1343. width: 180px !important;
  1344. }
  1345. .upload-plus-icon {
  1346. height: 15%;
  1347. color: rgb(139, 147, 156);
  1348. line-height: 100px;
  1349. font-size: 40px;
  1350. font-weight: 200;
  1351. }
  1352. .upload-text {
  1353. height: 25%;
  1354. color: rgb(139, 147, 156);
  1355. }
  1356. .info-gap {
  1357. width: 40px;
  1358. font-size: 14px;
  1359. overflow: visible;
  1360. white-space: nowrap;
  1361. color: #006ebc;
  1362. cursor: pointer;
  1363. }
  1364. .unit {
  1365. font-size: 14px;
  1366. font-family: PingFangSC-Regular, PingFang SC;
  1367. font-weight: 400;
  1368. color: #353a42;
  1369. line-height: 100%;
  1370. margin: 0 10px;
  1371. }
  1372. </style>