[update] 新增流程中心页,企标计划立项/变更流程
This commit is contained in:
+222
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="change-base-info-wrapper">
|
||||
<!-- 操作区域 -->
|
||||
<div class="table-operator">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
||||
{{ $t('newlyAdded') }}
|
||||
</a-button>
|
||||
<!-- 批量删除 -->
|
||||
<a-button icon="delete" type="primary" ghost @click="batchDel" :disabled="disabled">
|
||||
{{ $t('batchDelete') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="enterpriseStandardPlanId"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
|
||||
|
||||
<!-- 企标编号/企标名称 -->
|
||||
<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>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
<finish-time-change-base-info-drawer ref="changeBaseInfoDrawer" @ok="changeBaseInfoDrawerOk"></finish-time-change-base-info-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FinishTimeChangeBaseInfoDrawer from './FinishTimeChangeBaseInfoDrawer'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
|
||||
export default {
|
||||
name: 'FinishTimeChangeBaseInfo',
|
||||
components: { FinishTimeChangeBaseInfoDrawer, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
currentNode: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 企标编号
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standardNo',
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 企标名称
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standardName',
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 主起草人
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'principalDrafter_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主起草单位
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftUnit',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 原草稿计划完成日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.originalDraftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'originalDraftPlanFinishDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 原征求意见稿计划完成日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.originalExposureDraftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 210,
|
||||
dataIndex: 'originalExposureDraftPlanFinishDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 原计划报批日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.originalPlanSubmissionDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'originalPlanSubmissionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 草稿计划完成日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftPlannedCompleteDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 征求意见稿计划完成日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'solicitationDraftPlanCompleteDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划报批日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'planApprovalDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 操作
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
selectionRows: [],
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 企标编号,企标名称跳转详情
|
||||
handleGoDetail (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
standardNumber: record.standardNo
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表格选中
|
||||
onSelectChange (selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectionRows = selectionRows
|
||||
},
|
||||
// 新增或编辑完成
|
||||
changeBaseInfoDrawerOk (value) {
|
||||
console.log(value, this.modalType)
|
||||
value.draftPlannedCompleteDate = value.originalDraftPlanFinishDate
|
||||
value.solicitationDraftPlanCompleteDate = value.originalExposureDraftPlanFinishDate
|
||||
value.planApprovalDate = value.originalPlanSubmissionDate
|
||||
if (this.modalType === 'add') {
|
||||
this.dataSource.push(value)
|
||||
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
|
||||
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAdd () {
|
||||
this.modalType = 'add'
|
||||
this.$refs.changeBaseInfoDrawer.add()
|
||||
},
|
||||
// 编辑
|
||||
handleEdit (record, index) {
|
||||
this.modalType = 'edit' + index
|
||||
this.$refs.changeBaseInfoDrawer.edit(record)
|
||||
},
|
||||
// 删除
|
||||
handleDelete (id, index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 批量删除
|
||||
batchDel () {
|
||||
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.change-base-info-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user