[update] 修改企标复审流程

This commit is contained in:
lideqin
2023-11-22 13:47:59 +08:00
parent 12a8210534
commit 99ec73db94
10 changed files with 462 additions and 53 deletions
@@ -4,7 +4,7 @@
<a-input class="box-input" :value="standardNumber" :title="standardNumber" @click="standardClick"
disabled readonly :placeholder="placeholder"/>
<a-button v-if="!disabled" type="primary" class="button-box" @click="standardClick">
{{this.$t('enterprisePlanSelect.title')}}
{{ $t('enterprisePlanSelect.title')}}
</a-button>
</div>
<enterprise-plan-selection-modal ref="enterprisePlanSelectionModal" v-bind="$attrs" :value="value" @change="modalChange" @standardNumberChange="standardNumberChange" @listChange="modalListChange"></enterprise-plan-selection-modal>
@@ -0,0 +1,80 @@
<template>
<div class="selection-wrapper">
<div class="box-title-text">
<a-input class="box-input" :value="standardNumber" :title="standardNumber" @click="standardClick"
disabled readonly :placeholder="placeholder"/>
<a-button v-if="!disabled" type="primary" class="button-box" @click="standardClick">
{{ $t('select') }}
</a-button>
</div>
<enterprise-recheck-plan-selection-modal ref="enterpriseRecheckPlanSelectionModal" v-bind="$attrs" :value="value" @change="modalChange" @standardNumberChange="standardNumberChange" @listChange="modalListChange"></enterprise-recheck-plan-selection-modal>
</div>
</template>
<script>
import EnterpriseRecheckPlanSelectionModal from './EnterpriseRecheckPlanSelectionModal'
export default {
name: 'EnterpriseRecheckPlanSelection',
components: { EnterpriseRecheckPlanSelectionModal },
props: {
value: {
type: String,
default: ''
},
placeholder: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
standardNumber: {
type: String,
default: ''
}
},
methods: {
// 点击选择标准按钮
standardClick () {
this.$refs.enterpriseRecheckPlanSelectionModal.open()
},
modalChange (value) {
this.$emit('change', value)
},
standardNumberChange (value) {
this.$emit('standardNumberChange', value)
},
modalListChange (value) {
this.$emit('listChange', value)
}
},
model: {
prop: 'value',
event: 'change'
}
}
</script>
<style scoped lang="less">
.selection-wrapper {
height: 40px;
line-height: 40px;
}
.box-title-text {
height: 100%;
display: flex;
align-items: center;
.box-input {
width: 100%;
}
/deep/ .ant-input-disabled {
background: #fff;
color: rgba(0, 0, 0, 0.65);
cursor: default;
}
.button-box {
margin-left: 10px;
}
}
</style>
@@ -0,0 +1,282 @@
<template>
<a-drawer
:title="$t('enterpriseRecheckPlanSelect.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.reviewPlan.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardNum')" v-model="queryParam.originEnStandardNo"></a-input>
</a-form-item>
</a-col>
<!-- 企标名称 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" v-model="queryParam.originEnStandardName"></a-input>
</a-form-item>
</a-col>
<!-- 主起草人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.principalDrafter')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.principalDrafter')" v-model="queryParam.mainDraftingUser"></a-input>
</a-form-item>
</a-col>
<!-- 主起草单位 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.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.reviewPlan.mainDraftingUnit')"
/>
</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">{{ $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">
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 企标编号/企标名称 -->
<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>
</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 { queryDepartTreeList } from '@/api/api'
import { getEnterpriseRecheckPlanPage } from '@/api/enterpriseStandardLibraryApi'
export default {
name: 'EnterpriseRecheckPlanSelectionModal',
props: {
value: {
type: String,
default: ''
},
type: {
type: String,
required: false,
default: 'checkbox'
},
searchParam: { // 根据不同模块传入固定的查询参数
type: Object,
required: false,
default () {
return {}
}
}
},
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.reviewPlan.enterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'standardNo',
scopedSlots: { customRender: 'toDetail' }
},
{ // 企标名称
title: this.$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'standardName',
scopedSlots: { customRender: 'toDetail' }
},
{ // 发布日期
title: this.$t('enterpriseStandardLibrary.reviewPlan.publishDate'),
align: 'center',
width: 180,
dataIndex: 'releaseDate',
scopedSlots: { customRender: 'text' }
},
{ // 复审日期
title: this.$t('enterpriseStandardLibrary.reviewPlan.reviewDate'),
align: 'center',
width: 180,
dataIndex: 'recheckDate',
scopedSlots: { customRender: 'reviewDate' }
},
{ // 复审结果
title: this.$t('enterpriseStandardLibrary.reviewPlan.reviewResult'),
align: 'center',
width: 180,
dataIndex: 'recheckResult_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.reviewPlan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.reviewPlan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit_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 = []
}
})
},
// 点击跳转企标详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 获取表格数据
replacePage () {
const query = {
...this.queryParam,
...this.searchParam,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
this.selectedRowKeys = []
this.loading = true
getEnterpriseRecheckPlanPage(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 lang="less">
@import '~@assets/less/common.less';
</style>