audit-data.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <div class="home-container">
  3. <el-card class="home-container__card">
  4. <div class="title">
  5. <span>
  6. 审核数据
  7. </span>
  8. <span>
  9. <i
  10. class="el-icon-refresh-right"
  11. style="cursor: pointer;font-size:20px"
  12. @click="refresh"
  13. ></i>
  14. </span>
  15. </div>
  16. <div class="content" v-loading="loading" v-if="sysType != 2">
  17. <div class="content-item" v-for="(item, index) in list" :key="index">
  18. <div class="card">
  19. <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
  20. <div class="card-content">
  21. <span class="card-content-num">{{ item.qty }}</span>
  22. <span class="card-content-text">{{ item.text }}</span>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="content" v-loading="loading" v-if="sysType == 2">
  28. <div class="content-item" v-for="(item, index) in domList" :key="index">
  29. <div class="card">
  30. <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
  31. <div class="card-content">
  32. <span class="card-content-num">{{ item.qty }}</span>
  33. <span class="card-content-text">{{ item.text }}</span>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </el-card>
  39. </div>
  40. </template>
  41. <script>
  42. import {
  43. checkDate,
  44. shipCheckDate,
  45. financeCheck
  46. } from "@/api/wel";
  47. export default {
  48. name: "basicContainer",
  49. props: {
  50. sysType: Number
  51. },
  52. data() {
  53. return {
  54. loading: false,
  55. list: [
  56. { icon: "el-icon-s-order", qty: "0", text: "报价订单/待审核" },
  57. { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
  58. { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
  59. { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
  60. { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
  61. { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
  62. ],
  63. domList: [
  64. { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
  65. { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
  66. { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
  67. { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
  68. { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
  69. ],
  70. tradeType: null
  71. };
  72. },
  73. created() {
  74. this.getSysType();
  75. },
  76. mounted() {
  77. this.init();
  78. },
  79. methods: {
  80. init() {
  81. // if(this.sysType === 3){
  82. // }
  83. if (this.sysType === 5) {
  84. this.list = [
  85. { icon: "el-icon-s-order", qty: "0", text: "主营业务/待审核" }
  86. ];
  87. }
  88. this.getCheckDate();
  89. this.getshipCheckDate();
  90. this.getfinanceCheck()
  91. },
  92. getSysType() {
  93. const sysType = localStorage.getItem("sysitemType");
  94. if (sysType == 6) {
  95. this.tradeType = "JXS";
  96. } else if (sysType == 5) {
  97. this.tradeType = "SW";
  98. } else if (sysType == 4) {
  99. this.tradeType = "CK";
  100. } else if (sysType == 3) {
  101. this.tradeType = "JK";
  102. } else if (sysType == 2) {
  103. this.tradeType = "GN";
  104. } else if (sysType == 1) {
  105. this.tradeType = "XX";
  106. }else if(sysType == 999){
  107. this.tradeType = "ADMIN";
  108. }
  109. },
  110. getCheckDate() {
  111. this.loading = true;
  112. checkDate({ tradeType: this.tradeType })
  113. .then(res => {
  114. if (this.sysType == 2){
  115. this.domList.forEach(e => {
  116. if (e.text == "报价订单/待审核") {
  117. e.qty = res.data.data.offerNumber;
  118. }
  119. if (e.text == "销售订单/待审核") {
  120. e.qty = res.data.data.sellNumber;
  121. }
  122. if (e.text == "采购订单/待审核") {
  123. e.qty = res.data.data.purchaseNumber;
  124. }
  125. });
  126. }else {
  127. this.list.forEach(e => {
  128. if (e.text == "报价订单/待审核") {
  129. e.qty = res.data.data.offerNumber;
  130. }
  131. if (e.text == "销售订单/待审核") {
  132. e.qty = res.data.data.sellNumber;
  133. }
  134. if (e.text == "采购订单/待审核") {
  135. e.qty = res.data.data.purchaseNumber;
  136. }
  137. });
  138. }
  139. })
  140. .finally(() => {
  141. this.loading = false;
  142. });
  143. },
  144. getshipCheckDate() {
  145. this.loading = true;
  146. shipCheckDate({ tradeType: this.tradeType })
  147. .then(res => {
  148. if (this.sysType == 2){
  149. this.domList.forEach(e => {
  150. if (e.text == "发货/待审核") {
  151. e.qty = res.data.data.sellNumber;
  152. }
  153. if (e.text == "收货/待审核") {
  154. e.qty = res.data.data.purchaseNumber;
  155. }
  156. });
  157. }else {
  158. this.list.forEach(e => {
  159. if (e.text == "发货/待审核") {
  160. e.qty = res.data.data.sellNumber;
  161. }
  162. if (e.text == "收货/待审核") {
  163. e.qty = res.data.data.purchaseNumber;
  164. }
  165. });
  166. }
  167. })
  168. .finally(() => {
  169. this.loading = false;
  170. });
  171. },
  172. getfinanceCheck(){
  173. this.loading = true;
  174. financeCheck({ tradeType: this.tradeType })
  175. .then(res => {
  176. if (this.sysType == 2){
  177. this.domList.forEach(e => {
  178. if (e.text == "申请付款/待审核") {
  179. e.qty = res.data.data;
  180. }
  181. });
  182. }else {
  183. this.list.forEach(e => {
  184. if (e.text == "申请付款/待审核") {
  185. e.qty = res.data.data;
  186. }
  187. });
  188. }
  189. })
  190. .finally(() => {
  191. this.loading = false;
  192. });
  193. },
  194. refresh() {
  195. this.getCheckDate();
  196. this.getshipCheckDate();
  197. this.getfinanceCheck()
  198. }
  199. }
  200. };
  201. </script>
  202. <style lang="scss" scoped>
  203. .home-container {
  204. padding: 0px 5px 5px 5px;
  205. box-sizing: border-box;
  206. height: 100%;
  207. ::v-deep .el-card__body {
  208. padding: 10px 15px;
  209. font-size: 14px;
  210. }
  211. &__card {
  212. width: 100%;
  213. height: 100%;
  214. }
  215. .title {
  216. display: flex;
  217. justify-content: space-between;
  218. }
  219. }
  220. .content {
  221. display: flex;
  222. &-item {
  223. background-color: #f4f8ff;
  224. margin-top: 0.5vh;
  225. margin-right: 0.5vw;
  226. height: 13vh;
  227. width: 15vw;
  228. display: flex;
  229. align-items: center;
  230. padding-left: 1.5vw;
  231. .card {
  232. display: flex;
  233. align-items: center;
  234. &-content {
  235. padding-left: 1vw;
  236. display: flex;
  237. flex-direction: column;
  238. &-num {
  239. font-size: 20px;
  240. font-weight: 600;
  241. }
  242. &-text {
  243. color: #909399;
  244. }
  245. }
  246. }
  247. }
  248. }
  249. </style>