Commit 1c37b50f authored by “lixuyan”'s avatar “lixuyan”

修改工时分配

parent 614a06ec
......@@ -18,7 +18,7 @@
</span>
</template>
</el-table-column>
<el-table-column v-if="basicData.joExecutePlan.state==='Pending_Review'" prop="workHourOPercent" label="工时占比(%)">
<el-table-column v-if="flag" prop="workHourOPercent" label="工时占比(%)">
<template slot-scope="scope">
<el-input-number
v-if="scope.row.id === tabClickIndex"
......@@ -55,6 +55,10 @@ export default {
itemObj: {
type: Object,
default: null
},
form: {
type: Object,
default: () => {}
}
},
data() {
......@@ -65,8 +69,12 @@ export default {
}
},
computed: {
contentTypeOptions() {
return this.basicData.joExecutePlan.prodTask
flag() {
if (this.itemObj.isProcess) {
return !this.itemObj.readOnly
} else {
return this.basicData.joExecutePlan.state === 'Pending_Review' || this.form.state === 'Pending_Review'
}
}
},
watch: {
......@@ -96,7 +104,7 @@ export default {
{
'fieldName': 'joExecutePlanId',
'operator': 'EQ',
'value': this.basicData.joExecutePlanId
'value': this.basicData.joExecutePlanId || this.basicData.id
},
{
'fieldName': 'subTypeName',
......@@ -127,7 +135,7 @@ export default {
this.tableData = []
if (res.items && res.items.content) {
res.items.content.forEach(element => {
element.allWorkHour = this.basicData.joExecutePlan.allWorkHour
element.allWorkHour = this.form.allWorkHour || this.basicData.joExecutePlan.allWorkHour
if (element.workHour !== null) {
element.workHourOPercent = this.oPercent(element.workHour, element.allWorkHour)
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment