123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <template>
- <div class="home-container">
- <el-card class="home-container__card">
- <div class="title">
- <span>
- 审核数据
- </span>
- <span>
- <i
- class="el-icon-refresh-right"
- style="cursor: pointer;font-size:20px"
- @click="refresh"
- ></i>
- </span>
- </div>
- <div class="content" v-loading="loading" v-if="sysType != 2">
- <div class="content-item" v-for="(item, index) in list" :key="index">
- <div class="card">
- <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
- <div class="card-content">
- <span class="card-content-num">{{ item.qty }}</span>
- <span class="card-content-text">{{ item.text }}</span>
- </div>
- </div>
- </div>
- </div>
- <div class="content" v-loading="loading" v-if="sysType == 2">
- <div class="content-item" v-for="(item, index) in domList" :key="index">
- <div class="card">
- <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
- <div class="card-content">
- <span class="card-content-num">{{ item.qty }}</span>
- <span class="card-content-text">{{ item.text }}</span>
- </div>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- </template>
- <script>
- import {
- checkDate,
- shipCheckDate,
- financeCheck
- } from "@/api/wel";
- export default {
- name: "basicContainer",
- props: {
- sysType: Number
- },
- data() {
- return {
- loading: false,
- list: [
- { icon: "el-icon-s-order", qty: "0", text: "报价订单/待审核" },
- { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
- { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
- { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
- { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
- { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
- ],
- domList: [
- { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
- { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
- { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
- { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
- { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
- ],
- tradeType: null
- };
- },
- created() {
- this.getSysType();
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- // if(this.sysType === 3){
- // }
- if (this.sysType === 5) {
- this.list = [
- { icon: "el-icon-s-order", qty: "0", text: "主营业务/待审核" }
- ];
- }
- this.getCheckDate();
- this.getshipCheckDate();
- this.getfinanceCheck()
- },
- getSysType() {
- const sysType = localStorage.getItem("sysitemType");
- if (sysType == 6) {
- this.tradeType = "JXS";
- } else if (sysType == 5) {
- this.tradeType = "SW";
- } else if (sysType == 4) {
- this.tradeType = "CK";
- } else if (sysType == 3) {
- this.tradeType = "JK";
- } else if (sysType == 2) {
- this.tradeType = "GN";
- } else if (sysType == 1) {
- this.tradeType = "XX";
- }else if(sysType == 999){
- this.tradeType = "ADMIN";
- }
- },
- getCheckDate() {
- this.loading = true;
- checkDate({ tradeType: this.tradeType })
- .then(res => {
- if (this.sysType == 2){
- this.domList.forEach(e => {
- if (e.text == "报价订单/待审核") {
- e.qty = res.data.data.offerNumber;
- }
- if (e.text == "销售订单/待审核") {
- e.qty = res.data.data.sellNumber;
- }
- if (e.text == "采购订单/待审核") {
- e.qty = res.data.data.purchaseNumber;
- }
- });
- }else {
- this.list.forEach(e => {
- if (e.text == "报价订单/待审核") {
- e.qty = res.data.data.offerNumber;
- }
- if (e.text == "销售订单/待审核") {
- e.qty = res.data.data.sellNumber;
- }
- if (e.text == "采购订单/待审核") {
- e.qty = res.data.data.purchaseNumber;
- }
- });
- }
- })
- .finally(() => {
- this.loading = false;
- });
- },
- getshipCheckDate() {
- this.loading = true;
- shipCheckDate({ tradeType: this.tradeType })
- .then(res => {
- if (this.sysType == 2){
- this.domList.forEach(e => {
- if (e.text == "发货/待审核") {
- e.qty = res.data.data.sellNumber;
- }
- if (e.text == "收货/待审核") {
- e.qty = res.data.data.purchaseNumber;
- }
- });
- }else {
- this.list.forEach(e => {
- if (e.text == "发货/待审核") {
- e.qty = res.data.data.sellNumber;
- }
- if (e.text == "收货/待审核") {
- e.qty = res.data.data.purchaseNumber;
- }
- });
- }
- })
- .finally(() => {
- this.loading = false;
- });
- },
- getfinanceCheck(){
- this.loading = true;
- financeCheck({ tradeType: this.tradeType })
- .then(res => {
- if (this.sysType == 2){
- this.domList.forEach(e => {
- if (e.text == "申请付款/待审核") {
- e.qty = res.data.data;
- }
- });
- }else {
- this.list.forEach(e => {
- if (e.text == "申请付款/待审核") {
- e.qty = res.data.data;
- }
- });
- }
- })
- .finally(() => {
- this.loading = false;
- });
- },
- refresh() {
- this.getCheckDate();
- this.getshipCheckDate();
- this.getfinanceCheck()
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .home-container {
- padding: 0px 5px 5px 5px;
- box-sizing: border-box;
- height: 100%;
- ::v-deep .el-card__body {
- padding: 10px 15px;
- font-size: 14px;
- }
- &__card {
- width: 100%;
- height: 100%;
- }
- .title {
- display: flex;
- justify-content: space-between;
- }
- }
- .content {
- display: flex;
- &-item {
- background-color: #f4f8ff;
- margin-top: 0.5vh;
- margin-right: 0.5vw;
- height: 13vh;
- width: 15vw;
- display: flex;
- align-items: center;
- padding-left: 1.5vw;
- .card {
- display: flex;
- align-items: center;
- &-content {
- padding-left: 1vw;
- display: flex;
- flex-direction: column;
- &-num {
- font-size: 20px;
- font-weight: 600;
- }
- &-text {
- color: #909399;
- }
- }
- }
- }
- }
- </style>
|