| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- :style="{ backgroundColor: taskStatusColor() }" --> |
| | | <div class="task-div-content" > |
| | | <div v-if="!isShowNormalTracking" class="task-list-div" > |
| | | <operationTaskPane |
| | | ref="operateTaskDiv" :style="{ backgroundColor: taskStatusColor() }" |
| | | ref="operateTaskDiv" |
| | | :workstationId="dutyForm.workstationId" |
| | | :productSn="operateTaskForm.SN" |
| | | :orderNumber="operateTaskForm.orderNumber" |
| | |
| | | </div> |
| | | <div v-if="isShowNormalTracking" class="task-list-div" > |
| | | <operationTaskTable |
| | | ref="operateTaskTableDiv" :style="{ backgroundColor: taskStatusColor() }" |
| | | ref="operateTaskTableDiv" |
| | | :workstationId="dutyForm.workstationId" |
| | | :productSn="operateTaskForm.SN" |
| | | :orderNumber="operateTaskForm.orderNumber" |
| | |
| | | <staffDialog |
| | | :currshowlist.sync="showStaff" |
| | | :selCol="selCol" |
| | | :selColValArr="selColValArr" |
| | | :multiSelect="true" |
| | | :dutyRecord="dutyForm" |
| | | @handleSelectionChange="selectStaff" |
| | |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | margin-bottom: 10px; |
| | | |
| | | } |
| | | |
| | | .task-list-div { |
| | |
| | | |
| | | .warning-info { |
| | | margin-left: 20px; |
| | | font-size: 16px; |
| | | font-size: 13px; |
| | | font-weight: bold; |
| | | color: red; |
| | | letter-spacing: 3px; |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | changeCurrOperateTask() {}, |
| | | refreshWorkReportPageData() {}, |
| | | // changeCurrOperateTask() {}, |
| | | // refreshWorkReportPageData() {}, |
| | | refreshOperateTasksByConditions() { |
| | | this.$nextTick(() => { |
| | | this.refreshOperateTasks() |
| | |
| | | customerOrderNo: this.operateTaskForm.orderNumber |
| | | }).then((res) => { |
| | | const result = res.data.data |
| | | console.log(result) |
| | | result.forEach(function(item) { |
| | | const obj = { |
| | | key: item, |
| | |
| | | } |
| | | that.partNames.push(obj) |
| | | }) |
| | | console.log(that.partNames) |
| | | }) |
| | | }, 500) |
| | | } else { |
| | |
| | | (e) => e.id === this.dutyForm.workstationId |
| | | ).workCenter |
| | | } |
| | | console.log(this.paramObj_StationSave) |
| | | this.visible_StationSave = true |
| | | }, |
| | | Select_StationSave() { |
| | |
| | | } else if (this.status) { |
| | | this.$message.warning('该班次已经确认,不可修改') |
| | | } else { |
| | | this.selCol = 'staffNo' |
| | | for (let i = 0; i < this.personBoardList.length; i++) { |
| | | this.selColValArr.push(this.personBoardList[i].staffNo) |
| | | } |
| | | // this.selCol = 'staffNo' |
| | | // for (let i = 0; i < this.personBoardList.length; i++) { |
| | | // this.selColValArr.push(this.personBoardList[i].staffNo) |
| | | // } |
| | | this.showStaff = true |
| | | } |
| | | }, |
| | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['userInfo', 'tagWel', 'permissions']), |
| | | // 半个月之前是黄色 当天和三天之内就是红色 三天之后就是蓝色 |
| | | // taskStatusColor() { |
| | | // return function(date) { |
| | | // const now = new Date(); |
| | | // const halfMonthAgo = new Date(now - 15 * 24 * 60 * 60 * 1000); |
| | | // const threeDaysAgo = new Date(now - 3 * 24 * 60 * 60 * 1000); |
| | | // const oneDayAgo = new Date(now - 24 * 60 * 60 * 1000); |
| | | // const today = new Date(now); |
| | | |
| | | taskStatusColor() { |
| | | return function() { |
| | | const now = new Date(); |
| | | const threeDaysAgo = new Date(now - 3 * 24 * 60 * 60 * 1000); |
| | | const oneDayAgo = new Date(now - 24 * 60 * 60 * 1000); |
| | | const today = new Date(now); |
| | | // if (halfMonthAgo <= date && date <= threeDaysAgo) { |
| | | // return 'yellow'; |
| | | // } else if (today <= date && date <= threeDaysAgo) { |
| | | // return 'red'; |
| | | // } else { |
| | | // return 'blue'; |
| | | // } |
| | | // }; |
| | | // } |
| | | |
| | | if (threeDaysAgo <= today && today <= oneDayAgo) { |
| | | return 'yellow'; |
| | | } else if (today <= threeDaysAgo) { |
| | | return 'blue'; |
| | | } else { |
| | | return 'red'; |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | created() { |
| | | document.title = '工作台——MES' |