index.vue 37 KB

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