[update] 收入合同项目关联接口联调;支出合同页面
This commit is contained in:
@@ -62,36 +62,50 @@
|
||||
<!-- 表格区域-->
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
<template slot="htmlSlot" slot-scope="text">
|
||||
<div v-html="text"></div>
|
||||
</template>
|
||||
<template slot="imgSlot" slot-scope="text">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" height="25px" alt=""
|
||||
style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
</template>
|
||||
<template slot="fileSlot" slot-scope="text,record">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||
:value="text" :length="20"/>
|
||||
</template>
|
||||
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="30"></j-ellipsis>
|
||||
<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="rateOfProgress" slot-scope="text">
|
||||
<progress-bar :data="text"></progress-bar>
|
||||
</template>
|
||||
|
||||
<template slot="status-pack" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- /表格区域-->
|
||||
<!-- 普通项目新增-->
|
||||
<general-project-module ref="generalProjectForm"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
@ok="modalFormOk"></general-project-module>
|
||||
<!-- 工作组项目新增-->
|
||||
<working-group-member-unit-module ref="workingGroupMemberForm"
|
||||
@ok="modalFormOk"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
:default-charge-way="2"></working-group-member-unit-module>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -99,10 +113,15 @@
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import GeneralProjectModule from '../../../projectManagement/modules/GeneralProjectModule'
|
||||
import StatusSlot from '../../../../components/tools/StatusSlot'
|
||||
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
||||
import WorkingGroupMemberUnitModule from '../../../projectManagement/modules/WorkingGroupMemberUnitModule'
|
||||
import ProgressBar from '../../../../components/ProgressBar'
|
||||
|
||||
export default {
|
||||
name: 'SelectProjectModule',
|
||||
components: { SelectPrincipal, JYearDate },
|
||||
components: { SelectPrincipal, JYearDate, GeneralProjectModule, StatusSlot, WorkingGroupMemberUnitModule, ProgressBar },
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
@@ -119,7 +138,9 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
projectType: null,
|
||||
projectType: null, // 项目类型,1--普通项目;2--工作组项目;3--会议项目;4--会员项目
|
||||
disableMixinCreated: true,
|
||||
contractId: '', // 收入合同id
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
@@ -127,20 +148,56 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.loadData()
|
||||
this.visible = true
|
||||
console.log(this.columns)
|
||||
},
|
||||
close() {
|
||||
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()
|
||||
},
|
||||
/**
|
||||
* 打开不同类型项目的新增module
|
||||
*/
|
||||
handleAdd() {
|
||||
|
||||
switch (this.projectType) {
|
||||
case 1:
|
||||
this.$refs.generalProjectForm.add()
|
||||
this.$refs.generalProjectForm.title = '新增'
|
||||
this.$refs.generalProjectForm.disableSubmit = false
|
||||
break
|
||||
case 2:
|
||||
this.$refs.workingGroupMemberForm.add()
|
||||
this.$refs.workingGroupMemberForm.title = '新增'
|
||||
this.$refs.workingGroupMemberForm.disableSubmit = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user