[update] 企标更改流程和流程中心接口修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form :disabled="disabled"></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" :disabled="disabled"></base-info-form>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -36,13 +36,9 @@
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
|
||||
<!-- 企标编号/企标名称 -->
|
||||
<template v-slot:toDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<!-- 修改前 -->
|
||||
<template v-slot:beforeUpdate="{text, record}">
|
||||
<a-button type="primary" @click="beforeUpdateClick(record)">{{ $t('workCenter.enStandardChange.lookUpdateBeforeContent') }}</a-button>
|
||||
</template>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
@@ -55,17 +51,18 @@
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
<update-list-modal ref="updateListModal" @ok="modalFormOk"></update-list-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import CommentModal from '../../enterpriseStandardRevision/modules/CommentModal'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import UpdateListModal from './UpdateListModal'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterInitBaseInfo',
|
||||
components: { BaseInfoForm, CommentModal },
|
||||
components: { BaseInfoForm, JTable, UpdateListModal },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
@@ -101,15 +98,29 @@ export default {
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容
|
||||
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
|
||||
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
|
||||
children: [
|
||||
{ // 修改前
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseName',
|
||||
dataIndex: 'beforeUpdate',
|
||||
scopedSlots: { customRender: 'beforeUpdate' }
|
||||
},
|
||||
{ // 修改后
|
||||
title: this.$t('workCenter.enStandardChange.afterUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'afterUpdate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改理由
|
||||
title: this.$t('workCenter.enStandardChange.updateReason'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'updateReason',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -124,25 +135,54 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 新增征求意见
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.dataSource =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.formInline = this.$refs.baseInfoForm.formInline
|
||||
data.dataSource = this.dataSource
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
this.$refs.baseInfoForm.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.formInline = this.$refs.baseInfoForm.formInline
|
||||
data.dataSource = this.dataSource
|
||||
callback(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增修改单
|
||||
handleAdd () {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('newlyAdded')
|
||||
this.$refs.commentModal.add(file)
|
||||
this.$refs.updateListModal.title = this.$t('newlyAdded')
|
||||
this.$refs.updateListModal.add(file)
|
||||
},
|
||||
// 征求意见的编辑
|
||||
// 修改单的编辑
|
||||
handleEdit (record, index) {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
this.$refs.updateListModal.title = this.$t('edit')
|
||||
this.$refs.updateListModal.edit(file, record, index)
|
||||
},
|
||||
// 征求意见的删除
|
||||
// 修改单的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 征求意见新增编辑完成
|
||||
// 修改单新增编辑完成
|
||||
modalFormOk (value, index) {
|
||||
console.log(value, index)
|
||||
if (index || index === 0) {
|
||||
@@ -152,11 +192,29 @@ export default {
|
||||
// 没有下标, 是新增
|
||||
this.dataSource.push(value)
|
||||
}
|
||||
},
|
||||
// 修改前按钮点击
|
||||
beforeUpdateClick (record) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.online-edit-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user