فهرست منبع

会计项目查看优化

徐滕 1 هفته پیش
والد
کامیت
0d837ba6cd

+ 7 - 0
src/api/cw/invoice/CwFinanceInvoiceService.js

@@ -128,6 +128,13 @@ export default {
 			params: { projectId: projectId, ...invoiceForm },
 		});
 	},
+	getByReportId: function (reportId, invoiceForm) {
+		return request({
+			url: prefix + "/cw_finance/invoice/getByReportId",
+			method: "get",
+			params: { reportId: reportId, ...invoiceForm },
+		});
+	},
 	getByContractId: function (contractId, invoiceForm) {
 		return request({
 			url: prefix + "/cw_finance/invoice/getByContractId",

+ 2 - 1
src/views/cw/projectRecords/ProjectRecordsForm.vue

@@ -624,6 +624,7 @@
   import UserSelect2 from '@/views/utils/UserTreeSelect'
   import UserSelect3 from '@/views/utils/UserTreeSelect'
   import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import InvoiceForm from '../invoice/InvoiceForm'
   export default {
     name: 'ProjectRecordsForm',
     props: {
@@ -765,7 +766,7 @@
 		UserSelect2,
 		UserSelect3,
       ReportManagementForm,
-      InvoiceForm: () => import('../invoice/InvoiceForm')
+      InvoiceForm
     },
     methods: {
       getKeyWatch (keyWatch) {

+ 135 - 6
src/views/cw/reportManagement/ReportManagementForm.vue

@@ -9,10 +9,17 @@
 							<el-button @click="downloadCwReportAuditTpl">报告审核单下载</el-button>
 						</el-row>
 					</div>
+					<el-divider content-position="left">
+						<i class="el-icon-document"></i> 项目信息
+						<span style="margin-left: 20px;">
+							<el-link v-if="method === 'view'" type="primary" :underline="false" icon="el-icon-document" @click="viewContract(inputForm.contractId)" style="margin-right: 16px;"><b>查看合同详情</b></el-link>
+							<el-link v-if="method === 'view'" type="primary" :underline="false" icon="el-icon-document" @click="viewProject(inputForm.projectId)" style="margin-right: 16px;"><b>查看项目详情</b></el-link>
+							<el-link v-if="method === 'view'" type="primary" :underline="false" icon="el-icon-document" @click="openInvoiceDialog"><b>查看发票详情</b></el-link>
+						</span>
+					</el-divider>
 					<el-form :model="inputForm" ref="inputForm" v-loading="loading"
 						:class="method === 'view' ? 'readonly' : ''" :disabled="method === 'view'" label-width="170px"
 						@submit.native.prevent>
-						<el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
 						<el-row :gutter="0">
 							<el-col :span="12">
 								<el-form-item label="项目名称" prop="projectName" :rules="[
@@ -889,7 +896,6 @@
 								</el-col>
 							</el-row>
 						</el-tab-pane>
-
 					</el-tabs>
 				</el-row>
 			</el-row>
@@ -909,6 +915,55 @@
 			<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
 			<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
 			<user-select3 ref="userSelect3" @doSubmit="selectUser3"></user-select3>
+			<ContractNameForm ref="contractNameForm"></ContractNameForm>
+			<ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
+			<InvoiceForm ref="invoiceFormDialog"></InvoiceForm>
+			<!-- 关联发票弹窗 -->
+			<el-dialog title="关联发票" :close-on-click-modal="false" draggable width="1200px" append-to-body v-model="invoiceDialogVisible">
+				<el-form :inline="true" class="query-form" ref="invoiceSearchForm" :model="invoiceSearchForm" @keyup.enter.native="searchInvoice()" @submit.native.prevent>
+					<el-form-item label="发票申请编号" prop="no">
+						<el-input v-model="invoiceSearchForm.no" placeholder="请输入发票申请编号" clearable></el-input>
+					</el-form-item>
+					<el-form-item>
+						<el-button type="primary" @click="searchInvoice()" icon="el-icon-search">查询</el-button>
+						<el-button @click="resetInvoiceSearch()" icon="el-icon-refresh-right">重置</el-button>
+					</el-form-item>
+				</el-form>
+				<vxe-table
+					max-height="500"
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="invoiceLoading"
+					ref="invoiceDialogTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					:checkbox-config="{}"
+					:data="invoiceList">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="150" title="发票申请编号" align="center" field="no" show-overflow="title">
+						<template #default="scope">
+							<el-link type="primary" :underline="false" @click="viewInvoice(false, scope.row.id)">{{scope.row.no}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="150" title="发票号" align="center" field="number" show-overflow="title"></vxe-column>
+					<vxe-column min-width="150" title="实际开票单位" align="center" field="billingWorkplaceReal" show-overflow="title"></vxe-column>
+					<vxe-column min-width="150" title="开票金额(元)" align="center" field="accountDetail" show-overflow="title"></vxe-column>
+					<vxe-column min-width="120" title="开票内容" align="center" field="billingContent" show-overflow="title">
+						<template #default="scope">
+							{{$dictUtils.getDictLabel('invoice_billing_content', scope.row.billingContent, '-')}}
+						</template>
+					</vxe-column>
+					<vxe-column min-width="110" fixed="right" align="center" title="是否收款" field="receivablesStatus" show-overflow="title">
+						<template #default="scope">
+							{{scope.row.receivablesStatus === '1'?'已收款':'未收款'}}
+						</template>
+					</vxe-column>
+				</vxe-table>
+			</el-dialog>
 		</el-dialog>
 	</div>
 </template>
@@ -925,6 +980,7 @@ import UserSelectAll from '@/components/userSelect'
 // import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
 // import WorkContractChooseCom from '../projectRecords/WorkContractChooseCom'
 import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
+import cwFinanceInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
 import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
 import ReportServiceUnitForm from './ReportServiceUnitForm'
 import ProjectRecoredChooseCom from '../projectRecords/ProjectRecordsChooseCom'
@@ -932,6 +988,8 @@ import userService from "@/api/sys/userService";
 import UserSelect1 from '@/views/utils/UserTreeSelect'
 // import UserSelect2 from '@/views/utils/UserTreeSelect'
 import UserSelect3 from '@/views/utils/UserTreeSelect'
+import { defineAsyncComponent } from 'vue'
+import InvoiceForm from '../invoice/InvoiceForm'
 export default {
 	props: {
 		businessId: {
@@ -1024,7 +1082,8 @@ export default {
 				businessObjects: '',
 				invoiceNumber: '',
 				approvedIncludingTax: '',
-				approvedNoIncludingTax: ''
+				approvedNoIncludingTax: '',
+				contractId: ''
 
 			},
 			keyWatch: '',
@@ -1035,7 +1094,13 @@ export default {
 			tableKeyClient2: '1',
 			tableKeyClient3: '1',
 			visible: false,
-			tabName: ''
+			tabName: '',
+			invoiceList: [],
+			invoiceSearchForm: {
+				no: ''
+			},
+			invoiceDialogVisible: false,
+			invoiceLoading: false
 		}
 	},
 	ReportReviewService: null,
@@ -1080,7 +1145,10 @@ export default {
 		ProjectRecoredChooseCom,
 		UserSelectAll,
 		UserSelect1,
-		UserSelect3
+		UserSelect3,
+		ContractNameForm: defineAsyncComponent(() => import('../workContract/ContractNameForm')),
+		ProjectRecordsForm: defineAsyncComponent(() => import('../projectRecords/ProjectRecordsForm')),
+		InvoiceForm
 	},
 	methods: {
 		// seeFileInfo (index) {
@@ -1184,7 +1252,8 @@ export default {
 				businessObjects: '',
 				invoiceNumber: '',
 				approvedIncludingTax: '',
-				approvedNoIncludingTax: ''
+				approvedNoIncludingTax: '',
+				contractId: ''
 			}
 			this.inputForm.id = id
 			this.loading = false
@@ -1558,6 +1627,7 @@ export default {
 			this.inputForm.realHeaderName = row.realHeaderName // 项目经理2名称
 			this.inputForm.signatureAnnotator1 = row.projectMasterId // 签字注师1id = 项目经理1id
 			this.inputForm.signatureAnnotator2 = row.realHeader // 签字注师2id = 项目经理2id
+			this.inputForm.contractId = row.contractId // 关联合同id
 			this.clearClientList()
 			this.$forceUpdate()
 			this.inputForm.cwProjectInfoList = []
@@ -1704,6 +1774,65 @@ export default {
 			this.inputForm.realCreateName = user[0].name
 			this.inputForm.realCreate = user[0].id
 		},
+		// 查看合同详情
+		viewContract(id) {
+			if (!id) {
+				this.$message.warning('该报告未关联合同')
+				return
+			}
+			this.$refs.contractNameForm.init('view', id)
+		},
+		// 查看项目详情
+		viewProject(id) {
+			if (!id) {
+				this.$message.warning('该报告未关联项目')
+				return
+			}
+			this.$refs.projectRecordsForm.init('view', id)
+		},
+		// 打开发票弹窗
+		openInvoiceDialog() {
+			this.invoiceDialogVisible = true
+			this.invoiceSearchForm = { no: '' }
+			this.$nextTick(() => {
+				this.searchInvoice()
+			})
+		},
+		// 查询关联发票
+		searchInvoice() {
+			this.invoiceLoading = true
+			cwFinanceInvoiceService.getByReportId(this.inputForm.id, this.invoiceSearchForm).then((data) => {
+				this.invoiceList = data
+				this.invoiceList.forEach(item => {
+					if (item.number) {
+						let num = item.number
+						if (num.indexOf(',') !== -1) {
+							num = num.replace(/,/g, '\n')
+						}
+						item.number = num
+					} else {
+						item.number = ''
+						item.accountDetail = ''
+					}
+				})
+				this.invoiceLoading = false
+			}).catch(() => {
+				this.invoiceLoading = false
+			})
+		},
+		// 重置发票搜索
+		resetInvoiceSearch() {
+			this.invoiceSearchForm = { no: '' }
+			this.searchInvoice()
+		},
+		// 查看发票详情
+		viewInvoice(flag, id) {
+			this.$nextTick(() => {
+				if (this.$refs.invoiceFormDialog) {
+					this.$refs.invoiceFormDialog.init(flag, id)
+				}
+			})
+		},
 	}
 }
 </script>

+ 3 - 2
src/views/cw/workClientInfo/WorkClientForm.vue

@@ -903,6 +903,7 @@
   import cwFinanceInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
   import InvoiceForm from '../invoice/InvoiceForm'
   import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import { defineAsyncComponent } from 'vue'
   export default {
     props: {
       businessId: {
@@ -1100,14 +1101,14 @@
       }
     },
     components: {
-		ProjectRecordsForm: () => import('../projectRecords/ProjectRecordsForm'),
+		ProjectRecordsForm: defineAsyncComponent(() => import('../projectRecords/ProjectRecordsForm')),
       UpLoadComponent,
       SelectTree,
       UserSelect,
       WorkClientListForm,
       ManageLevelTypeListForm,
       OrganizationTypeListForm,
-      ContractNameForm: () => import('../workContract/ContractNameForm'),
+      ContractNameForm: defineAsyncComponent(() => import('../workContract/ContractNameForm')),
       ReportManagementForm,
       InvoiceForm
     },

+ 3 - 3
src/views/cw/workContract/ContractNameForm.vue

@@ -507,6 +507,7 @@
   import InvoiceForm from '../invoice/InvoiceForm'
   import WorkClientForm from '../workClientInfo/WorkClientForm'
   import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import { defineAsyncComponent } from 'vue'
   export default {
     data () {
       return {
@@ -643,13 +644,12 @@
 		WorkClientChooseForm,
 		SelectTree,
 		WorkClientChooseRadio,
-		// WorkClientForm,
+		WorkClientForm,
 		// WorkClientForm: () => import('../workClientInfo/WorkClientForm'),
-		ProjectRecordsForm: () => import('../projectRecords/ProjectRecordsForm'),
+		ProjectRecordsForm: defineAsyncComponent(() => import('../projectRecords/ProjectRecordsForm')),
 		InvoiceForm,
 		ReportManagementForm
 		// InvoiceForm: () => import('../invoice/InvoiceForm'),
-		// ReportManagementForm: () => import('../reportManagement/ReportManagementForm')
     },
     ossService: null,
     // workContractService: null,

+ 1 - 0
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -112,6 +112,7 @@
 								<el-button type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
 								<!-- <el-button type="primary" icon="el-icon-plus" @click="selectAllEvent()">全选</el-button> -->
 								<el-button type="primary" icon="el-icon-plus"
+									v-if="hasPermission('enrollmentRegistration:download')"
 									@click="downloadAttachments()">批量下载附件</el-button>
 
 							</template>