[update] 打包管理接口联调;工作组项目文件预览
This commit is contained in:
@@ -42,6 +42,14 @@ const addPayBill = (projectId, projectType, param) => postAction(`/paymentRecord
|
|||||||
const editPayBill = (param) => postAction('/paymentRecord/payPaymentRecord/editPayBill', param)
|
const editPayBill = (param) => postAction('/paymentRecord/payPaymentRecord/editPayBill', param)
|
||||||
// 普通项目管理-通过项目id查询其他的信息
|
// 普通项目管理-通过项目id查询其他的信息
|
||||||
const queryCommonProjectById = (param) => getAction('/project/payCommonProject/queryById', param)
|
const queryCommonProjectById = (param) => getAction('/project/payCommonProject/queryById', param)
|
||||||
|
// 通过id查询打包企业信息
|
||||||
|
const getPackCompanyById = (param) => getAction('/pack/payPackCompany/queryById', param)
|
||||||
|
// 添加打包项目
|
||||||
|
const addPackProject = (param) => postAction('/pack/payPackCompanyProject/add', param)
|
||||||
|
// 取消打包
|
||||||
|
const removePackProject = (param) => postAction('/pack/payPackCompanyProject/remove', param)
|
||||||
|
// 批量取消打包
|
||||||
|
const batchRemovePackProject = (param) => postAction('/pack/payPackCompanyProject/removeBatch', param)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getWorkingGroupById,
|
getWorkingGroupById,
|
||||||
@@ -64,5 +72,9 @@ export {
|
|||||||
payBillList,
|
payBillList,
|
||||||
addPayBill,
|
addPayBill,
|
||||||
editPayBill,
|
editPayBill,
|
||||||
queryCommonProjectById
|
queryCommonProjectById,
|
||||||
|
getPackCompanyById,
|
||||||
|
addPackProject,
|
||||||
|
removePackProject,
|
||||||
|
batchRemovePackProject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,8 @@
|
|||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 打包-->
|
<!-- 打包-->
|
||||||
<pack-project-select-project-module ref="selectPackProjectModal"
|
<pack-project-select-project-module :visible.sync="selectPackProjectVisible"
|
||||||
|
:pack-id="companyDataById.id"
|
||||||
@ok="modalFormOk"></pack-project-select-project-module>
|
@ok="modalFormOk"></pack-project-select-project-module>
|
||||||
<!-- 批量来款-->
|
<!-- 批量来款-->
|
||||||
<batch-income-payment-module ref="batchIncomePaymentModal" @ok="modalFormOk"></batch-income-payment-module>
|
<batch-income-payment-module ref="batchIncomePaymentModal" @ok="modalFormOk"></batch-income-payment-module>
|
||||||
@@ -142,6 +143,7 @@ import BatchIncomePaymentModule from './modules/BatchIncomePaymentModule'
|
|||||||
import BatchInvoicingModule from './modules/BatchInvoicingModule'
|
import BatchInvoicingModule from './modules/BatchInvoicingModule'
|
||||||
import ArriveStageModule from '../financialManagement/arriveAndInvoicing/modules/ArriveStageModule'
|
import ArriveStageModule from '../financialManagement/arriveAndInvoicing/modules/ArriveStageModule'
|
||||||
import InvoicingStageModule from '../financialManagement/arriveAndInvoicing/modules/InvoicingStageModule'
|
import InvoicingStageModule from '../financialManagement/arriveAndInvoicing/modules/InvoicingStageModule'
|
||||||
|
import { getPackCompanyById, batchRemovePackProject, removePackProject } from '../../api/incomePaymentsApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PackProjectMaintenance',
|
name: 'PackProjectMaintenance',
|
||||||
@@ -159,6 +161,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
IconImg,
|
IconImg,
|
||||||
|
// 企业信息名称字段对应
|
||||||
companyDataField: [
|
companyDataField: [
|
||||||
{
|
{
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
@@ -171,7 +174,7 @@ export default {
|
|||||||
dataIndex: 'phone'
|
dataIndex: 'phone'
|
||||||
}, {
|
}, {
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
dataIndex: 'mail'
|
dataIndex: 'email'
|
||||||
}, {
|
}, {
|
||||||
title: '打包费用总计',
|
title: '打包费用总计',
|
||||||
dataIndex: 'packChargeTotal'
|
dataIndex: 'packChargeTotal'
|
||||||
@@ -183,13 +186,14 @@ export default {
|
|||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
}, {
|
}, {
|
||||||
title: '已来款未开票金额',
|
title: '已来款未开票金额',
|
||||||
dataIndex: ''
|
dataIndex: 'uninvoicedAmount'
|
||||||
}, {
|
}, {
|
||||||
title: '打包年份',
|
title: '打包年份',
|
||||||
dataIndex: 'packYear'
|
dataIndex: 'packYear'
|
||||||
}
|
}
|
||||||
], // 企业信息名称字段对应
|
],
|
||||||
companyDataById: {}, // 通过id获取的企业信息
|
// 通过id获取的企业信息
|
||||||
|
companyDataById: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 5 }
|
sm: { span: 5 }
|
||||||
@@ -287,24 +291,44 @@ export default {
|
|||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [
|
disableMixinCreated: true,
|
||||||
{
|
selectPackProjectVisible: false,
|
||||||
id: 1,
|
|
||||||
chargeProject: 'asd'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
url: {
|
url: {
|
||||||
list: '',
|
list: '/pack/payPackCompanyProject/listAll',
|
||||||
exportXlsUrl: ''
|
exportXlsUrl: '/pack/payPackCompanyProject/exportXls'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.loadCompanyDetail().then(() => {
|
||||||
|
this.filters.packId = this.companyDataById.id
|
||||||
|
this.loadData()
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取企业信息
|
||||||
|
*/
|
||||||
|
loadCompanyDetail() {
|
||||||
|
let param = {
|
||||||
|
id: this.$route.query.packCompanyId
|
||||||
|
}
|
||||||
|
return new Promise(resolve => {
|
||||||
|
getPackCompanyById(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.companyDataById = res.result
|
||||||
|
resolve()
|
||||||
|
} else {
|
||||||
|
console.log(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 添加打包项目
|
* 添加打包项目
|
||||||
*/
|
*/
|
||||||
handlePack() {
|
handlePack() {
|
||||||
this.$refs.selectPackProjectModal.open()
|
this.selectPackProjectVisible = true
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 批量取消打包
|
* 批量取消打包
|
||||||
@@ -314,11 +338,23 @@ export default {
|
|||||||
this.$message.warn('请至少选中一个项目')
|
this.$message.warn('请至少选中一个项目')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let that = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '确认取消打包',
|
title: '确认取消打包',
|
||||||
content: '确定要取消选中项目的打包状态吗?',
|
content: '确定要取消选中项目的打包状态吗?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
console.log('批量取消打包')
|
let param = {
|
||||||
|
packId: that.companyDataById.id,
|
||||||
|
packProjectIds: that.selectedRowKeys.join(',')
|
||||||
|
}
|
||||||
|
batchRemovePackProject(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.loadData()
|
||||||
|
} else {
|
||||||
|
that.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -342,8 +378,30 @@ export default {
|
|||||||
console.log(id)
|
console.log(id)
|
||||||
this.$refs.arriveStage.open()
|
this.$refs.arriveStage.open()
|
||||||
},
|
},
|
||||||
cancelPack() {
|
/**
|
||||||
|
* 取消打包
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
cancelPack(id) {
|
||||||
|
let that = this
|
||||||
|
this.$confirm({
|
||||||
|
title: '确认取消打包',
|
||||||
|
content: '确定要取消该项目的打包状态吗?',
|
||||||
|
onOk: function () {
|
||||||
|
let param = {
|
||||||
|
id: id,
|
||||||
|
packId: that.companyDataById.id
|
||||||
|
}
|
||||||
|
removePackProject(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.loadData()
|
||||||
|
} else {
|
||||||
|
that.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 开票
|
* 开票
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export default {
|
|||||||
id: 1,
|
id: 1,
|
||||||
chargeProject: '项目名称',
|
chargeProject: '项目名称',
|
||||||
receivableAmount: 100,
|
receivableAmount: 100,
|
||||||
paidAmount: 0,
|
paidAmount: 50,
|
||||||
thisIncomingAmount: null,
|
thisIncomingAmount: null,
|
||||||
remark: ''
|
remark: ''
|
||||||
}, {
|
}, {
|
||||||
@@ -197,6 +197,10 @@ export default {
|
|||||||
close() {
|
close() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 来款金额输入失去焦点,进行金额分配
|
||||||
|
* @param e
|
||||||
|
*/
|
||||||
incomingAmountBlur(e) {
|
incomingAmountBlur(e) {
|
||||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||||
this.inputIncomingAmount = Number(e.target.value)
|
this.inputIncomingAmount = Number(e.target.value)
|
||||||
@@ -204,6 +208,10 @@ export default {
|
|||||||
this.calculateThisTimeAmount()
|
this.calculateThisTimeAmount()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 清空本次来款金额
|
||||||
|
* @returns {Promise<unknown>}
|
||||||
|
*/
|
||||||
clearThisTimeAmount() {
|
clearThisTimeAmount() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
this.dataSource.forEach(item => {
|
this.dataSource.forEach(item => {
|
||||||
|
|||||||
@@ -24,9 +24,11 @@
|
|||||||
<a-form-item label="企业联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="企业联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-contacts
|
<select-contacts
|
||||||
:selected-company="selectedCompany"
|
:selected-company="selectedCompany"
|
||||||
|
:init-contacts="initContact"
|
||||||
placeholder="请选择企业联系人"
|
placeholder="请选择企业联系人"
|
||||||
v-decorator="['companyContactId', validatorRules.companyContactId]"
|
v-decorator="['companyContactId', validatorRules.companyContactId]"
|
||||||
@change="handleContactChange">
|
ref="companyContact"
|
||||||
|
@ok="companyContactOk">
|
||||||
</select-contacts>
|
</select-contacts>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -55,8 +57,11 @@
|
|||||||
<a-form-item label="打包联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="打包联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-contacts
|
<select-contacts
|
||||||
:selected-company="selectedCompany"
|
:selected-company="selectedCompany"
|
||||||
|
:init-contacts="initPackContact"
|
||||||
placeholder="请选择打包联系人"
|
placeholder="请选择打包联系人"
|
||||||
v-decorator="['packContactId', validatorRules.packContactId]">
|
ref="packContact"
|
||||||
|
v-decorator="['packContactId', validatorRules.packContactId]"
|
||||||
|
@ok="packContactOk">
|
||||||
</select-contacts>
|
</select-contacts>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -151,7 +156,9 @@ export default {
|
|||||||
rules: [{ required: true, message: '请选择打包联系人' }],
|
rules: [{ required: true, message: '请选择打包联系人' }],
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
initContact: null, // 编辑回显的企业联系人信息
|
||||||
|
initPackContact: null // 编辑回显的打包联系人信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -161,11 +168,24 @@ export default {
|
|||||||
edit(record) {
|
edit(record) {
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
record.company = {
|
record.company = {
|
||||||
id: record.companyTemporaryId,
|
id: record.companyId,
|
||||||
companyName: record.companyTemporaryName
|
companyName: record.companyTemporaryName
|
||||||
}
|
}
|
||||||
|
// 回显企业信息
|
||||||
|
this.selectedCompany = record.company
|
||||||
record.companyContactId = record.companyContactTemporaryId
|
record.companyContactId = record.companyContactTemporaryId
|
||||||
record.packContactId = record.packContactTemporaryId
|
record.packContactId = record.packContactTemporaryId
|
||||||
|
// 编辑时,将企业联系人、打包联系人添加至候选项中
|
||||||
|
if (record.id) {
|
||||||
|
this.initContact = {
|
||||||
|
id: record.companyContactTemporaryId,
|
||||||
|
name: record.companyContactTemporaryName
|
||||||
|
}
|
||||||
|
this.initPackContact = {
|
||||||
|
id: record.packContactTemporaryId,
|
||||||
|
name: record.packContactTemporaryName
|
||||||
|
}
|
||||||
|
}
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -215,18 +235,13 @@ export default {
|
|||||||
handleCompanyChange(value) {
|
handleCompanyChange(value) {
|
||||||
this.selectedCompany = value
|
this.selectedCompany = value
|
||||||
},
|
},
|
||||||
/**
|
// 企业联系人新增回调
|
||||||
* 企业联系人变化,打包联系人默认为企业联系人,打包联系人未选择时进行回显
|
companyContactOk() {
|
||||||
* @param value
|
this.$refs.packContact.getContactsList()
|
||||||
*/
|
},
|
||||||
handleContactChange(value) {
|
// 打包联系人新增回调
|
||||||
console.log(Object.values(this.form.getFieldValue(['packContactId'])).indexOf(undefined) !== -1)
|
packContactOk() {
|
||||||
if (Object.values(this.form.getFieldValue(['packContactId'])).indexOf(undefined) !== -1) {
|
this.$refs.companyContact.getContactsList()
|
||||||
this.model.packContactId = value
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.form.setFieldsValue(pick(this.model, 'packContactId'))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 校验金额格式
|
* 校验金额格式
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xl="8" :lg="9" :md="10" :sm="24">
|
<a-col :xl="8" :lg="9" :md="10" :sm="24">
|
||||||
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入项目名称" v-model="queryParam.companyName"></a-input>
|
<a-input placeholder="请输入项目名称" v-model="queryParam.chargeProject"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="8" :lg="9" :md="10" :sm="24">
|
<a-col :xl="8" :lg="9" :md="10" :sm="24">
|
||||||
@@ -78,16 +78,36 @@
|
|||||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||||
import JYearDate from '../../../components/jero/JYearDate'
|
import JYearDate from '../../../components/jero/JYearDate'
|
||||||
import StatusSlot from '../../../components/tools/StatusSlot'
|
import StatusSlot from '../../../components/tools/StatusSlot'
|
||||||
|
import { addPackProject } from '../../../api/incomePaymentsApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PackProjectSelectProjectModule',
|
name: 'PackProjectSelectProjectModule',
|
||||||
components: { JYearDate, StatusSlot },
|
components: { JYearDate, StatusSlot },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
|
props: {
|
||||||
|
// 打包id
|
||||||
|
packId: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
visible(value) {
|
||||||
|
if (value) {
|
||||||
|
this.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '添加打包项目',
|
title: '添加打包项目',
|
||||||
width: 1000,
|
width: 1200,
|
||||||
visible: false,
|
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -98,7 +118,7 @@ export default {
|
|||||||
sm: { span: 10 }
|
sm: { span: 10 }
|
||||||
},
|
},
|
||||||
url:{
|
url:{
|
||||||
list: ''
|
list: '/pack/payPackCompanyProject/queryNotPackListAll'
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -119,8 +139,8 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
title: '来款用途',
|
title: '来款用途',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 160,
|
||||||
dataIndex: 'chargeUse',
|
dataIndex: 'chargeUse_dictText',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
}, {
|
}, {
|
||||||
title: '项目负责人',
|
title: '项目负责人',
|
||||||
@@ -163,21 +183,45 @@ export default {
|
|||||||
dataIndex: 'mail',
|
dataIndex: 'mail',
|
||||||
scopedSlots: { customRender: 'status' }
|
scopedSlots: { customRender: 'status' }
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
disableMixinCreated: true,
|
||||||
|
filters: {
|
||||||
|
packId: this.packId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOk() {
|
handleOk() {
|
||||||
|
if (this.selectedRowKeys.length === 0) {
|
||||||
|
this.$message.warn('请至少选择一个项目')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let projectIds = this.selectedRowKeys.join(',')
|
||||||
|
let params = {
|
||||||
|
projectIds: projectIds,
|
||||||
|
packId: this.packId
|
||||||
|
}
|
||||||
|
addPackProject(params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.close()
|
||||||
|
this.$emit('ok')
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
this.visible = true
|
this.filters.packId = this.packId
|
||||||
|
console.log(this.filters)
|
||||||
|
this.loadData()
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.visible = false
|
this.selectedRowKeys = []
|
||||||
|
this.$emit('update:visible', false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
:key="index">
|
:key="index">
|
||||||
<div class="work-group-detail-item-title">{{ item.title }}:</div>
|
<div class="work-group-detail-item-title">{{ item.title }}:</div>
|
||||||
<div class="work-group-detail-item-content work-group-detail-item-filename"
|
<div class="work-group-detail-item-content work-group-detail-item-filename"
|
||||||
v-if="(item.fieldName === 'chargeNoticeA' || item.fieldName === 'chargeNoticeB') && workingGroupDetail[item.fieldName]"
|
v-if="(item.fieldName === 'chargeNoticeAId' || item.fieldName === 'chargeNoticeBId') && workingGroupDetail[item.fieldName]">
|
||||||
@click="previewFile(workingGroupDetail[item.fieldName])">
|
<preview-file :file-id="workingGroupDetail[item.fieldName]"></preview-file>
|
||||||
{{ workingGroupDetail[item.fieldName].fileName }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="work-group-detail-item-content" v-else>{{ workingGroupDetail[item.fieldName] }}</div>
|
<div class="work-group-detail-item-content" v-else>{{ workingGroupDetail[item.fieldName] }}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -139,6 +138,7 @@ import WorkingGroupMemberSetChargeNotice from './modules/WorkingGroupMemberSetCh
|
|||||||
import { getFileInfo } from '../../api/api'
|
import { getFileInfo } from '../../api/api'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '../../store/mutation-types'
|
import { ACCESS_TOKEN } from '../../store/mutation-types'
|
||||||
|
import PreviewFile from '../../components/jero/PreviewFile'
|
||||||
const Base64 = require('js-base64').Base64
|
const Base64 = require('js-base64').Base64
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -149,7 +149,8 @@ export default {
|
|||||||
StatusSlot,
|
StatusSlot,
|
||||||
ProjectDetailModal,
|
ProjectDetailModal,
|
||||||
WorkingGroupMemberUnitModule,
|
WorkingGroupMemberUnitModule,
|
||||||
WorkingGroupMemberSetChargeNotice
|
WorkingGroupMemberSetChargeNotice,
|
||||||
|
PreviewFile
|
||||||
},
|
},
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {
|
||||||
@@ -187,7 +188,7 @@ export default {
|
|||||||
fieldName: 'chargeNoticeNoA'
|
fieldName: 'chargeNoticeNoA'
|
||||||
}, {
|
}, {
|
||||||
title: '收费通知A',
|
title: '收费通知A',
|
||||||
fieldName: 'chargeNoticeA'
|
fieldName: 'chargeNoticeAId'
|
||||||
}, {
|
}, {
|
||||||
title: '本年应收款B',
|
title: '本年应收款B',
|
||||||
fieldName: 'yearChargeB'
|
fieldName: 'yearChargeB'
|
||||||
@@ -196,7 +197,7 @@ export default {
|
|||||||
fieldName: 'chargeNoticeNoB'
|
fieldName: 'chargeNoticeNoB'
|
||||||
}, {
|
}, {
|
||||||
title: '收费通知B',
|
title: '收费通知B',
|
||||||
fieldName: 'chargeNoticeB'
|
fieldName: 'chargeNoticeBId'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
labelCol: {
|
labelCol: {
|
||||||
@@ -309,23 +310,11 @@ export default {
|
|||||||
}
|
}
|
||||||
getWorkingGroupById(param).then(res => {
|
getWorkingGroupById(param).then(res => {
|
||||||
this.workingGroupDetail = res.result
|
this.workingGroupDetail = res.result
|
||||||
// this.workingGroupDetail.chargeNoticeA = {}
|
|
||||||
// this.workingGroupDetail.chargeNoticeB = {}
|
|
||||||
this.getFile()
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.spinning = false
|
this.spinning = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getFile() {
|
|
||||||
await getFileInfo({ id: this.workingGroupDetail.chargeNoticeAId }).then(res => {
|
|
||||||
this.workingGroupDetail.chargeNoticeA = res.result
|
|
||||||
this.$forceUpdate()
|
|
||||||
})
|
|
||||||
await getFileInfo({ id: this.workingGroupDetail.chargeNoticeBId }).then(res => {
|
|
||||||
this.workingGroupDetail.chargeNoticeB = res.result
|
|
||||||
this.$forceUpdate()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleAdd: function () {
|
handleAdd: function () {
|
||||||
this.getChargeNoticeList()
|
this.getChargeNoticeList()
|
||||||
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
|
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
|
||||||
@@ -342,9 +331,13 @@ export default {
|
|||||||
this.$refs.modalForm.title = '编辑'
|
this.$refs.modalForm.title = '编辑'
|
||||||
this.$refs.modalForm.disableSubmit = false
|
this.$refs.modalForm.disableSubmit = false
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取收费通知列表
|
||||||
|
*/
|
||||||
getChargeNoticeList() {
|
getChargeNoticeList() {
|
||||||
this.chargeNoticeList = []
|
this.chargeNoticeList = []
|
||||||
let chargeNoticeA, chargeNoticeB
|
let chargeNoticeA, chargeNoticeB
|
||||||
|
// 是否存在收费通知A
|
||||||
if (this.workingGroupDetail.chargeNoticeNoA && this.workingGroupDetail.chargeNoticeNoA !== '') {
|
if (this.workingGroupDetail.chargeNoticeNoA && this.workingGroupDetail.chargeNoticeNoA !== '') {
|
||||||
chargeNoticeA = {
|
chargeNoticeA = {
|
||||||
type: 'chargeNoticeA',
|
type: 'chargeNoticeA',
|
||||||
@@ -353,7 +346,9 @@ export default {
|
|||||||
yearCharge: this.workingGroupDetail.yearChargeA,
|
yearCharge: this.workingGroupDetail.yearChargeA,
|
||||||
chargeNoticeId: this.workingGroupDetail.chargeNoticeAId
|
chargeNoticeId: this.workingGroupDetail.chargeNoticeAId
|
||||||
}
|
}
|
||||||
|
this.chargeNoticeList.push(chargeNoticeA)
|
||||||
}
|
}
|
||||||
|
// 是否存在收费通知B
|
||||||
if (this.workingGroupDetail.chargeNoticeNoB && this.workingGroupDetail.chargeNoticeNoB !== '') {
|
if (this.workingGroupDetail.chargeNoticeNoB && this.workingGroupDetail.chargeNoticeNoB !== '') {
|
||||||
chargeNoticeB = {
|
chargeNoticeB = {
|
||||||
type: 'chargeNoticeB',
|
type: 'chargeNoticeB',
|
||||||
@@ -362,11 +357,6 @@ export default {
|
|||||||
yearCharge: this.workingGroupDetail.yearChargeB,
|
yearCharge: this.workingGroupDetail.yearChargeB,
|
||||||
chargeNoticeId: this.workingGroupDetail.chargeNoticeBId
|
chargeNoticeId: this.workingGroupDetail.chargeNoticeBId
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (chargeNoticeA && chargeNoticeA.hasOwnProperty.call(chargeNoticeA, 'value')) {
|
|
||||||
this.chargeNoticeList.push(chargeNoticeA)
|
|
||||||
}
|
|
||||||
if (chargeNoticeB && chargeNoticeB.hasOwnProperty.call(chargeNoticeA, 'value')) {
|
|
||||||
this.chargeNoticeList.push(chargeNoticeB)
|
this.chargeNoticeList.push(chargeNoticeB)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user