|
@@ -87,6 +87,13 @@
|
|
|
placeholder="请填写合同编号" clearable></el-input>
|
|
placeholder="请填写合同编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="12" style="display: none;">
|
|
|
|
|
+ <el-form-item label="项目id" prop="programProjectListInfo.id" :rules="[
|
|
|
|
|
+ ]">
|
|
|
|
|
+ <el-input :disabled="true" v-model="inputForm.programProjectListInfo.id" maxlength="64"
|
|
|
|
|
+ placeholder="项目id" clearable></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12" v-if="this.inputForm.reportType != 2">
|
|
<el-col :span="12" v-if="this.inputForm.reportType != 2">
|
|
@@ -678,6 +685,7 @@ export default {
|
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then((data) => {
|
|
this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then((data) => {
|
|
|
|
|
+ console.log("init中的数据",data)
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
if (data.programProjectListInfo) {
|
|
if (data.programProjectListInfo) {
|
|
|
if (data.programProjectListInfo.reportType) {
|
|
if (data.programProjectListInfo.reportType) {
|
|
@@ -716,9 +724,9 @@ export default {
|
|
|
this.inputForm.otherFileList = []
|
|
this.inputForm.otherFileList = []
|
|
|
}
|
|
}
|
|
|
// 根据项目类型,判断开票日期是否填写
|
|
// 根据项目类型,判断开票日期是否填写
|
|
|
- if (this.inputForm.programProjectListInfo.projectMould != 2) {
|
|
|
|
|
|
|
+ /*if (this.inputForm.programProjectListInfo.projectMould != 2) {
|
|
|
this.invoiceDateRule.push({ required: true, message: '开票日期不能为空', trigger: 'blur' })
|
|
this.invoiceDateRule.push({ required: true, message: '开票日期不能为空', trigger: 'blur' })
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
// 查询对应的项目发票数据
|
|
// 查询对应的项目发票数据
|
|
|
this.handleGetInvoiceInfo(this.inputForm.isInvoice)
|
|
this.handleGetInvoiceInfo(this.inputForm.isInvoice)
|
|
|
this.$refs.uploadComponentReport.newUpload(method, this.inputForm.reportFileList, 'program', 2048, '评估报告及评估明细表')
|
|
this.$refs.uploadComponentReport.newUpload(method, this.inputForm.reportFileList, 'program', 2048, '评估报告及评估明细表')
|
|
@@ -1040,25 +1048,37 @@ export default {
|
|
|
this.inputForm.currentDisposePersonName = user[0].name
|
|
this.inputForm.currentDisposePersonName = user[0].name
|
|
|
this.inputForm.currentDisposePerson = user[0].id
|
|
this.inputForm.currentDisposePerson = user[0].id
|
|
|
},
|
|
},
|
|
|
- // 选择是否开票后查询项目关联的发票信息
|
|
|
|
|
- handleGetInvoiceInfo(val) {
|
|
|
|
|
- if (val == 1) {
|
|
|
|
|
- if (this.inputForm.programProjectListInfo.name) {
|
|
|
|
|
- this.financeInvoiceService.findInvoiceByProjectName({
|
|
|
|
|
- programName: this.inputForm.programProjectListInfo.name
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.records && res.records.length > 0) {
|
|
|
|
|
- const { records } = res
|
|
|
|
|
- this.invoiceList = records.map(item => {
|
|
|
|
|
- return item.number
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.invoiceList = ["暂未查询到发票信息"]
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 选择是否开票后查询项目关联的发票信息
|
|
|
|
|
+ handleGetInvoiceInfo(val) {
|
|
|
|
|
+ console.log(this.inputForm.programProjectListInfo)
|
|
|
|
|
+ if (val == 1) {
|
|
|
|
|
+ if (this.inputForm.programProjectListInfo.id) {
|
|
|
|
|
+ this.financeInvoiceService.findInvoiceByProjectName({
|
|
|
|
|
+ programId: this.inputForm.programProjectListInfo.id
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.records && res.records.length > 0) {
|
|
|
|
|
+ const { records } = res
|
|
|
|
|
+ this.invoiceList = records.map(item => {
|
|
|
|
|
+ return item.number
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ // ========================
|
|
|
|
|
+ // 🔥 只新增这一段:取第一条 account>0 的 billingDate
|
|
|
|
|
+ // ========================
|
|
|
|
|
+ // 判定:如果 invoiceDate 已经有值,就不执行
|
|
|
|
|
+ if (!this.inputForm.invoiceDate) {
|
|
|
|
|
+ const firstItem = records.find(item => item.account > 0);
|
|
|
|
|
+ this.billingDate = firstItem ? firstItem.billingDate : "";
|
|
|
|
|
+ this.inputForm.invoiceDate = this.billingDate;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.invoiceList = ["暂未查询到发票信息"]
|
|
|
|
|
+ this.billingDate = ""; // 无数据时清空
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|