北鸣对接T+畅捷通,看板前端
loulijun2021
2023-11-24 efca35e837a01df3f44755d8f9918b407e2cf0b7
src/views/kb/procure.vue
@@ -9,7 +9,7 @@
        </div>
        <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
          <span>仓库管理数字化看板</span>
          <span>采购委外数字化看板</span>
        </div>
        <div class="kb_headTime" style="top: 35px;right:  25px">
@@ -326,12 +326,12 @@
<script>
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
// import {
//   WareHouseRightBottomData,
//   WareHouseRightTopData,
//   WareHouseTopBottomData,
//   WareHouseTopLeftData
// } from '@/api/kanbanManager'
import {
  ProcureOutsourcLeftTop,
  ProcureOutsourcLeftBottom,
  ProcureOutsourcRightTop,
  ProcureOutsourcRightBottom
} from '@/api/kanbanManager'
export default {
  name: 'Index2',
@@ -371,10 +371,10 @@
    window.addEventListener('online', this.updateOnlineStatus)
    window.addEventListener('offline', this.updateOnlineStatus)
    this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
    //
    // this.getWareHouseTopLeftData()
    // this.getWareHouseTopBottomData()
    // this.getEcharts()
    this.getProcureOutsourcLeftTop()
    this.getProcureOutsourcLeftBottom()
    this.getEcharts()
  },
  beforeDestroy() {
    window.removeEventListener('online', this.updateOnlineStatus)
@@ -405,8 +405,8 @@
    },
    // 获取左上table数据
    getWareHouseTopLeftData() {
      WareHouseTopLeftData().then(res => {
    getProcureOutsourcLeftTop() {
      ProcureOutsourcLeftTop().then(res => {
        this.tableDataTop = res.data
        // this.number1 = this.tableDataTop.length
        const divData = this.$refs.tableDataTopRef.bodyWrapper
@@ -419,12 +419,12 @@
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // 重置table距离顶部距离
            divData.scrollTop = 0
            WareHouseTopLeftData().then(res => {
            ProcureOutsourcLeftTop().then(res => {
              this.tableDataTop = res.data
              // this.number1 = this.tableDataTop.length
              if (this.tableDataTop.length > 10) {
                clearInterval(this.tableTopTask)
                this.getWareHouseTopLeftData()
                this.getProcureOutsourcLeftTop()
              }
            })
          }
@@ -432,8 +432,8 @@
      })
    },
    // 获取左下table数据
    getWareHouseTopBottomData() {
      WareHouseTopBottomData().then(res => {
    getProcureOutsourcLeftBottom() {
      ProcureOutsourcLeftBottom().then(res => {
        this.tableDataBottom = res.data
        this.number2 = this.tableDataBottom.length
        const divData = this.$refs.tableDataBottomRef.bodyWrapper
@@ -447,12 +447,12 @@
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // 重置table距离顶部距离
            divData.scrollTop = 0
            WareHouseTopBottomData().then(res => {
            ProcureOutsourcLeftBottom().then(res => {
              this.tableDataBottom = res.data
              this.number2 = this.tableDataBottom.length
              if (this.tableDataBottom.length > 10) {
                clearInterval(this.tableBottomTask)
                this.getWareHouseTopBottomData()
                this.getProcureOutsourcLeftBottom()
              }
            })
          }
@@ -462,23 +462,23 @@
    // 获取echarts
    getEcharts() {
      WareHouseRightTopData().then(res => {
        loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
      ProcureOutsourcRightTop().then(res => {
        loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
      })
      WareHouseRightBottomData().then(res => {
        loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
      ProcureOutsourcRightBottom().then(res => {
        loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
      })
      this.echartsRightTop = setInterval(() => {
        WareHouseRightTopData().then(res => {
          loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
        ProcureOutsourcRightTop().then(res => {
          loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
        })
      }, 1000 * 15)
      this.echartsRightBottom = setInterval(() => {
        WareHouseRightBottomData().then(res => {
          loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
        ProcureOutsourcRightBottom().then(res => {
          loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
        })
      }, 1000 * 15)
    },