Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/cw/reimbursementApproval/info/ReimbursementForm.vue
user5 1 year ago
parent
commit
6e6f9266ee

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

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

+ 8 - 0
src/api/cw/reportManagement/ProjectReportService.js

@@ -160,6 +160,14 @@ saveSignatureAnnotator: function (inputForm) {
       params: {projectId: projectId, ...reportForm}
       params: {projectId: projectId, ...reportForm}
     })
     })
   },
   },
+	getIdByProjectId2: function (projectId, reportForm) {
+		return request({
+			url: prefix + '/cwProjectReport/getIdByProjectId2',
+			method: 'get',
+			params: {projectId: projectId, ...reportForm}
+		})
+	},
+
   getIdByClientId: function (clientId, reportForm) {
   getIdByClientId: function (clientId, reportForm) {
     return request({
     return request({
       url: prefix + '/cwProjectReport/getIdByClientId',
       url: prefix + '/cwProjectReport/getIdByClientId',

+ 2 - 1
src/views/common/InvoiceReimbursementUpLoadComponent.vue

@@ -55,7 +55,7 @@
           <template  #default="scope">
           <template  #default="scope">
             <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
             <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
             <el-button text type="primary" key="02" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index,fileList)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
             <el-button text type="primary" key="02" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index,fileList)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
-<!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
+            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
@@ -576,6 +576,7 @@
 		  }
 		  }
       },
       },
       async parentDeleteById (row) {
       async parentDeleteById (row) {
+      	console.log('this.dataListNew',this.dataListNew)
 		  var index = null;
 		  var index = null;
 		  for (var j = 0; j < this.dataListNew.length; j++) {
 		  for (var j = 0; j < this.dataListNew.length; j++) {
 			  if (this.dataListNew[j].name === row.name) {
 			  if (this.dataListNew[j].name === row.name) {

+ 25 - 1
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -157,7 +157,7 @@
 									:rules="[
 									:rules="[
                                  {required: true, message:'有无报告不能为空', trigger:'blur'}
                                  {required: true, message:'有无报告不能为空', trigger:'blur'}
                   ]">
                   ]">
-						  <el-radio v-model="inputForm.isHaveReport" v-for="item in $dictUtils.getDictList('is_have_report')" :label="item.value" style="margin-right: 20px">
+						  <el-radio :disabled="isReport" v-model="inputForm.isHaveReport" v-for="item in $dictUtils.getDictList('is_have_report')" :label="item.value" style="margin-right: 20px">
 							  {{item.label}}</el-radio>
 							  {{item.label}}</el-radio>
 					  </el-form-item>
 					  </el-form-item>
 				  </el-col>
 				  </el-col>
@@ -438,6 +438,8 @@
   import contractInfoService from '@/api/cw/workContract/ContractInfoService'
   import contractInfoService from '@/api/cw/workContract/ContractInfoService'
   import UserSelectSignatory from '../workClientInfo/clientUserSelect'
   import UserSelectSignatory from '../workClientInfo/clientUserSelect'
   import CwProjectBusinessTypeService from '@/api/cw/projectBusinessType/CwProjectBusinessTypeService'
   import CwProjectBusinessTypeService from '@/api/cw/projectBusinessType/CwProjectBusinessTypeService'
+  import projectReportService from "@/api/cw/reportManagement/ProjectReportService";
+  import cwFinanceInvoiceService from "@/api/cw/invoice/CwFinanceInvoiceService";
   export default {
   export default {
     props: {
     props: {
       businessId: {
       businessId: {
@@ -534,6 +536,7 @@
 			  pageSize: 10,
 			  pageSize: 10,
 			  orders: []
 			  orders: []
 		  },
 		  },
+		  isReport: false
       }
       }
     },
     },
 	  cwProjectBusinessTypeService: null,
 	  cwProjectBusinessTypeService: null,
@@ -677,6 +680,7 @@
             if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
             if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
               this.inputForm.projectMoney = ''
               this.inputForm.projectMoney = ''
             }
             }
+            this.checkProject()
             this.loading = false
             this.loading = false
           })
           })
         })
         })
@@ -1093,6 +1097,26 @@
 			this.inputForm.businessType = row.id
 			this.inputForm.businessType = row.id
 			this.inputForm.businessTypeName = row.name
 			this.inputForm.businessTypeName = row.name
 		},
 		},
+		//校验当前项目是否生成报告或根据项目开票
+		checkProject(){
+			projectReportService.getIdByProjectId2(this.inputForm.id,'').then((data)=>{
+				console.log('report',data)
+				if (data.length === 0){
+					this.isReport = false
+				}else {
+					this.isReport = true
+				}
+			})
+			cwFinanceInvoiceService.getByIds2(this.inputForm.id,'').then((data)=>{
+				console.log('invoice',data)
+				if (data.length === 0){
+					this.isReport = false
+				}else {
+					this.isReport = true
+				}
+			})
+
+		}
     }
     }
   }
   }
 </script>
 </script>

File diff suppressed because it is too large
+ 998 - 998
src/views/cw/reimbursementApproval/info/InfoForm.vue


File diff suppressed because it is too large
+ 822 - 822
src/views/cw/reimbursementApproval/info/InfoList.vue


File diff suppressed because it is too large
+ 2413 - 2413
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue