[update] 收入合同关联普通、工作组项目组件拆分;支出合同税率修改
This commit is contained in:
+45
-10
@@ -73,10 +73,15 @@
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入税率"
|
||||
v-decorator="['rate',validatorRules.rate]"
|
||||
:maxLength='50'
|
||||
@change="rateChange"></a-input>
|
||||
<a-row>
|
||||
<a-col :span="20">
|
||||
<a-input placeholder="请输入税率"
|
||||
v-decorator="['rate',validatorRules.rate]"
|
||||
:maxLength='50'
|
||||
@change="rateChange"></a-input>
|
||||
</a-col>
|
||||
<a-col :span="1">%</a-col>
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
@@ -240,6 +245,7 @@ import { duplicateCheck, getAllUserList } from '../../../../api/api'
|
||||
import { postAction } from '../../../../api/manage'
|
||||
import JDate from '../../../../components/tools/JDate'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import { money } from '../../../../utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractModule',
|
||||
@@ -288,7 +294,7 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractAmount: {
|
||||
rules: [{ required: true, message: '请输入签订合同总金额' }],
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
rate: {
|
||||
@@ -296,11 +302,11 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
accountsReceivableAmount: {
|
||||
rules: [{ required: true, message: '请输入应收金额' }],
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
amountReceived: {
|
||||
rules: [{ required: true, message: '请输入已收金额' }],
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
pack: {
|
||||
@@ -499,7 +505,7 @@ export default {
|
||||
*/
|
||||
rateChange(e) {
|
||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||
this.rateNum = e.target.value
|
||||
this.rateNum = Number(e.target.value) / 100
|
||||
this.calculateNoTaxAmount()
|
||||
},
|
||||
/**
|
||||
@@ -507,7 +513,10 @@ export default {
|
||||
*/
|
||||
calculateNoTaxAmount() {
|
||||
if (this.rateNum !== null && this.contractAmountNum !== null) {
|
||||
this.model.noTaxAmount = Number(this.contractAmountNum) / (1 + Number(this.rateNum))
|
||||
let noTaxAmount = Number(this.contractAmountNum) / (1 + this.rateNum)
|
||||
// 取小数点两位
|
||||
noTaxAmount = noTaxAmount.toFixed(2)
|
||||
this.model.noTaxAmount = Number(noTaxAmount)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'noTaxAmount'))
|
||||
})
|
||||
@@ -558,7 +567,33 @@ export default {
|
||||
} else {
|
||||
this.isPackage = false
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 校验金额格式
|
||||
* @param rules
|
||||
* @param value
|
||||
* @param callback
|
||||
*/
|
||||
checkMoney(rules, value, callback) {
|
||||
if (value) {
|
||||
if (money(value)) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
callback('请输入正确格式的金额')
|
||||
}
|
||||
switch (rules.field) {
|
||||
case 'contractAmount':
|
||||
callback('请输入签订合同总金额')
|
||||
break
|
||||
case 'accountsReceivableAmount':
|
||||
callback('请输入应收金额')
|
||||
break
|
||||
case 'amountReceived':
|
||||
callback('请输入已收金额')
|
||||
break
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -252,11 +252,23 @@
|
||||
|
||||
<!-- 项目类型选择-->
|
||||
<project-type-selection ref="projectTypeSelection" @ok="selectProjectTypeOk"></project-type-selection>
|
||||
<!-- 项目选择-->
|
||||
<!-- 普通项目选择-->
|
||||
<select-project-module ref="selectProjectModule"
|
||||
@ok="selectProjectOk"
|
||||
:depart-id="departId"
|
||||
:pack="model.pack"
|
||||
:contract-id="model.id"
|
||||
:project-type="projectType"
|
||||
:default-contract-num="contractNum"
|
||||
:default-charge-company="selectedCompany"></select-project-module>
|
||||
<!-- 工作组项目选择-->
|
||||
<select-working-group-project-module ref="selectWorkingGroupProjectModule"
|
||||
@ok="selectProjectOk"
|
||||
:default-contract-num="contractNum"
|
||||
:pack="model.pack"
|
||||
:contract-id="model.id"
|
||||
:project-type="projectType"
|
||||
:default-charge-company="selectedCompany"></select-working-group-project-module>
|
||||
<!-- 会议项目选择-->
|
||||
<select-meeting-project-module ref="selectMeetingProjectModule"
|
||||
@ok="selectProjectOk"></select-meeting-project-module>
|
||||
@@ -287,118 +299,7 @@ import AssociatedProject from './AssociatedProject'
|
||||
import SelectMeetingProjectModule from './SelectMeetingProjectModule'
|
||||
import SelectMemberProjectModule from './SelectMemberProjectModule'
|
||||
import { money } from '../../../../utils/validate'
|
||||
|
||||
// 普通项目表头
|
||||
const generalProjectColumns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '来款项目',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'chargeProject',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'chargeUse_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '来款单位',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'chargeCompanyTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'receivableAmount'
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'paidAmount'
|
||||
}, {
|
||||
title: '负责人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'principalName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '打包',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'pack',
|
||||
scopedSlots: { customRender: 'status-pack' }
|
||||
}, {
|
||||
title: '需要发票',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'needInvoice',
|
||||
scopedSlots: { customRender: 'status-pack' }
|
||||
}, {
|
||||
title: '到账',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'inAccount',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}, {
|
||||
title: '开票',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'makeInvoice',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}, {
|
||||
title: '邮寄',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}
|
||||
]
|
||||
// 工作组项目表头
|
||||
const workingProjectColumns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '工作组项目',
|
||||
align: 'center',
|
||||
dataIndex: 'workingGroupProject',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '负责人A',
|
||||
align: 'center',
|
||||
dataIndex: 'principalNameA'
|
||||
}, {
|
||||
title: '进度',
|
||||
align: 'center',
|
||||
dataIndex: 'obj',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'rateOfProgress' }
|
||||
}
|
||||
]
|
||||
import SelectWorkingGroupProjectModule from './SelectWorkingGroupProjectModule'
|
||||
|
||||
export default {
|
||||
name: 'RevenueContractModule',
|
||||
@@ -414,7 +315,8 @@ export default {
|
||||
SelectProjectModule,
|
||||
AssociatedProject,
|
||||
SelectMeetingProjectModule,
|
||||
SelectMemberProjectModule
|
||||
SelectMemberProjectModule,
|
||||
SelectWorkingGroupProjectModule
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -477,8 +379,6 @@ export default {
|
||||
url: {
|
||||
add: '/contract/payIncomeContract/add',
|
||||
edit: '/contract/payIncomeContract/edit',
|
||||
generalProjectList: '/project/payCommonProject/listAll', // 普通项目
|
||||
workingGroupProjectList: '/project/payWorkingGroup/queryListByCompany', // 工作组项目
|
||||
meetingProjectList: '',
|
||||
memberProjectList: ''
|
||||
},
|
||||
@@ -494,7 +394,9 @@ export default {
|
||||
associatedProjectLoading: false,
|
||||
contractId: '', // 收入合同id
|
||||
contractNum: '', // 合同号
|
||||
isCancel: false //是否取消
|
||||
isCancel: false, // 是否取消
|
||||
departId: null, // 部门id普通项目列表查询
|
||||
projectType: null //项目类型
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -810,48 +712,30 @@ export default {
|
||||
* @param type
|
||||
*/
|
||||
selectProjectTypeOk(type) {
|
||||
this.projectType = type
|
||||
switch (type) {
|
||||
// 普通项目
|
||||
case 1:
|
||||
this.$refs.selectProjectModule.columns = generalProjectColumns
|
||||
this.getUserDetailByUserId().then(res => {
|
||||
console.log(this.model.pack)
|
||||
this.departId = res
|
||||
// 混入筛选条件
|
||||
this.$refs.selectProjectModule.filters = {
|
||||
chargeCompanyId: this.selectedCompany.id,
|
||||
contractId: this.contractId,
|
||||
departId: res.split(',')[0] // 一个用户多部门情况下传给后端第一个部门id
|
||||
departId: this.departId // 一个用户多部门情况下传给后端第一个部门id
|
||||
}
|
||||
// 查询条件回显
|
||||
this.$refs.selectProjectModule.queryParam.departId = res.split(',')
|
||||
// 获取数据list
|
||||
this.$refs.selectProjectModule.url.list = this.url.generalProjectList
|
||||
// 打包状态
|
||||
this.$refs.selectProjectModule.pack = this.model.pack
|
||||
// 合同id
|
||||
this.$refs.selectProjectModule.contractId = this.model.id
|
||||
// 项目类型
|
||||
this.$refs.selectProjectModule.projectType = type
|
||||
// 标题
|
||||
this.$refs.selectProjectModule.title = '普通项目列表'
|
||||
// 获取负责人列表
|
||||
this.$refs.selectProjectModule.departChange(res.split(',')[0])
|
||||
this.$refs.selectProjectModule.departChange(this.departId)
|
||||
// 打开弹窗
|
||||
this.$refs.selectProjectModule.open()
|
||||
})
|
||||
break
|
||||
// 工作组项目
|
||||
case 2:
|
||||
this.$refs.selectProjectModule.columns = workingProjectColumns
|
||||
this.$refs.selectProjectModule.filters = {
|
||||
this.$refs.selectWorkingGroupProjectModule.filters = {
|
||||
companyId: this.selectedCompany.id
|
||||
}
|
||||
this.$refs.selectProjectModule.url.list = this.url.workingGroupProjectList
|
||||
this.$refs.selectProjectModule.pack = this.model.pack
|
||||
this.$refs.selectProjectModule.contractId = this.model.id
|
||||
this.$refs.selectProjectModule.projectType = type
|
||||
this.$refs.selectProjectModule.title = '工作组项目列表'
|
||||
this.$refs.selectProjectModule.open()
|
||||
this.$refs.selectWorkingGroupProjectModule.open()
|
||||
break
|
||||
// 会议项目
|
||||
case 3:
|
||||
@@ -863,8 +747,6 @@ export default {
|
||||
this.$refs.selectMemberProjectModule.open(this.model)
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 通过用户id获取用户信息
|
||||
|
||||
@@ -11,51 +11,38 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row>
|
||||
<!-- 普通项目管理查询-->
|
||||
<template v-if="projectType === 1">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-tree-select
|
||||
style="width:100%"
|
||||
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflow-y': 'auto' }"
|
||||
:treeData="treeDepartData"
|
||||
v-model="queryParam.departId"
|
||||
placeholder="请选择科室"
|
||||
:disabled="pack === 0"
|
||||
@change="departChange">
|
||||
</a-tree-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="queryParam.principalId"
|
||||
show-search
|
||||
placeholder="请选择负责人"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname }}</a-select-option>
|
||||
</a-select>
|
||||
</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.year"></j-year-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
<!-- 工作组项目查询-->
|
||||
<template v-if="projectType === 2">
|
||||
<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">
|
||||
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-tree-select
|
||||
style="width:100%"
|
||||
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflow-y': 'auto' }"
|
||||
:treeData="treeDepartData"
|
||||
v-model="queryParam.departId"
|
||||
placeholder="请选择科室"
|
||||
:disabled="pack === 0"
|
||||
@change="departChange">
|
||||
</a-tree-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="queryParam.principalId"
|
||||
show-search
|
||||
placeholder="请选择负责人"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{
|
||||
item.realname
|
||||
}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</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.year"></j-year-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
@@ -66,6 +53,7 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- /查询区域-->
|
||||
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
@@ -98,11 +86,6 @@
|
||||
<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>
|
||||
@@ -116,13 +99,6 @@
|
||||
:default-charge-way="2"
|
||||
:is-contract-num-disabled="true"
|
||||
@ok="modalFormOk"></general-project-module>
|
||||
<!-- 工作组项目新增-->
|
||||
<working-group-member-unit-module ref="workingGroupMemberForm"
|
||||
@ok="modalFormOk"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
:is-contract-num-disabled="true"
|
||||
:default-charge-way="2"></working-group-member-unit-module>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -132,8 +108,6 @@ import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import GeneralProjectModule from '../../../projectManagement/modules/GeneralProjectModule'
|
||||
import StatusSlot from '../../../../components/tools/StatusSlot'
|
||||
import { associatedProject, queryUserByDepartId } from '../../../../api/incomePaymentsApi'
|
||||
import WorkingGroupMemberUnitModule from '../../../projectManagement/modules/WorkingGroupMemberUnitModule'
|
||||
import ProgressBar from '../../../../components/ProgressBar'
|
||||
import { queryDepartTreeList } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
@@ -141,18 +115,41 @@ export default {
|
||||
components: {
|
||||
JYearDate,
|
||||
GeneralProjectModule,
|
||||
StatusSlot,
|
||||
WorkingGroupMemberUnitModule,
|
||||
ProgressBar
|
||||
StatusSlot
|
||||
},
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
// 部门id,用于查询
|
||||
departId: {
|
||||
type: String,
|
||||
requird: false,
|
||||
default: null
|
||||
},
|
||||
// 打包状态
|
||||
pack: {
|
||||
type: Number,
|
||||
requird: false,
|
||||
default: null
|
||||
},
|
||||
// 收入合同id
|
||||
contractId: {
|
||||
type: String,
|
||||
requird: false,
|
||||
default: null,
|
||||
},
|
||||
// 项目类型,1--普通项目;2--工作组项目;3--会议项目;4--会员项目
|
||||
projectType: {
|
||||
type: Number,
|
||||
requird: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '操作',
|
||||
title: '普通项目列表',
|
||||
width: 1200,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
columns: [],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
@@ -161,22 +158,107 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
projectType: null, // 项目类型,1--普通项目;2--工作组项目;3--会议项目;4--会员项目
|
||||
disableMixinCreated: true,
|
||||
contractId: '', // 收入合同id
|
||||
url: {
|
||||
list: ''
|
||||
list: '/project/payCommonProject/listAll'
|
||||
},
|
||||
pack: null,// 是否打包
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '来款项目',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'chargeProject',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'chargeUse_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '来款单位',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'chargeCompanyTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'receivableAmount'
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'paidAmount'
|
||||
}, {
|
||||
title: '负责人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'principalName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '打包',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'pack',
|
||||
scopedSlots: { customRender: 'status-pack' }
|
||||
}, {
|
||||
title: '需要发票',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'needInvoice',
|
||||
scopedSlots: { customRender: 'status-pack' }
|
||||
}, {
|
||||
title: '到账',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'inAccount',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}, {
|
||||
title: '开票',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'makeInvoice',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}, {
|
||||
title: '邮寄',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}
|
||||
],
|
||||
treeDepartData: [], // 部门列表
|
||||
userList: [] // 用户列表
|
||||
userList: [], // 用户列表
|
||||
}
|
||||
},
|
||||
// 部门id变化时绑定查询条件
|
||||
watch: {
|
||||
departId(val) {
|
||||
this.queryParam.departId = val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.loadData()
|
||||
this.loadDepartTreeData()
|
||||
this.visible = true
|
||||
this.loadData()
|
||||
},
|
||||
/**
|
||||
* 获取科室(部门)数据
|
||||
@@ -230,21 +312,12 @@ export default {
|
||||
this.close()
|
||||
},
|
||||
/**
|
||||
* 打开不同类型项目的新增module
|
||||
* 打开新增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
|
||||
}
|
||||
this.$refs.generalProjectForm.add()
|
||||
this.$refs.generalProjectForm.title = '新增'
|
||||
this.$refs.generalProjectForm.disableSubmit = false
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
@@ -267,7 +340,15 @@ export default {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
searchReset() {
|
||||
this.lastQueryParam = {}
|
||||
this.queryParam.departId = this.departId
|
||||
this.loadData(1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
<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">
|
||||
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
|
||||
</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-pack" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- /表格区域-->
|
||||
|
||||
<!-- 工作组项目新增-->
|
||||
<working-group-member-unit-module ref="workingGroupMemberForm"
|
||||
@ok="modalFormOk"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
:is-contract-num-disabled="true"
|
||||
:default-charge-way="2"></working-group-member-unit-module>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import WorkingGroupMemberUnitModule from '../../../projectManagement/modules/WorkingGroupMemberUnitModule'
|
||||
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'SelectWorkingGroupProjectModule',
|
||||
components: { WorkingGroupMemberUnitModule, JYearDate },
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
// 打包状态
|
||||
pack: {
|
||||
type: Number,
|
||||
requird: false,
|
||||
default: null
|
||||
},
|
||||
// 收入合同id
|
||||
contractId: {
|
||||
type: String,
|
||||
requird: false,
|
||||
default: null,
|
||||
},
|
||||
// 项目类型,1--普通项目;2--工作组项目;3--会议项目;4--会员项目
|
||||
projectType: {
|
||||
type: Number,
|
||||
requird: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '工作组项目列表',
|
||||
width: 1200,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '工作组项目',
|
||||
align: 'center',
|
||||
dataIndex: 'workingGroupProject',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '负责人A',
|
||||
align: 'center',
|
||||
dataIndex: 'principalNameA'
|
||||
}, {
|
||||
title: '进度',
|
||||
align: 'center',
|
||||
dataIndex: 'obj',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'rateOfProgress' }
|
||||
}
|
||||
],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
disableMixinCreated: true,
|
||||
url: {
|
||||
list: '/project/payWorkingGroup/queryListByCompany'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.loadData()
|
||||
this.visible = true
|
||||
},
|
||||
close() {
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
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() {
|
||||
this.$refs.workingGroupMemberForm.add()
|
||||
this.$refs.workingGroupMemberForm.title = '新增'
|
||||
this.$refs.workingGroupMemberForm.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';
|
||||
</style>
|
||||
Reference in New Issue
Block a user