|
@@ -157,7 +157,7 @@
|
|
|
:rules="[
|
|
|
{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>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -438,6 +438,8 @@
|
|
|
import contractInfoService from '@/api/cw/workContract/ContractInfoService'
|
|
|
import UserSelectSignatory from '../workClientInfo/clientUserSelect'
|
|
|
import CwProjectBusinessTypeService from '@/api/cw/projectBusinessType/CwProjectBusinessTypeService'
|
|
|
+ import projectReportService from "@/api/cw/reportManagement/ProjectReportService";
|
|
|
+ import cwFinanceInvoiceService from "@/api/cw/invoice/CwFinanceInvoiceService";
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -534,6 +536,7 @@
|
|
|
pageSize: 10,
|
|
|
orders: []
|
|
|
},
|
|
|
+ isReport: false
|
|
|
}
|
|
|
},
|
|
|
cwProjectBusinessTypeService: null,
|
|
@@ -677,6 +680,7 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
|
|
|
this.inputForm.projectMoney = ''
|
|
|
}
|
|
|
+ this.checkProject()
|
|
|
this.loading = false
|
|
|
})
|
|
|
})
|
|
@@ -1093,6 +1097,26 @@
|
|
|
this.inputForm.businessType = row.id
|
|
|
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>
|