audit-data.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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. this.list.forEach(e => {
  115. if (e.text == "报价订单/待审核") {
  116. e.qty = res.data.data.offerNumber;
  117. }
  118. if (e.text == "销售订单/待审核") {
  119. e.qty = res.data.data.sellNumber;
  120. }
  121. if (e.text == "采购订单/待审核") {
  122. e.qty = res.data.data.purchaseNumber;
  123. }
  124. });
  125. })
  126. .finally(() => {
  127. this.loading = false;
  128. });
  129. },
  130. getshipCheckDate() {
  131. this.loading = true;
  132. shipCheckDate({ tradeType: this.tradeType })
  133. .then(res => {
  134. this.list.forEach(e => {
  135. if (e.text == "发货/待审核") {
  136. e.qty = res.data.data.sellNumber;
  137. }
  138. if (e.text == "收货/待审核") {
  139. e.qty = res.data.data.purchaseNumber;
  140. }
  141. });
  142. })
  143. .finally(() => {
  144. this.loading = false;
  145. });
  146. },
  147. getfinanceCheck(){
  148. this.loading = true;
  149. financeCheck({ tradeType: this.tradeType })
  150. .then(res => {
  151. this.list.forEach(e => {
  152. if (e.text == "申请付款/待审核") {
  153. e.qty = res.data.data;
  154. }
  155. });
  156. })
  157. .finally(() => {
  158. this.loading = false;
  159. });
  160. },
  161. refresh() {
  162. this.getCheckDate();
  163. this.getshipCheckDate();
  164. this.getfinanceCheck()
  165. }
  166. }
  167. };
  168. </script>
  169. <style lang="scss" scoped>
  170. .home-container {
  171. padding: 0px 5px 5px 5px;
  172. box-sizing: border-box;
  173. height: 100%;
  174. ::v-deep .el-card__body {
  175. padding: 10px 15px;
  176. font-size: 14px;
  177. }
  178. &__card {
  179. width: 100%;
  180. height: 100%;
  181. }
  182. .title {
  183. display: flex;
  184. justify-content: space-between;
  185. }
  186. }
  187. .content {
  188. display: flex;
  189. &-item {
  190. background-color: #f4f8ff;
  191. margin-top: 0.5vh;
  192. margin-right: 0.5vw;
  193. height: 13vh;
  194. width: 15vw;
  195. display: flex;
  196. align-items: center;
  197. padding-left: 1.5vw;
  198. .card {
  199. display: flex;
  200. align-items: center;
  201. &-content {
  202. padding-left: 1vw;
  203. display: flex;
  204. flex-direction: column;
  205. &-num {
  206. font-size: 20px;
  207. font-weight: 600;
  208. }
  209. &-text {
  210. color: #909399;
  211. }
  212. }
  213. }
  214. }
  215. }
  216. </style>