| | |
| | | <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"> |
| | |
| | | <el-table-column |
| | | prop="PurchaseOrder" |
| | | label="采购订单" |
| | | width="225" |
| | | width="195" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="ellipsis">{{ row.PurchaseOrder }}</div> |
| | |
| | | <el-table-column |
| | | prop="suppername" |
| | | label="供应商" |
| | | width="183" |
| | | width="173" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.suppername" class="ellipsis">{{ row.suppername }}</div> |
| | |
| | | <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--> |
| | |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="订单数量" |
| | | width="114" |
| | | width="104" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.quantity">{{ parseFloat(row.quantity) }}</div> |
| | |
| | | <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> |
| | |
| | | <el-table-column |
| | | prop="warning" |
| | | label="延期天数" |
| | | width="144" |
| | | width="139" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="parseFloat(row.warning)<0" style="color: red">{{ |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="suppername" |
| | | width="293" |
| | | width="292" |
| | | label="供应商名称" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | 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 => { |
| | |
| | | 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 |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableData.length <= 13 ? 1000 * 3 : 100) |
| | | |
| | | }, this.tableData.length <= 13 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | getPurchaseRight() { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataRank.length <= 23 ? 1000 * 3 : 100) |
| | | }, this.tableDataRank.length <= 23 ? 1000 * 15 : 100) |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |