[update] 修改企标流程bug

This commit is contained in:
lideqin
2023-12-20 18:43:23 +08:00
parent ea8d024628
commit d2a044ac3e
5 changed files with 148 additions and 75 deletions
+1 -1
View File
@@ -57,7 +57,7 @@
<!--审批意见--> <!--审批意见-->
<template v-slot:approvalOpinion="{text, record}"> <template v-slot:approvalOpinion="{text, record}">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template> <template slot="title">{{ text || text === 0 ? record.commitFlag_dictText : global.emptyLine }}</template>
<div class="table-text" :class="{'agree-color': record.commitFlag + '' === '1', 'reject-color': record.commitFlag + '' === '2'}"> <div class="table-text" :class="{'agree-color': record.commitFlag + '' === '1', 'reject-color': record.commitFlag + '' === '2'}">
{{ text || text === 0 ? record.commitFlag_dictText : global.emptyLine }} {{ text || text === 0 ? record.commitFlag_dictText : global.emptyLine }}
</div> </div>
@@ -28,7 +28,7 @@
:columns="columns" :columns="columns"
rowKey="contactId" rowKey="contactId"
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%', y: '280px'}"
:data-source="dataSource" :data-source="dataSource"
:pagination="ipagination" :pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
@@ -2,74 +2,102 @@
<j-modal <j-modal
:title="$t('userSelect.selectUser')" :title="$t('userSelect.selectUser')"
:maskClosable="false" :maskClosable="false"
:width="1000" :width="1200"
:closable="true" :closable="true"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
switchFullscreen switchFullscreen
:visible="visible"> :visible="visible">
<div class="modal-search-wrapper table-page-search-wrapper"> <div class="modal-top-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <div class="modal-left-wrapper">
<a-row :gutter="24"> <a-spin :spinning="treeLoading">
<a-col :span="6"> <a-tree
<a-form-item :label="$t('system.internalWorkGroup.name')" :labelCol="labelCol" :wrapperCol="wrapperCol"> :show-line="true"
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.name')" v-model="queryParam.realname"></a-input> :show-icon="true"
</a-form-item> :tree-data="treeData"
</a-col> :selectedKeys="currentTreeNode"
<a-col :span="6"> :replaceFields="{children: 'subset', title: 'name', key: 'id'}"
<a-form-item :label="$t('system.internalWorkGroup.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol"> :default-expand-all="defaultExpandAll"
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.workNo')" v-model="queryParam.username"></a-input> @select="treeSelect">
</a-form-item> <template #custom="record">
</a-col> <div class="tree-operate-node">
<a-col :span="6"> <a-icon class="parent-node-icon" type="folder" v-if="record.subset && record.subset.length > 0" />
<a-form-item :label="$t('system.internalWorkGroup.role')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-tooltip>
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.role')" v-model="queryParam.userRoleName"></a-input> <template #title>
</a-form-item> {{ record.name }}
</a-col> </template>
<a-col :span="6"> <span class="tree-node-custom-title">{{ record.name }}</span>
<a-form-item :label="$t('system.internalWorkGroup.post')" :labelCol="labelCol" :wrapperCol="wrapperCol"> </a-tooltip>
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.post')" v-model="queryParam.userPostName"></a-input> </div>
</a-form-item> </template>
</a-col> </a-tree>
<!--<a-col :span="6">--> </a-spin>
<!-- <a-form-item :label="$t('userSelect.workGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol">--> </div>
<!-- <a-tree-select--> <div class="modal-right-wrapper">
<!-- tree-node-filter-prop="title"--> <div class="modal-search-wrapper table-page-search-wrapper">
<!-- v-model="queryParam.workingGroupId"--> <a-form layout="inline" @keyup.enter.native="searchQuery">
<!-- :maxTagCount="1"--> <a-row :gutter="24">
<!-- :show-search="true"--> <a-col :span="6">
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"--> <a-form-item :label="$t('system.internalWorkGroup.name')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- style="width: 100%"--> <j-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.name')" v-model="queryParam.realname"></j-input>
<!-- :tree-data="workingGroupTreeList"--> </a-form-item>
<!-- :placeholder="$t('pleaseSelect')"--> </a-col>
<!-- />--> <a-col :span="6">
<!-- </a-form-item>--> <a-form-item :label="$t('system.internalWorkGroup.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!--</a-col>--> <j-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.workNo')" v-model="queryParam.username"></j-input>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> </a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :label="$t('system.internalWorkGroup.role')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.role')" v-model="queryParam.userRoleName"></a-input>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :label="$t('system.internalWorkGroup.post')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.post')" v-model="queryParam.post"></j-input>
</a-form-item>
</a-col>
<!--<a-col :span="6">-->
<!-- <a-form-item :label="$t('userSelect.workGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!-- <a-tree-select-->
<!-- tree-node-filter-prop="title"-->
<!-- v-model="queryParam.workingGroupId"-->
<!-- :maxTagCount="1"-->
<!-- :show-search="true"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- style="width: 100%"-->
<!-- :tree-data="workingGroupTreeList"-->
<!-- :placeholder="$t('pleaseSelect')"-->
<!-- />-->
<!-- </a-form-item>-->
<!--</a-col>-->
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button style="margin-left: 8px" type="primary" icon="search" @click="searchQuery">{{$t('query')}}</a-button> <a-button style="margin-left: 8px" type="primary" icon="search" @click="searchQuery">{{$t('query')}}</a-button>
<a-button style="margin-left: 8px" type="primary" ghost icon="reload" @click="searchReset">{{$t('reset')}}</a-button> <a-button style="margin-left: 8px" type="primary" ghost icon="reload" @click="searchReset">{{$t('reset')}}</a-button>
</span> </span>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="modal-content"> <div class="modal-content">
<a-table <a-table
:columns="columns" :columns="columns"
rowKey="id" rowKey="id"
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%', y: '280px'}"
:data-source="dataSource" :data-source="dataSource"
:pagination="ipagination" :pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
:loading="loadingLeft" :loading="loadingLeft"
@change="leftTableChange"> @change="leftTableChange">
<template slot="text" slot-scope="text"> <template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template> <template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div> <div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip> </a-tooltip>
</template> </template>
</a-table> </a-table>
</div>
</div>
</div> </div>
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p> <p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content"> <div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
@@ -122,6 +150,10 @@ export default {
wrapperCol: { wrapperCol: {
span: 18 span: 18
}, },
treeLoading: false,
currentTreeNode: null, // 当前选中的树节点
defaultExpandAll: false, // 左侧树默认展开所有
treeData: [],
columns: [ columns: [
{ {
title: this.$t('user.workNo'), title: this.$t('user.workNo'),
@@ -137,13 +169,13 @@ export default {
}, },
{ {
title: this.$t('role'), title: this.$t('role'),
dataIndex: 'userRoleName', dataIndex: 'roleTxt',
align: 'center', align: 'center',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
title: this.$t('userSelect.post'), title: this.$t('userSelect.post'),
dataIndex: 'userPostName', dataIndex: 'post',
align: 'center', align: 'center',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
@@ -171,16 +203,17 @@ export default {
} }
}, },
mounted () { mounted () {
this.initTreeData()
this.getWorkGroupTree() this.getWorkGroupTree()
this.loadData() this.loadData()
}, },
methods: { methods: {
open (value) { open (value) {
this.visible = true this.visible = true
this.loadData()
if (value) { if (value) {
this.selectedRowKeys = value.split(',') this.selectedRowKeys = value.split(',')
this.getUserListByIds(value) this.getUserListByIds(value)
this.loadData()
} }
}, },
// 获取内部工作组树 // 获取内部工作组树
@@ -193,6 +226,30 @@ export default {
} }
}) })
}, },
// 左侧树点击选中
treeSelect (selectedKeys) {
console.log(selectedKeys)
this.currentTreeNode = selectedKeys
this.queryParam.workingGroupId = selectedKeys[0]
this.loadData()
},
// 获取左侧树数据
initTreeData (params) {
this.treeLoading = true
getWorkGroupTreeList(params).then(res => {
if (res.success) {
this.treeData = this.dealTreeData(res.result)
this.treeData[0].scopedSlots = { title: 'oneCustom' }
} else {
this.treeData = []
}
}).finally(() => {
this.$nextTick(() => {
this.defaultExpandAll = true
})
this.treeLoading = false
})
},
// 处理左侧树数据结构 // 处理左侧树数据结构
dealTreeData (treeData) { dealTreeData (treeData) {
return treeData.map(item => { return treeData.map(item => {
@@ -318,6 +375,21 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import '~@assets/less/common.less';
.modal-top-wrapper {
display: flex;
height: 480px;
margin-bottom: 20px;
}
.modal-left-wrapper {
width: 200px;
margin-right: 20px;
height: 100%;
overflow-y: scroll;
}
.modal-right-wrapper {
flex: 1;
}
.modal-content { .modal-content {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -360,6 +432,10 @@ export default {
} }
} }
/deep/ .ant-table-body{
overflow: scroll;
}
/deep/ .ant-form-item-label{ /deep/ .ant-form-item-label{
min-width: 70px !important; min-width: 70px !important;
} }
+1 -1
View File
@@ -58,7 +58,7 @@
:columns="columns" :columns="columns"
rowKey="id" rowKey="id"
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%', y: '280px'}"
:data-source="dataSource" :data-source="dataSource"
:pagination="ipagination" :pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
@@ -785,23 +785,20 @@ export default {
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record) this.formInline = Object.assign({}, record)
// 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填 // 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填
// 找出最初的这条表格数据
const dItem = this.initDataSource.find(item => item.id === this.formInline.id)
console.log(dItem)
if ([6].includes(this.currentNode)) { if ([6].includes(this.currentNode)) {
// 是主起草人的编辑 // 是主起草人的编辑
// 草稿计划完成日期的处理 // 草稿计划完成日期的处理
if (dItem.draftPlannedCompleteDate) { if (this.formInline.draftPlannedCompleteDateEditFlag === '0') {
// 草稿计划完成日期已经填写了, 主起草人不能修改 // 草稿计划完成日期已经填写了, 主起草人不能修改
this.draftPlanFinishDateDisabled = true this.draftPlanFinishDateDisabled = true
} }
// 征求意见稿计划完成日期 // 征求意见稿计划完成日期
if (dItem.solicitationDraftPlanCompleteDate) { if (this.formInline.solicitationDraftPlanCompleteDateEditFlag === '0') {
// 征求意见稿计划完成日期已经填写了, 主起草人不能修改 // 征求意见稿计划完成日期已经填写了, 主起草人不能修改
this.exposureDraftPlanFinishDateDisabled = true this.exposureDraftPlanFinishDateDisabled = true
} }
// 计划报批日期 // 计划报批日期
if (dItem.planApprovalDate) { if (this.formInline.planApprovalDateEditFlag === '0') {
// 计划报批日期已经填写了, 主起草人不能修改 // 计划报批日期已经填写了, 主起草人不能修改
this.planSubmissionDateDisabled = true this.planSubmissionDateDisabled = true
} }
@@ -813,7 +810,7 @@ export default {
// 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填 // 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填
this.disabled = true this.disabled = true
// 草稿计划完成日期的处理 // 草稿计划完成日期的处理
if (!dItem.draftPlannedCompleteDate) { if (this.formInline.draftPlannedCompleteDateEditFlag !== '0') {
// 草稿计划完成日期没有填写, 联络人必填 // 草稿计划完成日期没有填写, 联络人必填
this.rules.draftPlannedCompleteDate[0].required = true this.rules.draftPlannedCompleteDate[0].required = true
} else { } else {
@@ -821,7 +818,7 @@ export default {
this.draftPlanFinishDateDisabled = true this.draftPlanFinishDateDisabled = true
} }
// 征求意见稿计划完成日期 // 征求意见稿计划完成日期
if (!dItem.solicitationDraftPlanCompleteDate) { if (this.formInline.solicitationDraftPlanCompleteDateEditFlag !== '0') {
// 征求意见稿计划完成日期没有填写, 联络人必填 // 征求意见稿计划完成日期没有填写, 联络人必填
this.rules.solicitationDraftPlanCompleteDate[0].required = true this.rules.solicitationDraftPlanCompleteDate[0].required = true
} else { } else {
@@ -829,7 +826,7 @@ export default {
this.exposureDraftPlanFinishDateDisabled = true this.exposureDraftPlanFinishDateDisabled = true
} }
// 计划报批日期 // 计划报批日期
if (!dItem.planApprovalDate) { if (this.formInline.planApprovalDateEditFlag !== '0') {
// 计划报批日期没有填写, 联络人必填 // 计划报批日期没有填写, 联络人必填
this.rules.planApprovalDate[0].required = true this.rules.planApprovalDate[0].required = true
} else { } else {