[update] 修改UAT问题:企标制修订流程征求意见对象填写意见节点增加有无意见字段,有意见才显示征求意见表格及操作按钮
This commit is contained in:
@@ -164,7 +164,10 @@ module.exports = {
|
|||||||
confirmIsInsertSignature: '确认是否已插入签章',
|
confirmIsInsertSignature: '确认是否已插入签章',
|
||||||
confirmIsInsertSignatureCont: '本节点需要前往在线编辑页面插入签章,请前往在线编辑页面确认是否已经插入签章,检查签章页无误后再行提交。',
|
confirmIsInsertSignatureCont: '本节点需要前往在线编辑页面插入签章,请前往在线编辑页面确认是否已经插入签章,检查签章页无误后再行提交。',
|
||||||
confirmIsInsertSignatureOkText: '前往在线编辑页面',
|
confirmIsInsertSignatureOkText: '前往在线编辑页面',
|
||||||
confirmIsInsertSignatureCancelText: '确认签章页无误并提交'
|
confirmIsInsertSignatureCancelText: '确认签章页无误并提交',
|
||||||
|
haveNoOpinion: '有无意见',
|
||||||
|
have: '有',
|
||||||
|
noHave: '无'
|
||||||
},
|
},
|
||||||
// 企标更改流程
|
// 企标更改流程
|
||||||
enStandardChange: {
|
enStandardChange: {
|
||||||
|
|||||||
+100
-46
@@ -1,49 +1,74 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
<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="box-title-text form-flex-item">
|
<div class="form-flex-box">
|
||||||
<div class="title-text">
|
<!-- 标准文本 -->
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model">
|
||||||
|
<div class="online-edit-wrapper">
|
||||||
|
<p>{{ $t('enterpriseStandard') }}</p>
|
||||||
|
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</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="required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.haveNoOpinion')">
|
||||||
|
{{ $t('workCenter.enStandardRevision.haveNoOpinion') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model" prop="haveNoOpinion">
|
||||||
|
<a-radio-group v-model="formInline.haveNoOpinion" :disabled="disabled" @change="reviewMeetingFlagChange">
|
||||||
|
<a-radio value="1">
|
||||||
|
{{ $t('workCenter.enStandardRevision.have') }}
|
||||||
|
</a-radio>
|
||||||
|
<a-radio value="0">
|
||||||
|
{{ $t('workCenter.enStandardRevision.noHave') }}
|
||||||
|
</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-form-model>
|
||||||
|
<template v-if="formInline.haveNoOpinion === '1'">
|
||||||
|
<!-- 操作区域 -->
|
||||||
|
<div v-if="!disabled" class="table-operator">
|
||||||
|
<!-- 新增 -->
|
||||||
|
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
||||||
|
{{ $t('newlyAdded') }}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model">
|
|
||||||
<div class="online-edit-wrapper">
|
|
||||||
<p>{{ $t('enterpriseStandard') }}</p>
|
|
||||||
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
|
|
||||||
</div>
|
|
||||||
</a-form-model-item>
|
|
||||||
</div>
|
|
||||||
<!-- 操作区域 -->
|
|
||||||
<div v-if="!disabled" class="table-operator">
|
|
||||||
<!-- 新增 -->
|
|
||||||
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
|
||||||
{{ $t('newlyAdded') }}
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<j-table
|
<j-table
|
||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
ref="table"
|
ref="table"
|
||||||
rowKey="uid"
|
rowKey="uid"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
|
|
||||||
<!-- 操作栏 -->
|
<!-- 操作栏 -->
|
||||||
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
||||||
<a v-if="!disabled" @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
<a v-if="!disabled" @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||||
<a-divider v-if="!disabled" type="vertical" />
|
<a-divider v-if="!disabled" type="vertical" />
|
||||||
<a v-if="!disabled" @click="handleDelete(record.uid)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
<a v-if="!disabled" @click="handleDelete(record.uid)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</j-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -71,6 +96,17 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
formInline: {},
|
||||||
|
rules: {
|
||||||
|
// 有无意见
|
||||||
|
haveNoOpinion: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('workCenter.enStandardRevision.haveNoOpinion') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
/* 分页参数 */
|
/* 分页参数 */
|
||||||
ipagination: {
|
ipagination: {
|
||||||
current: 1,
|
current: 1,
|
||||||
@@ -126,9 +162,18 @@ export default {
|
|||||||
onEditFile: '' // 在线编辑的文件id
|
onEditFile: '' // 在线编辑的文件id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
const formInline = {}
|
||||||
|
formInline.haveNoOpinion = '1'
|
||||||
|
this.formInline = Object.assign({}, formInline)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
|
this.formInline = Object.assign({}, data)
|
||||||
|
if (!this.formInline.haveNoOpinion) {
|
||||||
|
this.formInline.haveNoOpinion = '1'
|
||||||
|
}
|
||||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||||
this.dataSource = data.advices.map(item => {
|
this.dataSource = data.advices.map(item => {
|
||||||
const uidGenerator = () => {
|
const uidGenerator = () => {
|
||||||
@@ -148,7 +193,7 @@ export default {
|
|||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = Object.assign({}, this.formInline)
|
||||||
data.advices = this.dataSource
|
data.advices = this.dataSource
|
||||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||||
// 在线编辑文件id
|
// 在线编辑文件id
|
||||||
@@ -156,15 +201,20 @@ export default {
|
|||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
getDataValidate () {
|
async getDataValidate () {
|
||||||
if (this.dataSource && this.dataSource.length > 0) {
|
let data = {} // 要返回的数据
|
||||||
const data = {}
|
await this.$refs.ruleForm.validate(valid => {
|
||||||
data.advices = this.dataSource
|
if (this.formInline.haveNoOpinion === '1' && this.dataSource && this.dataSource.length > 0) {
|
||||||
return data
|
data = Object.assign({}, this.formInline)
|
||||||
} else {
|
data.advices = this.dataSource
|
||||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
} else if (this.formInline.haveNoOpinion === '1' && (!this.dataSource || this.dataSource.length <= 0)) {
|
||||||
return false
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
}
|
data = false
|
||||||
|
} else {
|
||||||
|
data = Object.assign({}, this.formInline)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return data
|
||||||
},
|
},
|
||||||
handleTableChange (pagination) {
|
handleTableChange (pagination) {
|
||||||
this.ipagination = pagination
|
this.ipagination = pagination
|
||||||
@@ -212,6 +262,10 @@ export default {
|
|||||||
// 在线编辑的查看
|
// 在线编辑的查看
|
||||||
onlineEditView () {
|
onlineEditView () {
|
||||||
this.$emit('onlineEditView', this.onEditFile)
|
this.$emit('onlineEditView', this.onEditFile)
|
||||||
|
},
|
||||||
|
reviewMeetingFlagChange () {
|
||||||
|
console.log('------change', this.formInline)
|
||||||
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user