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

修改工时分配

parent 614a06ec
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</span> </span>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-input-number <el-input-number
v-if="scope.row.id === tabClickIndex" v-if="scope.row.id === tabClickIndex"
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
itemObj: { itemObj: {
type: Object, type: Object,
default: null default: null
},
form: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
...@@ -65,8 +69,12 @@ export default { ...@@ -65,8 +69,12 @@ export default {
} }
}, },
computed: { computed: {
contentTypeOptions() { flag() {
return this.basicData.joExecutePlan.prodTask if (this.itemObj.isProcess) {
return !this.itemObj.readOnly
} else {
return this.basicData.joExecutePlan.state === 'Pending_Review' || this.form.state === 'Pending_Review'
}
} }
}, },
watch: { watch: {
...@@ -96,7 +104,7 @@ export default { ...@@ -96,7 +104,7 @@ export default {
{ {
'fieldName': 'joExecutePlanId', 'fieldName': 'joExecutePlanId',
'operator': 'EQ', 'operator': 'EQ',
'value': this.basicData.joExecutePlanId 'value': this.basicData.joExecutePlanId || this.basicData.id
}, },
{ {
'fieldName': 'subTypeName', 'fieldName': 'subTypeName',
...@@ -127,7 +135,7 @@ export default { ...@@ -127,7 +135,7 @@ export default {
this.tableData = [] this.tableData = []
if (res.items && res.items.content) { if (res.items && res.items.content) {
res.items.content.forEach(element => { res.items.content.forEach(element => {
element.allWorkHour = this.basicData.joExecutePlan.allWorkHour element.allWorkHour = this.form.allWorkHour || this.basicData.joExecutePlan.allWorkHour
if (element.workHour !== null) { if (element.workHour !== null) {
element.workHourOPercent = this.oPercent(element.workHour, element.allWorkHour) element.workHourOPercent = this.oPercent(element.workHour, element.allWorkHour)
} else { } 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