| | |
| | | width="114" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.quantity1">{{ parseFloat(row.quantity1) }}</div> |
| | | <div v-else>0</div> |
| | | <!-- <div v-if="row.quantity1">{{ row.quantity1 }}</div>--> |
| | | <!-- <!– <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-else>0</div>--> |
| | | |
| | | <div v-if=" new Date(row.PurchaseOrder.substring(3, 13)).getTime()<new Date(fun_date(-7)).getTime()"> |
| | | {{ row.quantity }} |
| | | </div> |
| | | <div |
| | | v-else-if="(new Date(row.PurchaseOrder.substring(3, 13)).getTime()<new Date(fun_date(-3)).getTime())&& |
| | | (new Date(row.PurchaseOrder.substring(3, 13)).getTime()>new Date(fun_date(-7)).getTime())" |
| | | > |
| | | {{ Math.ceil(row.quantity*0.6) }} |
| | | </div> |
| | | <div v-else> |
| | | 0 |
| | | </div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | width="114" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div> |
| | | <div v-else>0</div> |
| | | |
| | | <!-- 七天之前--> |
| | | <div v-if=" new Date(row.PurchaseOrder.substring(3, 13)).getTime()<new Date(fun_date(-7)).getTime()"> |
| | | {{ row.quantity }} |
| | | </div> |
| | | <!-- 三到7天之前--> |
| | | <div |
| | | v-else-if="(new Date(row.PurchaseOrder.substring(3, 13)).getTime()<new Date(fun_date(-3)).getTime())&& |
| | | (new Date(row.PurchaseOrder.substring(3, 13)).getTime()>new Date(fun_date(-7)).getTime())" |
| | | > |
| | | {{ Math.floor(row.quantity*0.4) }} |
| | | </div> |
| | | <div v-else> |
| | | 0 |
| | | </div> |
| | | |
| | | <!-- <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>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | }, |
| | | |
| | | 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 => { |
| | |
| | | async getEcharts() { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | // loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseOrderCont - 5, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | }) |
| | | setInterval(() => { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | // loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseOrderCont - 5, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | }) |
| | | }, 1000 * 30) |
| | | }, |