|
@@ -187,11 +187,11 @@
|
|
|
<el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12" v-if="preInvoice && !completed">
|
|
|
+ <el-col :span="12" v-if="preInvoice && completed">
|
|
|
<el-form-item label="开票编号" prop="invoiceNumber"
|
|
|
:rules="[{required: true, message:'开票编号不能为空', trigger:'change'}
|
|
|
]">
|
|
|
- <el-input @focus="openInoviceForm()" :disabled="status === 'audit' || status === 'taskFormDetail' ||inputForm.isCompleteInvoice !== '0'" v-model="inputForm.invoiceNumber" placeholder="请填写开票编号" clearable></el-input>
|
|
|
+ <el-input @focus="openInoviceForm()" :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.invoiceNumber" placeholder="请填写开票编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -636,7 +636,7 @@
|
|
|
searchForm: {
|
|
|
programId:''
|
|
|
},
|
|
|
- completed:false
|
|
|
+ completed:true
|
|
|
}
|
|
|
},
|
|
|
ReportCancellApplyService: null,
|
|
@@ -794,6 +794,7 @@
|
|
|
// this.$refs.uploadComponent.clearUpload()
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
+ console.log('in',this.inputForm)
|
|
|
this.searchForm.programId = data.projectId
|
|
|
if (this.commonJS.isEmpty(this.inputForm.createDate)) {
|
|
|
this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
@@ -833,22 +834,22 @@
|
|
|
console.log('total',this.total)
|
|
|
})
|
|
|
//查询该项目下的报告是否已经关联完成
|
|
|
- projectReportService.getCompleteReport(this.inputForm.projectId).then((da)=>{
|
|
|
- //结果为true时说明已完成关联
|
|
|
- if (da){
|
|
|
- console.log('32',da)
|
|
|
- //若已经发起,则进行展示
|
|
|
- if (this.commonJS.isNotEmpty(data.applyStatus) && data.applyStatus !== '0'){
|
|
|
- this.completed = false
|
|
|
- }else {
|
|
|
- //未发起 则进行选择
|
|
|
- this.completed = true
|
|
|
- }
|
|
|
- }else {
|
|
|
- this.completed = false
|
|
|
- }
|
|
|
- console.log('com',this.completed)
|
|
|
- })
|
|
|
+ // projectReportService.getCompleteReport(this.inputForm.projectId).then((da)=>{
|
|
|
+ // //结果为true时说明已完成关联
|
|
|
+ // if (da){
|
|
|
+ // console.log('32',da)
|
|
|
+ // //若已经发起,则进行展示
|
|
|
+ // if (this.commonJS.isNotEmpty(data.applyStatus) && data.applyStatus !== '0'){
|
|
|
+ // this.completed = false
|
|
|
+ // }else {
|
|
|
+ // //未发起 则进行选择
|
|
|
+ // this.completed = true
|
|
|
+ // }
|
|
|
+ // }else {
|
|
|
+ // this.completed = false
|
|
|
+ // }
|
|
|
+ // console.log('com',this.completed)
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
this.loading = false
|
|
@@ -908,7 +909,8 @@
|
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
} else {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.isCompleteInvoice) && this.inputForm.isCompleteInvoice !== '0'){
|
|
|
+ //判断项目是否是预开票
|
|
|
+ if (this.preInvoice && this.completed){
|
|
|
this.$confirm('该项目是否已完成预开票关联','提示',{
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: '是',
|
|
@@ -929,7 +931,7 @@
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.isCompleteInvoice) && this.inputForm.isCompleteInvoice !== '0'){
|
|
|
+ if (this.preInvoice && this.completed){
|
|
|
this.$confirm('该项目是否已完成预开票关联','提示',{
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: '是',
|
|
@@ -1232,14 +1234,7 @@
|
|
|
this.inputForm.cwProjectInfoList = []
|
|
|
//校验当前项目是否预开票及项目下是否存在已开票信息
|
|
|
this.checkIsPreInvoice()
|
|
|
- //查询该项目下的报告是否已完成关联
|
|
|
- projectReportService.getCompleteReport(row.id).then((data)=>{
|
|
|
- if (data){
|
|
|
- this.completed = true
|
|
|
- this.preInvoice = false
|
|
|
- }
|
|
|
- console.log('com',this.completed)
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
openWorkClient () {
|
|
|
this.$refs.reportServiceUnitForm.init(this.inputForm.projectId)
|
|
@@ -1331,15 +1326,36 @@
|
|
|
|
|
|
},
|
|
|
checkIsPreInvoice(){
|
|
|
+ //查询是否是预开票项目
|
|
|
projectRecordsService.getInvoiceTotal(this.inputForm.projectId).then((data)=>{
|
|
|
- if (data.isPreInvoice === '1' && data.invoiceTotal > 0){
|
|
|
+ //当项目为预开票时,显示开票编号
|
|
|
+ if (data.isPreInvoice === '1' && data.invoiceTotal >= 0){
|
|
|
+ //预开票且存在发票的情况
|
|
|
this.preInvoice = true
|
|
|
+ }else {
|
|
|
+ //否则不进行展示
|
|
|
+ this.preInvoice = false
|
|
|
+ }
|
|
|
+ if (data.isPreInvoice === '1'){
|
|
|
+ // //查询该项目下的报告是否已完成关联
|
|
|
+ projectReportService.getCompleteReport(this.inputForm.projectId).then((da)=>{
|
|
|
+ if (da){
|
|
|
+ //判断该报告是否已经发起
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.applyStatus) && this.commonJS.isNotEmpty(this.inputForm.invoiceNumber)){
|
|
|
+ this.completed = true
|
|
|
+ }else {
|
|
|
+ this.completed = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log('com',this.completed)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
//打开发票列表
|
|
|
openInoviceForm(){
|
|
|
- this.$refs.financeInvoiceRadioForm.init(this.inputForm.projectId)
|
|
|
+ this.$refs.financeInvoiceRadioForm.init(this.inputForm.projectId,this.inputForm.id)
|
|
|
},
|
|
|
getInvoice(row,total){
|
|
|
this.inputForm.invoiceNumber = row.no
|