loulijun2021
2023-01-05 dea3e0d4fc4ec96f12eaf3d8ecb32a8d3659ea32
src/views/kb/cgdd.vue
@@ -44,7 +44,9 @@
          <!-- 2-->
          <div class="kb_left_bottom kb_pd10">
            <div class="kb_left_bottom_content">
              <div class="content_head kb_title_text">采购到货跟踪 <div style="margin-left: 30px">{{ number1 }} 单</div></div>
              <div class="content_head kb_title_text">采购到货跟踪
                <div style="margin-left: 30px">{{ number1 }} 单</div>
              </div>
              <div class="content_body">
                <el-table
                  ref="tableData"
@@ -138,7 +140,12 @@
                    prop="checkuser"
                    label="检验人员"
                    width="94"
                  />
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.checkuser===null">/</div>
                      <div v-else>{{ row.checkuser }}</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="quantity1"
                    label="已收数量"
@@ -174,10 +181,15 @@
                    width="114"
                  >
                    <template slot-scope="{row}">
                      <div v-if="parseFloat(row.warning)<0" style="color: red">{{ Math.abs(parseFloat(row.warning)) }}</div>
                      <div v-if="parseFloat(row.warning)<0" style="color: red">{{
                        Math.abs(parseFloat(row.warning))
                      }}
                      </div>
                      <div v-else-if="row.warning===null||row.warning===''||row.warning===0">0</div>
                      <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div>
                      <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">{{ row.warning }}</div>
                      <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">
                        {{ row.warning }}
                      </div>
                    </template>
                  </el-table-column>
                </el-table>
@@ -354,7 +366,7 @@
    },
    getPurchaseLeftBottom() {
      PurchaseLeftBottom().then(res => {
        this.tableData = res.data
        this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值
        this.number1 = this.tableData.length
        const divData = this.$refs.tableData.bodyWrapper
@@ -367,7 +379,7 @@
            // 重置table距离顶部距离
            divData.scrollTop = 0
            PurchaseLeftBottom().then(res => {
              this.tableData = res.data
              this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值
              this.number1 = this.tableData.length
              if (this.tableData.length > 14) {
                clearInterval(this.PurchaseLeftBottom)