|
@@ -73,6 +73,7 @@
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
import {ElButton, ElTable} from "element-plus";
|
|
import {ElButton, ElTable} from "element-plus";
|
|
import {ref} from "@vue/reactivity";
|
|
import {ref} from "@vue/reactivity";
|
|
|
|
+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 {defineProps, getCurrentInstance, reactive, toRefs} from "vue";
|
|
import {
|
|
import {
|
|
@@ -130,13 +131,7 @@ const handleClick = (index: number, row: TFrom, ele: ElButton) => {
|
|
row.inputdisabled = false;
|
|
row.inputdisabled = false;
|
|
row.buttonName = '修改';
|
|
row.buttonName = '修改';
|
|
restDetail();
|
|
restDetail();
|
|
- proxy.$alert(
|
|
|
|
- "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
|
- "修改完成" +
|
|
|
|
- "</div>"
|
|
|
|
- ,
|
|
|
|
- { dangerouslyUseHTMLString: true }
|
|
|
|
- );
|
|
|
|
|
|
+ modal.msgSuccess("修改成功");
|
|
row.inputHidden = 0;
|
|
row.inputHidden = 0;
|
|
getList.value();
|
|
getList.value();
|
|
}).catch((error)=>{
|
|
}).catch((error)=>{
|
|
@@ -149,13 +144,7 @@ const handleClick = (index: number, row: TFrom, ele: ElButton) => {
|
|
}
|
|
}
|
|
const handleClickDel = (index: number, row: TFrom, ele: ElButton) =>{
|
|
const handleClickDel = (index: number, row: TFrom, ele: ElButton) =>{
|
|
delDetail(row.id).then(res => {
|
|
delDetail(row.id).then(res => {
|
|
- proxy.$alert(
|
|
|
|
- "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
|
- "删除成功" +
|
|
|
|
- "</div>"
|
|
|
|
- ,
|
|
|
|
- { dangerouslyUseHTMLString: true }
|
|
|
|
- );
|
|
|
|
|
|
+ modal.msgSuccess("删除成功");
|
|
restDetail();
|
|
restDetail();
|
|
getList.value();
|
|
getList.value();
|
|
})
|
|
})
|
|
@@ -214,16 +203,26 @@ const formclear = () => {
|
|
const onSubmit = () =>{
|
|
const onSubmit = () =>{
|
|
fullscreenLoading.value = true;
|
|
fullscreenLoading.value = true;
|
|
sumbitForm.workOrderId = workOrderId;
|
|
sumbitForm.workOrderId = workOrderId;
|
|
- addDetail(sumbitForm).then((response) => {
|
|
|
|
- sumbitForm.recordDetail = null;
|
|
|
|
- sumbitForm.recordDate = null;
|
|
|
|
- restDetail();
|
|
|
|
- fullscreenLoading.value = false;
|
|
|
|
- getList.value();
|
|
|
|
- }).catch((error) => {
|
|
|
|
- console.log(error);
|
|
|
|
- fullscreenLoading.value = false;
|
|
|
|
- })
|
|
|
|
|
|
+ if(sumbitForm.recordDetail != null && sumbitForm.recordDetail !== ''){
|
|
|
|
+ addDetail(sumbitForm).then((response) => {
|
|
|
|
+ sumbitForm.recordDetail = null;
|
|
|
|
+ sumbitForm.recordDate = null;
|
|
|
|
+ restDetail();
|
|
|
|
+ fullscreenLoading.value = false;
|
|
|
|
+ getList.value();
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.log(error);
|
|
|
|
+ fullscreenLoading.value = false;
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ proxy.$alert(
|
|
|
|
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
|
+ "请填写记录日期和进度描述" +
|
|
|
|
+ "</div>"
|
|
|
|
+ ,
|
|
|
|
+ { dangerouslyUseHTMLString: true }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
const dateFormat = (date)=>{
|
|
const dateFormat = (date)=>{
|
|
return moment(date).format("YYYY-MM-DD");
|
|
return moment(date).format("YYYY-MM-DD");
|