user5 7 ヶ月 前
コミット
8d98d865b0

+ 1 - 1
src/views/cw/fillingbatch/FillingbatchForm.vue

@@ -39,7 +39,7 @@
 			<el-divider content-position="left"><i class="el-icon-document"></i>
 				归档项目信息 (<a style="color: red;font-size: 14px">根据档案管理要求,一次批量归档的报告号类型需一致,不能混装。如:全是“苏兴咨字【xx】xx”或全是“苏兴内审字【xx】xx”</a>)
 			</el-divider>
-			<el-row :gutter="15">
+			<el-row :gutter="15" style="margin-bottom: 20px">
 				<el-button style="margin-left: 80px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'"  @click="insertEvent" plain>
 					添加项目信息
 				</el-button>

+ 84 - 98
src/views/cw/invoice/InvoiceFormTask.vue

@@ -933,13 +933,13 @@
 		  getKeyWatch(keyWatch) {
 			  this.keyWatch = keyWatch
 		  },
-		  init(method, id) {
-			  this.bj1 = ''
-			  this.importVisible = false
-			  this.method = method
+		  async init(method, id) {
+			  this.bj1 = '';
+			  this.importVisible = false;
+			  this.method = method;
 			  this.inputForm = {
 				  checkType: '',
-				  accountTotal: '',//发票汇总金额
+				  accountTotal: '', // 发票汇总金额
 				  id: '',
 				  financeInvoiceBaseDTOList: [],
 				  programName: '',
@@ -987,122 +987,108 @@
 				  reportType: '',
 				  tenantId: '',
 				  actualDrawerEmailAddress: ''
-			  }
-			  // if (method === 'add') {
-			  //   this.title = `新建发票`
-			  // } else if (method === 'edit') {
-			  //   this.title = '修改发票'
-			  // } else if (method === 'view') {
-			  //   this.title = '查看发票信息'
-			  // }
-			  this.inputForm.id = id
-			  this.visible = true
-			  this.loading = false
-			  this.$nextTick(() => {
-				  var user = this.$TOOL.data.get("USER_INFO")
-				  this.inputForm.tenantId = user.tenantDTO.id
-				  userService.queryById(user.id).then((data) => {
-					  this.userPhone = data.mobile
-					  this.userEmail = data.email
+			  };
+
+			  this.inputForm.id = id;
+			  this.visible = true;
+			  this.loading = false;
+
+			  this.$nextTick(async () => {
+				  try {
+					  const user = this.$TOOL.data.get("USER_INFO");
+					  this.inputForm.tenantId = user.tenantDTO.id;
+
+					  // 确保userService.queryById完成后再执行后续代码
+					  const userData = await userService.queryById(user.id);
+					  this.userPhone = userData.mobile;
+					  this.userEmail = userData.email;
+
+					  // 重置表单字段
+					  this.$refs.inputForm.resetFields();
+
+					  // 获取发票数据并处理
+					  this.loading = true;
+					  const invoiceData = await financeInvoiceService.queryById(this.inputForm.id);
+
+					  this.$refs.uploadComponent.clearUpload();
+					  this.inputForm = this.recover(this.inputForm, invoiceData);
 
-				  });
-				  this.$refs.inputForm.resetFields()
-				  this.loading = true
-				  financeInvoiceService.queryById(this.inputForm.id).then((data) => {
-					  this.$refs.uploadComponent.clearUpload()
-					  this.inputForm = this.recover(this.inputForm, data)
 					  if (this.commonJS.isEmpty(this.inputForm.actualDrawerEmailAddress)) {
-						  this.inputForm.actualDrawerEmailAddress = this.userEmail
+						  this.inputForm.actualDrawerEmailAddress = this.userEmail;
 					  }
-					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+					  // 确保对象深拷贝
+					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm));
+
+					  // 加载银行账户信息
 					  if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
-						  this.bankList = []
-						  workClientService.queryById(this.inputForm.billingWorkplaceRealId).then((data) => {
-							  if (this.commonJS.isNotEmpty(data.cwWorkClientBillingDTOList)) {
-								  data.cwWorkClientBillingDTOList.forEach(i => {
-									  i.ourBank = i.accountHolder
-									  this.bankList.push(i)
-									  this.inputForm.openBank = i.ourBank
-								  })
-							  } else {
-								  this.bankList = []
-							  }
-						  })
-					  }
+						  this.bankList = [];
+						  const workClientData = await workClientService.queryById(this.inputForm.billingWorkplaceRealId);
 
-					  if (this.commonJS.isEmpty(this.inputForm.type)) {
-						  this.inputForm.type = '1'
-					  }
-					  if (this.commonJS.isEmpty(this.inputForm.billingType)) {
-						  this.inputForm.billingType = '1'
-					  }
-					  if (this.commonJS.isEmpty(this.inputForm.receivablesType)) {
-						  this.inputForm.receivablesType = '2'
+						  if (this.commonJS.isNotEmpty(workClientData.cwWorkClientBillingDTOList)) {
+							  workClientData.cwWorkClientBillingDTOList.forEach(i => {
+								  i.ourBank = i.accountHolder;
+								  this.bankList.push(i);
+								  this.inputForm.openBank = i.ourBank;
+							  });
+						  } else {
+							  this.bankList = [];
+						  }
 					  }
+
+					  // 设置默认值
+					  this.inputForm.type = this.commonJS.isEmpty(this.inputForm.type) ? '1' : this.inputForm.type;
+					  this.inputForm.billingType = this.commonJS.isEmpty(this.inputForm.billingType) ? '1' : this.inputForm.billingType;
+					  this.inputForm.receivablesType = this.commonJS.isEmpty(this.inputForm.receivablesType) ? '2' : this.inputForm.receivablesType;
 					  if (this.status === 'audit') {
-						  this.inputForm.billingPeople = this.$store.state.user.name
-					  }
-					  if (this.commonJS.isEmpty(this.inputForm.billingPeopleId)) {
-						  this.inputForm.billingPeopleId = this.$store.state.user.id
-					  }
-					  console.log('billingPeopleReal', this.inputForm.billingPeopleReal)
-					  if (this.commonJS.isEmpty(this.inputForm.billingPeopleReal)) {
-						  this.inputForm.billingPeopleReal = this.$store.state.user.id
-					  }
-					  // console.log('reconciliationPeople', this.inputForm.reconciliationPeople)
-					  // if (this.commonJS.isEmpty(this.inputForm.reconciliationPeople)) {
-						//   this.inputForm.reconciliationPeople = this.$store.state.user.id
-					  // }
-					  if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
-						  this.inputForm.financeInvoiceBaseDTOList = []
-					  }
-					  if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList) || this.inputForm.workAttachmentDtoList.length === 0) {
-						  this.inputForm.workAttachmentDtoList = []
-					  }
-					  if (this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) || this.inputForm.financeInvoiceReceivablesDTOList.length === 0) {
-						  this.inputForm.financeInvoiceReceivablesDTOList = []
+						  this.inputForm.billingPeople = this.$store.state.user.name;
 					  }
+					  this.inputForm.billingPeopleId = this.commonJS.isEmpty(this.inputForm.billingPeopleId) ? this.$store.state.user.id : this.inputForm.billingPeopleId;
+
+					  // 初始化数据
+					  this.inputForm.billingPeopleReal = this.commonJS.isEmpty(this.inputForm.billingPeopleReal) ? this.$store.state.user.id : this.inputForm.billingPeopleReal;
+					  this.inputForm.financeInvoiceBaseDTOList = this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList) ? [] : this.inputForm.financeInvoiceBaseDTOList;
+					  this.inputForm.workAttachmentDtoList = this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList) ? [] : this.inputForm.workAttachmentDtoList;
+					  this.inputForm.financeInvoiceReceivablesDTOList = this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) ? [] : this.inputForm.financeInvoiceReceivablesDTOList;
+
 					  if (this.commonJS.isEmpty(this.inputForm.checkType) || this.inputForm.checkType === '0') {
-						  // 是否多张开票  默认为 0 否
-						  this.bj1 = 'bj1'
+						  this.bj1 = 'bj1';
 					  }
 					  if (this.commonJS.isEmpty(this.inputForm.isMultiple) && this.status !== 'taskFormDetail') {
-						  // 是否多张开票  默认为 0 否
-						  this.inputForm.isMultiple = '0'
+						  this.inputForm.isMultiple = '0';
 					  }
+
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
-						  method = 'view'
-						  if (this.status === 'audit'){
-							  this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
+						  method = 'view';
+						  if (this.status === 'audit') {
+							  this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD');
 						  }
 					  }
-					  /*if (this.commonJS.isEmpty(this.inputForm.billingDate)) {
-						  this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
-					  }*/
-					  if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && (this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList) || this.inputForm.financeInvoiceDetailDTOList.length === 0)) {
-						  this.inputForm.financeInvoiceDetailDTOList = []
-						  let i = this.inputForm.financeInvoiceBaseDTOList.length
-						  let sun = this.inputForm.account
-						  // let sun = 0
-						  // for (let j = 0; j < i; j++) {
-						  // 	sun = (100*sun + 100* this.inputForm.financeInvoiceBaseDTOList[j].account)/100
-						  // }
-						  console.log(sun)
+
+					  if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList)) {
+						  this.inputForm.financeInvoiceDetailDTOList = [];
+						  const totalAccount = this.inputForm.account;
 						  this.inputForm.financeInvoiceDetailDTOList.push({
 							  code: '',
 							  number: '',
-							  account: sun,
+							  account: totalAccount,
 							  rate: '',
 							  amount: '',
 							  tax: '',
 							  allAmount: ''
-						  })
+						  });
 					  }
-					  this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'invoice')
-					  this.loading = false
-				  })
-			  })
-		  },
+
+					  this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'invoice');
+					  this.loading = false;
+
+				  } catch (error) {
+					  console.error("Error occurred:", error);
+					  this.loading = false;
+				  }
+			  });
+		  }
+		  ,
 		  saveForm(callback) {
 			  this.doSubmit('save', callback)
 		  },

+ 1 - 1
src/views/cw/reportManagement/ReportManagementList.vue

@@ -129,7 +129,7 @@
 			</vxe-column>
 			<vxe-column min-width="130" title="质量复核" fixed="right" align="center" field="reviewStatus">
 				<template #default="scope">
-					<el-button v-if="scope.row.projectLevel==='1'" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('quality_status_info', scope.row.reviewStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("quality_status", scope.row.reviewStatus, '未开始')}} </el-button>
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('quality_status_info', scope.row.reviewStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("quality_status", scope.row.reviewStatus, '未开始')}} </el-button>
 				</template>
 			</vxe-column>
 			<vxe-column min-width="100" title="报告签发" fixed="right" align="center" field="signAndIssueStatus">

+ 2 - 2
src/views/cw/reportManagement/paperArchiving/ReportPaperArchiving.vue

@@ -242,7 +242,7 @@
 							</el-col>
 						</el-row>
 					</el-form>
-					<el-divider content-position="left"><i class="el-icon-document"></i>
+					<!--<el-divider content-position="left"><i class="el-icon-document"></i>
 						委托方联系人信息
 					</el-divider>
 					<el-row  :gutter="15" >
@@ -321,7 +321,7 @@
 								</vxe-table-column>
 							</vxe-table>
 						</el-col>
-					</el-row>
+					</el-row>-->
 					<el-divider content-position="left"><i class="el-icon-document"></i>
 						项目报告
 					</el-divider>

+ 2 - 1
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -757,12 +757,13 @@
 
           this.loading = true
           projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
+          	console.log(data)
             this.inputForm = this.recover(this.inputForm, data)
 
 			  if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
 				  this.inputForm.contractCategory = '1'
 			  }
-
+				console.log(321312312)
 			  // 根据证书类型  获取字典值
 			  let professionList = this.getProfessionList(this.inputForm.professionType)
 			  if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {