徐滕 3 hete
szülő
commit
ecb3cde48f

+ 4 - 6
src/views/cw/invoice/InvoiceFormTask.vue

@@ -395,7 +395,7 @@
 
 				<el-col :span="12">
 					<el-form v-if="status === 'audit' || status === 'taskFormDetail'"
-						:disabled="true" style="width: 100%" :model="inputForm"
+						:disabled="status === 'taskFormDetail' || isDisabled" style="width: 100%" :model="inputForm"
 						v-loading="loading" :class="method === 'view' ? 'readonly' : ''" label-width="160px"
 						@submit.native.prevent>
 						<el-form-item label="是否手动开票" prop="isOmsBilling" :rules="[
@@ -949,7 +949,7 @@ export default {
 				redInvoiceRelevancyId: '',	//红字发票id
 				relatedInvoice: '1',	//关联发票
 				isSmsNotice: '0',	//是否短信通知
-				isOmsBilling: '1',	//是否手动开票
+				isOmsBilling: '0',	//是否手动开票
 				situationDetail: ''	//情况说明
 			},
 			programRow: '',
@@ -1091,7 +1091,7 @@ export default {
 				redInvoiceRelevancyId: '',	//红字发票id
 				relatedInvoice: '1',	//关联发票
 				isSmsNotice: '0',	//是否短信通知
-				isOmsBilling: '1',	//是否手动开票
+				isOmsBilling: '0',	//是否手动开票
 				situationDetail: ''	//情况说明
 			}
 			// if (method === 'add') {
@@ -1163,9 +1163,7 @@ export default {
 						this.inputForm.isSmsNotice = '0'
 					}
 					if (this.commonJS.isEmpty(this.inputForm.isOmsBilling)) {
-						this.inputForm.isOmsBilling = '1'
-					}else{
-						this.inputForm.isOmsBilling = '1'
+						this.inputForm.isOmsBilling = '0'
 					}
 					if ((this.inputForm.redInvoiceFlag == 1 &&
 						(this.inputForm.relatedInvoice == 0 || this.inputForm.invoiceNumberStr == '' || this.inputForm.invoiceNumberStr == null || this.inputForm.invoiceNumberStr.length == 8))) {

+ 5 - 7
src/views/finance/invoice/InvoiceFormTask.vue

@@ -340,7 +340,7 @@
         <el-col :span="12">
 
           <el-form v-if="status === 'audit' || status === 'taskFormDetail'"
-            :disabled="true" style="width: 100%" :model="inputForm"
+            :disabled="status === 'taskFormDetail' || isDisabled" style="width: 100%" :model="inputForm"
             v-loading="loading" :class="method === 'view' ? 'readonly' : ''" label-width="160px" @submit.native.prevent>
             <el-form-item label="是否手动开票" prop="isOmsBilling" :rules="[
               { required: true, message: '是否手动开票不能为空', trigger: 'change' }
@@ -785,7 +785,7 @@ export default {
         redInvoiceFlag: '0',	//是否红字发票
         redFlushReason: '', //红冲原因
         isSmsNotice: '0',//是否短信通知
-        isOmsBilling: '1',//是否手动开票
+        isOmsBilling: '0',//是否手动开票
         redInvoiceRelevancyNumber: '',	//红字发票编号
         invoiceNumberStr: '',	//红字发票号
         redInvoiceRelevancyId: '',	//红字发票id
@@ -916,7 +916,7 @@ export default {
         redInvoiceFlag: '0',	//是否红字发票
         redFlushReason: '', //红冲原因
         isSmsNotice: '0',//是否短信通知
-        isOmsBilling: '1',//是否手动开票
+        isOmsBilling: '0',//是否手动开票
         redInvoiceRelevancyNumber: '',	//红字发票编号
         invoiceNumberStr: '',	//红字发票号
         redInvoiceRelevancyId: '',	//红字发票id
@@ -986,10 +986,8 @@ export default {
             this.inputForm.isSmsNotice = '0'
           }
           if (this.commonJS.isEmpty(this.inputForm.isOmsBilling)) {
-            this.inputForm.isOmsBilling = '1'
-          }else{
-			  this.inputForm.isOmsBilling = '1'
-		  }
+            this.inputForm.isOmsBilling = '0'
+          }
           if ((this.inputForm.redInvoiceFlag == 1 &&
             (this.inputForm.relatedInvoice == 0 || this.inputForm.invoiceNumberStr == '' || this.inputForm.invoiceNumberStr == null || this.inputForm.invoiceNumberStr.length == 8))) {
             this.inputForm.isOmsBilling = "1"

+ 41 - 21
src/views/program/registered/ProjectArchiveForm.vue

@@ -87,6 +87,13 @@
                 placeholder="请填写合同编号" clearable></el-input>
             </el-form-item>
           </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">
@@ -678,6 +685,7 @@ export default {
         this.$refs.inputForm.resetFields()
         this.loading = true
         this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then((data) => {
+			console.log("init中的数据",data)
           this.inputForm = this.recover(this.inputForm, data)
           if (data.programProjectListInfo) {
             if (data.programProjectListInfo.reportType) {
@@ -716,9 +724,9 @@ export default {
             this.inputForm.otherFileList = []
           }
           // 根据项目类型,判断开票日期是否填写
-          if (this.inputForm.programProjectListInfo.projectMould != 2) {
+          /*if (this.inputForm.programProjectListInfo.projectMould != 2) {
             this.invoiceDateRule.push({ required: true, message: '开票日期不能为空', trigger: 'blur' })
-          }
+          }*/
           // 查询对应的项目发票数据
           this.handleGetInvoiceInfo(this.inputForm.isInvoice)
           this.$refs.uploadComponentReport.newUpload(method, this.inputForm.reportFileList, 'program', 2048, '评估报告及评估明细表')
@@ -1040,25 +1048,37 @@ export default {
       this.inputForm.currentDisposePersonName = user[0].name
       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 = ""; // 无数据时清空
+					  }
+				  })
+			  }
+		  }
+	  }
 
   }
 }

+ 5 - 5
src/views/zs/reportArchieve/ReportArchieveForm.vue

@@ -120,7 +120,7 @@
 					</el-col>
 					<el-col :span="12">
 						<el-form-item label="盒号" prop="fileBoxNumber" :rules="[]">
-							<el-input @blur="checkFileBoxNumber()" v-model="inputForm.fileBoxNumber" class="m-2"
+							<el-input v-model="inputForm.fileBoxNumber" class="m-2"
 								placeholder="请输入盒号" clearable></el-input>
 							<span style="color: #E6A23C; font-weight: bold;">{{ usedReportNo }}</span>
 						</el-form-item>
@@ -403,7 +403,7 @@ export default {
 							this.$message.error('存放地区区位码和特殊最少填一个')
 							throw new Error('存放地区区位码和特殊最少填一个')
 						}
-						if (this.commonJS.isNotEmpty(this.inputForm.fileBoxNumber) && this.commonJS.isNotEmpty(this.inputForm.reportNoType)) {
+						/*if (this.commonJS.isNotEmpty(this.inputForm.fileBoxNumber) && this.commonJS.isNotEmpty(this.inputForm.reportNoType)) {
 							this.reportArchieveService.checkFileBoxNumber(this.inputForm.fileBoxNumber, this.inputForm.reportNoType).then((data) => {
 								if (data) {
 									this.loading = false
@@ -412,7 +412,7 @@ export default {
 									throw new Error(`该盒号已被使用,请重新输入`)
 								}
 							})
-						}
+						}*/
 						this.reportArchieveService.checkReportTypeAndReportNo(this.inputForm.reportNoType, this.inputForm.reportNo).then((data) => {
 							if (!data) {
 								this.loading = false
@@ -523,7 +523,7 @@ export default {
 				}
 			})
 		},
-		checkFileBoxNumber() {
+		/*checkFileBoxNumber() {
 			if (this.commonJS.isNotEmpty(this.inputForm.fileBoxNumber) && this.commonJS.isNotEmpty(this.inputForm.reportNoType)) {
 				this.reportArchieveService.checkFileBoxNumber(this.inputForm.fileBoxNumber, this.inputForm.reportNoType).then((data) => {
 					if (data) {
@@ -534,7 +534,7 @@ export default {
 				})
 			}
 
-		},
+		},*/
 
 
 	}