123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- <template>
- <div>
- <sd-webflow ref="flow" :removed-tabs="['sdRelatedDoc']" :class="$style.mainForm">
- <template v-slot:form="{ model, fields }">
- <table>
- <tr>
- <td style="border: none">
- <audit-advanced-group
- :expand="planExpand"
- expand-str="planExpand"
- group-label="基本信息"
- tablestyle=""
- @changedClick="changedClick"
- ></audit-advanced-group>
- </td>
- </tr>
- </table>
- <table v-show="planExpand">
- <tr>
- <!-- 整改名称 -->
- <sd-form-item-td name="rectName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.rectName }}
- </template>
- </sd-form-item-td>
- <!-- 整改要求编号 -->
- <sd-form-item-td name="rectCode">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.rectCode }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 整改计划反馈截止日期 -->
- <td class="ant-form-item-label ant-form-item-label">
- <label
- title="整改计划反馈截止日期"
- :class="fields.feedbackDate.required ? 'ant-form-item-required' : ''"
- >
- 整改计划反馈<br />{{ '截\u2002止\u2003日\u2002期' }}
- </label>
- </td>
- <sd-form-item-td
- name="feedbackDate"
- :colspan="3"
- :label="'整改计划反馈截止日期'"
- :label-td-attrs="{ hidden: true }"
- >
- <template v-slot:read-and-edit="{ editable }">
- {{ model.feedbackDate | sdDateFormat('YYYY-MM-DD') }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 附件 -->
- <sd-form-item-td name="requireAttachment" :colspan="3">
- <template v-slot:read-and-edit="{ editable }">
- <sd-attachment
- :uploadable="false"
- read-only
- :group-id="JSON.parse(fields.requireAttachment.value).value"
- :init-value="getRequireAttachment(fields.requireAttachment)"
- >
- </sd-attachment>
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 整改要求 -->
- <sd-form-item-td name="rectRequire" :colspan="3">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.rectRequire }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 创建人 -->
- <sd-form-item-td name="requireCreatorName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.requireCreatorName }}
- </template>
- </sd-form-item-td>
- <!-- 创建日期 -->
- <sd-form-item-td name="requireCreationTime">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.requireCreationTime | sdDateFormat('YYYY-MM-DD') }}
- </template>
- </sd-form-item-td>
- </tr>
- </table>
- <table>
- <tr>
- <td style="border: none">
- <audit-advanced-group
- :expand="defectExpand"
- expand-str="defectExpand"
- group-label="缺陷信息"
- tablestyle=""
- @changedClick="changedClick"
- ></audit-advanced-group>
- </td>
- </tr>
- </table>
- <table v-show="defectExpand">
- <tr>
- <!-- 评价名称 -->
- <sd-form-item-td name="evaluationName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.evaluationName }}
- </template>
- </sd-form-item-td>
- <!-- 流程名称 -->
- <sd-form-item-td name="prcName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.prcName }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 控制点名称 -->
- <sd-form-item-td name="measureName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.measureName }}
- </template>
- </sd-form-item-td>
- <!-- 控制点编号 -->
- <sd-form-item-td name="measureCode">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.measureCode }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 测试结果 -->
- <sd-form-item-td name="testResult">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.testResult }}
- </template>
- </sd-form-item-td>
- <!-- 缺陷类型 -->
- <sd-form-item-td name="defectType">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.defectType }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 缺陷等级 -->
- <sd-form-item-td name="defectLevel">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.defectLevel }}
- </template>
- </sd-form-item-td>
- <!-- 缺陷责任组织 -->
- <sd-form-item-td name="liabilityOrgName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.liabilityOrgName }}
- </template>
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 整改联系人 -->
- <sd-form-item-td name="rectContactName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.rectContactName }}
- </template>
- </sd-form-item-td>
- <!-- 整改跟踪人 -->
- <sd-form-item-td name="rectTrackerName">
- <template v-slot:read-and-edit="{ editable }">
- {{ model.rectTrackerName }}
- </template>
- </sd-form-item-td>
- </tr>
- </table>
- <table>
- <tr>
- <td style="border: none">
- <audit-advanced-group
- :expand="defectRectifyExpand"
- expand-str="defectRectifyExpand"
- group-label="缺陷整改计划"
- tablestyle=""
- @changedClick="changedClick"
- ></audit-advanced-group>
- </td>
- </tr>
- </table>
- <table v-show="defectRectifyExpand">
- <tr>
- <!-- 整改责任部门 -->
- <sd-form-item-td name="responsibleDeptName" />
- <!-- 直接责任人 -->
- <sd-form-item-td name="directResponsibleName" />
- </tr>
- <tr>
- <!-- 拟整改完成日期 -->
- <sd-form-item-td name="finishDate" :colspan="3" />
- </tr>
- <tr>
- <!-- 拟整改措施 -->
- <sd-form-item-td name="measure" :colspan="3">
- <a-textarea v-model="model.measure" :auto-size="{ maxRows: 3, minRows: 3 }" />
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 说明 -->
- <sd-form-item-td name="evidenceExplain" :colspan="3">
- <a-textarea v-model="model.evidenceExplain" :auto-size="{ maxRows: 3, minRows: 3 }" />
- </sd-form-item-td>
- </tr>
- </table>
- <table v-if="!isPlanStat">
- <tr>
- <td style="border: none">
- <audit-advanced-group
- :expand="defectRectifyEndExpand"
- expand-str="defectRectifyEndExpand"
- group-label="缺陷整改结果"
- tablestyle=""
- @changedClick="changedClick"
- ></audit-advanced-group>
- </td>
- </tr>
- </table>
- <table v-if="!isPlanStat" v-show="defectRectifyEndExpand">
- <tr>
- <!-- 整改状态 -->
- <sd-form-item-td
- name="rectStatus"
- :colspan="model.rectStatus === '03' ? 1 : 3"
- :input-td-attrs="{
- class: model.rectStatus !== '03' ? $style.rectStatusTd : '',
- }"
- @change="rectStatusChange"
- />
- <!-- 整改完成日期 -->
- <sd-form-item-td name="rectFinishDate" :hidden="model.rectStatus !== '03'" />
- </tr>
- <tr>
- <!-- 整改情况说明 -->
- <sd-form-item-td name="description" :colspan="3">
- <a-textarea v-model="model.description" :auto-size="{ maxRows: 3, minRows: 3 }" />
- </sd-form-item-td>
- </tr>
- <tr>
- <!-- 成果利用 -->
- <sd-form-item-td name="resultUse" :colspan="3" component="a-select"> </sd-form-item-td>
- </tr>
- <tr>
- <!-- 附件 -->
- <sd-form-item-td name="attachment" :colspan="3"> </sd-form-item-td>
- </tr>
- </table>
- <table v-if="!isPlanStat">
- <tr
- ><td :colspan="4">
- <sd-form-item name="icPreRectResultEntity" :label="null">
- <template v-slot:read-and-edit="{ editable }">
- <audit-advanced-group
- :expand="listExpand"
- expand-str="listExpand"
- group-label="历次整改结果列表"
- @changedClick="changedClick"
- >
- <template>
- <xm-child-table
- :key="infoKey"
- ref="infoData"
- v-model="model.icPreRectResultEntity"
- :class="$style.deptPlanChild"
- :label="null"
- :read-only="true"
- :addbuttonvisiable="false"
- :fields="
- [
- {
- caption: '序号',
- name: 'sortNum',
- dataType: 'number',
- },
- ].concat(Array.from(fields.icPreRectResultEntity.attr.dync))
- "
- :columns="defectColumns"
- :flagpage="true"
- >
- <!-- 整改状态 -->
- <template v-slot:rectStatus_xm="{ text, record, field, value }">
- {{ getDictValue(fields.rectStatus.attr.selectListItem, text) }}
- </template>
- <!-- 整改完成日期 -->
- <template v-slot:rectFinishDate_xm="{ text, record, field, value }">
- {{ text | sdDateFormat('YYYY-MM-DD') }}
- </template>
- <!-- 整改情况说明 -->
- <template v-slot:description_xm="{ text, record, field, value }">
- {{ text }}
- </template>
- <!-- 成果利用 -->
- <template v-slot:resultUse_xm="{ text, record, field, value }">
- {{ getDictValue(fields.resultUse.attr.selectListItem, text) }}
- </template>
- <!-- 附件 -->
- <template v-slot:attachment_xm="{ text, record, field, value }">
- <sd-attachment :uploadable="false" read-only :group-id="text">
- </sd-attachment>
- </template>
- </xm-child-table>
- </template>
- </audit-advanced-group>
- </template>
- </sd-form-item>
- </td>
- </tr>
- </table>
- </template>
- </sd-webflow>
- </div>
- </template>
- <script>
- import auditAdvancedGroup from '@product/iam/components/audit-advanced-group.vue'
- import auditAdvancedGroupMixins from '@product/iam/components/audit-advanced-group-mixins'
- import iamIcRectifyFeedbackServices from './iam-ic-rectify-feedback-service'
- import components from './_import-components/iam-ic-rectify-feedback-form-import'
- export default {
- name: 'IamIcRectifyFeedbackForm',
- metaInfo: {
- title: '整改反馈',
- },
- components: {
- ...components,
- auditAdvancedGroup,
- },
- mixins: [auditAdvancedGroupMixins],
- data() {
- return {
- isPlanStat: true, // 是否为计划审核环节
- requireAttachmentKey: 0,
- userType: null,
- infoKey: 0,
- rectVisible: false, // 缺陷清单列表显示
- planExpand: true,
- defectExpand: true,
- defectRectifyExpand: true,
- defectRectifyEndExpand: true,
- listExpand: true,
- defectColumns: [
- {
- title: '序号',
- dataIndex: 'sortNum',
- width: '50px',
- customRender: (text, record, index) => `${index + 1}`,
- },
- {
- dataIndex: 'rectStatus',
- title: '整改状态',
- width: '150px',
- },
- { dataIndex: 'rectFinishDate', title: '整改完成日期', width: '150px' },
- { dataIndex: 'description', title: '整改情况说明', width: '40%' },
- { dataIndex: 'resultUse', title: '成果利用' },
- { dataIndex: 'attachment', title: '附件' },
- { dataIndex: 'rectFeedbackId', title: 'ID', sdHidden: true },
- ],
- }
- },
- mounted() {
- // 判断当前环节是否为计划审核环节
- this.fnCheckIsPlanStat()
- },
- methods: {
- // 判断是否为计划环节
- fnCheckIsPlanStat() {
- const checkPlanStat = setInterval(() => {
- if (this.$refs.flow) {
- clearInterval(checkPlanStat)
- if (this.$refs.flow.FlowData.attrs.audit$isPlanStat) {
- this.isPlanStat = this.$refs.flow.FlowData.attrs.audit$isPlanStat === true
- } else {
- iamIcRectifyFeedbackServices
- .getSetpInfo(this.$refs.flow.FlowData.instId, this.$refs.flow.FlowData.activeStepId)
- .then((res) => {
- this.isPlanStat = res.data.audit$isPlanStat === 'true'
- })
- }
- }
- }, 100)
- },
- // 获取附件
- getRequireAttachment(attachment) {
- // 获取附件列表
- const attList = attachment.attr.attachments
- return attList.map((item) => {
- item.readOnly = false
- item.attr.deletable = false
- item.attr.editable = false
- item.attr.renamable = false
- return item
- })
- },
- // 整改状态变化时触发
- rectStatusChange(val, option) {
- if (val === '03') {
- this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
- return item.name === 'rectFinishDate'
- }).required = true
- } else {
- this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
- return item.name === 'rectFinishDate'
- }).required = false
- // 不为必填时,清空整改完成时间
- this.$refs.flow.setFieldValue('rectFinishDate', null)
- }
- },
- // 获取字典值
- getDictValue(list, val) {
- return list.find((item) => {
- return item.value.trim() === (val + '').trim()
- })?.label
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- .main-form {
- :global(.header_xm-child-table_product) {
- display: none;
- }
- :global(.ant-calendar-picker) {
- width: 100%;
- }
- .rect-status-td {
- border-right: 0 !important;
- }
- }
- </style>
|