[update] 修改企标制修订流程

This commit is contained in:
lideqin
2023-12-22 16:23:06 +08:00
parent 74f54c59cd
commit 370b6abef6
15 changed files with 360 additions and 352 deletions
@@ -377,6 +377,7 @@ export default {
func = enStandardEditGetDataDraft
params = param
}
this.loading = true
func(params).then(res => {
if (res.success) {
this.model = res.result
@@ -393,6 +394,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
switchChange (value) {
@@ -492,6 +495,7 @@ export default {
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
const data = await this.$refs.baseInfoRef.getDataValidate()
if (!err && !approvalErr && data) {
this.loading = true
const param = {} // 需要传给后端的数据
param.common = { ...values, ...approvalValues }
param.flowUser = personnelObj
@@ -558,14 +562,9 @@ export default {
const data = await this.$refs.baseInfoRef.getDataValidate()
if (!approvalErr && data) {
const param = {} // 需要传给后端的数据
param.common = approvalValues
if (data.dataSource && data.dataSource.length > 0) {
param.dataList = data.dataSource.map(item => {
return { ...item, ...data.formInline }
})
} else {
param.dataList = [data.formInline]
}
param.common = Object.assign({}, approvalValues)
param.common.taskId = this.$route.query.taskId
param.data = data
enStandardEditAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -180,7 +180,7 @@
</div>
</template>
</div>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
<upload-file ref="uploadFile" @change="uploadFileChange" :disabled="disabled" :return-url="false"></upload-file>
</a-form-model>
</a-spin>
</template>
@@ -216,6 +216,11 @@ export default {
type: String,
required: false,
default: ''
},
disabled: {
type: Boolean,
required: false,
default: false
}
},
watch: {
@@ -22,7 +22,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'clauseNumber', validatorRules.clauseNumber ]" />
v-decorator.trim="[ 'clauseNum', validatorRules.clauseNum ]" />
</a-form-item>
<!-- 条款名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseName')">
@@ -36,7 +36,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'contentOfRevisedOpinion', validatorRules.contentOfRevisedOpinion ]" />
v-decorator.trim="[ 'editAdvice', validatorRules.editAdvice ]" />
</a-form-item>
</a-form>
</a-spin>
@@ -87,7 +87,7 @@ export default {
},
validatorRules: {
// 条款号
clauseNumber: {
clauseNum: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') }
],
@@ -101,7 +101,7 @@ export default {
validateTrigger: 'blur'
},
// 修改意见内容(包括修改理由和依据)
contentOfRevisedOpinion: {
editAdvice: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion') }
],
@@ -129,7 +129,7 @@ export default {
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'clauseNumber', 'clauseName', 'contentOfRevisedOpinion'))
this.form.setFieldsValue(pick(this.model, 'clauseNum', 'clauseName', 'editAdvice'))
})
},
getFileInfo (fileId) {
@@ -39,7 +39,7 @@
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
<a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
@@ -81,7 +81,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center',
width: 180,
dataIndex: 'clauseNumber',
dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
@@ -95,7 +95,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center',
width: 300,
dataIndex: 'contentOfRevisedOpinion',
dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' }
},
{
@@ -112,11 +112,11 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
this.dataSource = data.advices
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
@@ -26,12 +26,12 @@
{{ $t('workCenter.enStandardRevision.isOpenComment') }}
</span>
</div>
<a-form-model-item class="item-model" prop="isOpenComment">
<a-radio-group v-model="formInline.isOpenComment">
<a-form-model-item class="item-model" prop="adviceFlag">
<a-radio-group v-model="formInline.adviceFlag">
<a-radio :value="1">
{{ $t('yes') }}
</a-radio>
<a-radio :value="2">
<a-radio :value="0">
{{ $t('not') }}
</a-radio>
</a-radio-group>
@@ -40,18 +40,18 @@
<!-- 部门联络人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required" v-if="rules.departmentalLiaison[0].required">*</span>
<span class="required" v-if="rules.contactUser[0].required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
</span>
</div>
<a-form-model-item class="item-model" prop="departmentalLiaison">
<user-selection v-model="formInline.departmentalLiaison"
<a-form-model-item class="item-model" prop="contactUser">
<user-selection v-model="formInline.contactUser"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
:disabled="disabled"
filedName="departmentalLiaison"
filedName="contactUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.departmentalLiaison_dictText"
:nameStr="formInline.contactUser_dictText"
type="checkbox"/>
</a-form-model-item>
</div>
@@ -79,7 +79,7 @@ export default {
formInline: {},
rules: {
// 部门联络人
departmentalLiaison: [
contactUser: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.departmentalLiaison') + this.$t('cannotEmpty'),
@@ -91,13 +91,13 @@ export default {
},
watch: {
// 是否开启征求意见
'formInline.isOpenComment': {
'formInline.adviceFlag': {
handler (val) {
if (val && val === 1) {
// 开启征求意见,部门联络人必填
this.rules.departmentalLiaison[0].required = true
this.rules.contactUser[0].required = true
} else {
this.rules.departmentalLiaison[0].required = false
this.rules.contactUser[0].required = false
}
}
}
@@ -106,17 +106,16 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline =
this.formInline = Object.assign({}, data)
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.formInline
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -124,7 +123,7 @@ export default {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
data.formInline = this.formInline
const data = Object.assign({}, this.formInline)
} else {
data = false
}
@@ -50,13 +50,13 @@
{{ $t('workCenter.enStandardRevision.departLiaisonLeader') }}
</span>
</div>
<a-form-model-item class="item-model" prop="departLiaisonLeader">
<user-selection v-model="formInline.departLiaisonLeader"
<a-form-model-item class="item-model" prop="contactUserLeader">
<user-selection v-model="formInline.contactUserLeader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')"
:disabled="disabled"
filedName="departLiaisonLeader"
filedName="contactUserLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.departLiaisonLeader_dictText"
:nameStr="formInline.contactUserLeader_dictText"
type="radio"/>
</a-form-model-item>
</div>
@@ -101,7 +101,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center',
width: 180,
dataIndex: 'clauseNumber',
dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
@@ -115,14 +115,14 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center',
width: 300,
dataIndex: 'contentOfRevisedOpinion',
dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' }
},
{ // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center',
width: 180,
dataIndex: 'proposer',
dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' }
},
{
@@ -136,7 +136,7 @@ export default {
formInline: {},
rules: {
// 部门联络人主管级领导
departLiaisonLeader: [
contactUserLeader: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.departLiaisonLeader') + this.$t('cannotEmpty'),
@@ -150,17 +150,18 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
this.dataSource = data.advices
this.formInline = Object.assign({}, data)
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
const data = Object.assign({}, this.formInline)
data.advices = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -169,8 +170,8 @@ export default {
await this.$refs.ruleForm.validate(valid => {
if (valid) {
if (this.dataSource && this.dataSource.length > 0) {
data.dataSource = this.dataSource
data.formInline = this.formInline
data = Object.assign({}, this.formInline)
data.advices = this.dataSource
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false
@@ -101,17 +101,16 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline =
this.formInline = Object.assign(data)
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.formInline
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -119,7 +118,7 @@ export default {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
data.formInline = this.formInline
data = Object.assign({}, this.formInline)
} else {
data = false
}
@@ -81,7 +81,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center',
width: 180,
dataIndex: 'clauseNumber',
dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
@@ -95,14 +95,14 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center',
width: 300,
dataIndex: 'contentOfRevisedOpinion',
dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' }
},
{ // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center',
width: 180,
dataIndex: 'proposer',
dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' }
},
{
@@ -119,24 +119,24 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
this.dataSource = data.advices
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
data.advices = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
if (this.dataSource && this.dataSource.length > 0) {
const data = {}
data.dataSource = this.dataSource
data.advices = this.dataSource
return data
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
@@ -74,7 +74,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center',
width: 180,
dataIndex: 'clauseNumber',
dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
@@ -88,24 +88,24 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center',
width: 300,
dataIndex: 'contentOfRevisedOpinion',
dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' }
},
{ // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center',
width: 180,
dataIndex: 'proposer',
dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 处理意见
title: this.$t('workCenter.enStandardRevision.handlingSuggestion'),
align: 'center',
width: 180,
dataIndex: 'handlingSuggestion',
dataIndex: 'handleAdvice',
customRender: (text, row, index) => {
const obj = {
children: <a-select v-model={this.dataSource[index].deductionScoreReason}
children: <a-select v-model={this.dataSource[index].handleAdvice}
placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'}
options={this.handlingSuggestionOption}
/>,
@@ -145,19 +145,18 @@ export default {
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
this.dataSource = data.advices
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
data.advices = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -175,7 +174,7 @@ export default {
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem'))
data = false
} else {
data.dataSource = this.dataSource
data.advices = this.dataSource
}
return data
},
@@ -128,7 +128,7 @@
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
<a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
@@ -312,10 +312,13 @@ export default {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
if (this.dataSource && this.dataSource.length > 0) {
if (this.formInline.inspectFlag === 1 && this.dataSource && this.dataSource.length > 0) {
// 有数据可以抛出
data.dataSource = this.dataSource
data.formInline = this.formInline
data = Object.assign({}, this.formInline)
data.inspectContents = this.dataSource
} else if (this.formInline.inspectFlag === 0) {
// 有数据可以抛出
data = Object.assign({}, this.formInline)
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false
@@ -102,9 +102,9 @@ export default {
// 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
@@ -2,164 +2,162 @@
<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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
<div class="form-flex-box">
<!-- 会议纪要 -->
<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.meetingSummary')">
{{ $t('workCenter.enStandardRevision.meetingSummary') }}
</span>
</div>
<a-form-model-item class="item-model" prop="meetingSummary">
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
{{
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</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.enterpriseInitChangePlan.authorizationDepart')">
<a-form-model-item class="item-model" prop="meetingSummary">
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
{{
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</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.enterpriseInitChangePlan.authorizationDepart')">
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
</span>
</div>
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
:disabled="disabled"
:backDepart="true" />
</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.conferee')">
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
:disabled="disabled"
:backDepart="true" />
</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.conferee')">
{{ $t('workCenter.enStandardRevision.conferee') }}
</span>
</div>
<a-form-model-item class="item-model" prop="conferee">
<user-selection v-model="formInline.conferee"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
:disabled="disabled"
filedName="conferee"
@nameChange="userSelectNameChange"
:nameStr="formInline.conferee_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.proofreader')">
<a-form-model-item class="item-model" prop="meetingUsers">
<user-selection v-model="formInline.meetingUsers"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
:disabled="disabled"
filedName="meetingUsers"
@nameChange="userSelectNameChange"
:nameStr="formInline.meetingUsers_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.proofreader')">
{{ $t('workCenter.enStandardRevision.proofreader') }}
</span>
</div>
<a-form-model-item class="item-model" prop="proofreader">
<user-selection v-model="formInline.proofreader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.proofreader')"
:disabled="disabled"
filedName="proofreader"
@nameChange="userSelectNameChange"
:nameStr="formInline.proofreader_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.approverLeader')">
<a-form-model-item class="item-model" prop="proofreader">
<user-selection v-model="formInline.proofreader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.proofreader')"
:disabled="disabled"
filedName="proofreader"
@nameChange="userSelectNameChange"
:nameStr="formInline.proofreader_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.approverLeader')">
{{ $t('workCenter.enStandardRevision.approverLeader') }}
</span>
</div>
<a-form-model-item class="item-model" prop="approverLeader">
<user-selection v-model="formInline.approverLeader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverLeader')"
:disabled="disabled"
filedName="approverLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverLeader_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.approverStandardization')">
<a-form-model-item class="item-model" prop="approvalUser">
<user-selection v-model="formInline.approvalUser"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverLeader')"
:disabled="disabled"
filedName="approvalUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvalUser_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.approverStandardization')">
{{ $t('workCenter.enStandardRevision.approverStandardization') }}
</span>
</div>
<a-form-model-item class="item-model" prop="approverStandardization">
<user-selection v-model="formInline.approverStandardization"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverStandardization')"
:disabled="disabled"
filedName="approverStandardization"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverStandardization_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.countersign')">
<a-form-model-item class="item-model" prop="approvalUserStandard">
<user-selection v-model="formInline.approvalUserStandard"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverStandardization')"
:disabled="disabled"
filedName="approvalUserStandard"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvalUserStandard_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.countersign')">
{{ $t('workCenter.enStandardRevision.countersign') }}
</span>
</div>
<a-form-model-item class="item-model" prop="countersign">
<user-selection v-model="formInline.countersign"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.countersign')"
:disabled="disabled"
filedName="countersign"
@nameChange="userSelectNameChange"
:nameStr="formInline.countersign_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.approverHeadEngineer')">
<a-form-model-item class="item-model" prop="relatedLeader">
<user-selection v-model="formInline.relatedLeader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.countersign')"
:disabled="disabled"
filedName="relatedLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.relatedLeader_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.approverHeadEngineer')">
{{ $t('workCenter.enStandardRevision.approverHeadEngineer') }}
</span>
</div>
<a-form-model-item class="item-model" prop="approverHeadEngineer">
<user-selection v-model="formInline.approverHeadEngineer"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverHeadEngineer')"
:disabled="disabled"
filedName="approverHeadEngineer"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverHeadEngineer_dictText"
type="radio"/>
</a-form-model-item>
</div>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<a-form-model-item class="item-model" prop="chiefEngineer">
<user-selection v-model="formInline.chiefEngineer"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverHeadEngineer')"
:disabled="disabled"
filedName="chiefEngineer"
@nameChange="userSelectNameChange"
:nameStr="formInline.chiefEngineer_dictText"
type="radio"/>
</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.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>
<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>
</a-form-model>
@@ -205,7 +203,7 @@ export default {
}
],
// 参会人员
conferee: [
meetingUsers: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
@@ -221,7 +219,7 @@ export default {
}
],
// 审批人(主管级领导)
approverLeader: [
approvalUser: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.approverLeader') + this.$t('cannotEmpty'),
@@ -229,7 +227,7 @@ export default {
}
],
// 审批人(标准化)
approverStandardization: [
approvalUserStandard: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.approverStandardization') + this.$t('cannotEmpty'),
@@ -237,7 +235,7 @@ export default {
}
],
// 会签(相关部门领导)
countersign: [
relatedLeader: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.countersign') + this.$t('cannotEmpty'),
@@ -245,7 +243,7 @@ export default {
}
],
// 审批(总工程师)
approverHeadEngineer: [
chiefEngineer: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.approverHeadEngineer') + this.$t('cannotEmpty'),
@@ -258,19 +256,17 @@ export default {
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline =
this.formInline = Object.assign({}, data)
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.uploadMinuteFormInline = this.formInline
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -278,7 +274,7 @@ export default {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
data.formInline = this.formInline
data = Object.assign({}, this.formInline)
} else {
data = false
}
@@ -287,11 +283,6 @@ export default {
},
// 点击文件上传
clickButtonToUpload (fieldName) {
if (fieldName === 'uploadAttachment') {
this.fileMaxSize = 10
} else {
this.fileMaxSize = undefined
}
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
@@ -11,11 +11,18 @@
:dataSource="dataSource"
:pagination="false"
:loading="loading">
<!-- 起草人 -->
<template slot="user" slot-scope="{record, text}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</template>
<div class="table-text">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<!-- 上传企标 只能上传分配给自己的上传企标,到期未上传跳过该起草人操作列表显示- -->
<a v-if="record.drafter === userInfo.id && record.expirationDate < currentDate"
<a v-if="record.operateType !== '1'"
@click="handleUploadStandard(record, index)"
class="table-ope-btn"
:disabled="disabled"
@@ -56,28 +63,28 @@ export default {
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
dataIndex: 'draftingUnit_dictText',
dataIndex: 'dept_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
dataIndex: 'drafter_dictText',
scopedSlots: { customRender: 'text' }
dataIndex: 'user_dictText',
scopedSlots: { customRender: 'user' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
dataIndex: 'draftingScope',
dataIndex: 'scope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
dataIndex: 'expirationDate',
dataIndex: 'deadline',
scopedSlots: { customRender: 'text' }
},
{ // 操作
@@ -281,17 +281,25 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
if (data.reviewMeetingDetails) {
for (const i in fixDataSourse) {
this.dataSource[i] = { ...fixDataSourse[i] }
if (i % 3 === 0) {
this.dataSource[i].evaluateScore = data.reviewMeetingDetails[Math.floor(i / 3)].evaluateScore || ''
this.dataSource[i].deductionScoreReason = data.reviewMeetingDetails[Math.floor(i / 3)].deductionScoreReason || ''
}
}
}
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
data.reviewMeetingDetails = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -311,7 +319,7 @@ export default {
data.dataSource = this.dataSource
}
return data
},
}
}
}
</script>
@@ -3,113 +3,111 @@
<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">
<div class="form-flex-box">
<!-- 标准文本 -->
<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">
<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')">
<a-form-model-item class="item-model" prop="reviewMeetingFlag">
<a-radio-group v-model="formInline.reviewMeetingFlag" @change="reviewMeetingFlagChange" :defaultValue="1">
<a-radio :value="1">
{{ $t('yes') }}
</a-radio>
<a-radio :value="0">
{{ $t('not') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
<template v-if="formInline.reviewMeetingFlag === 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')">
<a-form-model-item class="item-model" prop="reviewUser">
<user-selection v-model="formInline.reviewUser"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.assessor')"
:disabled="disabled"
filedName="reviewUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.reviewUser_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')">
<a-form-model-item class="item-model" prop="raters">
<user-selection v-model="formInline.raters"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.scorer')"
:disabled="disabled"
filedName="raters"
@nameChange="userSelectNameChange"
:nameStr="formInline.raters_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')">
<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"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
</a-form-model-item>
</div>
</template>
</div>
<a-form-model-item class="item-model" prop="reviewPlace">
<a-input class="box-input"
v-model="formInline.reviewPlace"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
</a-form-model-item>
</div>
</template>
</div>
</a-form-model>
</div>
@@ -134,7 +132,7 @@ export default {
formInline: {},
rules: {
// 评审人
assessor: [
reviewUser: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'),
@@ -142,7 +140,7 @@ export default {
}
],
// 评分人
scorer: [
raters: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'),
@@ -158,7 +156,7 @@ export default {
}
],
// 评审地点
judgingVenue: [
reviewPlace: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'),
@@ -170,25 +168,24 @@ export default {
},
mounted () {
const formInline = {}
formInline.isCanAuditMeeting = 1
formInline.reviewMeetingFlag = 1
this.formInline = Object.assign({}, formInline)
this.isCanAuditMeetingChange()
this.reviewMeetingFlagChange()
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.formInline =
this.formInline = Object.assign({}, data)
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.formInline
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -196,7 +193,7 @@ export default {
let data = {} // 要返回的数据
this.$refs.ruleForm.validate(valid => {
if (valid) {
data.formInline = this.formInline
data = Object.assign({}, this.formInline)
} else {
data = false
}
@@ -204,9 +201,9 @@ export default {
return data
},
// 是否可进行评审会
isCanAuditMeetingChange () {
reviewMeetingFlagChange () {
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
this.$emit('standardizationAuditIsMeeting', this.formInline.isCanAuditMeeting)
this.$emit('standardizationAuditIsMeeting', this.formInline.reviewMeetingFlag)
}
}
}