|
@@ -2,14 +2,14 @@
|
|
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :close-on-click-modal = "false"
|
|
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :close-on-click-modal = "false"
|
|
v-model="outerVisible" title="任务进度" width="765" height="800">
|
|
v-model="outerVisible" title="任务进度" width="765" height="800">
|
|
<div v-if="!falg">
|
|
<div v-if="!falg">
|
|
- <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-form v-if="recordStatu === 1 &&handlerId === useUserStore().user.userId" :rules="rules" :model="sumbitForm" label-width="auto" ref="workDetailForm" style="max-width: 700px;">
|
|
|
|
+ <el-form-item label="记录日期" prop="recordDate">
|
|
<el-date-picker v-model="sumbitForm.recordDate" type="date" clearable
|
|
<el-date-picker v-model="sumbitForm.recordDate" type="date" clearable
|
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
|
style="width: 100%;">
|
|
style="width: 100%;">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="进度描述">
|
|
|
|
|
|
+ <el-form-item label="进度描述" prop="recordDetail">
|
|
<el-input class="no-scrollbar" type="textarea" v-model="sumbitForm.recordDetail" />
|
|
<el-input class="no-scrollbar" type="textarea" v-model="sumbitForm.recordDetail" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<div style="display: flex;
|
|
<div style="display: flex;
|
|
@@ -75,7 +75,7 @@ import {ElButton, ElTable} from "element-plus";
|
|
import {ref} from "@vue/reactivity";
|
|
import {ref} from "@vue/reactivity";
|
|
import modal from "@/plugins/modal"
|
|
import modal from "@/plugins/modal"
|
|
import useUserStore from "@/store/modules/user";
|
|
import useUserStore from "@/store/modules/user";
|
|
-import {defineProps, getCurrentInstance, reactive, toRefs} from "vue";
|
|
|
|
|
|
+import {computed, defineProps, getCurrentInstance, reactive, toRefs} from "vue";
|
|
import {
|
|
import {
|
|
getDetail,
|
|
getDetail,
|
|
updateDetail,
|
|
updateDetail,
|
|
@@ -107,6 +107,14 @@ const form = reactive({
|
|
workOrderId: null,
|
|
workOrderId: null,
|
|
inputHidden:0,
|
|
inputHidden:0,
|
|
});
|
|
});
|
|
|
|
+const rules = computed(() => ({
|
|
|
|
+ recordDate: [
|
|
|
|
+ {type:'date', required: true, message: "记录日期不能为空"},
|
|
|
|
+ ],
|
|
|
|
+ recordDetail: [
|
|
|
|
+ { required: true, message: "进度描述不能为空"},
|
|
|
|
+ ],
|
|
|
|
+}));
|
|
type TFrom = typeof form;
|
|
type TFrom = typeof form;
|
|
const sumbitForm = reactive<TFrom>(form);
|
|
const sumbitForm = reactive<TFrom>(form);
|
|
const workDetailForm = ref();
|
|
const workDetailForm = ref();
|
|
@@ -203,7 +211,7 @@ const formclear = () => {
|
|
const onSubmit = () =>{
|
|
const onSubmit = () =>{
|
|
fullscreenLoading.value = true;
|
|
fullscreenLoading.value = true;
|
|
sumbitForm.workOrderId = workOrderId;
|
|
sumbitForm.workOrderId = workOrderId;
|
|
- if(sumbitForm.recordDetail != null && sumbitForm.recordDetail !== ''){
|
|
|
|
|
|
+ if(sumbitForm.recordDate != null && sumbitForm.recordDetail != null && sumbitForm.recordDetail !== ''){
|
|
addDetail(sumbitForm).then((response) => {
|
|
addDetail(sumbitForm).then((response) => {
|
|
sumbitForm.recordDetail = null;
|
|
sumbitForm.recordDetail = null;
|
|
sumbitForm.recordDate = null;
|
|
sumbitForm.recordDate = null;
|