losrealtime.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <template>
  2. <div class="container-losrealtime">
  3. <div class="home-container" style="padding: 0px 5px 5px 5px;">
  4. <el-card class="home-container__card">
  5. <div class="title">
  6. <span>
  7. {{ $t("btn118n.businessReminder") }}
  8. </span>
  9. <span class="right">
  10. <!-- <div class="right_but">
  11. <div class="right_but_left" :class="{ right_but_active: isActive == 1 }" @click="inDay">
  12. 本日
  13. </div>
  14. <div class="right_but_right" :class="{ right_but_active: isActive == 2 }" @click="inMoon">
  15. 本月
  16. </div>
  17. </div>
  18. <el-date-picker v-model="realDate" type="daterange" size="mini" start-placeholder="开始日期"
  19. end-placeholder="结束日期" value-format="yyyy-MM-dd" style="margin-right:10px;width:240px" :clearable="false">
  20. </el-date-picker>
  21. <el-button type="primary" size="mini" icon="el-icon-search" style="margin-right:10px;" @click="search"
  22. circle></el-button> -->
  23. <i class="el-icon-refresh-right" style="cursor: pointer;font-size:20px;line-height: 15px;" @click="refresh"></i>
  24. </span>
  25. </div>
  26. <div style="display: flex;">
  27. <div class="content" v-loading="loading">
  28. <div class="content-item">
  29. <div class="card" @click.stop="remindDialog('开船提醒', 1)">
  30. <div class="card-content">
  31. <span class="card-content-num" style="color: #F56C6C;">{{ remind.sailRemind }}</span>
  32. <span class="card-content-text">{{ $t("sea118n.onBoard") }}</span>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="divider" />
  37. <div class="content-item">
  38. <div class="card" @click.stop="remindDialog('到港提醒', 2)">
  39. <div class="card-content">
  40. <span class="card-content-num" style="color: #F56C6C;">{{ remind.arrivalReminder }}</span>
  41. <span class="card-content-text">{{ $t("sea118n.onArrival") }}</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="divider" />
  46. <div class="content-item">
  47. <div class="card" @click.stop="remindDialog('截港提醒', 3)">
  48. <div class="card-content">
  49. <span class="card-content-num" style="color: #F56C6C;">{{ remind.cutOffPortRemind }}</span>
  50. <span class="card-content-text">{{ $t("sea118n.portCutofftime") }}</span>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="divider" />
  55. <div class="content-item">
  56. <div class="card" @click.stop="remindDialog('截单提醒', 4)">
  57. <div class="card-content">
  58. <span class="card-content-num" style="color: #F56C6C;">{{ remind.cutSingleRemind }}</span>
  59. <span class="card-content-text">{{ $t("sea118n.docCutofftime") }}</span>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="divider" />
  64. <div class="content-item">
  65. <div class="card" @click.stop="remindDialog('开船未付', 5)">
  66. <div class="card-content">
  67. <span class="card-content-num" style="color: #F56C6C;">{{ remind.sailUnpaidRemind }}</span>
  68. <span class="card-content-text">{{ $t("btn118n.needDebit") }}</span>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </el-card>
  75. <el-dialog :title="remindTile" :visible.sync="dialogVisible" width="50%" append-to-body>
  76. <span v-if="dialogVisible">
  77. <avue-crud
  78. :table-loading="loading"
  79. :option="option"
  80. :data="dataList"
  81. @on-load="onLoad"
  82. :page.sync="page"
  83. @current-change="currentChange"
  84. @size-change="sizeChange"
  85. >
  86. <template slot="shortName" slot-scope="{ row }">
  87. <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.shortName }}</span>
  88. </template>
  89. <template slot="mblno" slot-scope="{ row }">
  90. <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.mblno }}</span>
  91. </template>
  92. </avue-crud>
  93. </span>
  94. <span slot="footer" class="dialog-footer">
  95. <el-button @click="dialogVisible = false" size="mini">关 闭</el-button>
  96. </span>
  97. </el-dialog>
  98. </div>
  99. <div class="home-container" style="padding: 0px 5px 5px 0px;">
  100. <el-card class="home-container__card">
  101. <div class="title">
  102. <span>
  103. {{ $t("btn118n.timeData") }}
  104. </span>
  105. <span class="right">
  106. <div class="right_but">
  107. <div class="right_but_left" :class="{ right_but_active: isActive == 1 }" @click="inDay">
  108. {{ $t("btn118n.theDay") }}
  109. </div>
  110. <div class="right_but_right" :class="{ right_but_active: isActive == 2 }" @click="inMoon">
  111. {{ $t("btn118n.theMonth") }}
  112. </div>
  113. </div>
  114. <el-date-picker
  115. v-model="realDate"
  116. type="daterange"
  117. size="mini"
  118. start-placeholder="开始日期"
  119. end-placeholder="结束日期"
  120. value-format="yyyy-MM-dd"
  121. style="margin-right:10px;width:240px"
  122. :clearable="false"
  123. >
  124. </el-date-picker>
  125. <el-button type="primary" size="mini" icon="el-icon-search" style="margin-right:10px;" @click="search" circle></el-button>
  126. <i class="el-icon-refresh-right" style="cursor: pointer;font-size:20px;line-height: 15px;" @click="refresh"></i>
  127. </span>
  128. </div>
  129. <div style="display: flex;">
  130. <div class="content" v-loading="loading">
  131. <div class="content-item">
  132. <div class="card">
  133. <div class="card-content">
  134. <span class="card-content-num">{{ data.HYCK }}</span>
  135. <span class="card-content-text">{{ $t("btn118n.export") }}</span>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="divider" />
  140. <div class="content-item">
  141. <div class="card">
  142. <div class="card-content">
  143. <span class="card-content-num">{{ data.HYJK }}</span>
  144. <span class="card-content-text">{{ $t("btn118n.import") }}</span>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="divider" v-if="tenantId == '128478' || tenantId == '762420'" />
  149. <div class="content-item" v-if="tenantId == '128478' || tenantId == '762420'">
  150. <div class="card">
  151. <div class="card-content">
  152. <span class="card-content-num">{{ data.OWN ? data.OWN : 0 }}</span>
  153. <span class="card-content-text">{{ $t("btn118n.owGet") }}</span>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="divider" v-if="tenantId == '128478' || tenantId == '762420'" />
  158. <div class="content-item" v-if="tenantId == '128478' || tenantId == '762420'">
  159. <div class="card">
  160. <div class="card-content">
  161. <span class="card-content-num">{{ data.OWF ? data.OWF : 0 }}</span>
  162. <span class="card-content-text">{{ $t("btn118n.owRelease") }}</span>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </el-card>
  169. </div>
  170. </div>
  171. </template>
  172. <script>
  173. import { defaultDate2, defaultDate3 } from "@/util/date";
  174. import { businessSum, arrivalReminder, arrivalReminderList, realTimeData, shipRealTimeData } from "@/api/wel";
  175. export default {
  176. name: "basicContainer",
  177. props: {
  178. sysType: Number
  179. },
  180. data() {
  181. return {
  182. tenantId: this.$store.getters.userInfo.tenant_id,
  183. type: null,
  184. remindTile: null,
  185. dialogVisible: false,
  186. remind: 0,
  187. isActive: 1,
  188. loading: false,
  189. realDate: [],
  190. data: {},
  191. saberTenantId: "",
  192. dataList: [],
  193. option: {
  194. header: false,
  195. menu: false,
  196. column: [
  197. {
  198. label: "客户名称",
  199. prop: "shortName",
  200. overHidden: true
  201. },
  202. {
  203. label: "提单号",
  204. prop: "mblno",
  205. overHidden: true
  206. },
  207. {
  208. label: "ETD",
  209. prop: "etd",
  210. overHidden: true
  211. },
  212. {
  213. label: "ETA",
  214. prop: "eta",
  215. overHidden: true
  216. },
  217. {
  218. label: "截港日期",
  219. prop: "cyReturnTime",
  220. overHidden: true
  221. },
  222. {
  223. label: "截单日期",
  224. prop: "cyTrailerTime",
  225. overHidden: true
  226. }
  227. ]
  228. },
  229. page: {
  230. pageSize: 10,
  231. currentPage: 1,
  232. total: 0
  233. }
  234. };
  235. },
  236. created() {
  237. this.saberTenantId = JSON.parse(localStorage.getItem("saber-tenantId")).content;
  238. this.realDate = defaultDate2();
  239. },
  240. mounted() {
  241. this.businessSumfun();
  242. this.arrivalReminder();
  243. },
  244. methods: {
  245. remindDialog(name, type) {
  246. this.dataList = [];
  247. this.page.total = 0;
  248. this.type = type;
  249. this.remindTile = name;
  250. this.dialogVisible = true;
  251. },
  252. rowEdit(row) {
  253. if (row.businessType == "SE") {
  254. if (this.$store.getters.seaFEStatus) {
  255. this.$alert("海运出口页面已存在,请关闭海运出口再进行操作", "温馨提示", {
  256. confirmButtonText: "确定",
  257. type: "warning",
  258. callback: action => {}
  259. });
  260. } else {
  261. this.$router.push({
  262. path: `/iosBasicData/SeafreightExportF/bills/index`,
  263. query: {
  264. id: row.id
  265. }
  266. });
  267. this.dialogVisible = false;
  268. }
  269. }
  270. if (row.businessType == "SI") {
  271. if (this.$store.getters.OceanFIStatus) {
  272. this.$alert("海运进口页面已存在,请关闭海运进口再进行操作", "温馨提示", {
  273. confirmButtonText: "确定",
  274. type: "warning",
  275. callback: action => {}
  276. });
  277. } else {
  278. this.$router.push({
  279. path: `/iosBasicData/OceanFreightImport/bills/index`,
  280. query: {
  281. id: row.id
  282. }
  283. });
  284. this.dialogVisible = false;
  285. }
  286. }
  287. },
  288. onLoad(page, params = {}) {
  289. let obj = {
  290. type: this.type
  291. };
  292. this.loading = true;
  293. arrivalReminderList(page.currentPage, page.pageSize, obj)
  294. .then(res => {
  295. this.dataList = res.data.data.records;
  296. this.page.total = res.data.data.total;
  297. })
  298. .finally(() => {
  299. this.loading = false;
  300. });
  301. },
  302. currentChange(currentPage) {
  303. this.page.currentPage = currentPage;
  304. },
  305. sizeChange(pageSize) {
  306. this.page.pageSize = pageSize;
  307. },
  308. // 获取数据
  309. businessSumfun() {
  310. businessSum({
  311. dateStart: this.realDate[0] + " 00:00:00",
  312. dateEnd: this.realDate[1] + " 23:59:59"
  313. }).then(res => {
  314. this.data = res.data.data;
  315. });
  316. },
  317. arrivalReminder() {
  318. arrivalReminder().then(res => {
  319. this.remind = res.data.data;
  320. });
  321. },
  322. init() {
  323. if (this.realDate == null) {
  324. return this.$message.error("请选择日期");
  325. }
  326. this.businessSumfun();
  327. this.arrivalReminder();
  328. },
  329. refresh() {
  330. this.init();
  331. },
  332. inDay() {
  333. this.isActive = 1;
  334. this.realDate = defaultDate2();
  335. this.init();
  336. },
  337. inMoon() {
  338. this.isActive = 2;
  339. this.realDate = defaultDate3();
  340. this.init();
  341. },
  342. search() {
  343. this.isActive = 3;
  344. this.init();
  345. }
  346. }
  347. };
  348. </script>
  349. <style lang="scss" scoped>
  350. .home-container {
  351. box-sizing: border-box;
  352. height: 100%;
  353. width: 100%;
  354. ::v-deep .el-card__body {
  355. padding: 10px 15px;
  356. font-size: 14px;
  357. }
  358. &__card {
  359. width: 100%;
  360. height: 100%;
  361. }
  362. .title {
  363. display: flex;
  364. justify-content: space-between;
  365. .right {
  366. display: flex;
  367. align-items: center;
  368. &_but {
  369. margin-right: 10px;
  370. border: 1px solid #409eff;
  371. width: 80px;
  372. border-radius: 3px;
  373. display: flex;
  374. &_left {
  375. width: 40px;
  376. text-align: center;
  377. color: #409eff;
  378. border-right: 1px solid #409eff;
  379. cursor: pointer;
  380. }
  381. &_right {
  382. width: 40px;
  383. text-align: center;
  384. color: #409eff;
  385. cursor: pointer;
  386. }
  387. &_active {
  388. color: #fff;
  389. background-color: #409eff;
  390. }
  391. }
  392. }
  393. }
  394. }
  395. .content {
  396. display: flex;
  397. //justify-content: center;
  398. align-items: center;
  399. height: 15vh;
  400. width: 100%;
  401. .divider {
  402. display: block;
  403. height: 0px;
  404. width: 100%;
  405. border-top: 1px dashed #dcdfe6;
  406. }
  407. &-item {
  408. margin-left: 1vw;
  409. .card {
  410. width: 130px;
  411. display: flex;
  412. align-items: center;
  413. &-title {
  414. width: 40px;
  415. height: 40px;
  416. text-align: center;
  417. border-radius: 50%;
  418. font-size: 20px;
  419. font-weight: 600;
  420. display: flex;
  421. justify-content: center;
  422. align-items: center;
  423. span {
  424. line-height: 20px;
  425. }
  426. }
  427. &-title1 {
  428. color: #037fe1;
  429. background-color: rgba(3, 127, 225, 0.15);
  430. }
  431. &-title2 {
  432. color: #ffa21e;
  433. background-color: rgba(255, 162, 30, 0.15);
  434. }
  435. &-title3 {
  436. color: #fb5b60;
  437. background-color: rgba(251, 91, 96, 0.15);
  438. }
  439. &-title4 {
  440. color: #42bc6f;
  441. background-color: rgba(66, 188, 111, 0.15);
  442. }
  443. &-content {
  444. padding-left: 1vw;
  445. display: flex;
  446. flex-direction: column;
  447. &-num {
  448. font-size: 20px;
  449. font-weight: 600;
  450. }
  451. &-text {
  452. color: #909399;
  453. }
  454. }
  455. }
  456. }
  457. }
  458. .container-losrealtime {
  459. display: flex;
  460. }
  461. </style>