index.vue 37 KB

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