| | |
| | | <div |
| | | slot="reference" |
| | | class="plan" |
| | | :style="{'margin-top':0.1*cellHeight+'px',}" |
| | | :style="{'marginTop':0.1*cellHeight+'px'}" |
| | | |
| | | @click="onClick" |
| | | > |
| | | <!-- ,background: backgroundPercent--> |
| | | <!-- <div class="runTime"> |
| | | <span>S:{{startToString}}</span> |
| | | <span>E:{{endToString}}</span> |
| | |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | import { handleDatetime2 } from '@/utils/global' |
| | | |
| | | const NOW_PLAN = '#D5F8EA' |
| | | const FUTHER_PLAN = '#BFF2FE' |
| | |
| | | data() { |
| | | return { |
| | | dayjs: dayjs |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | statusColor() { |
| | | const { item, currentTime } = this |
| | | const start = dayjs(item.start) |
| | | const end = dayjs(item.end) |
| | | // if(item.type == 'capacity'){ |
| | | // return CAPACITY |
| | | // }else if(item.type == 'h_schedule'){ |
| | | // return H_SCHEDULE |
| | | // }else if(item.type == 'schedule'){ |
| | | // return SCHEDULEING |
| | | backgroundPercent() { |
| | | // console.log(JSON.stringify(this.item), 9) |
| | | // this.item.forEach(item => { |
| | | // |
| | | // }) |
| | | // `linear-gradient(to right,rgba(5, 185, 100, 0.1) 0%,rgba(5, 185, 100, 0.1) 4.99%,rgba(167, 167, 167, 0.3) 5%,rgba(167, 167, 167, 0.3) `+ percentCenter +`%,rgba(5, 185, 100, 0.1) `+(percentCenter+0.01)+`%,rgba(5, 185, 100, 0.1) 100%)`} |
| | | // const molecule = (new Date(handleDatetime2(new Date())).getTime() - new Date(this.item.start).getTime()) / 1000 // 分子 |
| | | // const denominator = (new Date(this.item.end).getTime() - new Date(this.item.start).getTime()) / 1000 // 分母 |
| | | // let percentCenter = ((molecule * 1 / denominator * 1) * 100).toFixed(2) * 1 |
| | | // if (percentCenter < 0) { |
| | | // percentCenter = 0 |
| | | // } |
| | | // if (start.isBefore(currentTime) && end.isAfter(currentTime)) { |
| | | // return NOW_PLAN; // NOW |
| | | // } else if (end.isBefore(currentTime)) { |
| | | // return PAST_PLAN; // PAST |
| | | // } else { |
| | | // return FUTHER_PLAN; // Future |
| | | // } |
| | | // return percentCenter |
| | | |
| | | return `linear-gradient(to right,rgba(167, 167, 167, 0.3) 0%,rgba(167, 167, 167, 0.3) 50%,rgba(5, 185, 100, 0.1) 51%,rgba(5, 185, 100, 0.1) 100%)` |
| | | }, |
| | | // statusColor() { |
| | | // const { item, currentTime } = this |
| | | // const start = dayjs(item.start) |
| | | // const end = dayjs(item.end) |
| | | // if(item.type == 'capacity'){ |
| | | // return CAPACITY |
| | | // }else if(item.type == 'h_schedule'){ |
| | | // return H_SCHEDULE |
| | | // }else if(item.type == 'schedule'){ |
| | | // return SCHEDULEING |
| | | // } |
| | | // if (start.isBefore(currentTime) && end.isAfter(currentTime)) { |
| | | // return NOW_PLAN; // NOW |
| | | // } else if (end.isBefore(currentTime)) { |
| | | // return PAST_PLAN; // PAST |
| | | // } else { |
| | | // return FUTHER_PLAN; // Future |
| | | // } |
| | | // }, |
| | | startToString() { |
| | | return dayjs(this.item.start).format('HH:mm') |
| | | }, |
| | |
| | | return dayjs(this.item.end).format('HH:mm') |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | onClick() { |
| | | this.updateTimeLines(this.item.start, this.item.end) |
| | |
| | | position: relative; |
| | | z-index: 0; |
| | | // background:rgba(171, 245, 240 , 0.6); |
| | | |
| | | background: rgba(5, 185, 100, 0.1); |
| | | |
| | | //background: linear-gradient(to right, rgba(167, 167, 167, 0.3) 0%,rgba(167, 167, 167, 0.3) 20%,rgba(5, 185, 100, 0.1) 21%,rgba(5, 185, 100, 0.1) 100%); |
| | | text-align: center; |
| | | border-radius: 5px; |
| | | |
| | |
| | | <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: rgba(5, 185, 100, 0.5)" />产能</div> |
| | | <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: rgba(5, 185, 100, 1)" />已排</div> |
| | | <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color:rgba(128,0,128,0.7)" />预排</div> |
| | | <!-- <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="color: #a7a7a7" />已失效时间</div>--> |
| | | <!-- <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: #a7a7a7" />失效产能</div>--> |
| | | </div> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | |
| | | this.dialogForm.warehousecode = row.stck_code |
| | | this.dialogForm.stocktypecode = row.stocktypecode |
| | | this.dialogForm.materialtypecode = row.materialtypecode |
| | | this.dialogForm.minstockqty = row.maxqty |
| | | this.dialogForm.maxstockqty = row.minqty |
| | | this.dialogForm.minstockqty = row.minqty |
| | | this.dialogForm.maxstockqty = row.maxqty |
| | | this.isBatchNo = row.is_batchno === 'Y' |
| | | this.isFifo = row.is_fifo === 'Y' |
| | | this.isInCheck = row.is_incheck === 'Y' |
| | |
| | | warehousecode: this.dialogForm.warehousecode, |
| | | stocktypecode: this.dialogForm.stocktypecode, |
| | | materialtypecode: this.dialogForm.materialtypecode, |
| | | minstockqty: this.dialogForm.minstockqty === null ? 0 : this.dialogForm.minstockqty, |
| | | maxstockqty: this.dialogForm.maxstockqty === null ? 0 : this.dialogForm.maxstockqty, |
| | | minstockqty: this.dialogForm.minstockqty ? parseFloat(this.dialogForm.minstockqty) : 0, |
| | | maxstockqty: this.dialogForm.maxstockqty ? parseFloat(this.dialogForm.maxstockqty) : 0, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | is_batchno: this.isBatchNo ? 'Y' : 'N', |
| | | is_fifo: this.isFifo ? 'Y' : 'N', |