147 lines
4.0 KiB
Vue
147 lines
4.0 KiB
Vue
<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> |