|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :close-on-click-modal = "false"
|
|
|
v-model="outerVisible" title="任务进度" width="700" height="800">
|
|
|
- <el-form v-if="handlerId === useUserStore().user.userId" :model="sumbitForm" label-width="auto" ref="workDetailForm" style="max-width: 700px;">
|
|
|
+ <el-form v-if="recordStatu === 1 &&handlerId === useUserStore().user.userId" :model="sumbitForm" label-width="auto" ref="workDetailForm" style="max-width: 700px;">
|
|
|
<el-form-item label="记录日期">
|
|
|
<el-date-picker v-model="sumbitForm.recordDate" type="date" clearable
|
|
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
|
@@ -104,6 +104,7 @@ const setCurrent = (row?: any) => {
|
|
|
singleTableRef.value!.setCurrentRow(row)
|
|
|
}
|
|
|
const handlerId = ref();
|
|
|
+const recordStatu = ref();
|
|
|
const handleCurrentChange = (val: any | undefined) => {
|
|
|
currentRow.value = val
|
|
|
}
|
|
@@ -129,7 +130,7 @@ const handleClick = (index: number, row: TFrom, ele: ElButton) => {
|
|
|
fullscreenLoading.value = false;
|
|
|
})
|
|
|
}else{
|
|
|
- setDisabled(false);
|
|
|
+ setFormDisabled(false);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -137,22 +138,33 @@ const handleClick = (index: number, row: TFrom, ele: ElButton) => {
|
|
|
const restDetail = () =>{
|
|
|
getDetail(workOrderId.value).then((res) => {
|
|
|
onworkDetailData.value = res.rows;
|
|
|
- setDisabled(true);
|
|
|
+ setFormDisabled(true);
|
|
|
}).catch((error) => {
|
|
|
console.log(error);
|
|
|
})
|
|
|
}
|
|
|
//打开本弹窗的方法暴露给父组件
|
|
|
-const openView = (id,userId) => {
|
|
|
+const openView = (id,userId,recordStatus) => {
|
|
|
sumbitForm.recordDate = null;
|
|
|
sumbitForm.recordDetail = null;
|
|
|
workOrderId.value = id;
|
|
|
outerVisible.value = true;
|
|
|
handlerId.value = userId;
|
|
|
+ if(recordStatus ===1){
|
|
|
+ setButtonDisabled(false);
|
|
|
+ }else{
|
|
|
+ setButtonDisabled(true);
|
|
|
+ }
|
|
|
+ recordStatu.value = recordStatus;
|
|
|
restDetail();
|
|
|
}
|
|
|
+const setButtonDisabled = (falg:boolean)=>{
|
|
|
+ onworkDetailData.value.forEach((value) => {
|
|
|
+ value.disabled = falg;
|
|
|
+ })
|
|
|
+}
|
|
|
//设置属性
|
|
|
-const setDisabled = (falg:boolean) => {
|
|
|
+const setFormDisabled = (falg:boolean) => {
|
|
|
onworkDetailData.value.forEach((value) => {
|
|
|
|
|
|
value.inputdisabled = falg;
|