[update] 修改企标计划立项/变更流程
This commit is contained in:
@@ -0,0 +1,316 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('enterprisePlanSelect.title')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
class="custom-drawer-style">
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!-- 原企标编号 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum')" v-model="queryParam.originEnStandardNo"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 原企标名称 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName')" v-model="queryParam.originEnStandardName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 主起草人 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.principalDrafter')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.principalDrafter')" v-model="queryParam.mainDraftingUser"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 主起草单位 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.mainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.mainDraftingUnit"
|
||||
:maxTagCount="1"
|
||||
:show-search="true"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="categoryTreeList"
|
||||
:placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.plan.mainDraftingUnit')"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 主起草单位负责人 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" v-model="queryParam.mainDraftingUnitResponsiblePerson"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 制修订类型 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.plan.revisionType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag
|
||||
:placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.revisionType')"
|
||||
dict-code="esp_application_category"
|
||||
v-model="queryParam.applicationCategory">
|
||||
</j-dict-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary:plan:search'">{{ $t('query') }}</a-button>
|
||||
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 900}"
|
||||
:data-source="dataList"
|
||||
:pagination="ipagination"
|
||||
:row-selection="{ type: type, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<div class="custom-drawer-style-bottom-btn">
|
||||
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEnterpriseStandardPlanPage } from '@/api/enterpriseStandardLibraryApi'
|
||||
import { queryDepartTreeList } from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: 'EnterprisePlanSelectionModal',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'checkbox'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
sm: 8
|
||||
},
|
||||
wrapperCol: {
|
||||
sm: 14
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRowList: [],
|
||||
loading: false,
|
||||
queryParam: {},
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
columns: [
|
||||
{ // 制修订类型
|
||||
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'applicationCategory_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 原企标编号
|
||||
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'originEnStandardNo',
|
||||
scopedSlots: { customRender: 'toDetailOld' }
|
||||
},
|
||||
{ // 原企标名称
|
||||
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'originEnStandardName',
|
||||
scopedSlots: { customRender: 'toDetailOld' }
|
||||
},
|
||||
{ // 授权部门
|
||||
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'authDeparts',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 企业标准代号
|
||||
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'enStandardCode',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 配合单位
|
||||
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'cooperateDeparts',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主起草人
|
||||
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftingUser',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主起草单位
|
||||
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftingUnit',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主起草单位负责人
|
||||
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftingUnitResponsiblePerson',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 标准推进人
|
||||
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standardPromoter',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 草稿计划完成日期
|
||||
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftPlannedCompleteDate',
|
||||
scopedSlots: { customRender: 'specialDate' }
|
||||
},
|
||||
{ // 征求意见稿计划完成日期
|
||||
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'solicitationDraftPlanCompleteDate',
|
||||
scopedSlots: { customRender: 'specialDate' }
|
||||
},
|
||||
{ // 计划报批日期
|
||||
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'planApprovalDate',
|
||||
scopedSlots: { customRender: 'specialDate' }
|
||||
},
|
||||
{ // 项目状态
|
||||
title: this.$t('enterpriseStandardLibrary.plan.projectStatus'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'projectStatus_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
dataList: [],
|
||||
categoryTreeList: [] // 组织机构下拉框数据
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getSysCategoryTree()
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.$nextTick(() => {
|
||||
this.replacePage()
|
||||
})
|
||||
},
|
||||
// 获取组织机构树
|
||||
getSysCategoryTree () {
|
||||
queryDepartTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.categoryTreeList = res.result
|
||||
} else {
|
||||
this.categoryTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取表格数据
|
||||
replacePage () {
|
||||
const query = {
|
||||
...this.queryParam,
|
||||
pageNo: this.ipagination.current,
|
||||
pageSize: this.ipagination.pageSize,
|
||||
// 搜索项目状态为未开始和进行中的数据
|
||||
projectStatus: '1,2'
|
||||
}
|
||||
this.selectedRowKeys = []
|
||||
this.loading = true
|
||||
getEnterpriseStandardPlanPage(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records
|
||||
this.ipagination.total = res.result.total
|
||||
this.selectedRowKeys = this.value.split(',')
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchQuery () {
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset () {
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
// 表格选择改变
|
||||
onSelectChange (value, row) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowList = row
|
||||
},
|
||||
handleCancel () {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit () {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
const standardNumberList = this.selectedRowList.map(item => item.originEnStandardNo)
|
||||
this.$emit('change', this.selectedRowKeys.join(','))
|
||||
this.$emit('standardNumberChange', standardNumberList.join(','))
|
||||
this.$emit('listChange', this.selectedRowList)
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user