add 企标稽查整改
This commit is contained in:
+315
@@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 稽查依据 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.inspectionBasis')">
|
||||
{{ $t('workCenter.esInspectionRectification.inspectionBasis') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.inspectionBasis }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 依据条款 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.accordingToTerms')">
|
||||
{{ $t('workCenter.esInspectionRectification.accordingToTerms') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.accordingToTerms }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准内容或要求 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.standardContentOrDemand')">
|
||||
{{ $t('workCenter.esInspectionRectification.standardContentOrDemand') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.standardContentOrDemand }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改单位 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.rectificationUnit')">
|
||||
{{ $t('workCenter.esInspectionRectification.rectificationUnit') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationUnit }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 不符合项描述 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.nonCompliantDescription')">
|
||||
{{ $t('workCenter.esInspectionRectification.nonCompliantDescription') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.nonCompliantDescription }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改措施 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.rectificationMeasures')">
|
||||
{{ $t('workCenter.esInspectionRectification.rectificationMeasures') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationMeasures }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改负责人 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.rectificationDirector')">
|
||||
{{ $t('workCenter.esInspectionRectification.rectificationDirector') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationDirector }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 计划完成日期 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.planDoneDate')">
|
||||
{{ $t('workCenter.esInspectionRectification.planDoneDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.planDoneDate }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 操作类型 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.operationType')">
|
||||
{{ $t('workCenter.esInspectionRectification.operationType') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="operationType">
|
||||
<j-dict-select-tag class="box-input"
|
||||
:disabled="disabled"
|
||||
@change="changeOperationType"
|
||||
v-model="formInline.operationType"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.operationType')"
|
||||
:triggerChange="false"
|
||||
dictCode="yn" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<template v-if="operationType === '1'">
|
||||
<!-- 整改结果 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.rectificationResults')">
|
||||
{{ $t('workCenter.esInspectionRectification.rectificationResults') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="rectificationResults">
|
||||
<a-textarea :maxLength="500"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.rectificationResults')"
|
||||
:rows="4"
|
||||
v-model="formInline.rectificationResults" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 附件 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.file')">
|
||||
{{ $t('workCenter.esInspectionRectification.file') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="file">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" :disabled="disabled">
|
||||
{{
|
||||
(formInline.file === 'null' || formInline.file === '' || formInline.file === null || formInline.file === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="operationType === '0'">
|
||||
<!-- 申请延期日期 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.requestExtensionDate')">
|
||||
{{ $t('workCenter.esInspectionRectification.requestExtensionDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="requestExtensionDate">
|
||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionRectification.requestExtensionDate')"
|
||||
v-model="formInline.requestExtensionDate" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 延期说明 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.esInspectionRectification.extensionDescription')">
|
||||
{{ $t('workCenter.esInspectionRectification.extensionDescription') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="extensionDescription">
|
||||
<a-textarea :maxLength="500"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.extensionDescription')"
|
||||
:rows="4"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.extensionDescription" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 上传 -->
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||
</a-form-model>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
import UploadFile from '@comp/UploadFile'
|
||||
|
||||
export default {
|
||||
name: 'BaseInfoForm',
|
||||
components: { UploadFile },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
StandardSource,
|
||||
formInline: {},
|
||||
// 操作类型
|
||||
operationType: null,
|
||||
rules: {
|
||||
// 操作类型
|
||||
operationType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.operationType') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 整改结果
|
||||
rectificationResults: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.rectificationResults') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
// 申请延期日期
|
||||
requestExtensionDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.requestExtensionDate') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 延期说明
|
||||
extensionDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.extensionDescription') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeOperationType (val) {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
this.operationType = val
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值
|
||||
// this.formInline =
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
callback(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选完企标编号了,需要回显内容,返回流程名称
|
||||
listChange (value) {
|
||||
console.log(value)
|
||||
// 企标名称
|
||||
this.formInline.enStandardName = value[0].standardName
|
||||
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '废止')
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
this.$refs.uploadFile.open(item.fileId)
|
||||
// this.uploadName = item.dbFieldName
|
||||
},
|
||||
// 文件上传改变后的回调
|
||||
uploadFileChange (data) {
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.file = attIdList.join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
// 无边框无背景
|
||||
.readonly-transparent {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
&:hover {
|
||||
cursor: default;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user