[add 功能安全中心] 基础页面
This commit is contained in:
@@ -11,6 +11,11 @@ export const ProjectTypeEnums = {
|
|||||||
PACK_PRO: { name: '打包项目', value: 8 }
|
PACK_PRO: { name: '打包项目', value: 8 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 会议类型
|
||||||
|
export const MeetTypeEnums = {
|
||||||
|
safetyCenter: { name: '功能安全中心', value: '8' },
|
||||||
|
}
|
||||||
|
|
||||||
// 参会人员身份类型
|
// 参会人员身份类型
|
||||||
export const MeetIdentifyTypeEnums = {
|
export const MeetIdentifyTypeEnums = {
|
||||||
guest: { name: '嘉宾', index: 1 },
|
guest: { name: '嘉宾', index: 1 },
|
||||||
|
|||||||
@@ -0,0 +1,348 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title :img-for-icon="IconDraftingGruop"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 查询区域-start -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<a-col :xxl="6" :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入项目名称" v-model="queryParam.projectName" :maxLength='50'></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-principal placeholder="请选择负责人" v-model="queryParam.principalId"></select-principal>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery"
|
||||||
|
v-has="'draftingGroup:search'">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- /查询区域-end-->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'draftingGroup:add'">新增</a-button>
|
||||||
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'draftingGroup:batchDel'">批量删除</a-button>
|
||||||
|
</div>
|
||||||
|
<!-- /操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- table表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:scroll="{x: 1000}"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
|
<!-- 项目名称-->
|
||||||
|
<template slot="projectName" slot-scope="text, record">
|
||||||
|
<a-tooltip>
|
||||||
|
<template slot="title">{{ text }}</template>
|
||||||
|
<div class="primary-color text-over" @click="goMemberUnitMaintenance(record)">{{ text }}</div>
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
|
<a @click="goUnderStudyProject(record)" v-has="'draftingGroup:underStudyProject'">在研项目</a>
|
||||||
|
<a @click="goFilesMaintenance(record)" v-has="'draftingGroup:fileMaintenance'">其他分发资料</a>
|
||||||
|
<a @click="goConferenceMaintenance(record)" v-has="'draftingGroup:meetingMaintenance'">项目会议</a>
|
||||||
|
<a @click="handleCopy(record.id)" v-has="'draftingGroup:copy'">复制</a>
|
||||||
|
<a @click="handleEdit(record)" v-has="'draftingGroup:edit'">基本信息维护</a>
|
||||||
|
<a @click="handleDelete(record.id)" v-has="'draftingGroup:delete'">删除</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<!-- /table表格区域-->
|
||||||
|
</a-card>
|
||||||
|
<!--新增、基本信息维护-->
|
||||||
|
<safety-center-module ref="modalForm" @ok="modalFormOk"></safety-center-module>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||||
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
|
import IconDraftingGruop from '@/assets/imgs/icon/icon_drafting_group.png'
|
||||||
|
import {copyDraftingGroup} from '@api/incomePaymentsApi'
|
||||||
|
import { getAction } from '@api/manage'
|
||||||
|
import SafetyCenterModule from '@views/functionalSafetyCenter/modules/SafetyCenterModule'
|
||||||
|
import {MeetTypeEnums} from '@/enums/commonEnums'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FunctionalSafetyCenter',
|
||||||
|
components: {SafetyCenterModule, SelectPrincipal, PageHeaderTitle },
|
||||||
|
mixins: [JeroListMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
IconDraftingGruop,
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
list: '/FunctionalSafetyCenter/page',
|
||||||
|
delete: '/FunctionalSafetyCenter/delete',
|
||||||
|
deleteBatch: '/FunctionalSafetyCenter/deleteBatch'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '项目名称',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'projectName',
|
||||||
|
scopedSlots: { customRender: 'projectName' }
|
||||||
|
}, {
|
||||||
|
title: '负责人',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
dataIndex: 'principalName'
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 500,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
queryParam: {},
|
||||||
|
lastQueryParam: {},
|
||||||
|
operateData: [] // 进行操作权限校验时使用的数据
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadData(arg) {
|
||||||
|
if (!this.url.list) {
|
||||||
|
this.$message.error('请设置url.list属性!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
|
if (arg === 1) {
|
||||||
|
this.ipagination.current = 1
|
||||||
|
}
|
||||||
|
var params = this.getQueryParams()//查询条件
|
||||||
|
this.loading = true
|
||||||
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
|
this.dataSource = res.result.records || res.result
|
||||||
|
if (res.result.total) {
|
||||||
|
this.ipagination.total = res.result.total
|
||||||
|
//清空列表选中
|
||||||
|
this.onClearSelected()
|
||||||
|
} else {
|
||||||
|
this.ipagination.total = 0
|
||||||
|
}
|
||||||
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
|
}
|
||||||
|
if (res.code === 510) {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
// 判断登录用户是否为负责人B 2021-10-13:修改为后端在列表字段返回checkoutOperation字段控制,1--可操作,2--不可操作
|
||||||
|
// if (this.dataSource.length > 0) {
|
||||||
|
// for (let index = 0; index < this.dataSource.length; index++) {
|
||||||
|
// this.checkWorkingGroupPrincipal(index).then((res) => {
|
||||||
|
// res.showOperate = true
|
||||||
|
// this.$set(this.dataSource, index, res)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 判断登录用户是否为负责人B
|
||||||
|
*/
|
||||||
|
// checkWorkingGroupPrincipal(index) {
|
||||||
|
// let item = this.dataSource[index]
|
||||||
|
// // (负责人B不可操作)
|
||||||
|
// return new Promise(resolve => {
|
||||||
|
// checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||||
|
// // 不可操作则置否
|
||||||
|
// if (res.success) {
|
||||||
|
// item.canOperate = true
|
||||||
|
// } else {
|
||||||
|
// item.canOperate = false
|
||||||
|
// }
|
||||||
|
// }).finally(() => {
|
||||||
|
// resolve(item)
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
/**
|
||||||
|
* 文件维护
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
goFilesMaintenance(record) {
|
||||||
|
console.log(record)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/projectManagement/WorkingGroupProjectDataMaintenance',
|
||||||
|
query: {
|
||||||
|
safetyCenterId: record.id,
|
||||||
|
canOperate: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 会议维护
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
goConferenceMaintenance(record) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/functionalSafetyCenter/FunctionalSafetyConferenceMaintenance',
|
||||||
|
query: {
|
||||||
|
projectName: record.projectName,
|
||||||
|
projectId: record.id,
|
||||||
|
canOperate: true,
|
||||||
|
meetingType: MeetTypeEnums.safetyCenter.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 复制
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
handleCopy (id) {
|
||||||
|
copyDraftingGroup({ id: id }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loadData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 成员维护
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
goMemberUnitMaintenance(record) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance',
|
||||||
|
query: {
|
||||||
|
projectName: record.projectName,
|
||||||
|
projectId: record.id,
|
||||||
|
canOperate: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.lastQueryParam = {
|
||||||
|
year: new Date().getFullYear().toString()
|
||||||
|
}
|
||||||
|
this.queryParam = {
|
||||||
|
year: new Date().getFullYear().toString()
|
||||||
|
}
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 在研项目
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
sgoUnderStudyProject(record) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/functionalSafetyCenter/FunctionalSafetyUnderStudyProject',
|
||||||
|
query: {
|
||||||
|
title: record.projectName,
|
||||||
|
id: record.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 重写编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
handleEdit(record) {
|
||||||
|
this.$refs.modalForm.edit(record)
|
||||||
|
this.$refs.modalForm.title = '基本信息维护'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
// 下拉框的搜索
|
||||||
|
filterOption(input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.tooltip {
|
||||||
|
float: right;
|
||||||
|
width: auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: flex-end;
|
||||||
|
height: 40px;
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-color {
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
margin-right: 5px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-pay-in-full {
|
||||||
|
background: linear-gradient(0deg, #069f99 0%, #07b0a9 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-partial-payment {
|
||||||
|
background: linear-gradient(0deg, #0075a9 0%, #0096d8 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-non-payment {
|
||||||
|
background: #e8e8e8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-over {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,399 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title :is-level-one="false" :level-two-title="projectName"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 查询区域-->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="会议名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入会议名称" v-model="queryParam.meetingName" :maxLength='50'></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
|
<a-form-item label="会议时间">
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择开始日期"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.meetingStartTime"
|
||||||
|
:disabled-date="disabledStartDate">
|
||||||
|
</j-date>
|
||||||
|
<span class="query-group-split-cust"></span>
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择结束日期"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.meetingEndTime"
|
||||||
|
:disabled-date="disabledEndDate">
|
||||||
|
</j-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-year-date style="width:100%" placeholder="请选择年份"
|
||||||
|
v-model="queryParam.particularYear"></j-year-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
|
<a-form-item label="创建时间">
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择开始日期"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.createTime_begin"
|
||||||
|
:disabled-date="disabledStartCreateDate">
|
||||||
|
</j-date>
|
||||||
|
<span class="query-group-split-cust"></span>
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择结束日期"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.createTime_end"
|
||||||
|
:disabled-date="disabledEndCreateDate">
|
||||||
|
</j-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="已提醒" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag style="width: 100%"
|
||||||
|
dict-code="yn"
|
||||||
|
v-model="queryParam.remind"
|
||||||
|
placeholder="请选择提醒类型"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery"
|
||||||
|
v-has="'draftGroupMeeting:search'">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- /查询区域-->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'draftGroupMeeting:add'" v-if="canOperate">新增
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" icon="export" @click="handleExportXls('工作组会议')"
|
||||||
|
v-has="'draftGroupMeeting:export'">导出
|
||||||
|
</a-button>
|
||||||
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'draftGroupMeeting:batchDel'" v-if="canOperate">
|
||||||
|
批量删除
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" @click="publishRemind" v-has="'draftGroupMeeting:publish'" v-if="canOperate">发布
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
<!-- /操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- table表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:scroll="{x:true}"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
|
<!-- 会议名称 点击去参会情况-->
|
||||||
|
<template slot="htmlSlot" slot-scope="text, record">
|
||||||
|
<j-ellipsis v-if="!!text" class="primary-color" :value="text" :length="20"
|
||||||
|
@click="toAttendance(record)"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record" v-if="canOperate">
|
||||||
|
<a @click="uploadFile(record,'1')" v-has="'draftGroupMeeting:uploadCouncil'">会议纪要</a>
|
||||||
|
<a @click="uploadFile(record,'2')" v-has="'draftGroupMeeting:upload'">上传文件</a>
|
||||||
|
<!-- <a @click="applyMsg">报名信息</a>-->
|
||||||
|
<a @click="handleEdit(record)" v-has="'draftGroupMeeting:edit'">编辑</a>
|
||||||
|
<a @click="handleDelete(record.id)" v-has="'draftGroupMeeting:delete'">删除</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<publish-remind-modal ref="publishRemindModal" @ok="modalFormOk"></publish-remind-modal>
|
||||||
|
<upload-meet-file-modal ref="modalForm" @ok="modalFormOk"></upload-meet-file-modal>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import { RangeDateMixin } from '@/mixins/RangeDateMixin'
|
||||||
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
|
import JDate from '@comp/tools/JDate'
|
||||||
|
import moment from 'moment'
|
||||||
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
|
import PublishRemindModal from '@views/projectManagement/modules/PublishRemindModal'
|
||||||
|
import UploadMeetFileModal from '@views/incomePayments/meetManage/modules/UploadMeetFileModal'
|
||||||
|
import '@/assets/less/TableExpand.less'
|
||||||
|
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
||||||
|
import {MeetTypeEnums} from '@/enums/commonEnums'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FunctionalSafetyCenterConferenceMaintenance',
|
||||||
|
components: {
|
||||||
|
JYearDate,
|
||||||
|
JDate,
|
||||||
|
JDictSelectTag,
|
||||||
|
PublishRemindModal,
|
||||||
|
UploadMeetFileModal,
|
||||||
|
PageHeaderTitle
|
||||||
|
},
|
||||||
|
mixins: [JeroListMixin, RangeDateMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
projectName: '',
|
||||||
|
projectId: '',
|
||||||
|
disableMixinCreated: true,
|
||||||
|
list: [],
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
dateKeyObj: {
|
||||||
|
beginKey: 'meetingStartTime',
|
||||||
|
endKey: 'meetingEndtTime'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '会议名称',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'meetingName',
|
||||||
|
scopedSlots: { customRender: 'htmlSlot' },
|
||||||
|
width: 160
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '会议类型',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'meetingType_dictText',
|
||||||
|
width: 100,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '负责人',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'directorName',
|
||||||
|
width: 160,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '召开时间',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startTime',
|
||||||
|
width: 200,
|
||||||
|
customRender: (text, record) => (
|
||||||
|
<j-ellipsis value={ record.startTime + '~' + record.endTime } length={ 20 }></j-ellipsis>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '召开地点',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'venue',
|
||||||
|
width: 200,
|
||||||
|
customRender: (text, record) => (
|
||||||
|
<j-ellipsis value={ text + '/' + record.address } length={ 20 }></j-ellipsis>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '年份',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'particularYear',
|
||||||
|
width: 120,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '已提醒',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'remind_dictText',
|
||||||
|
width: 100,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 160,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: {
|
||||||
|
list: '/meeting/draftGroupMeeting/page',
|
||||||
|
delete: '/meeting/draftGroupMeeting/delete',
|
||||||
|
deleteBatch: '/meeting/draftGroupMeeting/deleteBatch',
|
||||||
|
exportXlsUrl: '/meeting/draftGroupMeeting/exportXls'
|
||||||
|
},
|
||||||
|
canOperate: true // 是否可操作(负责人B不可操作)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.projectName = this.$route.query.projectName
|
||||||
|
this.projectId = this.$route.query.projectId
|
||||||
|
this.filters.projectId = this.projectId
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 返回项目列表
|
||||||
|
*/
|
||||||
|
backWorkingGroupProject() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/functionalSafetyCenter'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 新增
|
||||||
|
* */
|
||||||
|
handleAdd() {
|
||||||
|
// 记录当前的项目id
|
||||||
|
let currentId = this.$route.query.projectId
|
||||||
|
this.$router.push({
|
||||||
|
path: '/incomePayments/meetManage/AddOrDetailMeet',
|
||||||
|
query: {
|
||||||
|
safetyCenterId: currentId,
|
||||||
|
meetingType: MeetTypeEnums.safetyCenter.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 编辑
|
||||||
|
* */
|
||||||
|
handleEdit(record) {
|
||||||
|
// 记录当前的工作组id
|
||||||
|
let currentId = this.$route.query.projectId
|
||||||
|
this.$router.push({
|
||||||
|
path: '/incomePayments/meetManage/AddOrDetailMeet',
|
||||||
|
query: {
|
||||||
|
safetyCenterId: currentId,
|
||||||
|
id: record.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 发布
|
||||||
|
* */
|
||||||
|
publishRemind() {
|
||||||
|
if (this.selectionRows.length === 0) {
|
||||||
|
this.$message.warn('请选择一个会议')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
// 传入选中的会议id
|
||||||
|
this.$refs.publishRemindModal.open(this.selectedRowKeys)
|
||||||
|
this.$refs.publishRemindModal.title = '发布'
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 上传文件
|
||||||
|
* */
|
||||||
|
uploadFile(record,type) {
|
||||||
|
this.$refs.modalForm.edit(record,type)
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 报名信息
|
||||||
|
* */
|
||||||
|
applyMsg() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/incomePayments/meetManage/SignUpInfoList'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 参会情况
|
||||||
|
* */
|
||||||
|
toAttendance(record) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/incomePayments/meetManage/AttendanceFunctionalSafetyCenter',
|
||||||
|
query: {
|
||||||
|
id: record.id,
|
||||||
|
meetingName: record.meetingName,
|
||||||
|
meetingType: MeetTypeEnums.safetyCenter.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 创建时间开始禁用
|
||||||
|
* */
|
||||||
|
disabledStartCreateDate(startValue) {
|
||||||
|
const endValue = this.queryParam.createTime_end && moment(this.queryParam.createTime_end, this.rangeDateFormat.end)
|
||||||
|
if (!startValue || !endValue) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return startValue.valueOf() > endValue.valueOf()
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 创建时间结束禁用
|
||||||
|
* */
|
||||||
|
disabledEndCreateDate(endValue) {
|
||||||
|
const startValue = this.queryParam.createTime_begin && moment(this.queryParam.createTime_begin, this.rangeDateFormat.begin)
|
||||||
|
if (!endValue || !startValue) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return startValue.valueOf() > endValue.valueOf()
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 修改查询条件
|
||||||
|
* */
|
||||||
|
searchQuery() {
|
||||||
|
// this.queryParam.meetingStartTime = this.queryParam.meetingStartTime ? this.queryParam.meetingStartTime + ' ' + '00:00:00' : undefined
|
||||||
|
// this.queryParam.meetingEndTime = this.queryParam.meetingEndTime ? this.queryParam.meetingEndTime + ' ' + '23:59:59' : undefined
|
||||||
|
// this.queryParam.createTime_begin = this.queryParam.createTime_begin ? this.queryParam.createTime_begin + ' ' + '00:00:00' : undefined
|
||||||
|
// this.queryParam.createTime_end = this.queryParam.createTime_end ? this.queryParam.createTime_end + ' ' + '23:59:59' : undefined
|
||||||
|
this.lastQueryParam = { ...this.queryParam }
|
||||||
|
if(this.lastQueryParam.meetingStartTime) this.lastQueryParam.meetingStartTime = this.lastQueryParam.meetingStartTime + ' ' + '00:00:00'
|
||||||
|
if(this.lastQueryParam.meetingEndTime) this.lastQueryParam.meetingEndTime = this.lastQueryParam.meetingEndTime + ' ' + '23:59:59'
|
||||||
|
if(this.lastQueryParam.createTime_begin) this.lastQueryParam.createTime_begin = this.lastQueryParam.createTime_begin + ' ' + '00:00:00'
|
||||||
|
if(this.lastQueryParam.createTime_end) this.lastQueryParam.createTime_end = this.lastQueryParam.createTime_end + ' ' + '23:59:59'
|
||||||
|
this.loadData(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.title {
|
||||||
|
|
||||||
|
&-text {
|
||||||
|
padding-left: 1rem;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
height: 1px;
|
||||||
|
background-color: #cccccc;
|
||||||
|
margin: 15px -24px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,522 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title :is-level-one="false" :level-two-title="projectName"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">项目信息</div>
|
||||||
|
</div>
|
||||||
|
<!-- 起草组信息区域-->
|
||||||
|
<a-spin :spinning="spinning">
|
||||||
|
<div class="work-group-detail">
|
||||||
|
<div class="work-group-detail-item work-group-detail-item-small"
|
||||||
|
v-for="(item, index) in detailTitleList"
|
||||||
|
:key="index">
|
||||||
|
<div class="work-group-detail-item-title">{{ item.title }}:</div>
|
||||||
|
<div class="work-group-detail-item-content work-group-detail-item-filename"
|
||||||
|
v-if="(item.fieldName === 'chargeNoticeAId' || item.fieldName === 'chargeNoticeBId') && detail[item.fieldName]">
|
||||||
|
<preview-file :file-id="detail[item.fieldName]"></preview-file>
|
||||||
|
</div>
|
||||||
|
<div class="work-group-detail-item-content" v-else>{{ detail[item.fieldName] }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="work-group-detail-item">
|
||||||
|
<div class="work-group-detail-item-title">任务及目标:</div>
|
||||||
|
<div class="work-group-detail-item-content">{{ detail.missionAndObjectives }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="work-group-detail-item">
|
||||||
|
<div class="work-group-detail-item-title">备注:</div>
|
||||||
|
<div class="work-group-detail-item-content">{{ detail.remarks }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-spin>
|
||||||
|
<!-- /起草组信息区域-->
|
||||||
|
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 入会信息 -->
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">入会信息</div>
|
||||||
|
</div>
|
||||||
|
<a-spin :spinning="spinning">
|
||||||
|
<a-row class="flex-col signUpInfo">
|
||||||
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
|
<label>报名链接:</label><span>{{ showSignUpHref }}</span>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
|
<label>报名二维码:</label><img class="qr-code" :src="signUpQRCode" alt="报名二维码"/><i class="copy primary-color"
|
||||||
|
@click="copy(showSignUpHref)">复制</i>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-spin>
|
||||||
|
<!-- /入会信息 -->
|
||||||
|
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 查询区域-->
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">成员信息</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入成员单位" v-model="queryParam.chargeCompanyTemporaryName"
|
||||||
|
:maxLength='50'></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
||||||
|
<!-- <a-form-item label="标签名称" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
|
<!-- <a-input placeholder="请输入标签名称" v-model="queryParam.label" :maxLength='50'></a-input>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!--</a-col>-->
|
||||||
|
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery"
|
||||||
|
v-has="'draftingGroupMember:search'">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- /查询区域-->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'draftingGroupMember:add'" v-if="canOperate">
|
||||||
|
添加成员
|
||||||
|
</a-button>
|
||||||
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :data="importParam"
|
||||||
|
:action="importExcelUrl" @change="handleImportExcel" v-has="'draftingGroupMember:import'"
|
||||||
|
v-if="canOperate">
|
||||||
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
|
</a-upload>
|
||||||
|
<a-button type="primary" icon="export" @click="handleExportXls('起草组成员')" v-has="'draftingGroupMember:export'">
|
||||||
|
导出
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="downTemplate('起草组成员导入模板')"
|
||||||
|
v-has="'draftingGroupMember:downTemplate'" v-if="canOperate">下载模板
|
||||||
|
</a-button>
|
||||||
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'draftingGroupMember:batchDel'" v-if="canOperate">
|
||||||
|
批量删除
|
||||||
|
</a-button>
|
||||||
|
<!--<a-button type="primary" @click="setLabel" v-has="'workingGroupMember:setLabel'">设置标签</a-button>-->
|
||||||
|
</div>
|
||||||
|
<!-- /操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- table表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:scroll="{x: 800}"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
|
<!-- 起草组名称-->
|
||||||
|
<template slot="projectName" slot-scope="text, record">
|
||||||
|
<j-ellipsis :value="text"
|
||||||
|
:length="18"
|
||||||
|
class="primary-color"
|
||||||
|
@click="openDetailModal(record)"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<a-tooltip>
|
||||||
|
<template slot="title">{{ text }}</template>
|
||||||
|
<div class="table-text">{{ text }}</div>
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record" v-if="canOperate">
|
||||||
|
<a @click="handleEdit(record)" v-has="'draftingGroupMember:edit'">编辑</a>
|
||||||
|
<a @click="handleDelete(record.id)" v-has="'draftingGroupMember:delete'">删除</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<project-detail-modal :project-type="ProjectTypeEnums.DRAFT_PRO.value" ref="projectDetail"></project-detail-modal>
|
||||||
|
<safety-center-member-unit-module ref="modalForm" @ok="modalFormOk"></safety-center-member-unit-module>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
|
import {getDraftingGroupById} from '@api/incomePaymentsApi'
|
||||||
|
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import PreviewFile from '../../components/jero/PreviewFile'
|
||||||
|
import {createQcCode} from '@api/incomeMeetingApi'
|
||||||
|
import { ProjectTypeEnums } from '@/enums/commonEnums'
|
||||||
|
import SafetyCenterMemberUnitModule
|
||||||
|
from '@views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule'
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-undef,no-unused-vars
|
||||||
|
const Base64 = require('js-base64').Base64
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FunctionalSafetyMemberUnitMaintenance',
|
||||||
|
components: {
|
||||||
|
SafetyCenterMemberUnitModule,
|
||||||
|
PageHeaderTitle,
|
||||||
|
ProjectDetailModal,
|
||||||
|
PreviewFile
|
||||||
|
},
|
||||||
|
mixins: [JeroListMixin],
|
||||||
|
computed: {
|
||||||
|
// 小程序报名链接
|
||||||
|
signUpHerfUrl() {
|
||||||
|
return `${ window._CONFIG['singUpDraftTeamQRCodeURL'] }?id=${ this.$route.query.projectId }`
|
||||||
|
},
|
||||||
|
// 企业端报名地址
|
||||||
|
showSignUpHref(){
|
||||||
|
return `${ window._CONFIG['singInDraftHref'] }?id=${ this.$route.query.projectId }`
|
||||||
|
},
|
||||||
|
importExcelUrl: function () {
|
||||||
|
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
// 生成会议报名二维码
|
||||||
|
this.signUpQRCode = await this.generateQRCode(this.signUpHerfUrl)
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
ProjectTypeEnums,
|
||||||
|
signUpQRCode: '',
|
||||||
|
disableMixinCreated: true,
|
||||||
|
projectName: '',
|
||||||
|
projectId: '',
|
||||||
|
spinning: false,
|
||||||
|
detailTitleList: [
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
fieldName: 'projectName'
|
||||||
|
}, {
|
||||||
|
title: '负责人',
|
||||||
|
fieldName: 'principalName'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
list: '/drafting/payDraftingGroupSubitem/list',
|
||||||
|
delete: '/drafting/payDraftingGroupSubitem/delete',
|
||||||
|
deleteBatch: '/drafting/payDraftingGroupSubitem/deleteBatch',
|
||||||
|
exportXlsUrl: '/drafting/payDraftingGroupSubitem/exportXls',
|
||||||
|
importExcelUrl: '/drafting/payDraftingGroupSubitem/importExcel',
|
||||||
|
downTemplateUrl: '/drafting/payDraftingGroupSubitem/downloadExcelModel'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '成员单位',
|
||||||
|
align: 'center',
|
||||||
|
// width: 280,
|
||||||
|
dataIndex: 'chargeCompanyTemporaryName',
|
||||||
|
scopedSlots: { customRender: 'projectName' }
|
||||||
|
}, {
|
||||||
|
title: '企业联系人',
|
||||||
|
align: 'center',
|
||||||
|
// width: 280,
|
||||||
|
dataIndex: 'contactsTemporaryNameOne',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '待确收金额',
|
||||||
|
// align: 'center',
|
||||||
|
// dataIndex: 'receivableAmount',
|
||||||
|
// width: 180,
|
||||||
|
// customRender: (text, record) => (
|
||||||
|
// <j-ellipsis value={ record.receivableAmount + '元' } length={ 15 }></j-ellipsis>
|
||||||
|
// )
|
||||||
|
// }, {
|
||||||
|
// title: '实收金额',
|
||||||
|
// align: 'center',
|
||||||
|
// dataIndex: 'paidAmount',
|
||||||
|
// width: 180,
|
||||||
|
// customRender: (text, record) => (
|
||||||
|
// <j-ellipsis value={ record.paidAmount + '元' } length={ 15 }></j-ellipsis>
|
||||||
|
// )
|
||||||
|
// }, {
|
||||||
|
// title: '标签名称',
|
||||||
|
// align: 'center',
|
||||||
|
// dataIndex: 'label',
|
||||||
|
// width: 100,
|
||||||
|
// scopedSlots: { customRender: 'text' }
|
||||||
|
// }, {
|
||||||
|
// // 2021-10-22需求变更新加
|
||||||
|
// title: '收费通知号',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 280,
|
||||||
|
// dataIndex: 'chargeNoticeNo',
|
||||||
|
// scopedSlots: { customRender: 'text' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '打包',
|
||||||
|
// align: 'center',
|
||||||
|
// fixed: 'right',
|
||||||
|
// width: 100,
|
||||||
|
// dataIndex: 'pack',
|
||||||
|
// scopedSlots: { customRender: 'status-pack' }
|
||||||
|
// },
|
||||||
|
// }, {
|
||||||
|
// title: '需要发票',
|
||||||
|
// align: 'center',
|
||||||
|
// fixed: 'right',
|
||||||
|
// width: 80,
|
||||||
|
// dataIndex: 'needInvoice',
|
||||||
|
// scopedSlots: { customRender: 'status-pack' }
|
||||||
|
// }, {
|
||||||
|
// title: '到账',
|
||||||
|
// align: 'center',
|
||||||
|
// fixed: 'right',
|
||||||
|
// width: 80,
|
||||||
|
// dataIndex: 'inAccount',
|
||||||
|
// scopedSlots: { customRender: 'status' }
|
||||||
|
// }, {
|
||||||
|
// title: '开票',
|
||||||
|
// align: 'center',
|
||||||
|
// fixed: 'right',
|
||||||
|
// width: 80,
|
||||||
|
// dataIndex: 'makeInvoice',
|
||||||
|
// scopedSlots: { customRender: 'status-bill' }
|
||||||
|
// }, {
|
||||||
|
// title: '邮寄',
|
||||||
|
// align: 'center',
|
||||||
|
// fixed: 'right',
|
||||||
|
// width: 80,
|
||||||
|
// dataIndex: 'mail',
|
||||||
|
// scopedSlots: { customRender: 'status-mail' }
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 180,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
detail: {},
|
||||||
|
chargeNoticeList: [], // 收费通知号选项
|
||||||
|
importParam: {},
|
||||||
|
// 给定当年作为来款年份默认查询条件
|
||||||
|
// queryParam: {
|
||||||
|
// paymentDate: new Date().getFullYear().toString()
|
||||||
|
// },
|
||||||
|
// lastQueryParam: {
|
||||||
|
// paymentDate: new Date().getFullYear().toString()
|
||||||
|
// },
|
||||||
|
canOperate: true // 是否可操作(负责人B不可操作)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化起草组信息
|
||||||
|
this.initWorkGroupData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/*
|
||||||
|
* 生成二维码
|
||||||
|
* */
|
||||||
|
generateQRCode(params) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let code = ''
|
||||||
|
createQcCode({ contact: params }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
code = res.result
|
||||||
|
} else {
|
||||||
|
console.error('生成二维码失败')
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
resolve(code)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 初始化起草组信息
|
||||||
|
*/
|
||||||
|
initWorkGroupData() {
|
||||||
|
this.spinning = true
|
||||||
|
this.projectName = this.$route.query.projectId || ''
|
||||||
|
this.projectId = this.$route.query.projectId || ''
|
||||||
|
this.filters.projectId = this.projectId
|
||||||
|
this.importParam.projectId = this.projectId
|
||||||
|
this.loadData()
|
||||||
|
let param = {
|
||||||
|
id: this.projectId
|
||||||
|
}
|
||||||
|
getDraftingGroupById(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.detail = res.result || {}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.spinning = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* 复制地址
|
||||||
|
* */
|
||||||
|
copy(data) {
|
||||||
|
// 存储传递过来的数据
|
||||||
|
let OrderNumber = data
|
||||||
|
// 创建一个input 元素
|
||||||
|
// createElement() 方法通过指定名称创建一个元素
|
||||||
|
let newInput = document.createElement('input')
|
||||||
|
// 讲存储的数据赋值给input的value值
|
||||||
|
newInput.value = OrderNumber
|
||||||
|
// appendChild() 方法向节点添加最后一个子节点。
|
||||||
|
document.body.appendChild(newInput)
|
||||||
|
// 选中input元素中的文本
|
||||||
|
// select() 方法用于选择该元素中的文本。
|
||||||
|
newInput.select()
|
||||||
|
// 执行浏览器复制命令
|
||||||
|
// execCommand方法是执行一个对当前文档,当前选择或者给出范围的命令
|
||||||
|
document.execCommand('Copy')
|
||||||
|
// 清空输入框
|
||||||
|
newInput.remove()
|
||||||
|
this.$message.success('复制成功')
|
||||||
|
},
|
||||||
|
handleAdd: function () {
|
||||||
|
this.$refs.modalForm.projectId = this.projectId
|
||||||
|
this.$refs.modalForm.add()
|
||||||
|
this.$refs.modalForm.title = '添加成员'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
handleEdit: function (record) {
|
||||||
|
this.$refs.modalForm.projectId = this.projectId
|
||||||
|
this.$refs.modalForm.edit(record)
|
||||||
|
this.$refs.modalForm.title = '编辑'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 文件预览
|
||||||
|
* @param file
|
||||||
|
*/
|
||||||
|
previewFile(file) {
|
||||||
|
console.log(file)
|
||||||
|
if (file && file.url) {
|
||||||
|
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.fileName }`
|
||||||
|
// let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||||
|
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||||||
|
window.open(url)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 2021 10 11 沟通后去掉了这个功能
|
||||||
|
// searchReset() {
|
||||||
|
// this.lastQueryParam = {
|
||||||
|
// paymentDate: new Date().getFullYear().toString()
|
||||||
|
// }
|
||||||
|
// this.queryParam = {
|
||||||
|
// paymentDate: new Date().getFullYear().toString()
|
||||||
|
// }
|
||||||
|
// this.loadData(1)
|
||||||
|
// },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.ant-divider-horizontal {
|
||||||
|
height: 1px;
|
||||||
|
background-color: #F2F2F2;
|
||||||
|
margin: 15px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.work-group-detail {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
&-item-small {
|
||||||
|
width: 33.3% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
display: flex;
|
||||||
|
padding: 5px 5px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
flex-shrink: 0;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-content {
|
||||||
|
word-break: break-all;
|
||||||
|
color: #2F3133;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-filename {
|
||||||
|
//cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-text {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-col {
|
||||||
|
.ant-col {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-code {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy {
|
||||||
|
font-style: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.signUpInfo {
|
||||||
|
line-height: 3;
|
||||||
|
|
||||||
|
.ant-col {
|
||||||
|
|
||||||
|
label {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title :is-level-one="false" :level-two-title="$route.query.title"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 查询区域-start -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入项目名称" v-model="queryParam.projectName" :maxLength='50'></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery" v-has="'draftingGroup:underStudy:search'">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- 查询区域-end-->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'draftingGroup:underStudy:add'">新增</a-button>
|
||||||
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'draftingGroup:batchDel'">批量删除</a-button>
|
||||||
|
</div>
|
||||||
|
<!-- 操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- table表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:scroll="{x: 1000}"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)" v-has="'draftingGroup:underStudy:edit'">编辑</a>
|
||||||
|
<a @click="handleDelete(record.id)" v-has="'draftingGroup:underStudy:delete'">删除</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<safety-center-under-study-project-modal ref="modalForm" @ok="modalFormOk"></safety-center-under-study-project-modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
||||||
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import { getAction } from '@api/manage'
|
||||||
|
import SafetyCenterUnderStudyProjectModal
|
||||||
|
from '@views/functionalSafetyCenter/modules/SafetyCenterUnderStudyProjectModal'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FunctionalSafetyUnderStudyProject',
|
||||||
|
components: {SafetyCenterUnderStudyProjectModal, PageHeaderTitle },
|
||||||
|
mixins: [JeroListMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '项目名称',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'projectName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '主要起草单位',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'draftCompany',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '项目进度',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'projectSchedule',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
fixed: 'right',
|
||||||
|
dataIndex: 'bankAccountName',
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: {
|
||||||
|
list: '/drafting/payDraftingGroupResearchProject/list',
|
||||||
|
delete: '/drafting/payDraftingGroupResearchProject/delete',
|
||||||
|
deleteBatch: '/drafting/payDraftingGroupResearchProject/deleteBatch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadData(arg) {
|
||||||
|
if (!this.url.list) {
|
||||||
|
this.$message.error('请设置url.list属性!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
|
if (arg === 1) {
|
||||||
|
this.ipagination.current = 1
|
||||||
|
}
|
||||||
|
let params = this.getQueryParams()//查询条件
|
||||||
|
params.projectId = this.$route.query.id
|
||||||
|
this.loading = true
|
||||||
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
|
this.dataSource = res.result.records || res.result
|
||||||
|
if (res.result.total) {
|
||||||
|
this.ipagination.total = res.result.total
|
||||||
|
//清空列表选中
|
||||||
|
this.onClearSelected()
|
||||||
|
} else {
|
||||||
|
this.ipagination.total = 0
|
||||||
|
}
|
||||||
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
|
}
|
||||||
|
if (res.code === 510) {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEdit: function (record) {
|
||||||
|
this.$refs.modalForm.projectId = this.$route.query.id
|
||||||
|
this.$refs.modalForm.edit(record)
|
||||||
|
this.$refs.modalForm.title = '编辑'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
handleAdd: function () {
|
||||||
|
this.$refs.modalForm.projectId = this.$route.query.id
|
||||||
|
this.$refs.modalForm.add()
|
||||||
|
this.$refs.modalForm.title = '新增'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,715 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<!-- 批量添加时显示) -->
|
||||||
|
<template v-if="isBatchAdd && model.projectIdList && model.projectIdList.length > 0">
|
||||||
|
<a-row v-for="(_, index) in model.projectIdList" :key="index + ''">
|
||||||
|
<!-- 对齐其他表单单独设置col样式 -->
|
||||||
|
<a-col :xl="21" :sm="20" class="custom-col">
|
||||||
|
<a-form-item :label="`起草组${index + 1}`" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-select
|
||||||
|
:placeholder="`请选择起草组${index + 1}`"
|
||||||
|
show-search
|
||||||
|
v-decorator="[`projectIdList[${index}]`, {rules: [{ required: index === 0, validator: index === 0 ? validateProjectRequired : validateProject }],validateTrigger: 'change'}]"
|
||||||
|
:maxLength='50'
|
||||||
|
allowClear
|
||||||
|
:filter-option="filterOption"
|
||||||
|
>
|
||||||
|
<a-select-option v-for="item in projectList" :key="item.id" :value="item.id">
|
||||||
|
{{ item.projectName }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="3" :sm="4">
|
||||||
|
<a-button type="link" class="contact-btn" @click="handleAddProject(index)">添加</a-button>
|
||||||
|
<a-button type="link" class="contact-btn del-btn" @click="handleDelProject(index)">删除</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</template>
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="成员单位" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<company-select placeholder="请选择成员单位"
|
||||||
|
v-decorator="['chargeCompany',validatorRules.chargeCompany]"
|
||||||
|
:disabled="disabledCompany"
|
||||||
|
@change="companyChange"
|
||||||
|
:maxLength='50'>
|
||||||
|
</company-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<template
|
||||||
|
v-if="model.payDraftingGroupSubItemContactsList && model.payDraftingGroupSubItemContactsList.length > 0">
|
||||||
|
<a-row v-for="(item, index) in model.payDraftingGroupSubItemContactsList" :key="index + ''">
|
||||||
|
<a-col :xl="12" :sm="24">
|
||||||
|
<a-form-item :label="`企业联系人${index + 1}`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-contacts :selected-company="selectedCompany"
|
||||||
|
:placeholder="`请选择企业联系人${index + 1}`"
|
||||||
|
v-decorator="[`payDraftingGroupSubItemContactsList[${index}].contactsId`, {rules: [{ required: index === 0, validator: index === 0 ? validateContactRequired : validateContact }],validateTrigger: 'change'}]"
|
||||||
|
:maxLength='50'
|
||||||
|
:ref="`selectContacts${index}`"
|
||||||
|
@ok="addContactsOneOk"></select-contacts>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="9" :sm="20">
|
||||||
|
<!-- v-show="hasContactOne"-->
|
||||||
|
<a-form-item :label="`备注${index + 1}`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input
|
||||||
|
:placeholder="`请输入备注${index + 1}`"
|
||||||
|
v-decorator="[`payDraftingGroupSubItemContactsList[${index}].remarks`]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}">
|
||||||
|
</a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="3" :sm="4">
|
||||||
|
<a-button type="link" class="contact-btn" @click="handleAddContact(index)">添加</a-button>
|
||||||
|
<a-button type="link" class="contact-btn del-btn" @click="handleDelContact(index)">删除</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</template>
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-textarea
|
||||||
|
placeholder="请输入备注"
|
||||||
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||||
|
v-decorator="['remarks']"
|
||||||
|
:maxLength='200'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { httpAction } from '@api/manage'
|
||||||
|
import CompanySelect from '@comp/company/CompanySelect'
|
||||||
|
import SelectContacts from '@comp/company/SelectContacts'
|
||||||
|
import {getAllDraftProjects, getWorkingGroupListByNotCompany} from '@api/incomePaymentsApi'
|
||||||
|
// import { isRepeat } from '../../../utils/util'
|
||||||
|
import { addZero } from '@/utils/util'
|
||||||
|
import { money } from '@/utils/validate'
|
||||||
|
import { checkAssociatedProject } from '@/utils/projectCheck'
|
||||||
|
import { CalcAmountMixin } from '@/mixins/CalcAmountMixin'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SafetyCenterMemberUnitModule',
|
||||||
|
components: { CompanySelect, SelectContacts },
|
||||||
|
mixins: [CalcAmountMixin],
|
||||||
|
props: {
|
||||||
|
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
||||||
|
defaultChargeWay: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 收入合同关联时传入的企业信息,不可修改
|
||||||
|
defaultChargeCompany: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 是否可以修改来款企业
|
||||||
|
disabledChargeCompany: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 收入合同新增项目时带入合同号且不可修改
|
||||||
|
defaultContractNum: {
|
||||||
|
type: String,
|
||||||
|
requirde: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 合同号是否可编辑
|
||||||
|
isContractNumDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 企业的签订联系人id,收入合同新增企业联系人、邮寄联系人默认为签订联系人
|
||||||
|
signedContactId: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
|
// 收入合同新增时为1
|
||||||
|
flag: {
|
||||||
|
type: Number,
|
||||||
|
requirded: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 是否批量添加
|
||||||
|
isBatchAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '操作',
|
||||||
|
width: 800,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 8 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 }
|
||||||
|
},
|
||||||
|
remarksLabelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 4 }
|
||||||
|
},
|
||||||
|
remarksWrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 20 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
projectId: {
|
||||||
|
rules: [{ required: true, message: '请选择项目' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
chargeCompany: {
|
||||||
|
rules: [{ required: true, validator: this.checkCompany }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
taxRate: {
|
||||||
|
rules: [{ required: true, message: '请选择税率' }],
|
||||||
|
validateTrigger: 'change', initialValue: '0.06'
|
||||||
|
},
|
||||||
|
contactsIdOne: {
|
||||||
|
rules: [{ required: true, message: '请选择企业联系人1' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
contactsRepeat: {
|
||||||
|
rules: [{ required: false, validator: this.validateContact }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
mailContactsId: {
|
||||||
|
rules: [{ required: true, message: '请选择邮寄联系人' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
chargeWay: {
|
||||||
|
rules: [{ required: true, message: '请选择来款方式' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
receivableAmount: {
|
||||||
|
rules: [{ required: true, validator: this.checkMoney }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
contractNum: {
|
||||||
|
rules: [{ required: true, message: '请选择合同号' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
charge: {
|
||||||
|
rules: [{ required: true, message: '请输入收费通知号' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
needInvoice: {
|
||||||
|
rules: [{ required: true, message: '请选择发票类型' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chargeWayType: null,
|
||||||
|
selectedCompany: null, // 当前选中的企业
|
||||||
|
selectedContact1: null, // 编辑时的联系人
|
||||||
|
selectedContact2: null, // 编辑时的联系人
|
||||||
|
selectedContact3: null, // 编辑时的联系人
|
||||||
|
selectedMailContact: null, // 编辑时的邮寄联系人
|
||||||
|
selectedChargeNotice: null, // 选中的收费通知号
|
||||||
|
projectId: null,
|
||||||
|
projectList: [],
|
||||||
|
disabledCompany: false, // 企业是否禁用
|
||||||
|
isAssociatedContract: false, // 是否关联合同
|
||||||
|
// hasContactOne: false, // 是否选择联系人1
|
||||||
|
// hasContactTwo: false, // 是否选择联系人2
|
||||||
|
// hasContactThree: false, // 是否选择联系人3
|
||||||
|
url: {
|
||||||
|
add: '/drafting/payDraftingGroupSubitem/add',
|
||||||
|
edit: '/drafting/payDraftingGroupSubitem/edit',
|
||||||
|
batchAdd: '/drafting/payDraftingGroupSubitem/batchAdd'
|
||||||
|
},
|
||||||
|
// 默认的联系人数据
|
||||||
|
defaultPayWorkingGroupSubItemContact: {
|
||||||
|
contactsId: undefined,
|
||||||
|
remarks: null,
|
||||||
|
name: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addZero,
|
||||||
|
add() {
|
||||||
|
const obj = {}
|
||||||
|
// 判断是否批量添加(工作组管理-批量新增成员单位)
|
||||||
|
if (this.isBatchAdd) {
|
||||||
|
// 获取当前年的工作组列表
|
||||||
|
this.loadCurrentYearProjectList()
|
||||||
|
// 默认一个项目
|
||||||
|
obj.projectIdList = [undefined]
|
||||||
|
}
|
||||||
|
this.edit(obj)
|
||||||
|
// 判断默认来款用途是否为合同(收入合同新增)
|
||||||
|
if (this.defaultChargeWay) {
|
||||||
|
this.loadWorkingGroupList()
|
||||||
|
this.chargeWayType = 2
|
||||||
|
}
|
||||||
|
// 判断是否存在默认合同号(收入合同新增)
|
||||||
|
if (this.defaultContractNum && this.defaultContractNum !== '') {
|
||||||
|
this.model.contractNum = this.defaultContractNum
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'contractNum'))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取当前年起草组列表
|
||||||
|
*/
|
||||||
|
loadCurrentYearProjectList() {
|
||||||
|
getAllDraftProjects({
|
||||||
|
year: new Date().getFullYear(),
|
||||||
|
column: 'createTime',
|
||||||
|
order: 'desc'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectList = res.result
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取工作组列表
|
||||||
|
*/
|
||||||
|
loadWorkingGroupList() {
|
||||||
|
let param = {
|
||||||
|
companyId: this.defaultChargeCompany.id
|
||||||
|
}
|
||||||
|
getWorkingGroupListByNotCompany(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.workingGroupList = res.result
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
// 存在默认选中企业时显示默认企业
|
||||||
|
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
||||||
|
record.chargeCompany = {
|
||||||
|
id: this.defaultChargeCompany.id,
|
||||||
|
companyName: this.defaultChargeCompany.companyName
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
record.chargeCompany = {
|
||||||
|
id: record.chargeCompanyId,
|
||||||
|
companyName: record.chargeCompanyTemporaryName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 验证项目是否关联收入合同,项目来款、开票、邮寄、打包、关联合同后,企业不可更改
|
||||||
|
if (record.id) {
|
||||||
|
checkAssociatedProject(record.id).then(res => {
|
||||||
|
this.disabledCompany = this.disabledChargeCompany || res || (!!record.inAccount && record.inAccount !== 0) || (!!record.makeInvoice && record.makeInvoice !== 0) || (!!record.mail && record.mail !== 0)
|
||||||
|
this.isAssociatedContract = res
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.disabledCompany = this.disabledChargeCompany
|
||||||
|
}
|
||||||
|
// 回显选中的企业
|
||||||
|
this.selectedCompany = record.chargeCompany
|
||||||
|
this.companyChange(this.selectedCompany)
|
||||||
|
this.form.resetFields()
|
||||||
|
record.contractNum = record.contractNum || undefined
|
||||||
|
this.model = Object.assign({}, JSON.parse(JSON.stringify(record)))
|
||||||
|
// 是否存在从收入合同传入的签订联系人id
|
||||||
|
this.model.contactsIdOne = this.signedContactId || this.model.contactsTemporaryIdOne || undefined
|
||||||
|
this.model.contactsIdTwo = this.model.contactsTemporaryIdTwo || undefined
|
||||||
|
this.model.contactsIdThree = this.model.contactsTemporaryIdThree || undefined
|
||||||
|
// 是否存在从收入合同传入的签订联系人id
|
||||||
|
// this.model.mailContactsId = this.signedContactId || this.model.mailContactsTemporaryId || undefined
|
||||||
|
if (this.model.id) {
|
||||||
|
// 传给组件的init-contact值,需要id和name两个属性
|
||||||
|
this.model.payDraftingGroupSubItemContactsList && this.model.payDraftingGroupSubItemContactsList.forEach(item => {
|
||||||
|
item.name = item.contactsTemporaryName
|
||||||
|
})
|
||||||
|
// this.selectedContact1 = {
|
||||||
|
// id: this.model.contactsTemporaryIdOne,
|
||||||
|
// name: this.model.contactsTemporaryNameOne
|
||||||
|
// }
|
||||||
|
// this.selectedContact2 = {
|
||||||
|
// id: this.model.contactsTemporaryIdTwo,
|
||||||
|
// name: this.model.contactsTemporaryNameTwo
|
||||||
|
// }
|
||||||
|
// this.selectedContact3 = {
|
||||||
|
// id: this.model.contactsTemporaryIdThree,
|
||||||
|
// name: this.model.contactsTemporaryNameThree
|
||||||
|
// }
|
||||||
|
this.selectedMailContact = {
|
||||||
|
id: this.model.mailContactsTemporaryId,
|
||||||
|
name: this.model.mailContactsTemporaryName
|
||||||
|
}
|
||||||
|
// // 是否需要显示联系人备注信息
|
||||||
|
// if (this.model.contactsTemporaryIdOne) {
|
||||||
|
// this.hasContactOne = true
|
||||||
|
// }
|
||||||
|
// if (this.model.contactsTemporaryIdTwo) {
|
||||||
|
// this.hasContactTwo = true
|
||||||
|
// }
|
||||||
|
// if (this.model.contactsTemporaryIdThree) {
|
||||||
|
// this.hasContactThree = true
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
// 新增处理默认显示的三个企业联系人
|
||||||
|
this.model.payDraftingGroupSubItemContactsList = []
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
}
|
||||||
|
this.chargeWayType = record.chargeWay
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'chargeCompany', 'contactsIdOne', 'contactsIdTwo', 'contactsIdThree', 'remarks', 'remarksOne', 'remarksTwo', 'remarksThree', 'payDraftingGroupSubItemContactsList'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.chargeWayType = null
|
||||||
|
this.selectedCompany = null
|
||||||
|
// 清除选中联系人信息
|
||||||
|
this.selectedContact1 = null
|
||||||
|
this.selectedContact2 = null
|
||||||
|
this.selectedContact3 = null
|
||||||
|
this.selectedMailContact = null
|
||||||
|
// 清除企业、来款方式、合同号的限制
|
||||||
|
this.isAssociatedContract = false
|
||||||
|
this.disabledCompany = false
|
||||||
|
// 清除联系人备注信息
|
||||||
|
// this.hasContactOne = false
|
||||||
|
// this.hasContactTwo = false
|
||||||
|
// this.hasContactThree = false
|
||||||
|
this.visible = false
|
||||||
|
this.model = Object.assign({}, {})
|
||||||
|
this.form.resetFields()
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
if (this.confirmLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.confirmLoading = true
|
||||||
|
const that = this
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
that.confirmLoading = true
|
||||||
|
// 收入合同新建项目手动赋值
|
||||||
|
if (this.defaultChargeWay === 2) {
|
||||||
|
values.chargeWay = 2
|
||||||
|
}
|
||||||
|
if (this.flag === 1) {
|
||||||
|
values.flag = this.flag
|
||||||
|
}
|
||||||
|
values.chargeCompanyTemporaryName = values.chargeCompany.companyName
|
||||||
|
values.chargeCompanyId = values.chargeCompany.id
|
||||||
|
let httpurl = ''
|
||||||
|
let method = 'post'
|
||||||
|
if (!this.model.id) {
|
||||||
|
// 如果是批量添加,调用批量添加的接口
|
||||||
|
httpurl += this.isBatchAdd ? this.url.batchAdd : this.url.add
|
||||||
|
// 通过添加成员来的,默认状态为通过
|
||||||
|
values.checkResult = 2
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit
|
||||||
|
}
|
||||||
|
// 批量添加
|
||||||
|
if (Array.isArray(values.projectIdList)) {
|
||||||
|
// 过滤空
|
||||||
|
values.projectIdList = values.projectIdList.filter(item => !!item)
|
||||||
|
values.projectIds = values.projectIdList.join(',')
|
||||||
|
}
|
||||||
|
if (this.projectId) {
|
||||||
|
values.projectId = this.projectId
|
||||||
|
}
|
||||||
|
// 企业联系人信息中将没有值的去掉
|
||||||
|
let haveValueContactArr = values.payDraftingGroupSubItemContactsList.filter(tt => tt.contactsId)
|
||||||
|
let obj = {
|
||||||
|
payDraftingGroupSubItemContactsList: haveValueContactArr
|
||||||
|
}
|
||||||
|
const formData = Object.assign(this.model, values, obj)
|
||||||
|
console.log('表单提交数据', formData)
|
||||||
|
httpAction(httpurl, formData, method).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.$emit('ok')
|
||||||
|
that.close()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选中企业变化,将联系人的值清空
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
companyChange(value) {
|
||||||
|
// 当前选中的企业和之前选中的企业一致,就不修改了
|
||||||
|
if (this.selectedCompany && value && this.selectedCompany.id === value.id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.selectedCompany = value
|
||||||
|
// this.model.contactsIdOne = undefined
|
||||||
|
// this.model.contactsIdTwo = undefined
|
||||||
|
// this.model.contactsIdThree = undefined
|
||||||
|
// 处理默认显示的三个企业联系人
|
||||||
|
this.model.payDraftingGroupSubItemContactsList = []
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.push(this.defaultPayWorkingGroupSubItemContact)
|
||||||
|
// this.model.mailContactsId = undefined
|
||||||
|
this.selectedMailContact = null
|
||||||
|
this.model.contractNum = undefined
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'contractNum', 'payDraftingGroupSubItemContactsList'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 企业必填校验
|
||||||
|
* @param rules
|
||||||
|
* @param value
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
checkCompany(rules, value, callback) {
|
||||||
|
if (value.id && value.companyName) {
|
||||||
|
callback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
callback('请选择成员单位')
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 校验金额格式
|
||||||
|
* @param rules
|
||||||
|
* @param value
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
checkMoney(rules, value, callback) {
|
||||||
|
if (value) {
|
||||||
|
if (money(value)) {
|
||||||
|
callback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||||
|
}
|
||||||
|
callback('请输入待确收金额')
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 在新增成功后重新获取联系人列表
|
||||||
|
*/
|
||||||
|
addContactsOneOk() {
|
||||||
|
this.$refs.selectMailContacts.getContactsList()
|
||||||
|
},
|
||||||
|
addMailContactsOk() {
|
||||||
|
this.$refs.selectContacts1.getContactsList()
|
||||||
|
this.$refs.selectContacts2.getContactsList()
|
||||||
|
this.$refs.selectContacts3.getContactsList()
|
||||||
|
},
|
||||||
|
validateContactRequired(rule, value, callback) {
|
||||||
|
if (value) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
callback('请选择企业联系人1')
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 校验企业联系人是否重复
|
||||||
|
* @param rule
|
||||||
|
* @param value
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
validateContact(rule, value, callback) {
|
||||||
|
if (value) {
|
||||||
|
let contactsList = this.form.getFieldValue('payDraftingGroupSubItemContactsList')
|
||||||
|
let hasValueArr = contactsList.filter(tt => tt.contactsId === value)
|
||||||
|
if (hasValueArr.length <= 1) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
callback('请选择不同的联系人')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
},
|
||||||
|
validateProjectRequired(rule, value, callback) {
|
||||||
|
if (value) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
callback('请选择起草组1')
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 校验工作组是否重复
|
||||||
|
* @param rule
|
||||||
|
* @param value
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
validateProject(rule, value, callback) {
|
||||||
|
if (value) {
|
||||||
|
let projectIdList = this.form.getFieldValue('projectIdList')
|
||||||
|
let hasValueArr = projectIdList.filter(id => id === value)
|
||||||
|
if (hasValueArr.length <= 1) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
callback('请选择不同的起草组')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 添加起草组
|
||||||
|
* @param index
|
||||||
|
*/
|
||||||
|
handleAddProject (index) {
|
||||||
|
this.model.projectIdList.splice(index + 1, 0, undefined)
|
||||||
|
this.$forceUpdate()
|
||||||
|
let formData = this.form.getFieldValue('projectIdList')
|
||||||
|
formData.splice(index + 1, 0, undefined)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({ projectIdList: formData })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 删除起草组
|
||||||
|
* @param index
|
||||||
|
*/
|
||||||
|
handleDelProject (index) {
|
||||||
|
if (this.model.projectIdList.length === 1) {
|
||||||
|
this.$message.warn('最少需要一个起草组')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.model.projectIdList.splice(index, 1)
|
||||||
|
let formData = this.form.getFieldValue('projectIdList')
|
||||||
|
formData.splice(index, 1)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({ projectIdList: formData })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 添加联系人
|
||||||
|
* @param index
|
||||||
|
*/
|
||||||
|
handleAddContact(index) {
|
||||||
|
if (this.model.payDraftingGroupSubItemContactsList.length >= 10) {
|
||||||
|
this.$message.warn('最多添加十个企业联系人')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let obj = {
|
||||||
|
contactsId: undefined,
|
||||||
|
remarks: null
|
||||||
|
}
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.splice(index + 1, 0, obj)
|
||||||
|
this.$forceUpdate()
|
||||||
|
let formData = this.form.getFieldValue('payDraftingGroupSubItemContactsList')
|
||||||
|
formData.splice(index + 1, 0, obj)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({ payDraftingGroupSubItemContactsList: formData })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 删除联系人
|
||||||
|
* @param index
|
||||||
|
*/
|
||||||
|
handleDelContact(index) {
|
||||||
|
if (this.model.payDraftingGroupSubItemContactsList.length === 1) {
|
||||||
|
this.$message.warn('最少需要一个企业联系人')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.model.payDraftingGroupSubItemContactsList.splice(index, 1)
|
||||||
|
let formData = this.form.getFieldValue('payDraftingGroupSubItemContactsList')
|
||||||
|
formData.splice(index, 1)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({ payDraftingGroupSubItemContactsList: formData })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 下拉框的搜索
|
||||||
|
filterOption(input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.charge-notice-no {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
/deep/ .ant-radio-wrapper {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
span.ant-radio + * {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
span {
|
||||||
|
vertical-align: bottom;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 8px;
|
||||||
|
padding: 0;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.del-btn {
|
||||||
|
color: #ff4d4f
|
||||||
|
}
|
||||||
|
// 工作组选择对齐其他表单的样式
|
||||||
|
.custom-col {
|
||||||
|
/deep/ .ant-col-sm-4 {
|
||||||
|
width: calc(100% / 24 * 4.5);
|
||||||
|
}
|
||||||
|
/deep/ .ant-col-sm-20 {
|
||||||
|
width: calc(100% / 24 * 19.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="项目名称" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-input placeholder="请输入项目名称"
|
||||||
|
v-decorator="['projectName',validatorRules.projectName]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-principal placeholder="请选择负责人"
|
||||||
|
v-decorator="['principalId',validatorRules.principalId]"
|
||||||
|
:maxLength='50'></select-principal>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="任务及目标" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-textarea
|
||||||
|
placeholder="请输入任务及目标"
|
||||||
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||||
|
v-decorator="['missionAndObjectives']"
|
||||||
|
:maxLength='200'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-textarea
|
||||||
|
placeholder="请输入备注"
|
||||||
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||||
|
v-decorator="['remarks']"
|
||||||
|
:maxLength='200'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { httpAction } from '@api/manage'
|
||||||
|
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||||
|
import { addZero } from '@/utils/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SafetyCenterModule',
|
||||||
|
components: { SelectPrincipal },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '操作',
|
||||||
|
width: 800,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 6 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 18 }
|
||||||
|
},
|
||||||
|
remarksLabelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 3 }
|
||||||
|
},
|
||||||
|
remarksWrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 21 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
projectName: {
|
||||||
|
rules: [{ required: true, message: '请输入项目名称' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
year: {
|
||||||
|
rules: [{ required: true, message: '请选择运行年份' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
principalId: {
|
||||||
|
rules: [{ required: true, validator: '请选择负责人' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
checkMoney: {
|
||||||
|
rules: [{ required: false, validator: this.checkMoney }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '/FunctionalSafetyCenter/add',
|
||||||
|
edit: '/FunctionalSafetyCenter/edit'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addZero,
|
||||||
|
add() {
|
||||||
|
this.edit({})
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.form.resetFields()
|
||||||
|
// 防止下拉选项出现问题
|
||||||
|
record.principalId = record.principalId || undefined
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model,
|
||||||
|
'projectName',
|
||||||
|
'principalId',
|
||||||
|
'missionAndObjectives',
|
||||||
|
'remarks'
|
||||||
|
))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
if (this.confirmLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.confirmLoading = true
|
||||||
|
const that = this
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
that.confirmLoading = true
|
||||||
|
let httpurl = ''
|
||||||
|
let method = 'post'
|
||||||
|
if (!this.model.id) {
|
||||||
|
httpurl += this.url.add
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit
|
||||||
|
}
|
||||||
|
values.yearChargeA = values.yearChargeA ? Number(values.yearChargeA) : null
|
||||||
|
values.chargeA = values.chargeNoticeNoA ? 'a' : null
|
||||||
|
const formData = Object.assign(this.model, values)
|
||||||
|
console.log('表单提交数据', formData)
|
||||||
|
httpAction(httpurl, formData, method).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.$emit('ok')
|
||||||
|
that.close()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 下拉框的搜索
|
||||||
|
filterOption(input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
)
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.prompt-message {
|
||||||
|
color: red;
|
||||||
|
|
||||||
|
&-line2 {
|
||||||
|
padding-left: 2.7rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="项目名称" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<a-input placeholder="请输入项目名称"
|
||||||
|
v-decorator="['projectName',validatorRules.projectName]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col :xl="12" :sm="24">
|
||||||
|
<a-form-item label="主要起草单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入主要起草单位"
|
||||||
|
v-decorator="['draftCompany', validatorRules.draftCompany]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="12" :sm="24">
|
||||||
|
<a-form-item label="项目进度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入项目进度"
|
||||||
|
v-decorator="['projectSchedule', validatorRules.projectSchedule]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col >
|
||||||
|
<!-- :xl="12" :sm="24"-->
|
||||||
|
<a-form-item label="过程文件" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
|
<j-upload file-type="all"
|
||||||
|
file-type-error-message="请上传过程文件"
|
||||||
|
:multiple="true"
|
||||||
|
:number="20"
|
||||||
|
:return-id="true"
|
||||||
|
v-decorator="['files', validatorRules.files]"
|
||||||
|
:trigger-change="true"></j-upload>
|
||||||
|
<div class="tip">最多只能添加20个文件,如果文件过多,请打包上传</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { postAction } from '@api/manage'
|
||||||
|
import JUpload from '../../../components/jero/JUpload'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SafetyCenterUnderStudyProjectModal',
|
||||||
|
components: { JUpload },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '操作',
|
||||||
|
width: 800,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
// 起草组id
|
||||||
|
projectId: '',
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 8 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 }
|
||||||
|
},
|
||||||
|
remarksLabelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 4 }
|
||||||
|
},
|
||||||
|
remarksWrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 20 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
projectName: {
|
||||||
|
rules: [{ required: true, message: '请输入项目名称' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
draftCompany: {
|
||||||
|
rules: [{ required: true, message: '请输入主要起草单位' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
projectSchedule: {
|
||||||
|
rules: [{ required: true, message: '请输入项目进度' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
rules: [{ required: true, message: '请上传过程文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '/drafting/payDraftingGroupResearchProject/add',
|
||||||
|
edit: '/drafting/payDraftingGroupResearchProject/edit'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add() {
|
||||||
|
this.edit({})
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.form.resetFields()
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'projectName', 'draftCompany', 'projectSchedule', 'files'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
if (this.confirmLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.confirmLoading = true
|
||||||
|
const that = this
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
let httpurl = ''
|
||||||
|
if (!this.model.id) {
|
||||||
|
httpurl += this.url.add
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit
|
||||||
|
}
|
||||||
|
values.projectId = this.projectId
|
||||||
|
const formData = Object.assign(this.model, values)
|
||||||
|
console.log('表单提交数据', formData)
|
||||||
|
postAction(httpurl, formData).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.$emit('ok')
|
||||||
|
that.close()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tip{
|
||||||
|
color: #f5222d;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -630,7 +630,7 @@ import JImageUpload from '@comp/jero/JImageUpload'
|
|||||||
import {checkMeetingName} from '@/utils/validateOnly'
|
import {checkMeetingName} from '@/utils/validateOnly'
|
||||||
import {addZero} from '@/utils/util'
|
import {addZero} from '@/utils/util'
|
||||||
import {money, phoneReg} from '@/utils/validate'
|
import {money, phoneReg} from '@/utils/validate'
|
||||||
import { LinkTopicsEnums } from '../../../enums/commonEnums'
|
import {LinkTopicsEnums, MeetTypeEnums} from '../../../enums/commonEnums'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -802,6 +802,14 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 是否应用安全中心来的
|
||||||
|
isSafetyCenterId() {
|
||||||
|
if (this.$route.query.safetyCenterId) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -922,8 +930,8 @@ export default {
|
|||||||
// 后端需要的注册签到时间
|
// 后端需要的注册签到时间
|
||||||
this.newSignInTime = [this.model.startSignInTime, this.model.endSignInTime]
|
this.newSignInTime = [this.model.startSignInTime, this.model.endSignInTime]
|
||||||
|
|
||||||
// 起草组会议费用默认0
|
// 起草组会议费用默认0 (功能安全中心同起草组)
|
||||||
if (this.meetingType === '7') {
|
if (this.meetingType === '7' || this.meetingType === MeetTypeEnums.safetyCenter.value) {
|
||||||
this.model.meetingCosts = '0.00'
|
this.model.meetingCosts = '0.00'
|
||||||
this.QRcodeBool = false
|
this.QRcodeBool = false
|
||||||
}
|
}
|
||||||
@@ -1039,6 +1047,11 @@ export default {
|
|||||||
formData.meetingType = '7'
|
formData.meetingType = '7'
|
||||||
formData.draftingGroupId = this.$route.query.draftingGroupProjectId
|
formData.draftingGroupId = this.$route.query.draftingGroupProjectId
|
||||||
}
|
}
|
||||||
|
// 如果是 应用安全中心 来的加上id和会议类型
|
||||||
|
if (this.isSafetyCenterId) {
|
||||||
|
formData.meetingType = MeetTypeEnums.safetyCenter.value
|
||||||
|
formData.projectId = this.$route.query.safetyCenterId
|
||||||
|
}
|
||||||
// 转换召开时间
|
// 转换召开时间
|
||||||
formData.startTime = this.newConvokeTime[0]
|
formData.startTime = this.newConvokeTime[0]
|
||||||
formData.endTime = this.newConvokeTime[1]
|
formData.endTime = this.newConvokeTime[1]
|
||||||
|
|||||||
@@ -184,6 +184,11 @@ export default {
|
|||||||
this.canOperate = this.$route.query.canOperate === 'true'
|
this.canOperate = this.$route.query.canOperate === 'true'
|
||||||
this.projectType = 4
|
this.projectType = 4
|
||||||
this.filters.projectType = 4
|
this.filters.projectType = 4
|
||||||
|
} else if (this.$route.query.hasOwnProperty.call(this.$route.query, 'safetyCenterId')) {
|
||||||
|
// 功能安全中心
|
||||||
|
this.filters.projectId = this.$route.query.safetyCenterId
|
||||||
|
this.projectType = 5
|
||||||
|
this.filters.projectType = 5
|
||||||
}
|
}
|
||||||
this.projectId = this.filters.projectId
|
this.projectId = this.filters.projectId
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
|||||||
Reference in New Issue
Block a user