audit-data.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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">
  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. </el-card>
  28. </div>
  29. </template>
  30. <script>
  31. import {
  32. checkDate,
  33. shipCheckDate,
  34. financeCheck
  35. } from "@/api/wel";
  36. export default {
  37. name: "basicContainer",
  38. props: {
  39. sysType: Number
  40. },
  41. data() {
  42. return {
  43. loading: false,
  44. list: [
  45. { icon: "el-icon-s-order", qty: "0", text: "报价订单/待审核" },
  46. { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
  47. { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
  48. { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
  49. { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
  50. { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
  51. ],
  52. tradeType: null
  53. };
  54. },
  55. created() {
  56. this.getSysType();
  57. },
  58. mounted() {
  59. this.init();
  60. },
  61. methods: {
  62. init() {
  63. // if(this.sysType === 3){
  64. // }
  65. if (this.sysType === 5) {
  66. this.list = [
  67. { icon: "el-icon-s-order", qty: "0", text: "主营业务/待审核" }
  68. ];
  69. }
  70. this.getCheckDate();
  71. this.getshipCheckDate();
  72. this.getfinanceCheck()
  73. },
  74. getSysType() {
  75. const sysType = localStorage.getItem("sysitemType");
  76. if (sysType == 6) {
  77. this.tradeType = "JXS";
  78. } else if (sysType == 5) {
  79. this.tradeType = "SW";
  80. } else if (sysType == 4) {
  81. this.tradeType = "CK";
  82. } else if (sysType == 3) {
  83. this.tradeType = "JK";
  84. } else if (sysType == 2) {
  85. this.tradeType = "GN";
  86. } else if (sysType == 1) {
  87. this.tradeType = "XX";
  88. }
  89. },
  90. getCheckDate() {
  91. this.loading = true;
  92. checkDate({ tradeType: this.tradeType })
  93. .then(res => {
  94. this.list.forEach(e => {
  95. if (e.text == "报价订单/待审核") {
  96. e.qty = res.data.data.offerNumber;
  97. }
  98. if (e.text == "销售订单/待审核") {
  99. e.qty = res.data.data.sellNumber;
  100. }
  101. if (e.text == "采购订单/待审核") {
  102. e.qty = res.data.data.purchaseNumber;
  103. }
  104. });
  105. })
  106. .finally(() => {
  107. this.loading = false;
  108. });
  109. },
  110. getshipCheckDate() {
  111. this.loading = true;
  112. shipCheckDate({ tradeType: this.tradeType })
  113. .then(res => {
  114. this.list.forEach(e => {
  115. if (e.text == "发货/待审核") {
  116. e.qty = res.data.data.sellNumber;
  117. }
  118. if (e.text == "收货/待审核") {
  119. e.qty = res.data.data.purchaseNumber;
  120. }
  121. });
  122. })
  123. .finally(() => {
  124. this.loading = false;
  125. });
  126. },
  127. getfinanceCheck(){
  128. this.loading = true;
  129. financeCheck({ tradeType: this.tradeType })
  130. .then(res => {
  131. this.list.forEach(e => {
  132. if (e.text == "申请付款/待审核") {
  133. e.qty = res.data.data;
  134. }
  135. });
  136. })
  137. .finally(() => {
  138. this.loading = false;
  139. });
  140. },
  141. refresh() {
  142. this.getCheckDate();
  143. this.getshipCheckDate();
  144. this.getfinanceCheck()
  145. }
  146. }
  147. };
  148. </script>
  149. <style lang="scss" scoped>
  150. .home-container {
  151. padding: 0px 5px 5px 5px;
  152. box-sizing: border-box;
  153. height: 100%;
  154. ::v-deep .el-card__body {
  155. padding: 10px 15px;
  156. font-size: 14px;
  157. }
  158. &__card {
  159. width: 100%;
  160. height: 100%;
  161. }
  162. .title {
  163. display: flex;
  164. justify-content: space-between;
  165. }
  166. }
  167. .content {
  168. display: flex;
  169. &-item {
  170. background-color: #f4f8ff;
  171. margin-top: 0.5vh;
  172. margin-right: 0.5vw;
  173. height: 13vh;
  174. width: 15vw;
  175. display: flex;
  176. align-items: center;
  177. padding-left: 1.5vw;
  178. .card {
  179. display: flex;
  180. align-items: center;
  181. &-content {
  182. padding-left: 1vw;
  183. display: flex;
  184. flex-direction: column;
  185. &-num {
  186. font-size: 20px;
  187. font-weight: 600;
  188. }
  189. &-text {
  190. color: #909399;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. </style>