ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<script lang="ts" setup>
import type { FormInstance } from 'ant-design-vue';
 
import { onMounted, reactive, ref, toRefs } from 'vue';
 
import { useFlowForm } from '#/views/workFlow/workFlowForm/hooks/useFlowForm';
 
interface State {
  dataForm: any;
  dataRule: any;
}
 
defineOptions({ name: 'Revoke' });
 
const props = defineProps(['config']);
const emit: EmitType = defineEmits(['setPageLoad', 'eventReceiver', 'openRevokeFlow']);
const formRef = ref<FormInstance>();
const state = reactive<State>({
  dataForm: {
    billRule: '',
    creatorTime: undefined,
    handleOpinion: '',
    revokeTaskName: '',
    revokeTaskId: '',
  },
  dataRule: {},
});
const { dataForm } = toRefs(state);
const { init, dataFormSubmit } = useFlowForm({
  config: props.config,
  selfState: state,
  emit,
  formRef,
});
 
defineExpose({ dataFormSubmit, openRevokeFlow });
 
function openRevokeFlow() {
  emit('openRevokeFlow', state.dataForm.revokeTaskId);
}
 
onMounted(() => {
  init();
});
</script>
 
<template>
  <div class="flow-form">
    <a-form :colon="false" :label-col="{ style: { width: '100px' } }" :model="dataForm" ref="formRef" :disabled="config.disabled">
      <a-row>
        <a-col :span="24">
          <a-form-item label="审批编号" name="billRule">
            <jnpf-input v-model:value="dataForm.billRule" disabled />
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="提交时间" name="creatorTime">
            <jnpf-date-picker v-model:value="dataForm.creatorTime" format="YYYY-MM-DD HH:mm:ss" disabled />
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="撤销理由" name="handleOpinion">
            <jnpf-textarea v-model:value="dataForm.handleOpinion" disabled />
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="关联流程" name="revokeFlow">
            <jnpf-link :content="dataForm.revokeTaskName" @click="openRevokeFlow" />
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>