[update] 收入合同关联项目组件拆分,普通项目管理module验证

This commit is contained in:
zhaoxiao
2021-09-07 19:27:14 +08:00
parent f8960e04d4
commit 8fa4563855
7 changed files with 412 additions and 39 deletions
@@ -0,0 +1,147 @@
<template>
<j-modal :title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<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.workingGroupProject"></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-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">查询</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域-->
<div class="table-operator">
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
</div>
<!-- 操作按钮区域-end-->
<!-- 表格区域-->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:scroll="{x: 800}"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
: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>
<!-- 打包需要发票到账开票邮寄状态-->
<template slot="status" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template>
<template slot="status-pack" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text"></status-slot>
</template>
</a-table>
</div>
<!-- /表格区域-->
</j-modal>
</template>
<script>
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
import { associatedProject } from '../../../../api/incomePaymentsApi'
export default {
name: 'SelectMeetingProjectModule',
mixins: [JeroListMixin],
data() {
return {
title: '会议项目列表',
width: 1200,
visible: false,
confirmLoading: false,
columns: [],
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 10 }
},
url: {
list: ''
},
disableMixinCreated: true,
contractId: '', // 收入合同id
}
},
methods: {
open() {
this.loadData()
this.visible = true
},
close() {
this.queryParam = {}
this.visible = false
},
handleOk() {
if (this.selectedRowKeys.length <= 0) {
this.$message.warn('请选择项目后再提交关联')
return
}
let submitData = []
let projectItem
this.selectedRowKeys.forEach(item => {
projectItem = {
contractId: this.contractId,
projectId: item,
projectType: this.projectType
}
submitData.push(projectItem)
})
associatedProject(submitData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.close()
this.$emit('ok')
} else {
this.$message.warn(res.message)
}
})
},
handleCancel() {
this.close()
}
}
}
</script>
<style scoped>
</style>