index.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147
  1. <template>
  2. <div class="app-container home" v-if="sysType == 1">
  3. <div class="home-fleet">
  4. <div class="home-left">
  5. <chi-card title="业务看板" iconName="el-icon-s-cooperation">
  6. <div slot="content">
  7. <div class="content-top">
  8. <div class="content-top-left">
  9. <div style="display: flex; align-self: flex-start">
  10. <div style="align-self: center">
  11. <svg
  12. t="1616396514864"
  13. class="icon"
  14. viewBox="0 0 1024 1024"
  15. version="1.1"
  16. xmlns="http://www.w3.org/2000/svg"
  17. p-id="9805"
  18. width="20"
  19. height="20"
  20. >
  21. <path
  22. d="M314.324 292.999c24.207 0.095 44.072-19.16 44.72-43.36L359.044 52.6c-0.647-24.2-20.512-43.455-44.72-43.36-23.945 0-43.36 19.415-43.36 43.36l0 197.04C271.012 273.567 290.397 292.952 314.324 292.999L314.324 292.999zM707.923 292.999c24.21 0.095 44.07-19.16 44.72-43.36L752.643 52.6c-0.65-24.2-20.51-43.455-44.72-43.36-23.945 0-43.36 19.415-43.36 43.36l0 197.04C664.563 273.584 683.978 292.999 707.923 292.999L707.923 292.999zM402.084 118.36l219.279 0 0 65.6L402.084 183.96 402.084 118.36 402.084 118.36zM878.003 118.36l-81.52 0 0 65.2 84.64 0c25.2 0.345 45.535 20.72 45.84 45.92l0 152L96.085 381.48 96.085 229.56c0.48-25.232 21-45.472 46.24-45.6l85.2 0 0-65.6-81.36 0c-63.345 0.265-114.592 51.615-114.72 114.96l0 666.558c-0.752 62.69 49.455 114.12 112.152 114.87 0.16 0 0.328 0 0.488 0.01l733.758 0c63.31-0.265 114.545-51.57 114.72-114.88L992.563 233.32C992.432 170.04 941.282 118.712 878.003 118.36L878.003 118.36zM497.929 810.758c-74.175 0.185-134.465-59.815-134.645-133.995-0.177-74.175 59.815-134.465 133.995-134.645 74.175-0.18 134.46 59.815 134.645 133.995 0 0.11 0 0.215 0 0.325C632.023 750.533 572.023 810.658 497.929 810.758L497.929 810.758 497.929 810.758z"
  23. p-id="9806"
  24. fill="#000000"
  25. ></path>
  26. </svg>
  27. </div>
  28. <div
  29. style="
  30. align-self: center;
  31. font-size: 16px;
  32. margin: 2px 0 0 5px;
  33. "
  34. >
  35. 新增柜数
  36. </div>
  37. </div>
  38. <div
  39. style="font-size: 36px; align-self: center; font-weight: 600"
  40. >
  41. {{ upperLeftCntrs.planQuantity }}
  42. </div>
  43. </div>
  44. <div class="content-top-right">
  45. <div
  46. style="
  47. display: flex;
  48. align-self: flex-start;
  49. min-width: 120px;
  50. "
  51. >
  52. <div style="align-self: center">
  53. <svg
  54. t="1616400289333"
  55. class="icon"
  56. viewBox="0 0 1024 1024"
  57. version="1.1"
  58. xmlns="http://www.w3.org/2000/svg"
  59. p-id="22417"
  60. width="20"
  61. height="20"
  62. >
  63. <path
  64. d="M864.425973 1023.936004 228.305731 1023.936004c-114.296856 0-130.871821-105.529404-133.111681-128.439973l-0.383976-0.575964 0.31998 0c-0.255984-2.367852-0.31998-4.031748-0.31998-4.031748l0-12.351228c-60.604212-36.093744-64.059996-115.320792-64.059996-115.320792L30.750078 126.328104C30.814074 3.967752 158.934067 0 158.934067 0l643.415787 0c64.63596 0 96.441972 38.269608 112.120992 72.63546 71.931504 28.47822 78.779076 117.496656 78.779076 117.496656l0 700.756203C993.249922 890.952315 974.56309 1023.936004 864.425973 1023.936004L864.425973 1023.936004 864.425973 1023.936004zM479.298044 256.687957l0 191.476033L222.994063 448.16399 222.994063 511.968002l256.303981 0 0 191.476033 256.303981-223.410037L479.298044 256.687957 479.298044 256.687957 479.298044 256.687957zM927.782014 129.015937l-64.059996 0 0 748.433223 0 17.470908-46.07712 0L158.934067 894.920067 158.934067 895.944003l0 62.844072 704.787951 0 64.059996 0L927.782014 129.015937 927.782014 129.015937zM927.782014 129.015937"
  65. p-id="22418"
  66. ></path>
  67. </svg>
  68. </div>
  69. <div
  70. style="
  71. align-self: center;
  72. font-size: 16px;
  73. margin: 2px 0 0 5px;
  74. "
  75. >
  76. 未安排柜数
  77. </div>
  78. </div>
  79. <div
  80. style="font-size: 36px; align-self: center; font-weight: 600"
  81. >
  82. {{ upperLeftCntrs.surplusQuantity }}
  83. </div>
  84. </div>
  85. </div>
  86. <div class="content-bottom">
  87. <div style="display: flex; align-self: flex-start">
  88. <div style="align-self: center">
  89. <svg
  90. t="1616402886142"
  91. class="icon"
  92. viewBox="0 0 1024 1024"
  93. version="1.1"
  94. xmlns="http://www.w3.org/2000/svg"
  95. p-id="31596"
  96. width="24"
  97. height="24"
  98. >
  99. <path
  100. d="M55.3 594.7V851c0 11 9 20 20 20h3.1c10 0 18.3-7.4 19.8-17.2 8.3-55.3 56.1-97.8 113.7-97.8s105.4 42.4 113.7 97.8c1.5 9.9 9.8 17.2 19.8 17.2H386c11 0 20-9 20-20V407c0-11-9-20-20-20H280c-33.1 0-64.8 13.7-87.5 37.9L71.6 553.7c-10.5 11.1-16.3 25.8-16.3 41zM336 478v144c0 11-9 20-20 20H145.3c-11 0-20-9-20-20v-13.6c0-10.5 4.2-20.7 11.6-28.1l85.9-86.7c22.5-22.8 53.2-35.6 85.3-35.6h7.9c11 0 20 8.9 20 20zM467.3 257v574c0 22.1 17.9 40 40 40h175.1c10 0 18.3-7.4 19.8-17.2 8.3-55.3 56.1-97.8 113.7-97.8 63.5 0 115 51.5 115 115 20.4 0 37-16.6 37-37V257c0-22.1-17.9-40-40-40H507.3c-22.1 0-40 17.9-40 40z"
  101. p-id="31597"
  102. ></path>
  103. <path
  104. d="M213.5 797c-45.4-0.8-82.3 36.1-81.5 81.5 0.8 42.8 35.7 77.7 78.5 78.5 45.4 0.8 82.3-36.1 81.5-81.5-0.8-42.8-35.7-77.7-78.5-78.5zM817.5 797c-45.4-0.8-82.3 36.1-81.5 81.5 0.8 42.8 35.7 77.7 78.5 78.5 45.4 0.8 82.3-36.1 81.5-81.5-0.8-42.8-35.7-77.7-78.5-78.5z"
  105. p-id="31598"
  106. ></path>
  107. </svg>
  108. </div>
  109. <div
  110. style="
  111. align-self: center;
  112. font-size: 16px;
  113. margin: 2px 0 0 5px;
  114. width: 110px;
  115. "
  116. >
  117. 今日派车数
  118. </div>
  119. </div>
  120. <div
  121. style="font-size: 36px; align-self: center; font-weight: 600"
  122. >
  123. {{ fleetData.upperLeftCarQuantity }}
  124. </div>
  125. <div style="align-self: center; color: #409eff">派车详情></div>
  126. </div>
  127. <div class="content-bottom">
  128. <div
  129. style="display: flex; align-self: flex-start; min-width: 120px"
  130. >
  131. <div style="align-self: center">
  132. <svg
  133. t="1616402771353"
  134. class="icon"
  135. viewBox="0 0 1048 1024"
  136. version="1.1"
  137. xmlns="http://www.w3.org/2000/svg"
  138. p-id="29149"
  139. width="20"
  140. height="20"
  141. >
  142. <path
  143. d="M880.931574 1.385265c-82.95439-11.745754-55.058223 55.058223-55.058224 55.058223l60.931101 83.6885c88.093157 106.445898-33.034934 81.486171-33.034934 81.48617-77.081513 36.705482 0 82.95439 0 82.95439h110.116447v496.99223c-49.185346 69.740416-82.95439 0-82.95439 0V470.481328a106.445898 106.445898 0 0 0-82.95439-110.116447H715.022794a34.503153 34.503153 0 0 1-27.896167-27.896166V84.339655c0-41.11014-18.352741-51.387675-54.324113-53.590004S198.209604 30.749651 135.810284 30.749651a55.058223 55.058223 0 0 0-54.324113 55.058223v828.075679c-163.706451 56.526443-27.896166 110.116447-27.896167 110.116447h690.063066c107.914118-73.410964-55.058223-110.116447-55.058223-110.116447v-440.465787l4.404658-4.404657a73.410964 73.410964 0 0 1 105.711788 4.404657v357.511397a122.596311 122.596311 0 0 0 55.058224 82.95439h110.116447a198.209604 198.209604 0 0 0 82.954389-82.95439v-660.69868zM610.045115 345.682688a34.503153 34.503153 0 0 1-34.503154 34.503154H191.602617a34.503153 34.503153 0 0 1-34.503153-34.503154V148.207194a34.503153 34.503153 0 0 1 34.503153-34.503153h383.939344a34.503153 34.503153 0 0 1 34.503154 34.503153z"
  144. p-id="29150"
  145. ></path>
  146. </svg>
  147. </div>
  148. <div
  149. style="
  150. align-self: center;
  151. font-size: 16px;
  152. margin: 2px 0 0 5px;
  153. width: 110px;
  154. "
  155. >
  156. 可用车辆数
  157. </div>
  158. </div>
  159. <div
  160. style="font-size: 36px; align-self: center; font-weight: 600"
  161. >
  162. {{ fleetData.upperLeftOldCarQuantity }}
  163. </div>
  164. <div style="align-self: center; color: #409eff">派车详情></div>
  165. </div>
  166. </div>
  167. </chi-card>
  168. <chi-card
  169. title="新闻公告"
  170. iconName="el-icon-s-cooperation"
  171. :More="true"
  172. >
  173. <div slot="content" style="min-height: 250px">
  174. <div style="padding: 5px 5px 0 5px; font-size: 16px">
  175. 【新闻】新闻
  176. </div>
  177. </div>
  178. </chi-card>
  179. </div>
  180. <div class="home-right">
  181. <chi-card title="运行车辆" iconName="el-icon-s-order" :More="true">
  182. <div slot="content" class="upper-right">
  183. <div
  184. style="display: flex; padding: 2px; font-size: 16px"
  185. v-for="(item, index) in fleetData.upperRight"
  186. :key="index"
  187. :style="{ backgroundColor:index%2==0 ? '#e6ebf5' : '#FFFFFF' }"
  188. >
  189. <div style="width: 30%">{{ item.mblno }}</div>
  190. <div style="width: 20%">{{ item.carregNo }}</div>
  191. <div style="width: 15%;color:#67c23a">{{ item.orderStatus|statusType }}</div>
  192. <div
  193. style="
  194. width: 35%;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. white-space: nowrap;
  198. "
  199. >
  200. {{ item.corpName }}
  201. </div>
  202. </div>
  203. </div>
  204. </chi-card>
  205. <chi-card title="业务待办" iconName="el-icon-s-order" :More="true">
  206. <div slot="content" class="upper-right">
  207. <div style="font-size: 16px; display: flex;margin: 4px 0;border-bottom:1px dashed #e6ebf5">
  208. <div style="width: 30%">FK221516485645</div>
  209. <div style="width: 20%">运费运费运费</div>
  210. <div style="width: 15%">李刚</div>
  211. <div style="width: 15%;color:#67c23a">待审批</div>
  212. <div style="width: 20%">2020/10/10</div>
  213. </div>
  214. <div style="font-size: 16px; display: flex;margin: 4px 0;">
  215. <div style="width: 30%">FK221516485645</div>
  216. <div style="width: 20%">运费运费运费</div>
  217. <div style="width: 15%">李刚</div>
  218. <div style="width: 15%;color:#67c23a">待审批</div>
  219. <div style="width: 20%">2020/10/10</div>
  220. </div>
  221. </div>
  222. </chi-card>
  223. <chi-card title="审核列表" iconName="el-icon-s-order" :More="true">
  224. <div slot="content" class="upper-right">
  225. <div style="font-size: 16px; display: flex;margin: 4px 0;border-bottom:1px dashed #e6ebf5">
  226. <div style="width: 30%">FK221516485645</div>
  227. <div style="width: 20%">运费运费运费</div>
  228. <div style="width: 15%">李刚</div>
  229. <div style="width: 15%;color:#67c23a">待审批</div>
  230. <div style="width: 20%">2020/10/10</div>
  231. </div>
  232. <div style="font-size: 16px; display: flex;;margin: 4px 0;">
  233. <div style="width: 30%">FK221516485645</div>
  234. <div style="width: 20%">运费运费运费</div>
  235. <div style="width: 15%">李刚</div>
  236. <div style="width: 15%;color:#67c23a">待审批</div>
  237. <div style="width: 20%">2020/10/10</div>
  238. </div>
  239. </div>
  240. </chi-card>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="app-container home" v-else>
  245. <ul class="block">
  246. <li @click="jump('/business/inStock')">
  247. <div>
  248. <i
  249. class="el-icon-download"
  250. style="font-size: 50px; text-align: center"
  251. ></i>
  252. <p>入库</p>
  253. </div>
  254. </li>
  255. <li @click="jump('/business/outStock')">
  256. <div>
  257. <i
  258. class="el-icon-upload2"
  259. style="font-size: 50px; text-align: center"
  260. ></i>
  261. <p>出库</p>
  262. </div>
  263. </li>
  264. <li @click="jump('/basicdata/corps')">
  265. <div>
  266. <i
  267. class="el-icon-s-custom"
  268. style="font-size: 50px; text-align: center"
  269. ></i>
  270. <p>新增用户</p>
  271. </div>
  272. </li>
  273. <li @click="jump('/basicdata/goods')">
  274. <div>
  275. <i
  276. class="el-icon-s-cooperation"
  277. style="font-size: 50px; text-align: center"
  278. ></i>
  279. <p>新增商品</p>
  280. </div>
  281. </li>
  282. <li @click="jump('/business/stockTransfer')">
  283. <div>
  284. <i
  285. class="el-icon-connection"
  286. style="font-size: 50px; text-align: center"
  287. ></i>
  288. <p>调拨</p>
  289. </div>
  290. </li>
  291. <li @click="jump('/finance/charge')">
  292. <div>
  293. <i
  294. class="el-icon-wallet"
  295. style="font-size: 50px; text-align: center"
  296. ></i>
  297. <p>收款</p>
  298. </div>
  299. </li>
  300. <li @click="jump('/finance/payment')">
  301. <div>
  302. <i
  303. class="el-icon-money"
  304. style="font-size: 50px; text-align: center"
  305. ></i>
  306. <p>付款</p>
  307. </div>
  308. </li>
  309. <li @click="jump('/finance/contrast')">
  310. <div>
  311. <i
  312. class="el-icon-s-management"
  313. style="font-size: 50px; text-align: center"
  314. ></i>
  315. <p>对账</p>
  316. </div>
  317. </li>
  318. <li @click="jump('/business/goodsTransfer')">
  319. <div>
  320. <i
  321. class="el-icon-takeaway-box"
  322. style="font-size: 50px; text-align: center"
  323. ></i>
  324. <p>货转</p>
  325. </div>
  326. </li>
  327. <li @click="jump('/agreement/agreementStorage')">
  328. <div>
  329. <i
  330. class="el-icon-s-order"
  331. style="font-size: 50px; text-align: center"
  332. ></i>
  333. <p>协议</p>
  334. </div>
  335. </li>
  336. </ul>
  337. <div style="width: 30%; float: right">
  338. <div style="display: flex">
  339. <div id="box" style="width: 100%; height: 350px"></div>
  340. <el-select
  341. v-model="select"
  342. slot="prepend"
  343. size="mini"
  344. :select="query()"
  345. placeholder="点击切换仓库"
  346. style="position: absolute; width: 8%; right: 1%"
  347. >
  348. <div v-for="(item, index) in warehouse" :key="index">
  349. <el-option
  350. :label="item.fName"
  351. :value="item.fWarehouseid"
  352. ></el-option>
  353. </div>
  354. </el-select>
  355. </div>
  356. </div>
  357. <div style="width: 100%; margin-bottom: 50px">
  358. <el-table
  359. :data="tableData"
  360. :header-cell-style="{ borderBottom: '1px dashed #dfe6ec' }"
  361. :cell-style="cellStyle"
  362. style="width: 67.5%; float: left"
  363. >
  364. <el-table-column
  365. prop="refno1"
  366. :show-overflow-tooltip="true"
  367. label="委托方"
  368. ></el-table-column>
  369. <el-table-column
  370. prop="auditItem"
  371. :show-overflow-tooltip="true"
  372. label="日期"
  373. >
  374. <template slot-scope="scope">
  375. <span v-if="!scope.row.auditItem">无时间</span>
  376. <span v-else>{{ scope.row.auditItem.slice(0, 10) }}</span>
  377. </template>
  378. </el-table-column>
  379. <el-table-column
  380. prop="refno3"
  381. :show-overflow-tooltip="true"
  382. label="提单号"
  383. ></el-table-column>
  384. <el-table-column
  385. prop="refno2"
  386. :show-overflow-tooltip="true"
  387. label="业务类型"
  388. >
  389. <template slot-scope="scope">
  390. <span v-if="scope.row.refno2 === 'SJRK'">入库</span>
  391. <span v-else-if="scope.row.refno2 === 'SJCK'">出库</span>
  392. <span v-else-if="scope.row.refno2 === 'HQZY'">货转</span>
  393. <span v-else-if="scope.row.refno2 === 'CKDB'">调拨</span>
  394. <span v-else-if="scope.row.refno2 === 'CCF'">仓储费</span>
  395. <span v-else-if="scope.row.refno2 === 'ZYF'">作业费</span>
  396. <span v-else-if="scope.row.refno2 === 'SF'">收费</span>
  397. <span v-else-if="scope.row.refno2 === 'DZ'">对账</span>
  398. <span v-else-if="scope.row.refno2 === 'FF'">付费</span>
  399. <span v-else-if="scope.row.refno2 === 'JSCCF'">计算仓储费</span>
  400. </template>
  401. </el-table-column>
  402. <el-table-column prop="address" label="操作" width="80">
  403. <template slot-scope="scope">
  404. <span style="cursor: pointer" @click="approval(scope.row)"
  405. >查看详情</span
  406. >
  407. </template>
  408. </el-table-column>
  409. </el-table>
  410. <el-table
  411. :data="tableDataTwo"
  412. :header-cell-style="{ borderBottom: '1px dashed #dfe6ec' }"
  413. :cell-style="cellStyle"
  414. style="width: 30%; float: right; margin-left: 20px"
  415. >
  416. <el-table-column
  417. prop="noticeTitle"
  418. :show-overflow-tooltip="true"
  419. label="消息中心"
  420. />
  421. <el-table-column prop="address" label="操作" width="80">
  422. <template slot-scope="scope">
  423. <span
  424. @click="querytoDo(scope.row.noticeContent)"
  425. style="cursor: pointer"
  426. >查看详情</span
  427. >
  428. </template>
  429. </el-table-column>
  430. </el-table>
  431. </div>
  432. <div style="width: 100%; float: left; margin-top: 20px">
  433. <div style="display: flex">
  434. <div
  435. id="commoDity"
  436. style="width: 68%; height: 350px; margin-left: 40px"
  437. ></div>
  438. <div id="cargoOwner" style="width: 30%; height: 350px"></div>
  439. </div>
  440. </div>
  441. <el-dialog
  442. title="消息提示"
  443. :visible.sync="dialogVisible"
  444. width="80%"
  445. :before-close="handleClose"
  446. :close-on-click-modal="false"
  447. >
  448. <span
  449. v-html="text"
  450. class="text"
  451. style="max-width: 100%; height: auto"
  452. ></span>
  453. <span slot="footer" class="dialog-footer">
  454. <el-button type="primary" @click="dialogVisible = false"
  455. >关 闭</el-button
  456. >
  457. </span>
  458. </el-dialog>
  459. </div>
  460. </template>
  461. <script>
  462. import { queryHomeInfo } from "@/api/fleet/home";
  463. import chiCard from "./chiCard.vue";
  464. import {
  465. listCorps,
  466. information,
  467. warehouse,
  468. inquiry,
  469. } from "../../src/api/index";
  470. export default {
  471. name: "index",
  472. data() {
  473. return {
  474. editModel: {},
  475. // 版本号
  476. version: "3.2.1",
  477. select: "",
  478. text: "",
  479. dialogVisible: false,
  480. tableData: [],
  481. chart: [],
  482. warehouse: [],
  483. master: [],
  484. commodity: [],
  485. commoditytwo: [],
  486. name: [],
  487. tableDataTwo: [],
  488. fleetData: "",
  489. upperLeftCntrs: {},
  490. sysType: "",
  491. };
  492. },
  493. filters: {
  494. statusType(val) {
  495. switch (val) {
  496. case 10:
  497. return "车队安排";
  498. break;
  499. case 20:
  500. return "司机受理";
  501. break;
  502. case 30:
  503. return "司机出车";
  504. break;
  505. case 40:
  506. return "提箱";
  507. break;
  508. case 50:
  509. return "装卸货";
  510. break;
  511. case 60:
  512. return "还卸柜子";
  513. break;
  514. case 70:
  515. return "费用确认";
  516. break;
  517. default:
  518. return "回单";
  519. }
  520. },
  521. },
  522. components: {
  523. chiCard,
  524. },
  525. created() {
  526. queryHomeInfo().then((response) => {
  527. this.fleetData = response.data;
  528. this.upperLeftCntrs = response.data.upperLeftCntrs;
  529. });
  530. this.getConfigKey("sys.index.systype").then((response) => {
  531. this.sysType = response.msg;
  532. });
  533. },
  534. activated() {
  535. this.getList();
  536. this.warehouses();
  537. this.inquiry();
  538. },
  539. methods: {
  540. //跳转审批页面
  541. approval(row) {
  542. switch (row.refno2) {
  543. case "SJRK": {
  544. this.$router.push({
  545. path: "/business/inStock",
  546. query: { data: JSON.stringify(row) },
  547. });
  548. break;
  549. }
  550. case "SJCK": {
  551. this.$router.push({
  552. path: "/business/outStock",
  553. query: { data: JSON.stringify(row) },
  554. });
  555. break;
  556. }
  557. case "HQZY": {
  558. this.$router.push({
  559. path: "/business/goodsTransfer",
  560. query: { data: JSON.stringify(row) },
  561. });
  562. break;
  563. }
  564. case "CKDB": {
  565. this.$router.push({
  566. path: "/business/stockTransfer",
  567. query: { data: JSON.stringify(row) },
  568. });
  569. break;
  570. }
  571. case "JSCCF": {
  572. this.$router.push({
  573. path: "/business/agreement",
  574. query: { data: JSON.stringify(row) },
  575. });
  576. break;
  577. }
  578. case "CCF": {
  579. this.$router.push({
  580. path: "/agreement/agreementStorage",
  581. query: { data: JSON.stringify(row) },
  582. });
  583. break;
  584. }
  585. case "ZYF": {
  586. this.$router.push({
  587. path: "/agreement/agreementTask",
  588. query: { data: JSON.stringify(row) },
  589. });
  590. break;
  591. }
  592. case "SF": {
  593. this.$router.push({
  594. path: "/finance/charge",
  595. query: { data: JSON.stringify(row) },
  596. });
  597. break;
  598. }
  599. case "DZ": {
  600. this.$router.push({
  601. path: "/finance/contrast",
  602. query: { data: JSON.stringify(row) },
  603. });
  604. break;
  605. }
  606. case "FF": {
  607. this.$router.push({
  608. path: "/finance/payment",
  609. query: { data: JSON.stringify(row) },
  610. });
  611. break;
  612. }
  613. default: {
  614. return this.$message.error("未知错误,无状态");
  615. }
  616. }
  617. },
  618. inquiry() {
  619. let data = {
  620. actId: "",
  621. };
  622. inquiry(data).then((res) => {
  623. this.tableData = res.data;
  624. });
  625. },
  626. querytoDo(res) {
  627. this.dialogVisible = true;
  628. this.text = res;
  629. },
  630. handleClose(done) {
  631. this.dialogVisible = false;
  632. },
  633. firstinventory(fId) {
  634. console.log(this.warehouse);
  635. information(fId).then((response) => {
  636. this.chart = response.data;
  637. if (this.chart.whouseList.length !== 0) {
  638. for (let index of this.chart.corpsListWhouse) {
  639. this.master.push({
  640. name: index.fName,
  641. value: index.fGrossweightD,
  642. });
  643. this.name.push(index.fName);
  644. }
  645. for (let index of this.chart.goodslistWhouse) {
  646. this.commodity.push(index.fName);
  647. this.commoditytwo.push(index.fGrossweightD);
  648. }
  649. this.drawLine();
  650. this.drawLinetwo();
  651. this.commoDity();
  652. } else {
  653. this.chart = {
  654. corpsListWhouse: [
  655. {
  656. balance: 0,
  657. fCorpid: 58,
  658. fGrossweightD: 0,
  659. fName: "展示数据",
  660. fTotalgross: 10000,
  661. fWarehouseName: "展示数据",
  662. },
  663. ],
  664. goodslistWhouse: [
  665. {
  666. balance: 0,
  667. fGoodsid: 13,
  668. fGrossweightD: 0,
  669. fName: "展示商品",
  670. fTotalgross: 10000,
  671. fWarehouseName: "展示数据",
  672. },
  673. ],
  674. whouseList: [
  675. {
  676. fGrossweightD: 0,
  677. fName: "展示数据",
  678. fTotalgross: 10000,
  679. fWarehouseid: 36,
  680. },
  681. ],
  682. };
  683. for (let index of this.chart.corpsListWhouse) {
  684. this.master.push({
  685. name: index.fName,
  686. value: index.fGrossweightD,
  687. });
  688. this.name.push(index.fName);
  689. }
  690. for (let index of this.chart.goodslistWhouse) {
  691. this.commodity.push(index.fName);
  692. this.commoditytwo.push(index.fGrossweightD);
  693. }
  694. this.drawLine();
  695. this.drawLinetwo();
  696. this.commoDity();
  697. }
  698. });
  699. },
  700. query() {
  701. this.master = [];
  702. this.commodity = [];
  703. this.commoditytwo = [];
  704. this.name = [];
  705. if (this.select === "") {
  706. return this.select;
  707. } else {
  708. information(this.select).then((response) => {
  709. this.chart = response.data;
  710. for (let index of this.chart.corpsListWhouse) {
  711. this.master.push({
  712. name: index.fName,
  713. value: index.fGrossweightD,
  714. });
  715. this.name.push(index.fName);
  716. }
  717. for (let index of this.chart.goodslistWhouse) {
  718. this.commodity.push(index.fName);
  719. this.commoditytwo.push(index.fGrossweightD);
  720. }
  721. this.drawLine();
  722. this.drawLinetwo();
  723. this.commoDity();
  724. });
  725. }
  726. },
  727. jump(res) {
  728. this.$router.push({ path: res });
  729. },
  730. //设置单元格边框
  731. cellStyle({ row, column, rowIndex, columnIndex }) {
  732. return "border-bottom: 1px dashed rgb(223, 230, 236)";
  733. },
  734. //查询消息中心
  735. getList() {
  736. this.loading = true;
  737. listCorps(this.queryParams).then((response) => {
  738. this.tableDataTwo = response.rows;
  739. });
  740. },
  741. //查询仓库
  742. warehouses() {
  743. warehouse().then((response) => {
  744. this.warehouse = [];
  745. for (let index of response.rows) {
  746. this.warehouse.push({
  747. fName: index.fName,
  748. fWarehouseid: index.fWarehouseid,
  749. });
  750. }
  751. console.log(this.warehouse);
  752. this.firstinventory(this.warehouse[0].fWarehouseid);
  753. });
  754. },
  755. goTarget(href) {
  756. window.open(href, "_blank");
  757. },
  758. //仓库图表
  759. drawLine() {
  760. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  761. let myChart = this.$echarts.init(document.getElementById("box"));
  762. // 绘制图表
  763. myChart.setOption({
  764. title: {
  765. text: this.chart.whouseList[0].fName + "统计",
  766. subtext: "实时数据",
  767. left: "center",
  768. },
  769. tooltip: {
  770. trigger: "item",
  771. formatter: "{a} <br/>{b} : {c} ({d}%)",
  772. },
  773. legend: {
  774. bottom: 10,
  775. left: "center",
  776. data: ["空闲库容", "占用库容"],
  777. },
  778. series: [
  779. {
  780. type: "pie",
  781. name: "实时数据",
  782. radius: "65%",
  783. center: ["50%", "50%"],
  784. selectedMode: "single",
  785. data: [
  786. {
  787. label: {
  788. backgroundColor: "#eee",
  789. borderColor: "#777",
  790. borderWidth: 1,
  791. borderRadius: 4,
  792. rich: {
  793. title: {
  794. color: "#eee",
  795. align: "center",
  796. },
  797. abg: {
  798. backgroundColor: "#333",
  799. width: "100%",
  800. align: "right",
  801. height: 25,
  802. borderRadius: [4, 4, 0, 0],
  803. },
  804. Sunny: {
  805. height: 30,
  806. align: "left",
  807. },
  808. Cloudy: {
  809. height: 30,
  810. align: "left",
  811. },
  812. Showers: {
  813. height: 30,
  814. align: "left",
  815. },
  816. weatherHead: {
  817. color: "#333",
  818. height: 24,
  819. align: "left",
  820. },
  821. hr: {
  822. borderColor: "#777",
  823. width: "100%",
  824. borderWidth: 0.5,
  825. height: 0,
  826. },
  827. value: {
  828. width: 20,
  829. padding: [0, 20, 0, 30],
  830. align: "left",
  831. },
  832. valueHead: {
  833. color: "#333",
  834. width: 20,
  835. padding: [0, 20, 0, 30],
  836. align: "center",
  837. },
  838. rate: {
  839. width: 40,
  840. align: "right",
  841. padding: [0, 10, 0, 0],
  842. },
  843. rateHead: {
  844. color: "#333",
  845. width: 40,
  846. align: "center",
  847. padding: [0, 10, 0, 0],
  848. },
  849. },
  850. },
  851. },
  852. {
  853. value: this.chart.whouseList[0].fGrossweightD,
  854. name: "占用库容",
  855. },
  856. {
  857. value: parseFloat(
  858. this.chart.whouseList[0].fTotalgross -
  859. this.chart.whouseList[0].fGrossweightD
  860. ).toFixed(1),
  861. name: "空闲库容",
  862. },
  863. ],
  864. emphasis: {
  865. itemStyle: {
  866. shadowBlur: 10,
  867. shadowOffsetX: 0,
  868. shadowColor: "rgba(0, 0, 0, 0.5)",
  869. },
  870. },
  871. },
  872. ],
  873. });
  874. },
  875. drawLinetwo() {
  876. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  877. let myChart = this.$echarts.init(document.getElementById("cargoOwner"));
  878. // 绘制图表
  879. myChart.setOption({
  880. title: {
  881. text: this.chart.whouseList[0].fName + "货权方统计",
  882. subtext: "实时数据",
  883. left: "center",
  884. },
  885. tooltip: {
  886. trigger: "item",
  887. formatter: "{a} <br/>{b}: {c} ({d}%)",
  888. },
  889. legend: {
  890. bottom: 10,
  891. left: "center",
  892. data: this.name,
  893. },
  894. series: [
  895. {
  896. name: "访问来源",
  897. type: "pie",
  898. radius: ["40%", "60%"],
  899. avoidLabelOverlap: false,
  900. label: {
  901. show: false,
  902. position: "center",
  903. },
  904. emphasis: {
  905. label: {
  906. // show: true,
  907. fontSize: "30",
  908. fontWeight: "bold",
  909. },
  910. },
  911. labelLine: {
  912. show: false,
  913. },
  914. data: this.master,
  915. },
  916. ],
  917. });
  918. },
  919. commoDity() {
  920. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  921. let myChart = this.$echarts.init(document.getElementById("commoDity"));
  922. // 绘制图表
  923. myChart.setOption({
  924. title: {
  925. text: this.chart.whouseList[0].fName + "商品统计",
  926. subtext: "实时数据",
  927. left: "center",
  928. },
  929. color: ["#3398DB"],
  930. tooltip: {
  931. trigger: "axis",
  932. axisPointer: {
  933. // 坐标轴指示器,坐标轴触发有效
  934. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  935. },
  936. },
  937. grid: {
  938. left: "3%",
  939. right: "4%",
  940. bottom: "3%",
  941. containLabel: true,
  942. },
  943. xAxis: [
  944. {
  945. type: "category",
  946. data: this.commodity,
  947. axisTick: {
  948. alignWithLabel: true,
  949. },
  950. },
  951. ],
  952. yAxis: [
  953. {
  954. type: "value",
  955. },
  956. ],
  957. series: [
  958. {
  959. name: "实时状态",
  960. type: "bar",
  961. barWidth: "60%",
  962. data: this.commoditytwo,
  963. },
  964. ],
  965. });
  966. },
  967. },
  968. };
  969. </script>
  970. <style scoped lang="scss">
  971. .block {
  972. width: 68%;
  973. float: left;
  974. display: flex;
  975. flex-wrap: wrap;
  976. justify-content: space-around;
  977. height: 350px;
  978. li:hover {
  979. background-color: #025184;
  980. }
  981. li:nth-child(6),
  982. li:nth-child(7),
  983. li:nth-child(8),
  984. li:nth-child(9),
  985. li:nth-child(10) {
  986. background-color: #2f4554;
  987. }
  988. li:nth-child(6):hover,
  989. li:nth-child(7):hover,
  990. li:nth-child(8):hover,
  991. li:nth-child(9):hover,
  992. li:nth-child(10):hover {
  993. background-color: #2f4454d1;
  994. }
  995. li {
  996. width: 18%;
  997. height: 150px;
  998. background-color: #1c84c6;
  999. margin-left: 10px;
  1000. text-align: center;
  1001. color: #ffffff;
  1002. border-radius: 10px;
  1003. cursor: pointer;
  1004. div {
  1005. margin-top: 40px;
  1006. p {
  1007. font-size: 20px;
  1008. }
  1009. }
  1010. }
  1011. }
  1012. .home {
  1013. blockquote {
  1014. padding: 10px 20px;
  1015. margin: 0 0 20px;
  1016. font-size: 17.5px;
  1017. border-left: 5px solid #eee;
  1018. }
  1019. hr {
  1020. margin-top: 20px;
  1021. margin-bottom: 20px;
  1022. border: 0;
  1023. border-top: 1px solid #eee;
  1024. }
  1025. .col-item {
  1026. margin-bottom: 20px;
  1027. }
  1028. ul {
  1029. padding: 0;
  1030. margin: 0;
  1031. }
  1032. font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  1033. font-size: 13px;
  1034. color: #676a6c;
  1035. overflow-x: hidden;
  1036. ul {
  1037. list-style-type: none;
  1038. }
  1039. h4 {
  1040. margin-top: 0px;
  1041. }
  1042. h2 {
  1043. margin-top: 10px;
  1044. font-size: 26px;
  1045. font-weight: 100;
  1046. }
  1047. p {
  1048. margin-top: 10px;
  1049. b {
  1050. font-weight: 700;
  1051. }
  1052. }
  1053. .update-log {
  1054. ol {
  1055. display: block;
  1056. list-style-type: decimal;
  1057. margin-block-start: 1em;
  1058. margin-block-end: 1em;
  1059. margin-inline-start: 0;
  1060. margin-inline-end: 0;
  1061. padding-inline-start: 40px;
  1062. }
  1063. }
  1064. }
  1065. .home-fleet {
  1066. display: flex;
  1067. .home-left {
  1068. width: 40%;
  1069. padding: 0 10px;
  1070. }
  1071. .home-right {
  1072. width: 60%;
  1073. padding: 0 10px;
  1074. }
  1075. .content-top {
  1076. display: flex;
  1077. .content-top-left {
  1078. display: flex;
  1079. width: 50%;
  1080. height: 100px;
  1081. border-bottom: 1px solid #e6ebf5;
  1082. border-right: 1px solid #e6ebf5;
  1083. padding: 10px;
  1084. justify-content: space-between;
  1085. }
  1086. .content-top-right {
  1087. display: flex;
  1088. width: 50%;
  1089. height: 100px;
  1090. border-bottom: 1px solid #e6ebf5;
  1091. padding: 10px;
  1092. justify-content: space-between;
  1093. }
  1094. }
  1095. .content-bottom {
  1096. display: flex;
  1097. height: 70px;
  1098. border-bottom: 1px solid #e6ebf5;
  1099. padding: 10px;
  1100. justify-content: space-between;
  1101. }
  1102. .upper-right {
  1103. padding: 10px;
  1104. min-height: 144px;
  1105. }
  1106. }
  1107. @media screen and (max-width: 920px) {
  1108. .home-fleet {
  1109. display: flex;
  1110. flex-direction: column;
  1111. .home-left {
  1112. width: 100%;
  1113. }
  1114. .home-right {
  1115. width: 100%;
  1116. }
  1117. }
  1118. }
  1119. </style>
  1120. <style>
  1121. .text img {
  1122. max-width: 100%;
  1123. height: auto;
  1124. }
  1125. </style>