[update] 企标制修订流程到评分人打分节点
This commit is contained in:
+234
@@ -0,0 +1,234 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
|
||||
<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.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 是否可进行评审会 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isCanAuditMeeting')">
|
||||
{{ $t('workCenter.enStandardRevision.isCanAuditMeeting') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="isCanAuditMeeting">
|
||||
<a-radio-group v-model="formInline.isCanAuditMeeting" @change="isCanAuditMeetingChange" :defaultValue="1">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="2">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<template v-if="formInline.isCanAuditMeeting === 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.enStandardRevision.assessor')">
|
||||
{{ $t('workCenter.enStandardRevision.assessor') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="assessor">
|
||||
<user-selection v-model="formInline.assessor"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.assessor')"
|
||||
:disabled="disabled"
|
||||
filedName="assessor"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.assessor_dictText"
|
||||
type="radio"/>
|
||||
</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.enStandardRevision.scorer')">
|
||||
{{ $t('workCenter.enStandardRevision.scorer') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="scorer">
|
||||
<user-selection v-model="formInline.scorer"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.scorer')"
|
||||
:disabled="disabled"
|
||||
filedName="scorer"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.scorer_dictText"
|
||||
type="checkbox"/>
|
||||
</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.enStandardRevision.reviewDate')">
|
||||
{{ $t('workCenter.enStandardRevision.reviewDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="reviewDate">
|
||||
<a-date-picker v-model="formInline.reviewDate"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.reviewDate')"
|
||||
:showTime="false"
|
||||
value-format="YYYY-MM-DD"
|
||||
:disabled="disabled"></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.enStandardRevision.judgingVenue')">
|
||||
{{ $t('workCenter.enStandardRevision.judgingVenue') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="judgingVenue">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.judgingVenue"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
|
||||
export default {
|
||||
name: 'StandardizationAuditBaseInfo',
|
||||
components: { BaseInfoForm, UserSelection },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 评审人
|
||||
assessor: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 评分人
|
||||
scorer: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 评审日期
|
||||
reviewDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.reviewDate') + this.$t('cannotEmpty'),
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
],
|
||||
// 评审地点
|
||||
judgingVenue: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const formInline = {}
|
||||
formInline.isCanAuditMeeting = 1
|
||||
this.formInline = Object.assign({}, formInline)
|
||||
this.isCanAuditMeetingChange()
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.formInline =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.standardAuditFormInline = this.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.standardAuditFormInline = this.formInline
|
||||
return data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 是否可进行评审会
|
||||
isCanAuditMeetingChange () {
|
||||
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
|
||||
this.$emit('standardizationAuditIsMeeting', this.formInline.isCanAuditMeeting)
|
||||
}
|
||||
}
|
||||
}
|
||||
</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;
|
||||
}
|
||||
|
||||
.online-edit-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text-long {
|
||||
width: 220px !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user