|
@@ -12,47 +12,22 @@
|
|
|
>
|
|
|
<el-form :model="state.ruleForm" label-width="90px" ref="ruleFormRef">
|
|
|
<el-row :gutter="35">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="工单编码">
|
|
|
- {{ state.orderDetail.no }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="工单标题">
|
|
|
- {{ state.orderDetail.title }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="撤销人">
|
|
|
- {{ userInfos.name }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="撤销部门">
|
|
|
- {{ userInfos.orgName }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="撤销时间">
|
|
|
- {{ formatDate(Date(), 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="撤销短信" prop="acceptSms" :rules="[{ required: false, message: '请选择发送督办短信', trigger: 'change' }]">
|
|
|
- <el-checkbox v-model="state.ruleForm.acceptSms" label="发送撤销短信" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
- <el-form-item label="撤销原因" class="textarea" prop="opinion" :rules="[{ required: true, message: '请填写撤销原因', trigger: 'blur' }]">
|
|
|
+ <el-form-item label="撤销说明" class="textarea" prop="opinion" :rules="[{ required: true, message: '请填写撤销说明', trigger: 'blur' }]">
|
|
|
<common-advice
|
|
|
@chooseAdvice="chooseAdvice"
|
|
|
v-model="state.ruleForm.opinion"
|
|
|
- placeholder="请填写撤销原因"
|
|
|
+ placeholder="请填写撤销说明"
|
|
|
:loading="state.loading"
|
|
|
- :commonEnum="commonEnum['OrderCirculation']"
|
|
|
+ :commonEnum="commonEnum.OrderCirculation"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="" prop="acceptSms" :rules="[{ required: false, message: '请选择发送撤销短信', trigger: 'change' }]">
|
|
|
+ <el-checkbox v-model="state.ruleForm.acceptSms" label="发送撤销短信" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="附件" prop="additions">
|
|
|
<annex-list name="撤销附件" ref="annexListRef" :businessId="state.orderDetail.id" classify="撤销上传" />
|
|
@@ -63,7 +38,7 @@
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="closeDialog" class="default-button">取 消</el-button>
|
|
|
- <el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">提 交</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading">撤 销</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -73,9 +48,6 @@
|
|
|
import { reactive, ref, defineAsyncComponent } from 'vue';
|
|
|
import { ElMessageBox, FormInstance } from 'element-plus';
|
|
|
import { throttle } from '@/utils/tools';
|
|
|
-import { storeToRefs } from 'pinia';
|
|
|
-import { useUserInfo } from '@/stores/userInfo';
|
|
|
-import { formatDate } from '@/utils/formatTime';
|
|
|
import { commonEnum } from '@/utils/constants';
|
|
|
import { workflowCancel } from '@/api/system/workflow';
|
|
|
|
|
@@ -84,7 +56,7 @@ const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/inde
|
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
|
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
-const emit = defineEmits(['onSupplySuccess']);
|
|
|
+const emit = defineEmits(['updateList']);
|
|
|
// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
dialogVisible: false,
|
|
@@ -98,13 +70,13 @@ const state = reactive<any>({
|
|
|
transform: 'translate(0px, 0px)', // 滚动条位置
|
|
|
});
|
|
|
const ruleFormRef = ref<RefType>();
|
|
|
-const storesUserInfo = useUserInfo();
|
|
|
-const { userInfos } = storeToRefs(storesUserInfo); // 用户信息
|
|
|
// 打开弹窗
|
|
|
const openDialog = async (val: any) => {
|
|
|
- state.orderDetail = val;
|
|
|
- state.ruleForm.workflowId = val.workflowId;
|
|
|
+ // state.orderDetail = val;
|
|
|
+ // state.ruleForm.workflowId = val.workflowId;
|
|
|
+ console.log(val,'111')
|
|
|
state.dialogVisible = true;
|
|
|
+ state.loading = false;
|
|
|
};
|
|
|
// 关闭弹窗
|
|
|
const closeDialog = () => {
|
|
@@ -129,7 +101,7 @@ const onSubmit = throttle((formEl: FormInstance | undefined) => {
|
|
|
if (!formEl) return;
|
|
|
formEl.validate((valid: boolean) => {
|
|
|
if (!valid) return;
|
|
|
- ElMessageBox.confirm(`确认撤销?`, '提示', {
|
|
|
+ ElMessageBox.confirm(`您确认要设置撤销?`, '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -139,20 +111,20 @@ const onSubmit = throttle((formEl: FormInstance | undefined) => {
|
|
|
})
|
|
|
.then(() => {
|
|
|
state.loading = true;
|
|
|
- let request = {
|
|
|
+ const request = {
|
|
|
...state.ruleForm,
|
|
|
files: annexListRef.value?.fileList,
|
|
|
};
|
|
|
- workflowCancel(request)
|
|
|
+ /*workflowCancel(request)
|
|
|
.then(() => {
|
|
|
state.loading = false;
|
|
|
state.dialogVisible = false;
|
|
|
- emit('onSupplySuccess');
|
|
|
+ emit('updateList');
|
|
|
})
|
|
|
.catch(() => {
|
|
|
state.loading = false;
|
|
|
state.dialogVisible = false;
|
|
|
- });
|
|
|
+ });*/
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
});
|