update 企标稽查整改完善

This commit is contained in:
danshihao
2023-12-01 10:11:38 +08:00
parent 4ac2734d47
commit 751a4a2c11
9 changed files with 173 additions and 139 deletions
@@ -1,7 +1,7 @@
<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="form-flex-box">
<!-- 稽查依据 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -10,7 +10,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.inspectionBasis }}</span>
<span>{{ model.standardName }}</span>
</a-form-model-item>
</div>
<!-- 依据条款 -->
@@ -21,7 +21,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.accordingToTerms }}</span>
<span>{{ model.baseClause }}</span>
</a-form-model-item>
</div>
<!-- 标准内容或要求 -->
@@ -32,7 +32,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.standardContentOrDemand }}</span>
<span>{{ model.standardRequire }}</span>
</a-form-model-item>
</div>
<!-- 整改单位 -->
@@ -43,7 +43,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.rectificationUnit }}</span>
<span>{{ model.responseDepart_dictText }}</span>
</a-form-model-item>
</div>
<!-- 不符合项描述 -->
@@ -54,7 +54,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.nonCompliantDescription }}</span>
<span>{{ model.issue }}</span>
</a-form-model-item>
</div>
<!-- 整改措施 -->
@@ -65,7 +65,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.rectificationMeasures }}</span>
<span>{{ model.rectifyMeasure }}</span>
</a-form-model-item>
</div>
<!-- 整改负责人 -->
@@ -76,7 +76,7 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.rectificationDirector }}</span>
<span>{{ model.responseUserDictText }}</span>
</a-form-model-item>
</div>
<!-- 计划完成日期 -->
@@ -87,13 +87,13 @@
</span>
</div>
<a-form-model-item class="item-model">
<span>{{ formInline.planDoneDate }}</span>
<span>{{ model.planCompleteDate }}</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="form-flex-box">
<!-- 操作类型 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -109,7 +109,7 @@
v-model="formInline.operationType"
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.operationType')"
:triggerChange="false"
dictCode="yn" />
dictCode="report_operation_type" />
</a-form-model-item>
</div>
<template v-if="operationType === '1'">
@@ -121,11 +121,11 @@
{{ $t('workCenter.esInspectionRectification.rectificationResults') }}
</span>
</div>
<a-form-model-item class="item-model" prop="rectificationResults">
<a-form-model-item class="item-model" prop="rectifyResult">
<a-textarea :maxLength="500"
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.rectificationResults')"
:rows="4"
v-model="formInline.rectificationResults" />
v-model="formInline.rectifyResult" />
</a-form-model-item>
</div>
<!-- 附件 -->
@@ -135,10 +135,10 @@
{{ $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">
<a-form-model-item class="item-model" prop="attachment">
<a-button type="primary" class="button-text" @click="clickButtonToUpload" style="width: 100%">
{{
(formInline.file === 'null' || formInline.file === '' || formInline.file === null || formInline.file === undefined)
(formInline.attachment === 'null' || formInline.attachment === '' || formInline.attachment === null || formInline.attachment === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
@@ -146,7 +146,7 @@
</a-form-model-item>
</div>
</template>
<template v-else-if="operationType === '0'">
<template v-else-if="operationType === '2'">
<!-- 申请延期日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -155,10 +155,10 @@
{{ $t('workCenter.esInspectionRectification.requestExtensionDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="requestExtensionDate">
<a-form-model-item class="item-model" prop="applyDelayDate">
<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" />
v-model="formInline.applyDelayDate" />
</a-form-model-item>
</div>
<!-- 延期说明 -->
@@ -169,19 +169,19 @@
{{ $t('workCenter.esInspectionRectification.extensionDescription') }}
</span>
</div>
<a-form-model-item class="item-model" prop="extensionDescription">
<a-form-model-item class="item-model" prop="delayDetail">
<a-textarea :maxLength="500"
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.extensionDescription')"
:rows="4"
:disabled="disabled"
v-model="formInline.extensionDescription" />
v-model="formInline.delayDetail" />
</a-form-model-item>
</div>
</template>
</div>
</div>
<!-- 上传 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
</a-form-model>
</template>
@@ -201,6 +201,8 @@ export default {
data () {
return {
formInline: {},
// 当前数据
model: {},
// 操作类型
operationType: null,
rules: {
@@ -213,7 +215,7 @@ export default {
}
],
// 整改结果
rectificationResults: [
rectifyResult: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.rectificationResults') + this.$t('cannotEmpty'),
@@ -221,7 +223,7 @@ export default {
}
],
// 申请延期日期
requestExtensionDate: [
applyDelayDate: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.requestExtensionDate') + this.$t('cannotEmpty'),
@@ -229,7 +231,7 @@ export default {
}
],
// 延期说明
extensionDescription: [
delayDetail: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.extensionDescription') + this.$t('cannotEmpty'),
@@ -242,41 +244,43 @@ export default {
methods: {
changeOperationType (val) {
this.$refs.ruleForm.clearValidate()
this.operationType = val
this.formInline = { operationType: this.formInline.operationType }
this.operationType = val + ''
},
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
this.model = Object.assign({}, data,
data.enterpriseStandardInspectRectifyPlan,
data.enterpriseStandardInspectRectifyPlan && data.enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport)
this.operationType = data.operationType + ''
// 给表单赋值
// this.formInline =
this.formInline = {
operationType: data.operationType,
rectifyResult: data.rectifyResult,
attachment: data.attachment,
applyDelayDate: data.applyDelayDate,
delayDetail: data.delayDetail
}
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.formInline
return data
return { ...this.formInline }
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const data = {}
data.formInline = this.formInline
callback(data)
}
// 获取数据并验证
getDataValidate () {
return new Promise((resolve, reject) => {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const data = { ...this.formInline }
resolve(data)
} else {
reject(new Error('base'))
}
})
})
},
// 选完企标编号了,需要回显内容,返回流程名称
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)
clickButtonToUpload () {
this.$refs.uploadFile.open(this.formInline.attachment)
// this.uploadName = item.dbFieldName
},
// 文件上传改变后的回调
@@ -288,7 +292,8 @@ export default {
})
}
/** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',')
this.$set(this.formInline, 'attachment', attIdList.join(','))
// this.formInline.attachment = attIdList.join(',')
}
}
}
@@ -296,18 +301,15 @@ export default {
<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;
}
}
//.readonly-transparent {
// background-color: transparent;
// border-color: transparent;
// &:hover {
// cursor: default;
// background-color: transparent;
// border-color: transparent;
// }
//}
</style>