<template>
|
<div>
|
<el-alert
|
v-if="!operationTasks || operationTasks.length == 0"
|
title="还没有工单下发到此机台!"
|
type="warning"
|
effect="dark"
|
>
|
</el-alert>
|
<el-card
|
v-for="(item, index) in operationTasks"
|
@click.native="setCheckFlag(item)"
|
shadow="hover"
|
:key="index"
|
:class="['task-item', item.checkFlag ? 'card-checked' : 'card-unchecked']"
|
>
|
<img class="selectedImg" src="/img/workbench/icon_selected.png" />
|
<div class="header">
|
<div>工单号:{{ item.taskNo }}</div>
|
<div>计划号:{{ item.mpsNo }}</div>
|
<div
|
:class="[
|
'status-change-div',
|
item.checkFlag ? 'card-checked-status' : 'card-status'
|
]"
|
>
|
<el-select
|
v-if="permissions.product_operationTask_state"
|
v-model="item.statusAction"
|
placeholder="功能菜单"
|
@change="
|
changeTaskState(item.statusAction, item.status, item.id, item)
|
"
|
>
|
<el-option
|
v-for="ele in statusActions"
|
:key="ele.value"
|
:label="ele.label"
|
:value="ele.value"
|
:disabled="ele.disabled"
|
>
|
</el-option>
|
</el-select>
|
</div>
|
</div>
|
<div class="body">
|
<div class="row">
|
<div class="l">零件名称:</div>
|
<div class="r">{{ item.partName }}</div>
|
</div>
|
<div class="row">
|
<div class="l">零件号:</div>
|
<div class="r">{{ item.partNo }}</div>
|
</div>
|
<div class="row">
|
<div class="l">成品:</div>
|
<div class="r">{{ item.productName }}</div>
|
</div>
|
<div class="row">
|
<div class="l">计划完成时间:</div>
|
<div class="r">{{ item.planFinishDay }}</div>
|
</div>
|
</div>
|
|
<el-progress
|
class="task-progress"
|
:text-inside="true"
|
:stroke-width="20"
|
:percentage="
|
Number((item.completedQuantity / item.plannedQuantity).toFixed(2)) *
|
100 >
|
100
|
? 100
|
: Number(
|
(item.completedQuantity / item.plannedQuantity).toFixed(2)
|
) * 100
|
"
|
:format="formatPercentage(item.completedQuantity, item.plannedQuantity)"
|
></el-progress>
|
</el-card>
|
</div>
|
</template>
|
<style lang="scss" scoped>
|
@mixin flex-row {
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
}
|
@mixin flex-col {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
.task-item {
|
width: 100%;
|
border-radius: 12px;
|
cursor: pointer;
|
position: relative;
|
box-shadow: 1px 2px 24px 1px rgba(4, 0, 0, 0.14);
|
& + .task-item {
|
margin-top: 10px;
|
}
|
&.card-checked {
|
// color: white;
|
background-image: -webkit-linear-gradient(
|
90deg,
|
rgba(12, 149, 255, 0.7) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
-webkit-linear-gradient(#5a97fa, #5a97fa);
|
background-image: -moz-linear-gradient(
|
90deg,
|
rgba(12, 149, 255, 0.7) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
-moz-linear-gradient(#5a97fa, #5a97fa);
|
background-image: linear-gradient(
|
90deg,
|
rgba(12, 149, 255, 0.7) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
linear-gradient(#5a97fa, #5a97fa);
|
background-blend-mode: normal, normal;
|
}
|
.selectedImg {
|
position: absolute;
|
top: 0px;
|
right: 0px;
|
height: 38px;
|
width: 46px;
|
}
|
.header {
|
@include flex-row;
|
justify-content: space-between;
|
font-weight: bold;
|
font-size: 16px;
|
}
|
.body {
|
font-size: 14.5px;
|
padding: 5px 0;
|
.row {
|
@include flex-row;
|
align-items: baseline;
|
padding: 4px 0;
|
&:last-child {
|
.l {
|
width: 7em;
|
}
|
}
|
.l {
|
width: 5em;
|
}
|
.r {
|
flex: 1;
|
}
|
}
|
}
|
.task-progress {
|
>>> .el-progress-bar__outer .el-progress-bar__innerText {
|
font-size: 14px;
|
}
|
}
|
&.card-unchecked {
|
.task-progress {
|
>>> .el-progress-bar__inner {
|
background-image: -webkit-linear-gradient(
|
90deg,
|
rgba(64, 202, 253, 0.8) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
-webkit-linear-gradient(#ffffff, #ffffff);
|
background-image: -moz-linear-gradient(
|
90deg,
|
rgba(64, 202, 253, 0.8) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
-moz-linear-gradient(#ffffff, #ffffff);
|
background-image: linear-gradient(
|
90deg,
|
rgba(64, 202, 253, 0.8) 0%,
|
rgba(38, 176, 254, 0.8) 34%,
|
rgba(12, 149, 255, 0.8) 100%
|
),
|
linear-gradient(#ffffff, #ffffff);
|
background-blend-mode: normal, normal;
|
}
|
>>> .el-progress-bar__outer {
|
background-color: rgba(97, 143, 245, 0.17);
|
}
|
>>> .el-progress-bar__outer .el-progress-bar__innerText {
|
color: #272fc7;
|
}
|
}
|
}
|
&.card-checked {
|
color: white;
|
.task-progress {
|
>>> .el-progress-bar__inner {
|
background-color: #fff;
|
}
|
>>> .el-progress-bar__outer {
|
background-color: rgba(255, 255, 255, 0.3);
|
}
|
>>> .el-progress-bar__outer .el-progress-bar__innerText {
|
color: green;
|
}
|
}
|
}
|
}
|
.status-change-div {
|
width: 20%;
|
max-width: 100px;
|
}
|
.status-change-div >>> .el-select {
|
width: 100%;
|
}
|
.status-change-div >>> .el-select .el-input__inner {
|
height: 28px;
|
line-height: 28px;
|
border: 0px;
|
color: #fff;
|
&::-webkit-input-placeholder {
|
color: white;
|
}
|
}
|
.status-change-div >>> .el-select .el-input__inner .el-input__icon {
|
line-height: 28px;
|
}
|
.status-change-div >>> .el-select .el-input .el-select__caret::before {
|
content: '';
|
background: url('/img/workbench/icon_xl1.png') center center no-repeat;
|
position: absolute;
|
width: 100%;
|
height: 100%;
|
top: 50%;
|
left: 50%;
|
transform: translate(-50%, -50%);
|
}
|
.card-checked >>> .el-select .el-input__inner {
|
background-color: rgba(20, 44, 93, 0.6);
|
}
|
.card-unchecked >>> .el-select .el-input__inner {
|
background-color: #3ea1fc;
|
}
|
</style>
|
<script>
|
import {
|
getOperationTask,
|
changeBackState,
|
changeOperationTaskState,
|
getDraftProductOut,
|
batchChange
|
} from '@/api/product/personboard'
|
import {
|
getOperationTaskById,
|
selectSubmitState,
|
changeSubmitState
|
} from '@/api/plan/operationtask'
|
import { mapGetters } from 'vuex'
|
const task_storage_key = 'OPERATION_TASK_ID'
|
export default {
|
props: {
|
workstationId: {
|
type: Number
|
},
|
productSn: {
|
type: String
|
},
|
orderNumber: {
|
type: String
|
},
|
spec: {
|
type: String
|
},
|
outBatchNo: {
|
type: String
|
},
|
mpsNo: {
|
type: String
|
}
|
},
|
data() {
|
return {
|
taskID: null,
|
operationTasks: [],
|
currOperateTask: {
|
id: null,
|
taskNo: null,
|
technologyName: null,
|
technologyRequire: null,
|
partName: null,
|
manufacturingOrder: null,
|
status: null,
|
statusDesc: null,
|
saleOrder: null,
|
custom: null,
|
remark: null,
|
partId: null,
|
partNo: null,
|
unit: null,
|
operationName: null,
|
routingId: null,
|
operationId: null,
|
discNum: null,
|
routingOperationRemark: null,
|
mpsNo: null,
|
mpsId: null,
|
customerName: null,
|
productName: null,
|
moNo: null,
|
reelSpec: null,
|
sunit: null,
|
customerOrderNo: null
|
},
|
statusActions: [
|
{ value: 'start', label: '开始', disabled: false },
|
{ value: 'over', label: '结束', disabled: false }
|
]
|
}
|
},
|
computed: {
|
...mapGetters(['permissions'])
|
},
|
created() {
|
if (!this.defaultOperationId) {
|
const opId = localStorage.getItem(task_storage_key)
|
if (opId) {
|
this.defaultOperationId = parseInt(opId)
|
this.currOperateTask.id = this.defaultOperationId
|
}
|
}
|
this.loadOperateTaskByWorkstation(this.currOperateTask.id)
|
if (this.permissions.product_operationTask_state_submit) {
|
this.statusActions.push({
|
value: 'batchSubmit',
|
label: '批量提交',
|
disabled: false
|
})
|
}
|
},
|
methods: {
|
// 点击工单,选中工单
|
setCheckFlag(item) {
|
if (item.checkFlag) {
|
item.checkFlag = false
|
} else {
|
item.checkFlag = true
|
}
|
this.changeTask(item)
|
this.currentTaskChange(item)
|
// 点击工单时,触发事件,当前选中工单信息
|
this.$emit('changeCurrOperateTask', this.currOperateTask)
|
},
|
// 修改各工单选中情况
|
changeTask(item) {
|
this.operationTasks.forEach(function(el) {
|
if (item.id !== el.id) {
|
el.checkFlag = false
|
}
|
})
|
},
|
// 为当前工单赋值
|
currentTaskChange(val) {
|
if (val.checkFlag) {
|
var operationTask = val
|
this.currOperateTask.id = operationTask.id
|
this.currOperateTask.taskNo = operationTask.taskNo
|
this.currOperateTask.technologyName = operationTask.technologyName
|
this.currOperateTask.technologyRequire = operationTask.technologyRequire
|
this.currOperateTask.partName = operationTask.partName
|
this.currOperateTask.manufacturingOrder =
|
operationTask.manufacturingOrder
|
this.currOperateTask.status = operationTask.status
|
this.currOperateTask.statusDesc = operationTask.statusDesc
|
this.currOperateTask.saleOrder = operationTask.saleOrder
|
this.currOperateTask.custom = operationTask.custom
|
this.currOperateTask.remark = operationTask.remark
|
this.currOperateTask.partNo = operationTask.partNo
|
this.currOperateTask.partId = operationTask.partId
|
this.currOperateTask.unit = operationTask.unit
|
this.currOperateTask.operationName = operationTask.operationName
|
this.currOperateTask.routingId = operationTask.routingId
|
this.currOperateTask.operationId = operationTask.operationId
|
this.currOperateTask.partNo = operationTask.partNo
|
this.currOperateTask.moNo = operationTask.moNo
|
this.currOperateTask.optaskNo = operationTask.optaskNo
|
this.currOperateTask.operationName = operationTask.operationName
|
this.currOperateTask.plannedQuantity = operationTask.plannedQuantity
|
this.currOperateTask.completedQuantity = operationTask.completedQuantity
|
this.currOperateTask.priority = operationTask.priority
|
this.currOperateTask.unit = operationTask.unit
|
this.currOperateTask.plannedStartDate = operationTask.plannedStartDate
|
this.currOperateTask.plannedFinishDate = operationTask.plannedFinishDate
|
this.currOperateTask.actualStartDate = operationTask.actualStartDate
|
this.currOperateTask.actualFinishDate = operationTask.actualFinishDate
|
this.currOperateTask.createTime = operationTask.createTime
|
this.currOperateTask.discNum = operationTask.discNum
|
this.currOperateTask.mpsNo = operationTask.mpsNo
|
this.currOperateTask.mpsId = operationTask.mpsId
|
this.currOperateTask.customerName = operationTask.customerName
|
this.currOperateTask.productName = operationTask.productName
|
this.currOperateTask.reelSpec = operationTask.reelSpec
|
this.currOperateTask.sunit = operationTask.sunit
|
this.currOperateTask.pcoId = operationTask.pcoId
|
this.currOperateTask.customerOrderNo = operationTask.customerOrderNo
|
|
if (
|
operationTask.routingOperationRemark != null &&
|
operationTask.routingOperationRemark != ''
|
) {
|
let routingOperationRemark = operationTask.routingOperationRemark
|
const imgIndex = routingOperationRemark.indexOf('<img')
|
if (imgIndex >= 0) {
|
routingOperationRemark =
|
routingOperationRemark.slice(0, imgIndex + 4) +
|
' id="remarkImg" style="cursor:pointer;" ' +
|
routingOperationRemark.slice(imgIndex + 4)
|
this.currOperateTask.routingOperationRemark = routingOperationRemark
|
} else {
|
this.currOperateTask.routingOperationRemark =
|
operationTask.routingOperationRemark
|
}
|
} else {
|
this.currOperateTask.routingOperationRemark =
|
operationTask.routingOperationRemark
|
}
|
} else {
|
this.initOperateTask()
|
}
|
},
|
// 格式化工单进度内容
|
formatProgress(item) {
|
return () => {
|
return item
|
}
|
},
|
// 更改工单状态
|
changeTaskState(statusAction, taskStatus, taskId, currItem) {
|
let changeFlag = false
|
let changeEvent
|
if (statusAction === 'start') {
|
if (taskStatus === '01pending') {
|
changeFlag = true
|
changeEvent = 'START'
|
} else {
|
this.$message.error('工单不是【等待】状态,无法开始。')
|
}
|
}
|
if (statusAction === 'over') {
|
if (taskStatus === '02inProgress') {
|
changeFlag = true
|
changeEvent = 'COMPLETE'
|
} else {
|
this.$message.error('工单不是【进行中】状态,无法结束')
|
}
|
}
|
if (changeFlag) {
|
changeBackState({ id: taskId }, changeEvent).then((response) => {
|
if (response.data.code === 0) {
|
this.$message.success('工单状态变更成功')
|
// 刷新工单列表
|
this.loadOperateTaskByWorkstation(this.currOperateTask.id)
|
} else {
|
this.$message.success('工单状态变更失败')
|
}
|
})
|
}
|
// 批量提交
|
if (statusAction === 'batchSubmit') {
|
this.taskID = taskId
|
selectSubmitState(taskId)
|
.then((res) => {
|
if (!res.data.data) {
|
changeSubmitState(taskId, true).then((res) => {
|
console.log(res)
|
})
|
getDraftProductOut(taskId).then((response) => {
|
console.log(response)
|
const list = response.data.data || []
|
if (list.length > 0) {
|
this.batchChangeSubmit(list, 0, currItem)
|
} else {
|
changeSubmitState(taskId, false).then((res) => {
|
console.log(res)
|
})
|
currItem.statusAction = null
|
this.$message.warning('没有可提交的数据')
|
}
|
// for (let i = 0; i < list.length; i++) {
|
// batchChange([list[i].id], event)
|
// .then((response) => {
|
// // this.submitLoading = false
|
// // if (successSize === list.length) {
|
// // this.$message.success('提交成功')
|
// // } else {
|
// // this.$message.error(errorMsg + '提交失败')
|
// // }
|
// // this.getBatchReport(5)
|
// })
|
// .catch((error) => {
|
// // errorMsg = errorMsg + ele.outBatchNo + ';'
|
// // this.$message.error(errorMsg + '处理失败')
|
// })
|
// }
|
})
|
} else {
|
currItem.statusAction = null
|
this.$message.error('该工单处于批量提交执行中,请勿重复操作!')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
changeSubmitState(taskId, false).then((res) => {
|
console.log(res)
|
})
|
})
|
}
|
},
|
batchChangeSubmit(list, i, currItem) {
|
const count = i + 1
|
const len = list.length
|
const loading = this.$loading({
|
lock: true,
|
text: '正在处理 ' + count + '/' + len,
|
spinner: 'el-icon-loading',
|
background: 'rgba(0, 0, 0, 0.7)'
|
})
|
var event = 'SUBMIT'
|
batchChange([list[i].mainId], event)
|
.then((response) => {
|
loading.close()
|
if (i < list.length - 1) {
|
i++
|
this.batchChangeSubmit(list, i, currItem)
|
} else {
|
changeSubmitState(this.taskID, false).then((res) => {
|
console.log(res)
|
})
|
// 批量提交完成,刷新报工页面数据
|
this.$emit('refreshReport')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
loading.close()
|
changeSubmitState(this.taskID, false).then((res) => {
|
console.log(res)
|
})
|
const errorMsg = '报工单号' + list[i].productNo + ':'
|
this.$message.error(errorMsg + '处理失败')
|
// 刷新报工页面数据
|
this.$emit('refreshReport')
|
currItem.statusAction = null
|
})
|
},
|
// 根据工作站,加载工单信息,选中当前工单
|
loadOperateTaskByWorkstation(taskId) {
|
return new Promise((resolve, reject) => {
|
this.operationTasks = []
|
if (this.workstationId && this.workstationId != null) {
|
var query = { workstationId: this.workstationId }
|
if (this.productSn && this.productSn != null) {
|
query.productSn = this.productSn
|
}
|
if (this.orderNumber && this.orderNumber != null) {
|
query.salesOrder = this.orderNumber
|
}
|
if (this.spec && this.spec != null) {
|
query.productName = this.spec
|
}
|
if (this.outBatchNo && this.outBatchNo != null) {
|
query.outBatchNo = this.outBatchNo
|
}
|
if (this.mpsNo && this.mpsNo != null) {
|
query.mpsNo = this.mpsNo
|
}
|
getOperationTask(query)
|
.then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
var tasks = data.data
|
var operationTask
|
for (var i = 0; i < tasks.length; i++) {
|
operationTask = {}
|
Object.assign(operationTask, tasks[i])
|
operationTask.taskNo = tasks[i].optaskNo
|
if (tasks[i].state == '01pending') {
|
operationTask.cssStyle = 'waitClass'
|
} else if (tasks[i].state == '02inProgress') {
|
operationTask.cssStyle = 'inprogressClass'
|
} else if (tasks[i].state == '03interrupted') {
|
operationTask.cssStyle = 'pauseClass'
|
} else if (tasks[i].state == '04completed') {
|
operationTask.cssStyle = 'completeClass'
|
}
|
|
operationTask.completedQuantity =
|
tasks[i].completedQuantity == null
|
? 0
|
: tasks[i].completedQuantity
|
operationTask.technologyRequire =
|
tasks[i].technologyRequirement
|
operationTask.status = tasks[i].state
|
operationTask.statusDesc = this.formaterState(tasks[i].state)
|
operationTask.custom = tasks[i].customer
|
operationTask.saleOrder = tasks[i].salesOrder
|
operationTask.partNo = tasks[i].partNo
|
operationTask.moNo = tasks[i].moNo
|
operationTask.optaskNo = tasks[i].optaskNo
|
operationTask.operationName = tasks[i].operationName
|
operationTask.plannedQuantity = tasks[i].plannedQuantity
|
operationTask.completedQuantity = tasks[i].completedQuantity
|
operationTask.priority = tasks[i].priority
|
operationTask.unit = tasks[i].unit
|
operationTask.plannedStartDate = tasks[i].plannedStartDate
|
operationTask.plannedFinishDate = tasks[i].plannedFinishDate
|
operationTask.actualStartDate = tasks[i].actualStartDate
|
operationTask.actualFinishDate = tasks[i].actualFinishDate
|
operationTask.createTime = tasks[i].createTime
|
operationTask.statusAction = null
|
operationTask.discNum = tasks[i].discNum
|
operationTask.routingOperationRemark =
|
tasks[i].routingOperationRemark
|
operationTask.mpsNo = tasks[i].mpsNo
|
operationTask.mpsId = tasks[i].mpsId
|
operationTask.customerName = tasks[i].customerName
|
operationTask.productName = tasks[i].productName
|
operationTask.reelSpec = tasks[i].reelSpec
|
operationTask.sunit = tasks[i].sunit
|
operationTask.pcoId = tasks[i].pcoId
|
operationTask.customerOrderNo = tasks[i].customerOrderNo
|
operationTask.checkFlag = false
|
|
this.operationTasks.push(operationTask)
|
}
|
// 选中当前工单
|
if (
|
this.operationTasks.length > 0 &&
|
taskId != null &&
|
taskId
|
) {
|
var isResetCurrOpertionTaskFlag = true
|
for (var k = 0; k < this.operationTasks.length; k++) {
|
if (this.operationTasks[k].id === taskId) {
|
this.setCheckFlag(this.operationTasks[k])
|
isResetCurrOpertionTaskFlag = false
|
break
|
}
|
}
|
console.log(this.operationTasks)
|
// 若当前工单在工单列表未被找到且当前工单状态为已完成或已取消时,则将当前工单重置为空并抛出事件,否则不管
|
if (isResetCurrOpertionTaskFlag) {
|
getOperationTaskById(taskId).then((res) => {
|
var resData = res.data
|
if (resData.code === 0) {
|
// 当前工单状态为已完成或已取消或不存在
|
if (resData.data.status === '1') {
|
this.initOperateTask()
|
this.$emit(
|
'changeCurrOperateTask',
|
this.currOperateTask
|
)
|
}
|
}
|
})
|
}
|
} else if (
|
this.operationTasks.length <= 0 &&
|
taskId != null &&
|
taskId
|
) {
|
// 工单列表为空,且taskId有值,则找到且当前工单状态为已完成或已取消时,将当前工单重置为空并抛出事件,否则不管
|
getOperationTaskById(taskId).then((res) => {
|
var resData = res.data
|
if (resData.code === 0) {
|
// 当前工单状态为已完成或已取消或不存在
|
if (resData.data.status === '1') {
|
this.initOperateTask()
|
this.$emit(
|
'changeCurrOperateTask',
|
this.currOperateTask
|
)
|
}
|
}
|
})
|
}
|
|
resolve()
|
} else {
|
this.$message.error('获取工单信息失败')
|
reject()
|
}
|
})
|
.catch((error) => {
|
reject(error)
|
})
|
}
|
})
|
},
|
// 刷新某个工单的信息
|
updateSomeOpTask() {
|
const opTask = this.operationTasks.find((item) => {
|
return item.id == this.currOperateTask.id
|
})
|
if (opTask) {
|
opTask.statusAction = 'start'
|
}
|
},
|
// 工单状态格式化
|
formaterState(val) {
|
var statusDesc = ''
|
if (val == '01pending') {
|
statusDesc = '等待'
|
} else if (val == '02inProgress') {
|
statusDesc = '进行中'
|
} else if (val == '03interrupted') {
|
statusDesc = '已暂停'
|
} else if (val == '04completed') {
|
statusDesc = '已完成'
|
}
|
return statusDesc
|
},
|
// 工单进度格式化
|
formatPercentage(val1, val2) {
|
return () => {
|
return val1 + '/' + val2
|
}
|
},
|
// 初始化页面变量
|
initOperateTask() {
|
this.currOperateTask.id = null
|
this.currOperateTask.taskNo = null
|
this.currOperateTask.technologyName = null
|
this.currOperateTask.technologyRequire = null
|
this.currOperateTask.partName = null
|
this.currOperateTask.manufacturingOrder = null
|
this.currOperateTask.status = null
|
this.currOperateTask.statusDesc = null
|
this.currOperateTask.saleOrder = null
|
this.currOperateTask.custom = null
|
this.currOperateTask.remark = null
|
this.currOperateTask.partNo = null
|
this.currOperateTask.partId = null
|
this.currOperateTask.unit = null
|
this.currOperateTask.operationName = null
|
this.currOperateTask.routingId = null
|
this.currOperateTask.operationId = null
|
this.currOperateTask.partNo = null
|
this.currOperateTask.partId = null
|
this.currOperateTask.unit = null
|
this.currOperateTask.operationName = null
|
this.currOperateTask.routingId = null
|
this.currOperateTask.operationId = null
|
this.currOperateTask.partNo = null
|
this.currOperateTask.moNo = null
|
this.currOperateTask.optaskNo = null
|
this.currOperateTask.operationName = null
|
this.currOperateTask.plannedQuantity = null
|
this.currOperateTask.completedQuantity = null
|
this.currOperateTask.priority = null
|
this.currOperateTask.unit = null
|
this.currOperateTask.plannedStartDate = null
|
this.currOperateTask.plannedFinishDate = null
|
this.currOperateTask.actualStartDate = null
|
this.currOperateTask.actualFinishDate = null
|
this.currOperateTask.createTime = null
|
this.currOperateTask.discNum = null
|
this.currOperateTask.routingOperationRemark = null
|
this.currOperateTask.mpsNo = null
|
this.currOperateTask.mpsId = null
|
this.currOperateTask.customerName = null
|
this.currOperateTask.productName = null
|
this.currOperateTask.reelSpec = null
|
this.currOperateTask.sunit = null
|
this.currOperateTask.pcoId = null
|
this.currOperateTask.customerOrderNo = null
|
}
|
},
|
watch: {
|
workstationId() {
|
if (this.workstationId) {
|
this.loadOperateTaskByWorkstation(this.currOperateTask.id)
|
}
|
},
|
currOperateTask: {
|
handler(newValue, oldValue) {
|
if (newValue.id) {
|
localStorage.setItem(task_storage_key, newValue.id)
|
} else {
|
localStorage.setItem(task_storage_key, null)
|
}
|
},
|
deep: true
|
}
|
}
|
}
|
</script>
|