|
@@ -70,8 +70,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="70px">
|
|
|
<template #default="scope">
|
|
|
- <el-button v-if="(scope.row.status ==2 ||scope.row.status == 3) " link type="warning" icon="Edit" @click="handleUpdateDayworkItem(scope.row)" >编辑</el-button>
|
|
|
- <el-button v-else link type="primary" icon="View" @click="handleCheckDayworkItem(scope.row)" >查看</el-button>
|
|
|
+ <el-button v-if="(scope.row.status ==2 ||scope.row.status == 3) &&scope.row.flag" link type="warning" icon="Edit" @click="handleUpdateDayworkItem(scope.row)" >编辑</el-button>
|
|
|
+ <el-button v-else-if="(scope.row.status !=2 ||scope.row.status != 3) || scope.row.flag" link type="primary" icon="View" @click="handleCheckDayworkItem(scope.row)" >查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -249,17 +249,22 @@ function getDayworkItems() {
|
|
|
dayworkItemLoading.value = true
|
|
|
listDayworkItem(queryItemParams.value).then((res) => {
|
|
|
listDeptProcess({deptId:queryDayworkParams.value.deptId,flag:true}).then((deptProcess) => {
|
|
|
- // for(let i = 0; i < res.rows.length; i++) {
|
|
|
- // for(let j = 0; j < deptProcess.rows.length; j++) {
|
|
|
- // //如果在工段资源工序里,则代表工段长能编辑
|
|
|
- // if(res.rows[i].processAlias.trim() == deptProcess.rows[j].processAlias.trim()) {
|
|
|
- // res.rows[i].flag = true
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // res.rows[i].flag = false
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+ for(let i = 0; i < res.rows.length; i++) {
|
|
|
+ for(let j = 0; j < deptProcess.rows.length; j++) {
|
|
|
+ //如果在工段资源工序里,则代表工段长能编辑
|
|
|
+ if(res.rows[i].processAlias.trim() == deptProcess.rows[j].processAlias.trim()) {
|
|
|
+ console.log(res.rows[i].processAlias.trim())
|
|
|
+ console.log(deptProcess.rows[j].processAlias.trim())
|
|
|
+ console.log(res.rows[i].processAlias.trim() == deptProcess.rows[j].processAlias.trim())
|
|
|
+ res.rows[i].flag = true
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ res.rows[i].flag = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(res.rows)
|
|
|
dayworkItemList.value = res.rows
|
|
|
console.log(dayworkItemList.value)
|
|
|
for (var i = 0; i < dayworkItemList.value.length; i++) {
|