From 6c2e00278c1194b46eb9153ca4166af868bb15ef Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 06 五月 2023 08:00:02 +0800
Subject: [PATCH] 1.看板调整2.上云路由整合
---
src/views/kb/cgdd.vue | 66 ++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/src/views/kb/cgdd.vue b/src/views/kb/cgdd.vue
index 6450be2..d4edfc6 100644
--- a/src/views/kb/cgdd.vue
+++ b/src/views/kb/cgdd.vue
@@ -3,9 +3,9 @@
<div class="kb_dashboard">
<!-- 鏄熺┖鑳屾櫙-->
- <div ref="starsRef" class="stars">
- <div v-for="(item, index) in starsCount" :key="index" class="star" />
- </div>
+<!-- <div ref="starsRef" class="stars">-->
+<!-- <div v-for="(item, index) in starsCount" :key="index" class="star" />-->
+<!-- </div>-->
<div class="kb_header">
<div class="flex_c_c kb_header_text">
@@ -49,7 +49,7 @@
<el-table-column
prop="PurchaseOrder"
label="閲囪喘璁㈠崟"
- width="225"
+ width="195"
>
<template slot-scope="{row}">
<div class="ellipsis">{{ row.PurchaseOrder }}</div>
@@ -58,7 +58,7 @@
<el-table-column
prop="suppername"
label="渚涘簲鍟�"
- width="183"
+ width="173"
>
<template slot-scope="{row}">
<div v-if="row.suppername" class="ellipsis">{{ row.suppername }}</div>
@@ -84,11 +84,21 @@
<el-table-column
prop="partname"
label="浜у搧鍚嶇О"
- width="215"
+ width="185"
>
<template slot-scope="{row}">
<div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
<div v-else />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="partspec"
+ label="浜у搧瑙勬牸"
+ width="115"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec" class="ellipsis">{{ row.partspec }}</div>
+ <div v-else>/</div>
</template>
</el-table-column>
<!-- <el-table-column-->
@@ -104,7 +114,7 @@
<el-table-column
prop="quantity"
label="璁㈠崟鏁伴噺"
- width="114"
+ width="104"
>
<template slot-scope="{row}">
<div v-if="row.quantity">{{ parseFloat(row.quantity) }}</div>
@@ -134,28 +144,30 @@
<el-table-column
prop="quantity1"
label="宸叉敹鏁伴噺"
- width="114"
+ width="104"
>
<template slot-scope="{row}">
- <!-- <div v-if="row.quantity">{{ Math.floor(row.quantity*0.67) }}</div>-->
- <div v-if="row.quantity">{{ Math.round( row.quantity*0.67) }}</div>
+ <div v-if="new Date(row.voucherdate.substring(0,10)).getTime()<new Date('2023-05-01').getTime()">
+ {{parseFloat(row.quantity)}}
+ </div>
<div v-else>0</div>
</template>
</el-table-column>
<el-table-column
label="鏈敹鏁伴噺"
- width="114"
+ width="104"
>
<template slot-scope="{row}">
- <!-- <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div>-->
- <div v-if="row.quantity">{{ Math.ceil(row.quantity*0.33) }}</div>
- <div v-else>0</div>
+ <div v-if="new Date(row.voucherdate.substring(0,10)).getTime()<new Date('2023-05-01').getTime()">
+0
+ </div>
+ <div v-else>{{parseFloat(row.quantity - row.quantity1)}}</div>
</template>
</el-table-column>
<el-table-column
prop="acceptDate"
label="棰勮浜ゆ湡"
- width="135"
+ width="125"
>
<template slot-scope="{row}">
<div v-if="row.acceptDate">{{ row.acceptDate.substring(0, 10) }}</div>
@@ -165,7 +177,7 @@
<el-table-column
prop="warning"
label="寤舵湡澶╂暟"
- width="144"
+ width="139"
>
<template slot-scope="{row}">
<div v-if="parseFloat(row.warning)<0" style="color: red">{{
@@ -229,7 +241,7 @@
</el-table-column>
<el-table-column
prop="suppername"
- width="293"
+ width="292"
label="渚涘簲鍟嗗悕绉�"
>
<template slot-scope="{row}">
@@ -289,10 +301,18 @@
this.getPurchaseLeftBottom()
this.getPurchaseRight()
- this.setStarsRef()
+ // this.setStarsRef()
},
methods: {
+ fun_date(aa) {
+ const date1 = new Date()
+ const time1 = date1.getFullYear() + '-' + (date1.getMonth() + 1) + '-' + date1.getDate()// time1琛ㄧず褰撳墠鏃堕棿
+ const date2 = new Date(date1)
+ date2.setDate(date1.getDate() + aa)
+ const time2 = date2.getFullYear() + '-' + (date2.getMonth() + 1).toString().padStart(2, '0') + '-' + date2.getDate().toString().padStart(2, '0')
+ return time2
+ },
setStarsRef() {
const starNodes = Array.from(this.$refs.starsRef.children)
starNodes.forEach(item => {
@@ -322,11 +342,12 @@
this.purchaseLeftTopData = res.data[0]
loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))
})
- }, 1000 * 6)
+ }, 1000 * 15)
},
getPurchaseLeftBottom() {
PurchaseLeftBottom().then(res => {
- this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 杩囨护鎺夊凡鏀舵暟閲忓ぇ浜庨浂鐨勫��
+ // this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 杩囨护鎺夊凡鏀舵暟閲忓ぇ浜庨浂鐨勫��
+ this.tableData = res.data
// this.number1 = this.tableData.length
@@ -348,7 +369,8 @@
}
})
}
- }, this.tableData.length <= 13 ? 1000 * 3 : 100)
+
+ }, this.tableData.length <= 13 ? 1000 * 15 : 100)
})
},
getPurchaseRight() {
@@ -371,7 +393,7 @@
}
})
}
- }, this.tableDataRank.length <= 23 ? 1000 * 3 : 100)
+ }, this.tableDataRank.length <= 23 ? 1000 * 15 : 100)
})
},
tableRowClassName({ row, rowIndex }) {
--
Gitblit v1.9.3