[update] 联调企标封存流程

This commit is contained in:
lideqin
2023-11-10 14:52:02 +08:00
parent 64f4b98c0b
commit b0851d7d35
2 changed files with 202 additions and 212 deletions
@@ -1,160 +1,163 @@
<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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
<a-spin :spinning="loading">
<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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.standardNumber"
@listChange="listChange" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
@listChange="listChange" />
</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.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input"
v-model="formInline.standardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</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.enterpriseInitChangePlan.standardEnglishName')">
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
</span>
<!-- 标准英文名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardEnglishName')">
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="englishName">
<a-input class="box-input"
disabled
v-model="formInline.englishName"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="enStandardEnglishName">
<a-input class="box-input"
disabled
v-model="formInline.enStandardEnglishName"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
</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.enterpriseInitChangePlan.standardType')">
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
</span>
<!-- 标准类型 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')">
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardCategory">
<j-dict-select-tag class="box-input"
disabled
v-model="formInline.standardCategory"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
:type="'select'"
:triggerChange="false"
dictCode="esp_standard_type" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="standardType">
<j-dict-select-tag class="box-input"
disabled
v-model="formInline.standardType"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
:type="'select'"
:triggerChange="false"
dictCode="esp_standard_type" />
</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.enStandardAnnul.substituteStandardNumber')">
{{ $t('workCenter.enStandardAnnul.substituteStandardNumber') }}
</span>
<!-- 代替企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardAnnul.substituteStandardNumber')">
{{ $t('workCenter.enStandardAnnul.substituteStandardNumber') }}
</span>
</div>
<a-form-model-item class="item-model" prop="substituteStandardNumber">
<a-input class="box-input"
disabled
v-model="formInline.substituteStandardNumber"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.substituteStandardNumber')" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="substituteStandardNumber">
<a-input class="box-input"
disabled
v-model="formInline.substituteStandardNumber"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.substituteStandardNumber')" />
</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.enStandardAnnul.replacedByEnStandardNumber')">
{{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }}
</span>
<!-- 被代替企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')">
{{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }}
</span>
</div>
<a-form-model-item class="item-model" prop="replacedByStandardNumber">
<a-input class="box-input"
disabled
v-model="formInline.replacedByStandardNumber"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="replacedByEnStandardNumber">
<a-input class="box-input"
disabled
v-model="formInline.replacedByEnStandardNumber"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" />
</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.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
<!-- 发布日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</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.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
<!-- 实施日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker
v-model="formInline.implementationDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-date-picker
v-model="formInline.materialDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</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.enStandardSealSave.sealSaveReason')">
{{ $t('workCenter.enStandardSealSave.sealSaveReason') }}
</span>
<!-- 封存理由 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardSealSave.sealSaveReason')">
{{ $t('workCenter.enStandardSealSave.sealSaveReason') }}
</span>
</div>
<a-form-model-item class="item-model" prop="archiveReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardSealSave.sealSaveReason')"
:disabled="disabled"
:maxLength="500"
v-model="formInline.archiveReason" :rows="4" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="sealSaveReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardSealSave.sealSaveReason')"
:disabled="disabled"
:maxLength="500"
v-model="formInline.sealSaveReason" :rows="4" />
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</a-form-model>
</a-spin>
</template>
<script>
import { StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection'
import { getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
export default {
name: 'BaseInfoForm',
@@ -169,10 +172,11 @@ export default {
data () {
return {
StandardSource,
loading: false,
formInline: {},
rules: {
// 企标编号
enStandardNo: [
standardNumber: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -180,7 +184,7 @@ export default {
}
],
// 封存理由
sealSaveReason: [
archiveReason: [
{
required: true,
message: this.$t('workCenter.enStandardSealSave.sealSaveReason') + this.$t('cannotEmpty'),
@@ -205,32 +209,55 @@ export default {
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) {
this.$refs.ruleForm.validate(valid => {
async getDataValidate () {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
const data = {}
data.formInline = this.formInline
callback(data)
} else {
data = false
}
})
return data
},
// 选完企标编号了,需要回显内容,返回流程名称
listChange (value) {
console.log(value)
this.loading = true
// 企标名称
this.formInline.enStandardName = value[0].standardName
// 英文名称
// 企标类别
// 代替企标编号
// 被代替企标编号
// 实施日期
// 复审日期
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '封存')
this.formInline.standardName = value[0].standardName
// 根据返回的id查询企标数据
getEnterpriseStandardInfoById({ id: value[0].id, type: '2' }).then(res => {
if (res.success) {
const result = res.result
// 标准英文名称
this.formInline.standardEnglishName = result.standard_english_name
// 标准类型??
// this.formInline.standardEnglishName = result.standard_english_name
// 代替企标编号
this.formInline.substituteStandardNumber = result.substitute_standard_number
// 被代替企标编号
this.formInline.replacedByStandardNumber = result.replaced_by_standard_number
// 发布日期
this.formInline.releaseDate = result.release_date
// 实施日期
this.formInline.implementationDate = result.implementation_date
this.formInline = Object.assign({}, this.formInline)
}
}).finally(() => {
this.loading = false
})
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (this.formInline.standardName || '') + '-' + '封存')
}
}
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
</style>