|
@@ -23,7 +23,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="延期申请数量">{{ state.ruleForm?.delayNum }} {{ state.ruleForm?.delayUnitText }} </el-form-item>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
+ <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="延期后期满时间">{{ formatDate(state.ruleForm?.afterDelay, 'YYYY-mm-dd HH:MM:SS') }} </el-form-item>
|
|
|
</el-col>-->
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
@@ -46,10 +46,6 @@
|
|
|
<el-button type="primary" @click="onAudit" v-if="state.ruleForm?.isCanHandle" v-auths="['business:delay:audit:todo', 'business:delay:audit']"
|
|
|
>延期审批</el-button
|
|
|
>
|
|
|
- <!-- 6、隐藏【延期退回】功能 -->
|
|
|
- <!-- <el-button type="primary" @click="onReturn" v-if="state.ruleForm?.isCanHandle" v-auths="['todo:delay:return', 'business:delay:return']"
|
|
|
- >延期退回</el-button
|
|
|
- >-->
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -63,6 +59,9 @@ import { defineAsyncComponent, reactive, ref } from 'vue';
|
|
|
import { delayDetail } from '@/api/business/delay';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { transformFile } from '@/utils/tools';
|
|
|
+import { useThemeConfig } from '@/stores/themeConfig';
|
|
|
+import { storeToRefs } from 'pinia';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
|
|
|
const AuditRecord = defineAsyncComponent(() => import('@/components/AuditRecord/index.vue')); // 流程明细
|
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue')); // 附件列表
|
|
@@ -77,7 +76,8 @@ const state = reactive<any>({
|
|
|
ruleForm: {},
|
|
|
currentId: '',
|
|
|
});
|
|
|
-
|
|
|
+const storesThemeConfig = useThemeConfig();
|
|
|
+const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
/*
|
|
|
* @param row 工单详情
|
|
|
* @description 打开弹窗
|
|
@@ -85,7 +85,7 @@ const state = reactive<any>({
|
|
|
const openDialog = async (row: any) => {
|
|
|
state.loading = true;
|
|
|
state.currentId = row.id;
|
|
|
- state.dialogVisible = true;
|
|
|
+ state.dialogVisible = true;
|
|
|
try {
|
|
|
const res = await delayDetail(state.currentId);
|
|
|
state.ruleForm = res.result ?? {};
|
|
@@ -118,11 +118,26 @@ const onAudit = () => {
|
|
|
// 流程明细
|
|
|
const auditRecordRef = ref<RefType>(); // 审核记录ref
|
|
|
const processDetail = () => {
|
|
|
- const params = {
|
|
|
- dialogTitle: `延期记录 (${state.ruleForm.order?.title})`,
|
|
|
- ...state.ruleForm,
|
|
|
- };
|
|
|
- auditRecordRef.value.openDialog(params);
|
|
|
+ if (['ZiGong'].includes(themeConfig.value.appScope)) {
|
|
|
+ // 自贡
|
|
|
+ if (state.ruleForm?.automaticDelayNum === null) {
|
|
|
+ // 没有自动延期正常查看
|
|
|
+ const params = {
|
|
|
+ dialogTitle: `延期记录 (${state.ruleForm.order?.title})`,
|
|
|
+ ...state.ruleForm,
|
|
|
+ };
|
|
|
+ auditRecordRef.value.openDialog(params);
|
|
|
+ } else {
|
|
|
+ // 有自动延期,则不能查看
|
|
|
+ ElMessage.warning('该工单已自动延期,没有流程明细');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const params = {
|
|
|
+ dialogTitle: `延期记录 (${state.ruleForm.order?.title})`,
|
|
|
+ ...state.ruleForm,
|
|
|
+ };
|
|
|
+ auditRecordRef.value.openDialog(params);
|
|
|
+ }
|
|
|
};
|
|
|
// 审核成功
|
|
|
const orderProcessSuccess = () => {
|