[update] -打包、到账开票列表页增加 确认收入 图标的展示;打包管理 【确认收入】按钮增加禁用判断

This commit is contained in:
fengchenchen
2022-08-05 12:07:26 +08:00
parent af8fda0b3d
commit bc1d4cb50a
5 changed files with 65 additions and 8 deletions
+18 -3
View File
@@ -58,7 +58,7 @@ export default {
required: false required: false
}, },
// 当前需要转换key的属性, 悬浮显示实际具体内容信息时需要 // 当前需要转换key的属性, 悬浮显示实际具体内容信息时需要
// paymentRecord 来款 mail -- 邮寄 bill--开票 // paymentRecord 来款 confirm-确认收入 mail -- 邮寄 bill--开票
statusKey: { statusKey: {
type: String, type: String,
required: false, required: false,
@@ -106,6 +106,9 @@ export default {
} else { } else {
return finished return finished
} }
} else if(this.statusNo === 4) {
// 确认收入莫名其妙的出现了 4, 所以修改成 全部确认的样式
return finished
} }
} }
}, },
@@ -129,9 +132,16 @@ export default {
// 到账、开票、邮寄 的时候,请求接口获得相应的数据 // 到账、开票、邮寄 的时候,请求接口获得相应的数据
// 判断条件 tooltip显示、 有不同的统计状态,统计状态值不为0 没有请求过详情数据 // 判断条件 tooltip显示、 有不同的统计状态,统计状态值不为0 没有请求过详情数据
if (visible && this.statusType && this.statusNo && !this.hasInfo) { if (visible && this.statusType && this.statusNo && !this.hasInfo) {
this.getInfoFunc({ id: this.statuObj.id }).then(res => { let idKey = this.statusKey === 'confirm' && 'projectId' || 'id'
this.getInfoFunc({ [idKey]: this.statuObj.id }).then(res => {
if (res.success) { if (res.success) {
let arr = res.result[this.opeStatusKey] || [] let arr = []
if(this.statusKey === 'confirm') {
// 确认收入单独的实现逻辑
arr = res.result || []
} else {
arr = res.result[this.opeStatusKey] || []
}
let result = [] let result = []
arr.map(tt => { arr.map(tt => {
result.push(this.showTemplate(tt)) result.push(this.showTemplate(tt))
@@ -139,6 +149,7 @@ export default {
// 对tooltip中的文字进行替换 // 对tooltip中的文字进行替换
this.currentTitle = result.join('\n') this.currentTitle = result.join('\n')
this.hasInfo = true this.hasInfo = true
} }
}) })
} }
@@ -165,6 +176,10 @@ export default {
if (item.sendDate || item.postNo) { if (item.sendDate || item.postNo) {
result = `${ item.sendDate }新增邮寄信息,邮寄单号:${ item.postNo }` result = `${ item.sendDate }新增邮寄信息,邮寄单号:${ item.postNo }`
} }
} else if (this.statusKey === 'confirm') {
if (item.paymentDate || item.amountReceived) {
result = `${ item.paymentDate }确认收入${ item.amountReceived }`
}
} }
return result return result
} }
@@ -119,6 +119,11 @@
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot> <status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template> </template>
<!-- 确认收入 -->
<template slot="status-confirm" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="confirm" :get-info-func="getPayConfirmList"></status-slot>
</template>
<!-- 开票--> <!-- 开票-->
<template slot="status-bill" slot-scope="text,record"> <template slot="status-bill" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot> <status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
@@ -146,8 +151,8 @@
:disabled="record.projectType === 3 && record.registerCheckResult === '0'">来款</a> :disabled="record.projectType === 3 && record.registerCheckResult === '0'">来款</a>
<a @click="invoicing(record)" :disabled="record.needInvoice === 0" <a @click="invoicing(record)" :disabled="record.needInvoice === 0"
v-has="'incomePaymentAndInvoiving:invoicing'">开票</a> v-has="'incomePaymentAndInvoiving:invoicing'">开票</a>
<!-- 确认收入项目--- 普通项目工作组项目资料网员 项目 可以确认收入--> <!-- 确认收入项目--- 普通项目工作组项目资料网员 项目 可以确认收入 报名状态是 待审核的时候 不能确认收入-->
<a v-has="'incomePaymentAndInvoiving:confirmPayment'" @click="confirmPayment(record)">确认收入</a> <a v-has="'incomePaymentAndInvoiving:confirmPayment'" @click="confirmPayment(record)">确认收入</a>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -158,6 +163,7 @@
@ok="modalFormOk" @ok="modalFormOk"
:project-id="selectProjectId" :project-id="selectProjectId"
:project-type="selectProjectType" :project-type="selectProjectType"
:need-invoice="selectNeedInvoice"
:visible.sync="arriveVisible"></arrive-stage-module> :visible.sync="arriveVisible"></arrive-stage-module>
<!-- 开票阶段--> <!-- 开票阶段-->
@@ -214,6 +220,7 @@ import AuditProofModule from './modules/AuditProofModule'
// import AuditProofModule from "@views/financialManagement/arriveAndInvoicing/modules/AuditProofModule"; // import AuditProofModule from "@views/financialManagement/arriveAndInvoicing/modules/AuditProofModule";
import AuditModal from '@views/incomePayments/meetManage/modules/AuditModal' import AuditModal from '@views/incomePayments/meetManage/modules/AuditModal'
import ConfirmStageModule from './modules/ConfirmStageModule' import ConfirmStageModule from './modules/ConfirmStageModule'
import {getPayConfirmList} from '../../../api/incomePaymentsApi'
// 项目类型 数据字典 的定义 和数据库的保持一致 // 项目类型 数据字典 的定义 和数据库的保持一致
const ProjectTypeEnums = { const ProjectTypeEnums = {
@@ -330,6 +337,12 @@ export default {
width: 70, width: 70,
dataIndex: 'inAccount', dataIndex: 'inAccount',
scopedSlots: {customRender: 'status'} scopedSlots: {customRender: 'status'}
}, {
title: '收入',
align: 'center',
width: 70,
dataIndex: 'affirmIncome',
scopedSlots: {customRender: 'status-confirm'}
}, { }, {
title: '开票', title: '开票',
align: 'center', align: 'center',
@@ -358,6 +371,7 @@ export default {
selectProjectId: null, // 选中项目id selectProjectId: null, // 选中项目id
selectProjectType: null, // 选中项目类型 selectProjectType: null, // 选中项目类型
selectProjectName: null, // 选中项目名称open selectProjectName: null, // 选中项目名称open
selectNeedInvoice: null, // 选中项目是否需要发票
selectProjectChargeCompanyName: null, // 选中项目来款企业 selectProjectChargeCompanyName: null, // 选中项目来款企业
invoicingVisible: false, invoicingVisible: false,
arriveVisible: false, arriveVisible: false,
@@ -372,6 +386,7 @@ export default {
} }
}, },
methods: { methods: {
getPayConfirmList,
/** /**
* 来款 * 来款
* @param record * @param record
@@ -379,6 +394,7 @@ export default {
incomePayment(record) { incomePayment(record) {
this.selectProjectType = record.projectType this.selectProjectType = record.projectType
this.selectProjectId = record.id this.selectProjectId = record.id
this.selectNeedInvoice = record.needInvoice
this.arriveVisible = true this.arriveVisible = true
}, },
/** /**
@@ -76,6 +76,18 @@ export default {
required: false, required: false,
default: null default: null
}, },
// 项目是否需要发票
needInvoice: {
type: [Number, String],
required: false,
default: null
},
},
watch: {
// 监听是否需要发票 然后修改响应的税率值
needInvoice(value) {
this.taxRate = value ? 0.06 : 0
}
}, },
data() { data() {
return { return {
@@ -100,7 +100,7 @@ export default {
type: String, type: String,
required: false, required: false,
default: null default: null
}, }
}, },
data() { data() {
return { return {
@@ -111,7 +111,10 @@
<template slot="status" slot-scope="text,record"> <template slot="status" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot> <status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template> </template>
<!-- 确认收入 -->
<template slot="status-confirm" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="confirm" :get-info-func="getPayConfirmList"></status-slot>
</template>
<!-- 开票--> <!-- 开票-->
<template slot="status-bill" slot-scope="text,record"> <template slot="status-bill" slot-scope="text,record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot> <status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
@@ -132,7 +135,7 @@
<a @click="cancelPack(record.id)" v-has="'packProject:cancelPack'">取消打包</a> <a @click="cancelPack(record.id)" v-has="'packProject:cancelPack'">取消打包</a>
<a @click="invoicing(record)" :disabled="record.needInvoice === 0 || Number(record.receivableAmount) === 0" <a @click="invoicing(record)" :disabled="record.needInvoice === 0 || Number(record.receivableAmount) === 0"
v-has="'packProject:invoicing'">开票</a> v-has="'packProject:invoicing'">开票</a>
<a v-has="'packProject:confirmPayment'" @click="confirmPayment(record)">确认收入</a> <a v-has="'packProject:confirmPayment'" @click="confirmPayment(record)" :disabled="Number(record.receivableAmount) === 0">确认收入</a>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -166,6 +169,7 @@
:project-type="selectProjectType" :project-type="selectProjectType"
:project-id="selectProjectId" :project-id="selectProjectId"
:visible.sync="arriveStageVisible" :visible.sync="arriveStageVisible"
:need-invoice="selectNeedInvoice"
@ok="modalFormOk"></arrive-stage-module> @ok="modalFormOk"></arrive-stage-module>
<!-- 开票阶段--> <!-- 开票阶段-->
@@ -205,6 +209,7 @@ import InvoicingStageModule from '../financialManagement/arriveAndInvoicing/modu
import { getPackCompanyById, batchRemovePackProject, removePackProject } from '../../api/incomePaymentsApi' import { getPackCompanyById, batchRemovePackProject, removePackProject } from '../../api/incomePaymentsApi'
import ProjectDetailModal from '../../components/ProjectDetailModal' import ProjectDetailModal from '../../components/ProjectDetailModal'
import ConfirmStageModule from '../financialManagement/arriveAndInvoicing/modules/ConfirmStageModule' import ConfirmStageModule from '../financialManagement/arriveAndInvoicing/modules/ConfirmStageModule'
import {getPayConfirmList} from '@/api/incomePaymentsApi'
export default { export default {
name: 'PackProjectMaintenance', name: 'PackProjectMaintenance',
@@ -315,6 +320,12 @@ export default {
width: 80, width: 80,
dataIndex: 'inAccount', dataIndex: 'inAccount',
scopedSlots: { customRender: 'status' } scopedSlots: { customRender: 'status' }
}, {
title: '收入',
align: 'center',
width: 80,
dataIndex: 'affirmIncome',
scopedSlots: {customRender: 'status-confirm'}
}, { }, {
title: '开票', title: '开票',
align: 'center', align: 'center',
@@ -365,6 +376,7 @@ export default {
selectProjectId: null, // 选中项目id selectProjectId: null, // 选中项目id
selectProjectType: null, // 选中项目类型 selectProjectType: null, // 选中项目类型
selectProjectName: null, // 选中项目名称 selectProjectName: null, // 选中项目名称
selectNeedInvoice: null, // 选中项目是否需要发票
selectProjectChargeCompanyName: null, // 选中项目来款企业 selectProjectChargeCompanyName: null, // 选中项目来款企业
url: { url: {
list: '/pack/payPackCompanyProject/listAll', list: '/pack/payPackCompanyProject/listAll',
@@ -379,6 +391,7 @@ export default {
}) })
}, },
methods: { methods: {
getPayConfirmList,
/** /**
* 获取企业信息 * 获取企业信息
*/ */
@@ -515,6 +528,7 @@ export default {
incomePayment(record) { incomePayment(record) {
this.selectProjectId = record.id this.selectProjectId = record.id
this.arriveStageVisible = true this.arriveStageVisible = true
this.selectNeedInvoice = record.needInvoice
this.selectProjectType = record.projectType this.selectProjectType = record.projectType
}, },
/** /**