voyageList.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. <template>
  2. <div class="line-container-p24">
  3. <div class="df jcsb aic">
  4. <div class="df aic">
  5. <div
  6. @click="changeVoyageType(0)"
  7. :class="
  8. status == 0
  9. ? 'currentbtn radio-btns left-radius'
  10. : 'radio-btns left-radius'
  11. "
  12. >
  13. 全部航次
  14. </div>
  15. <div
  16. style="border-left: none"
  17. @click="changeVoyageType(1)"
  18. :class="status == 1 ? 'currentbtn radio-btns' : 'radio-btns'"
  19. >
  20. 装货中
  21. </div>
  22. <div
  23. style="border-left: none"
  24. @click="changeVoyageType(2)"
  25. :class="status == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
  26. >
  27. 运输中
  28. </div>
  29. <div
  30. style="border-left: none"
  31. @click="changeVoyageType(3)"
  32. :class="status == 3 ? 'currentbtn radio-btns' : 'radio-btns'"
  33. >
  34. 卸货中
  35. </div>
  36. <div
  37. @click="changeVoyageType(4)"
  38. :class="
  39. status == 4
  40. ? 'currentbtn radio-btns right-radius'
  41. : 'radio-btns right-radius '
  42. "
  43. style="margin-right: 40px; border-left: none"
  44. >
  45. 历史航次
  46. </div>
  47. <!-- <div style="color: #333; margin-right: 10px; font-size: 14px">
  48. 预计到港时间:
  49. </div>
  50. <el-radio-group v-model="sortradio">
  51. <el-radio :label="-1">默认排序</el-radio>
  52. <el-radio :label="0">降序</el-radio>
  53. <el-radio :label="1">升序</el-radio>
  54. </el-radio-group> -->
  55. <el-input
  56. placeholder="请输入船名/MMSI"
  57. prefix-icon="el-icon-search"
  58. v-model="term"
  59. clearable
  60. style="width: 240px"
  61. ></el-input>
  62. <div class="search-btn" @click="getVoyageList()">查询</div>
  63. </div>
  64. <!-- <div class="cargo-owner-add" @click="voyageAddDialogVisible = true">
  65. 添加航次
  66. </div> -->
  67. <div>
  68. <el-button
  69. type="primary"
  70. size="small"
  71. @click="showExportModal('航次列表')"
  72. >导出航次列表</el-button
  73. >
  74. <el-button
  75. type="primary"
  76. size="small"
  77. v-auth="'MULTDOWNLOADSHIPTRACK'"
  78. @click="showExportModal('航次跟踪')"
  79. >导出航次跟踪</el-button
  80. >
  81. <el-button
  82. type="primary"
  83. size="small"
  84. @click="showExportModal('卸货记录')"
  85. v-auth="'MULTDOWNLOADDISCHARGE'"
  86. >导出卸货记录</el-button
  87. >
  88. <el-button
  89. v-auth="'DOWNLOADFYDI'"
  90. type="primary"
  91. size="small"
  92. @click="downloadFYDI"
  93. >下载FYDI指数</el-button
  94. >
  95. </div>
  96. </div>
  97. <el-dialog
  98. v-model="exportModalVisable"
  99. :title="exportModalTitle"
  100. width="200px"
  101. >
  102. <div class="df aic jcsb">
  103. <div class="df aic">
  104. <div class="mr20">请选择月份:</div>
  105. <el-date-picker
  106. v-model="currentMonth"
  107. type="month"
  108. placeholder="请选择年月"
  109. value-format="YYYYMM"
  110. :disabled="isLoadingZip"
  111. />
  112. </div>
  113. <el-button type="primary" @click="exportZip" :loading="isLoadingZip"
  114. >导出{{ exportModalTitle }}</el-button
  115. >
  116. </div>
  117. </el-dialog>
  118. <el-dialog v-model="voyageAddDialogVisible" title="添加航次">
  119. <el-form
  120. :rules="rules"
  121. label-position="right"
  122. label-width="80px"
  123. ref="addVoyageForm"
  124. :model="voyageForm"
  125. :before-close="resetAddVoyageForm"
  126. >
  127. <div class="df ffw">
  128. <!-- <el-form-item prop="voyageName" label="航次名称">
  129. <el-input v-model="voyageForm.voyageName"></el-input>
  130. </el-form-item>
  131. <el-form-item label=""></el-form-item> -->
  132. <el-form-item prop="shipName" label="船舶">
  133. <!-- <el-input v-model="voyageForm.shipOwnerId"></el-input> -->
  134. <el-autocomplete
  135. v-model="voyageForm.shipName"
  136. :fetch-suggestions="searchShip"
  137. placeholder="选择船舶"
  138. @blur="clear('shipId')"
  139. @select="selectShip"
  140. />
  141. </el-form-item>
  142. <el-form-item prop="cargoOwnerName" label="货主">
  143. <el-autocomplete
  144. v-model="voyageForm.cargoOwnerName"
  145. :fetch-suggestions="searchCargoOwner"
  146. @blur="clear('cargoOwnerId')"
  147. placeholder="选择货主"
  148. @select="selectCargoOwner"
  149. />
  150. </el-form-item>
  151. <el-form-item prop="startTime" label="开始时间">
  152. <el-date-picker
  153. v-model="voyageForm.startTime"
  154. type="date"
  155. value-format="YYYY/MM/DD"
  156. placeholder="航次开始时间"
  157. ></el-date-picker>
  158. </el-form-item>
  159. <el-form-item prop="endTime" label="结束时间">
  160. <el-date-picker
  161. v-model="voyageForm.endTime"
  162. type="date"
  163. value-format="YYYY/MM/DD"
  164. placeholder="航次结束时间"
  165. disabled
  166. ></el-date-picker>
  167. </el-form-item>
  168. <el-form-item prop="loadPort" label="装货港">
  169. <el-autocomplete
  170. v-model="voyageForm.loadPort"
  171. :fetch-suggestions="getCol"
  172. @blur="clear('loadPort')"
  173. placeholder="选择装货港"
  174. @select="selectLoadPort"
  175. />
  176. </el-form-item>
  177. <el-form-item prop="dischargeProt" label="卸货港">
  178. <el-autocomplete
  179. v-model="voyageForm.dischargeProt"
  180. :fetch-suggestions="getCol"
  181. @blur="clear('dischargeProt')"
  182. placeholder="选择卸货港"
  183. @select="selectDischargeProt"
  184. />
  185. </el-form-item>
  186. <el-form-item prop="cargo" label="货种">
  187. <el-input v-model="voyageForm.cargo"></el-input>
  188. </el-form-item>
  189. <el-form-item prop="tons" label="吨位">
  190. <el-input v-model="voyageForm.tons"></el-input>
  191. </el-form-item>
  192. </div>
  193. </el-form>
  194. <template #footer>
  195. <span class="dialog-footer">
  196. <el-button @click="resetAddVoyageForm">取消</el-button>
  197. <el-button type="primary" @click="addVoyage">确定</el-button>
  198. </span>
  199. </template>
  200. </el-dialog>
  201. <el-table
  202. :data="tableData"
  203. stripe
  204. style="width: 100%; margin-top: 24px"
  205. :row-style="rowStyle"
  206. >
  207. <!-- <el-table-column
  208. type="index"
  209. label="序号"
  210. min-width="80"
  211. align="center"
  212. ></el-table-column> -->
  213. <el-table-column
  214. prop="voyageName"
  215. label="航次名称"
  216. min-width="140"
  217. align="center"
  218. ></el-table-column>
  219. <el-table-column
  220. prop="loadDiscPort"
  221. label="装货港-卸货港"
  222. min-width="160"
  223. align="center"
  224. ></el-table-column>
  225. <!-- <el-table-column
  226. prop="setSailTime"
  227. label="开航时间"
  228. min-width="100"
  229. align="center"
  230. ></el-table-column> -->
  231. <el-table-column
  232. prop="expectedArrivalTime"
  233. label="预计到港时间"
  234. sortable
  235. min-width="100"
  236. align="center"
  237. >
  238. <template v-slot="scope">
  239. {{ scope.row.arrived ? "已到港" : scope.row.expectedArrivalTime }}
  240. </template>
  241. </el-table-column>
  242. <el-table-column
  243. prop="abnormalStatus"
  244. label="航次状态"
  245. min-width="80"
  246. align="center"
  247. >
  248. <template v-slot="scope">
  249. {{ scope.row.abnormalStatus == 0 ? "正常" : "异常" }}
  250. </template>
  251. </el-table-column>
  252. <el-table-column
  253. prop="daysInPort"
  254. label="在港天数"
  255. sortable
  256. min-width="70"
  257. align="center"
  258. ></el-table-column>
  259. <el-table-column
  260. prop="todayPhotoCount"
  261. label="今日照片"
  262. min-width="70"
  263. align="center"
  264. ></el-table-column>
  265. <el-table-column
  266. prop="cargo"
  267. label="货种"
  268. min-width="70"
  269. align="center"
  270. ></el-table-column>
  271. <el-table-column
  272. prop="actualLoadTons"
  273. label="装载吨位"
  274. min-width="80"
  275. align="center"
  276. ></el-table-column>
  277. <el-table-column
  278. prop="unloadedtons"
  279. label="已卸货吨位"
  280. min-width="80"
  281. align="center"
  282. ></el-table-column>
  283. <el-table-column
  284. prop="remainTons"
  285. label="剩余吨位"
  286. min-width="80"
  287. align="center"
  288. ></el-table-column>
  289. <!-- <el-table-column
  290. prop="waybillStatus"
  291. sortable
  292. label="签单状态"
  293. min-width="100"
  294. align="center"
  295. >
  296. <template v-slot="scope">
  297. {{
  298. scope.row.waybillStatus == 0
  299. ? ""
  300. : scope.row.waybillStatus == 1
  301. ? "未签单"
  302. : "已签单"
  303. }}
  304. </template>
  305. </el-table-column> -->
  306. <!-- <el-table-column
  307. prop="transStatus"
  308. label="船舶状态"
  309. min-width="100"
  310. align="center"
  311. ></el-table-column> -->
  312. <el-table-column
  313. prop="hasInsurance"
  314. label="保险状态"
  315. min-width="70"
  316. align="center"
  317. >
  318. <template v-slot="scope">
  319. {{ scope.row.hasInsurance == 0 ? "未购买" : "已购买" }}
  320. </template>
  321. </el-table-column>
  322. <!-- <el-table-column
  323. sortable
  324. prop="createTime"
  325. label="创建时间"
  326. min-width="100"
  327. align="center"
  328. >
  329. <template v-slot="scope">
  330. {{ subTimeStr(scope.row.createTime) }}
  331. </template>
  332. </el-table-column>
  333. <el-table-column
  334. prop="remark"
  335. label="备注"
  336. min-width="100"
  337. align="center"
  338. ></el-table-column> -->
  339. <el-table-column
  340. v-auth="'VOYAGEDETAIL'"
  341. label="操作"
  342. min-width="80"
  343. align="center"
  344. fixed="right"
  345. >
  346. <template v-slot="scope">
  347. <el-button
  348. @click="voyageDetail(scope.row.id, tableData)"
  349. type="text"
  350. size="small"
  351. >
  352. 查看详情
  353. </el-button>
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. <div style="width: 100%; text-align: right; margin-top: 43px">
  358. <el-pagination
  359. background
  360. layout="prev, pager, next"
  361. :total="total"
  362. @current-change="pageChange"
  363. ></el-pagination>
  364. </div>
  365. </div>
  366. </template>
  367. <script setup>
  368. import { ref, h, reactive, toRefs, onMounted } from "vue";
  369. import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
  370. import store from "../../store";
  371. import router from "../../router";
  372. import md5 from "md5";
  373. import api from "../../apis/fetch";
  374. import _ from "lodash";
  375. import { subTimeStr } from "../../utils/utils";
  376. import downloadBlobFile from "../../utils/downloadBlobFile";
  377. import url from "../../apis/config";
  378. let currentPage = ref(1);
  379. let term = ref("");
  380. let tableData = ref([]);
  381. let total = ref(0);
  382. let status = ref(0);
  383. async function getVoyageList() {
  384. tableData.value = [];
  385. let res = await api.getVoyageList({
  386. loginAccountId: localStorage.loginAccountId,
  387. cargoOwnerId: localStorage.userId,
  388. shipId: 0,
  389. status: status.value,
  390. term: term.value,
  391. currentPage: currentPage.value,
  392. size: 10,
  393. });
  394. term.value = "";
  395. if (res.data.status == 0) {
  396. tableData.value = res.data.result;
  397. total.value = res.data.total;
  398. } else {
  399. ElNotification({
  400. type: "error",
  401. title: res.data.msg,
  402. });
  403. }
  404. }
  405. function changeVoyageType(s) {
  406. term.value = "";
  407. currentPage.value = 1;
  408. status.value = s;
  409. getVoyageList();
  410. }
  411. async function voyageDetail(id) {
  412. router.push({
  413. path: "/voyage/voyageDetail",
  414. query: {
  415. id,
  416. },
  417. });
  418. }
  419. function pageChange(e) {
  420. currentPage.value = e;
  421. getVoyageList();
  422. }
  423. function goToVoyageAdd() {
  424. router.push({
  425. path: "/voyage/voyageAdd",
  426. });
  427. }
  428. let voyageAddDialogVisible = ref(false);
  429. const rules = reactive({
  430. rules: {
  431. voyageName: [
  432. { required: false, message: "请填写航次名称", trigger: "blur" },
  433. ],
  434. shipName: [{ required: true, message: "请选择船舶", trigger: "blur" }],
  435. cargoOwnerName: [
  436. { required: true, message: "请选择货主", trigger: "blur" },
  437. ],
  438. startTime: [{ required: true, message: "请填写开始时间", trigger: "blur" }],
  439. loadPort: [{ required: true, message: "请填写装货港", trigger: "blur" }],
  440. dischargeProt: [
  441. { required: true, message: "请填写卸货港", trigger: "blur" },
  442. ],
  443. cargo: [{ required: true, message: "请填写货种", trigger: "blur" }],
  444. tons: [{ required: true, message: "请填写吨位", trigger: "blur" }],
  445. },
  446. });
  447. let voyageForm = reactive({
  448. voyageForm: {
  449. voyageName: "",
  450. cargoOwnerId: "",
  451. cargoOwnerName: "",
  452. startTime: "",
  453. endTime: "",
  454. loadPort: "",
  455. dischargeProt: "",
  456. cargo: "",
  457. tons: "",
  458. loadPortId: "",
  459. dischargeProtId: "",
  460. shipId: "",
  461. shipName: "",
  462. },
  463. });
  464. function clear(type) {
  465. setTimeout(() => {
  466. switch (type) {
  467. case "shipId": {
  468. let index = ref(-1);
  469. for (let i in shipsCache.value) {
  470. if (voyageForm.voyageForm.shipName == shipsCache.value[i].shipName) {
  471. index.value = i;
  472. break;
  473. }
  474. }
  475. if (index.value != -1) {
  476. voyageForm.voyageForm.shipId = shipsCache.value[index.value].shipId;
  477. } else {
  478. let b = shipsCache.value.some((item) => {
  479. return (
  480. item.shipId == voyageForm.voyageForm.shipId &&
  481. item.shipName == voyageForm.voyageForm.shipName
  482. );
  483. });
  484. voyageForm.voyageForm["shipId"] = "";
  485. voyageForm.voyageForm["shipName"] = "";
  486. }
  487. break;
  488. }
  489. case "cargoOwnerId": {
  490. let index = ref(-1);
  491. for (let i in cargoOwnersCache.value) {
  492. if (
  493. voyageForm.voyageForm.cargoOwnerName ==
  494. cargoOwnersCache.value[i].userName
  495. ) {
  496. index.value = i;
  497. break;
  498. }
  499. }
  500. if (index.value != -1) {
  501. voyageForm.voyageForm.cargoOwnerId =
  502. cargoOwnersCache.value[index.value].userId;
  503. } else {
  504. let b = cargoOwnersCache.value.some((item) => {
  505. return (
  506. item.userId == voyageForm.voyageForm.cargoOwnerId &&
  507. item.userName == voyageForm.voyageForm.cargoOwnerName
  508. );
  509. });
  510. if (!b) {
  511. voyageForm.voyageForm["cargoOwnerId"] = "";
  512. voyageForm.voyageForm["cargoOwnerName"] = "";
  513. }
  514. }
  515. break;
  516. }
  517. case "loadPort": {
  518. let index = ref(-1);
  519. for (let i in colCache.value) {
  520. if (voyageForm.voyageForm.loadPort == colCache.value[i].value) {
  521. index.value = i;
  522. break;
  523. }
  524. }
  525. if (index.value != -1) {
  526. voyageForm.voyageForm.loadPortId = colCache.value[index.value].key;
  527. } else {
  528. let b = colCache.value.some((item) => {
  529. return (
  530. item.value == voyageForm.voyageForm.loadPort &&
  531. item.key == voyageForm.voyageForm.loadPortId
  532. );
  533. });
  534. if (!b) {
  535. voyageForm.voyageForm["loadPort"] = "";
  536. voyageForm.voyageForm["loadPortId"] = "";
  537. }
  538. }
  539. break;
  540. }
  541. case "dischargeProt": {
  542. let index = ref(-1);
  543. for (let i in colCache.value) {
  544. if (voyageForm.voyageForm.dischargeProt == colCache.value[i].value) {
  545. index.value = i;
  546. break;
  547. }
  548. }
  549. if (index.value != -1) {
  550. voyageForm.voyageForm.dischargeProtId =
  551. colCache.value[index.value].key;
  552. } else {
  553. let b = colCache.value.some((item) => {
  554. return (
  555. item.value == voyageForm.voyageForm.dischargeProt &&
  556. item.key == voyageForm.voyageForm.dischargeProtId
  557. );
  558. });
  559. if (!b) {
  560. voyageForm.voyageForm["dischargeProt"] = "";
  561. voyageForm.voyageForm["dischargeProtId"] = "";
  562. }
  563. }
  564. break;
  565. }
  566. }
  567. }, 200);
  568. }
  569. let addVoyageForm = ref(null);
  570. async function addVoyage() {
  571. addVoyageForm.value.validate(async (valid) => {
  572. if (valid) {
  573. console.log("提交", voyageForm.voyageForm);
  574. let res = await api.addVoyage({
  575. ...voyageForm.voyageForm,
  576. });
  577. if (res.data.status == 0) {
  578. ElNotification({
  579. title: res.data.msg,
  580. type: "success",
  581. });
  582. resetAddVoyageForm();
  583. getVoyageList();
  584. } else {
  585. console.log(res);
  586. ElNotification({
  587. title: res.data.msg,
  588. type: "error",
  589. });
  590. }
  591. } else {
  592. console.log("未提交", voyageForm.voyageForm);
  593. }
  594. });
  595. }
  596. let shipsCache = ref([]);
  597. let colCache = ref([]);
  598. let cargoOwnersCache = ref([]);
  599. const searchShip = _.debounce(
  600. async (queryString, cb) => {
  601. if (!queryString) return;
  602. let res = await api.searchShip({
  603. term: queryString,
  604. });
  605. let ships = [];
  606. if (res.data.status == 0) {
  607. ships = res.data.result;
  608. for (let i of ships) {
  609. i.value = `${i.shipName}`;
  610. }
  611. shipsCache.value = ships;
  612. cb(ships);
  613. }
  614. },
  615. 1000,
  616. { leading: true }
  617. );
  618. const selectShip = (item) => {
  619. voyageForm.voyageForm.shipId = item.shipId;
  620. };
  621. const searchCargoOwner = _.debounce(
  622. async (queryString, cb) => {
  623. if (!queryString) return;
  624. let res = await api.searchUser({
  625. term: queryString,
  626. identity: 2,
  627. });
  628. let cargoOwners = [];
  629. if (res.data.status == 0) {
  630. cargoOwners = res.data.result;
  631. for (let i of cargoOwners) {
  632. i.value = `${i.userName}`;
  633. }
  634. cargoOwnersCache.value = cargoOwners;
  635. cb(cargoOwners);
  636. }
  637. },
  638. 1000,
  639. { leading: true }
  640. );
  641. const selectCargoOwner = (item) => {
  642. voyageForm.voyageForm.cargoOwnerId = item.userId;
  643. };
  644. const getCol = _.debounce(
  645. async (queryString, cb) => {
  646. if (!queryString) return;
  647. let res = await api.getCol({
  648. term: queryString,
  649. });
  650. if (res.data.status == 0) {
  651. colCache.value = [...colCache.value, ...res.data.result];
  652. colCache.value = _.uniqBy(colCache.value, "key");
  653. cb(res.data.result);
  654. }
  655. },
  656. 1000,
  657. { leading: true }
  658. );
  659. const selectLoadPort = (item) => {
  660. voyageForm.voyageForm.loadPortId = item.key;
  661. voyageForm.voyageForm.loadPort = item.value;
  662. };
  663. const selectDischargeProt = (item) => {
  664. voyageForm.voyageForm.dischargeProtId = item.key;
  665. voyageForm.voyageForm.dischargeProt = item.value;
  666. };
  667. function resetAddVoyageForm() {
  668. voyageAddDialogVisible.value = false;
  669. addVoyageForm.value.resetFields();
  670. }
  671. let sortradio = ref(0);
  672. async function downloadFYDI() {
  673. let res0 = await api.getFYFIDownloadUrl({
  674. loginAccountId: localStorage.loginAccountId,
  675. });
  676. let url = res0.data.result;
  677. let a = document.createElement("a");
  678. a.setAttribute("href", url);
  679. a.click();
  680. }
  681. let exportModalVisable = ref(false);
  682. let exportModalTitle = ref("");
  683. let currentMonth = ref("");
  684. function showExportModal(type) {
  685. exportModalVisable.value = true;
  686. exportModalTitle.value = type;
  687. }
  688. let isLoadingZip = ref(false);
  689. async function exportZip() {
  690. if (!currentMonth.value) return;
  691. isLoadingZip.value = true;
  692. let path = "";
  693. let type = "";
  694. switch (exportModalTitle.value) {
  695. case "航次列表": {
  696. path = "/voyage/exportListExcel";
  697. type =
  698. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8";
  699. break;
  700. }
  701. case "航次跟踪": {
  702. path = "/voyage/exportMultExcel";
  703. type = "application/zip";
  704. break;
  705. }
  706. case "卸货记录": {
  707. path = "/voyage/exportMultDischargeExcel";
  708. type = "application/zip";
  709. break;
  710. }
  711. }
  712. let res = await downloadBlobFile(
  713. `${url.baseurl}${path}`,
  714. { loginAccountId: localStorage.loginAccountId, date: currentMonth.value },
  715. `${exportModalTitle.value}${currentMonth.value}`,
  716. "post",
  717. type
  718. );
  719. ElNotification({
  720. title: "导出成功!",
  721. type: "success",
  722. });
  723. isLoadingZip.value = false;
  724. currentMonth.value = "";
  725. exportModalVisable.value = false;
  726. }
  727. function rowStyle({ row }) {
  728. let rowStyle = {};
  729. if (row.daysInPort >= 30) {
  730. rowStyle.color = "red";
  731. return rowStyle;
  732. }
  733. }
  734. onMounted(() => {
  735. getVoyageList();
  736. });
  737. </script>
  738. <style scoped>
  739. .search-btn {
  740. display: inline-block;
  741. width: 60px;
  742. height: 32px;
  743. background: #0094fe;
  744. border-radius: 2px;
  745. font-size: 14px;
  746. font-family: PingFangSC-Regular, PingFang SC;
  747. font-weight: 400;
  748. color: #ffffff;
  749. text-align: center;
  750. line-height: 32px;
  751. margin-left: 10px;
  752. cursor: pointer;
  753. }
  754. .cargo-owner-add {
  755. width: 80px;
  756. height: 32px;
  757. border-radius: 2px;
  758. border: 1px solid #0094fe;
  759. font-size: 14px;
  760. font-family: PingFangSC-Regular, PingFang SC;
  761. font-weight: 400;
  762. color: #0094fe;
  763. line-height: 32px;
  764. text-align: center;
  765. cursor: pointer;
  766. }
  767. :deep().el-dialog {
  768. width: 560px;
  769. padding: 20px 50px;
  770. border-radius: 6px;
  771. }
  772. :deep() .el-dialog__title {
  773. font-size: 18px;
  774. font-family: PingFangSC-Regular, PingFang SC;
  775. font-weight: 400;
  776. color: #0094fe;
  777. }
  778. .normal-label {
  779. font-size: 14px;
  780. font-family: PingFangSC-Regular, PingFang SC;
  781. font-weight: 400;
  782. color: #353a42;
  783. margin-right: 10px;
  784. }
  785. .show-input {
  786. width: 280px;
  787. height: 32px;
  788. background: #ffffff;
  789. border-radius: 2px;
  790. border: 1px solid #dee0e3;
  791. font-size: 14px;
  792. font-family: PingFangSC-Regular, PingFang SC;
  793. font-weight: 400;
  794. color: #333333;
  795. line-height: 32px;
  796. padding-left: 12px;
  797. margin-right: 40px;
  798. }
  799. .radio-btns {
  800. height: 38px;
  801. width: 70px;
  802. border: 1px solid #1486f9;
  803. line-height: 38px;
  804. text-align: center;
  805. font-size: 14px;
  806. font-family: PingFangSC-Regular, PingFang SC;
  807. font-weight: 400;
  808. color: #0094fe;
  809. cursor: pointer;
  810. }
  811. .left-radius {
  812. border-top-left-radius: 19px;
  813. border-bottom-left-radius: 19px;
  814. width: 80px;
  815. }
  816. .right-radius {
  817. border-top-right-radius: 19px;
  818. border-bottom-right-radius: 19px;
  819. width: 80px;
  820. }
  821. .currentbtn {
  822. background: #1486f9;
  823. color: #fff;
  824. }
  825. .search-btn {
  826. display: inline-block;
  827. width: 60px;
  828. height: 38px;
  829. background: #0094fe;
  830. border-radius: 2px;
  831. font-size: 14px;
  832. font-family: PingFangSC-Regular, PingFang SC;
  833. font-weight: 400;
  834. color: #ffffff;
  835. text-align: center;
  836. line-height: 38px;
  837. margin-left: 10px;
  838. cursor: pointer;
  839. }
  840. .voyage-add {
  841. width: 80px;
  842. height: 36px;
  843. border-radius: 2px;
  844. border: 1px solid #0094fe;
  845. font-size: 14px;
  846. font-family: PingFangSC-Regular, PingFang SC;
  847. font-weight: 400;
  848. color: #0094fe;
  849. line-height: 36px;
  850. text-align: center;
  851. cursor: pointer;
  852. }
  853. :deep() .el-dialog {
  854. width: 800px;
  855. }
  856. :deep() .el-form-item {
  857. margin-right: 22px;
  858. width: 300px;
  859. }
  860. :deep() .el-autocomplete {
  861. width: 220px;
  862. }
  863. .el-radio {
  864. margin-right: 10px;
  865. }
  866. .el-radio:last-child {
  867. margin-right: 20px;
  868. }
  869. </style>