瀏覽代碼

会议室预约,开票管理调整

sangwenwei 11 月之前
父節點
當前提交
8c0a38f944
共有 3 個文件被更改,包括 212 次插入109 次删除
  1. 1 1
      src/views/jy/daily/MeetingRoomForm.vue
  2. 210 107
      src/views/jy/finance/InvoiceFormTask.vue
  3. 1 1
      src/views/jy/monthly/MonthlyForm.vue

+ 1 - 1
src/views/jy/daily/MeetingRoomForm.vue

@@ -453,7 +453,7 @@
 				}
 				return arrs;
 			},
-			checkTime(){
+			async checkTime(){
 				this.dateList=this.$dictUtils.getDictList('jy_meeting_date')
 				console.log('this.dateList',this.dateList)
 				this.inputForm.startTime=''

+ 210 - 107
src/views/jy/finance/InvoiceFormTask.vue

@@ -1,6 +1,6 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
-    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+    <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
              label-width="160px" @submit.native.prevent>
       <el-divider content-position="left"><i class="el-icon-document"></i>
         基本信息
@@ -27,54 +27,109 @@
 				:edit-rules="tableRules"
 				:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
 			>
-				<vxe-table-column field="programName" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
-					<template v-slot:edit="scope">
-						<el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.programName"/>
-					</template>
-				</vxe-table-column>
-				<vxe-table-column field="contractName" align="center" title="合同名称" :edit-render="{}">
-					<template v-slot:edit="scope">
-						<el-input @focus="openContractForm()" placeholder="请填写合同名称" :readonly="true" v-model="scope.row.contractName"/>
-					</template>
-				</vxe-table-column>
-				<vxe-table-column field="programNo" align="center" title="项目编号" :edit-render="{}">
-					<template v-slot:edit="scope">
-						<el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
-					</template>
-				</vxe-table-column>
-				<vxe-table-column   field="account" align="center"   title="发票金额(元)" :edit-render="{}">
-					<template v-slot:edit="scope">
-						<el-input
-							v-on:input="scope.row.account=scope.row.account.replace(/[^-0-9.]/g,'')
-  .replace(/^\./g,'')
-  .replace(/\.{2,}/g,'.')
-  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
-  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-							v-model="scope.row.account"
-							controls-position="right"
-							:controls="false"
-							style="width:100%;"
-							placeholder="请输入发票金额(元)"
-							clearable
-						>
-						</el-input>
-					</template>
-				</vxe-table-column>
-				<!--          <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
-				<!--            <template v-slot:edit="scope">-->
-				<!--              <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
-				<!--            </template>-->
-				<!--          </vxe-table-column>-->
-				<!--            <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">-->
-				<!--              <template v-slot:edit="scope">-->
-				<!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
-				<!--              </template>-->
-				<!--            </vxe-table-column>-->
-				<vxe-table-column title="操作" align="center" width="100">
-					<template v-slot="scope">
-						<el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
-					</template>
-				</vxe-table-column>
+				<div v-if="status !== 'audit'">
+					<vxe-table-column field="programName" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+						<template v-slot:edit="scope">
+							<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.programName"/>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column field="contractName" align="center" title="合同名称" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" @focus="openContractForm()" placeholder="请填写合同名称" :readonly="true" v-model="scope.row.contractName"/>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column field="programNo" align="center" title="项目编号" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column  v-if="status === 'taskFormDetail'" field="account" align="center"   title="发票金额(元)" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input
+								v-on:input="scope.row.account=scope.row.account.replace(/[^-0-9.]/g,'')
+								  .replace(/^\./g,'')
+								  .replace(/\.{2,}/g,'.')
+								  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+								  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="scope.row.account"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="请输入发票金额(元)"
+								:disabled="status === 'audit' || status === 'taskFormDetail'"
+								clearable
+							>
+							</el-input>
+						</template>
+					</vxe-table-column>
+					<!--          <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
+					<!--            <template v-slot:edit="scope">-->
+					<!--              <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
+					<!--            </template>-->
+					<!--          </vxe-table-column>-->
+					<!--            <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">-->
+					<!--              <template v-slot:edit="scope">-->
+					<!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
+					<!--              </template>-->
+					<!--            </vxe-table-column>-->
+					<vxe-table-column title="操作" align="center" width="100">
+						<template v-slot="scope">
+							<el-button :disabled="status === 'audit' || status === 'taskFormDetail'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+						</template>
+					</vxe-table-column>
+				</div>
+				<div v-else>
+					<vxe-table-column field="programName" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+						<template v-slot:edit="scope">
+							<el-input v-if="commonJS.isEmpty(scope.row.programId)" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.programName"/>
+							<el-link v-else  type="primary" :underline="false"  @click="viewProject(scope.row)">{{scope.row.programName}}</el-link>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column field="contractName" align="center" title="合同名称" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input v-if="commonJS.isEmpty(scope.row.programId)" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写合同名称" :readonly="true" v-model="scope.row.contractName"/>
+							<el-link v-else  type="primary" :underline="false"  @click="viewContract(scope.row)">{{scope.row.contractName}}</el-link>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column field="programNo" align="center" title="项目编号" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
+						</template>
+					</vxe-table-column>
+					<vxe-table-column v-if="isCw"  field="account" align="center"   title="发票金额(元)" :edit-render="{}">
+						<template v-slot:edit="scope">
+							<el-input
+								v-on:input="scope.row.account=scope.row.account.replace(/[^-0-9.]/g,'')
+								  .replace(/^\./g,'')
+								  .replace(/\.{2,}/g,'.')
+								  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+								  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="scope.row.account"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="请输入发票金额(元)"
+								clearable
+							>
+							</el-input>
+						</template>
+					</vxe-table-column>
+					<!--          <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
+					<!--            <template v-slot:edit="scope">-->
+					<!--              <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
+					<!--            </template>-->
+					<!--          </vxe-table-column>-->
+					<!--            <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">-->
+					<!--              <template v-slot:edit="scope">-->
+					<!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
+					<!--              </template>-->
+					<!--            </vxe-table-column>-->
+					<vxe-table-column title="操作" align="center" width="100">
+						<template v-slot="scope">
+							<el-button :disabled="status === 'audit' || status === 'taskFormDetail'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+						</template>
+					</vxe-table-column>
+				</div>
 			</vxe-table>
 		</el-col>
       </el-row>
@@ -85,7 +140,7 @@
                         :rules="[
                         {required: true, message:'发票类型不能为空', trigger:'blur'}
                ]">
-            <el-radio v-model="inputForm.type" v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
+            <el-radio :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.type" v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
               {{item.label}}</el-radio>
           </el-form-item>
         </el-col>
@@ -101,7 +156,7 @@
                         :rules="[
                         {required: true, message:'开票类型不能为空', trigger:'blur'}
                ]">
-            <el-radio v-model="inputForm.billingType" @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
+            <el-radio :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.billingType" @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
               {{item.label}}</el-radio>
           </el-form-item>
         </el-col>
@@ -123,6 +178,7 @@
               :value="inputForm.name"
               :clearable="true"
               :accordion="true"
+			  :disabled="status === 'audit' || status === 'taskFormDetail'"
               @getValue="(value) => {inputForm.name=value}"/>
           </el-form-item>
         </el-col>
@@ -133,7 +189,7 @@
                         :rules="[
                         {required: true, message:'实际开票单位不能为空', trigger:'blur'},{required: true, message:'实际开票单位不能为空', trigger:'change'}
                ]">
-            <el-input :readonly="true" placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
+            <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
           </el-form-item>
         </el-col>
         <template v-if="inputForm.type === '1'">
@@ -142,7 +198,7 @@
                           :rules="[
                       {required: true, message:'纳税人识别号不能为空', trigger:'blur'},{required: true, message:'纳税人识别号不能为空', trigger:'change'}
              ]">
-              <el-input v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -150,7 +206,7 @@
                           :rules="[
                       {required: true, message:'地址不能为空', trigger:'blur'},{required: true, message:'地址不能为空', trigger:'change'}
              ]">
-              <el-input v-model="inputForm.address" placeholder="请填写地址" ></el-input>
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.address" placeholder="请填写地址" ></el-input>
             </el-form-item>
           </el-col>
           <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -158,7 +214,7 @@
                           :rules="[
                       {required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
              ]">
-              <el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
 				  <template #append>
 					  <el-button icon="el-icon-search" @click="openBillingChoose()"></el-button>
 				  </template>
@@ -171,7 +227,7 @@
                           :rules="[
                       {required: true, message:'开户银行不能为空', trigger:'blur'},{required: true, message:'开户银行不能为空', trigger:'change'}
              ]">
-              <el-select v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+              <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                 <el-option
                   v-for="item in bankList"
                   :key="item.id"
@@ -204,21 +260,21 @@
             <el-form-item label="纳税人识别号" prop="taxpayerIdentificationNo"
                           :rules="[
              ]">
-              <el-input v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col v-if="inputForm.billingType === '1'" :span="12">
             <el-form-item label="地址" prop="address"
                           :rules="[
              ]">
-              <el-input v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col v-if="inputForm.billingType === '1'" :span="12">
             <el-form-item label="电话" prop="telPhone"
                           :rules="[
              ]">
-              <el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
+              <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
                 <el-button slot="append" icon="el-icon-search" @click="openBillingChoose()"></el-button>
               </el-input>
             </el-form-item>
@@ -227,7 +283,7 @@
             <el-form-item label="开户银行" prop="openBank"
                           :rules="[
              ]">
-              <el-select v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+              <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                 <el-option
                   v-for="item in bankList"
                   :key="item.id"
@@ -251,7 +307,7 @@
                         :rules="[
                         {required: true, message:'收款类型不能为空', trigger:'blur'}
                ]">
-            <el-select v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
+            <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
               <el-option
                 v-for="item in $dictUtils.getDictList('invoice_receivables_type')"
                 :key="item.value"
@@ -266,7 +322,7 @@
                         :rules="[
                         {required: true, message:'开票内容不能为空', trigger:'blur'}
                ]">
-            <el-select v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
+            <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
               <el-option
                 v-for="item in $dictUtils.getDictList('invoice_billing_content')"
                 :key="item.value"
@@ -277,7 +333,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="发票金额(元)" prop="account"
+          <el-form-item v-if = 'isCw' label="发票金额(元)" prop="account"
                         :rules="[
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
                ]">
@@ -286,16 +342,27 @@
               maxlength="15"
               v-model="inputForm.accountTotal"
 			  :disabled="true"
+			  @change="getTotalAccount"
             >
-
             </el-input>
           </el-form-item>
+			<el-form-item v-else label="发票金额(元)" prop="account"
+						  :rules="[
+               ]">
+				<el-input
+					placeholder="请填写发票金额"
+					maxlength="15"
+					v-model="inputForm.accountTotal"
+					:disabled="true"
+				>
+				</el-input>
+			</el-form-item>
         </el-col >
 		  <el-col :span="12" v-if="(this.inputForm.programId==null || this.inputForm.programId == ''?!isShow:isShow) && status === 'audit'">
 			  <el-form-item label="报备类型" prop="reportType"
 							:rules="[]"
 			  >
-				  <el-select v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
+				  <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
 					  <el-option
 						  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
 						  :key="item.value"
@@ -309,7 +376,7 @@
 			  <el-form-item label="报备类型" prop="reportType"
 							:rules="[{required: true, message:'报备类型不能为空', trigger:'blur'}]"
 			  >
-				  <el-select v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
+				  <el-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
 					  <el-option
 						  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
 						  :key="item.value"
@@ -324,7 +391,7 @@
                         :rules="[
                         {required: true, message:'是否多张开票不能为空', trigger:'blur'}
                ]">
-            <el-radio v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
+            <el-radio :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
               {{item.label}}
             </el-radio>
           </el-form-item>
@@ -333,7 +400,7 @@
           <el-form-item label="开票内容要求" prop="billingContentTerms"
                         :rules="[
                ]">
-            <el-input type="textarea" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
+            <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" type="textarea" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
           </el-form-item>
         </el-col>
 
@@ -368,6 +435,7 @@
 							:rules="[
                  ]">
 				  <el-date-picker
+					  :disabled="status === 'audit' || status === 'taskFormDetail'"
 					  v-model="inputForm.billingDate"
 					  type="date"
 					  value-format="YYYY-MM-DD"
@@ -383,6 +451,7 @@
 							:rules="[
                  ]">
 				  <el-date-picker
+					  :disabled="status === 'audit' || status === 'taskFormDetail'"
 					  v-model="inputForm.collectDate"
 					  type="date"
 					  value-format="YYYY-MM-DD"
@@ -410,6 +479,7 @@
               :value="inputForm.billingPeopleReal"
               :clearable="true"
               :accordion="true"
+			  :disabled="status === 'audit' || status === 'taskFormDetail'"
 			  size="default"
               @getValue="(value) => {inputForm.billingPeopleReal=value}"/>
           </el-form-item>
@@ -431,6 +501,7 @@
               :value="inputForm.reconciliationPeople"
               :clearable="true"
               :accordion="true"
+			  :disabled="status === 'audit' || status === 'taskFormDetail'"
 			  size="default"
               @getValue="(value) => {inputForm.reconciliationPeople=value}"/>
           </el-form-item>
@@ -453,6 +524,7 @@
               :clearable="true"
               :accordion="true"
 			  size="default"
+			  :disabled="status === 'audit' || status === 'taskFormDetail'"
               @getValue="(value) => {inputForm.reconciliationArea=value}"/>
           </el-form-item>
         </el-col>
@@ -461,7 +533,7 @@
           <el-form-item label="备注" prop="remarks"
                         :rules="[
                ]">
-            <el-input maxlength="500" type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
+            <el-input :disabled="status === 'audit' || status === 'taskFormDetail'" maxlength="500" type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
           </el-form-item>
         </el-col>
       </el-row>
@@ -684,6 +756,8 @@
     <ContractForm  ref="contractForm" @getContract="getContract"></ContractForm>
     <WorkClientForm  ref="workClientForm" @getWorkClientRadioChoose="getWorkClient"></WorkClientForm>
     <WorkClientBillingChooseRadio ref="billingChoose" @getBilling="getBilling"></WorkClientBillingChooseRadio>
+	  <ProjectDia  ref="projectDia" @refreshDataList="refreshList"></ProjectDia>
+	  <ContractAddForm ref="contractAddForm" @refreshDataList="refreshList"></ContractAddForm>
 
   </div>
 </template>
@@ -699,6 +773,9 @@
   import SelectUserTree from '@/views/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import WorkClientBillingChooseRadio from './WorkClientBillingChooseRadio'
+  import ProjectDia from '@/views/jy/project/ProjectDia'
+  import ProjectInfoService from "@/api/jy/ProjectInfoService";
+  import ContractAddForm from '@/views/jy/workContractInfo/ContractAddForm'
   import XEUtils from 'xe-utils'
   export default {
     props: {
@@ -781,14 +858,17 @@
         detailKey: '',
         receivablesKey: '',
 	    isShow:false,
-	    recordType:''
+	    recordType:'',
+		  isCw: false
       }
     },
 	  CommonApi:null,
 	  workClientService: null,
+	  ProjectInfoService: null,
     created () {
 		this.commonApi = new CommonApi()
 		this.workClientService = new WorkClientService()
+		this.projectInfoService=new ProjectInfoService()
     },
     mounted () {
     },
@@ -799,7 +879,9 @@
       SelectUserTree,
       SelectTree,
       UpLoadComponent,
-      WorkClientBillingChooseRadio
+      WorkClientBillingChooseRadio,
+		ProjectDia,
+		ContractAddForm
     },
     computed: {
       bus: {
@@ -970,24 +1052,32 @@
 					if (this.commonJS.isEmpty(this.inputForm.billingDate)) {
 						this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
 					}
-					if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && (this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList) || this.inputForm.financeInvoiceDetailDTOList.length === 0)) {
+					if (this.status !== 'taskFormDetail') {
 						this.inputForm.financeInvoiceDetailDTOList = []
-						let i = this.inputForm.financeInvoiceBaseDTOList.length
-						let sun = 0
-						for (let j = 0; j < i; j++) {
-							sun += parseFloat(this.inputForm.financeInvoiceBaseDTOList[j].account)
-						}
-						console.log(sun)
-						this.inputForm.financeInvoiceDetailDTOList.push({
-							code: '',
-							number: '',
-							account: sun,
-							rate: '',
-							amount: '',
-							tax: '',
-							allAmount: ''
-						})
+					// 	let i = this.inputForm.financeInvoiceBaseDTOList.length
+					// 	let sun = 0
+					// 	for (let j = 0; j < i; j++) {
+					// 		sun += parseFloat(this.inputForm.financeInvoiceBaseDTOList[j].account)
+					// 	}
+					// 	console.log(sun)
+					// 	this.inputForm.financeInvoiceDetailDTOList.push({
+					// 		code: '',
+					// 		number: '',
+					// 		account: sun,
+					// 		rate: '',
+					// 		amount: '',
+					// 		tax: '',
+					// 		allAmount: ''
+					// 	})
 					}
+					//获取当前的审核节点
+					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=> {
+						if (this.commonJS.isNotEmpty(data)) {
+							if (data === '财务审核') {
+								this.isCw = true
+							}
+						}
+					})
 					this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'jy_invoice')
 					this.loading = false
 				})
@@ -1021,11 +1111,28 @@
 					this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 					throw new Error()
 				} else {
-					 this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=> {
-						 if (this.commonJS.isNotEmpty(data)) {
-							 if (data === '财务审核') {
+					 this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=> {
+						 if (this.commonJS.isNotEmpty(da)) {
+							 if (da === '财务审核') {
 								 this.inputForm.status = '5'
 								 if (this.inputForm.status === '5') {
+									 this.inputForm.account = this.inputForm.accountTotal
+									 if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
+										 let i = this.inputForm.financeInvoiceBaseDTOList.length
+										 for (let j = 0; j < i; j++) {
+											 if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].programName)) {
+												 this.loading = false
+												 this.$message.error('第' + (j + 1) + '行的基本信息不能为空')
+												 throw new Error()
+											 }
+											 if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].account)) {
+												 this.loading = false
+												 this.$message.error('第' + (j + 1) + '行的发票金额不能为空')
+												 throw new Error()
+											 }
+										 }
+									 }
+
 									 let acc = 0
 									 this.inputForm.financeInvoiceDetailDTOList.forEach((item, index) => {
 										 if (this.commonJS.isEmpty(item.number)) {
@@ -1139,22 +1246,6 @@
 					throw new Error()
 				}
 			}
-
-			if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
-				let i = this.inputForm.financeInvoiceBaseDTOList.length
-				for (let j = 0; j < i; j++) {
-					if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].programName)) {
-						this.loading = false
-						this.$message.error('第' + (j + 1) + '行的基本信息不能为空')
-						throw new Error()
-					}
-					if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].account)) {
-						this.loading = false
-						this.$message.error('第' + (j + 1) + '行的发票金额不能为空')
-						throw new Error()
-					}
-				}
-			}
 			if (this.inputForm.status === '5') {
 				let acc = 0
 				this.inputForm.financeInvoiceDetailDTOList.forEach((item, index) => {
@@ -1694,7 +1785,19 @@
 				h('span', { style: 'color: #F56C6C' }, '*'),
 				h('span', ' ' + column.label)
 			];
-		}
+		},
+		//查看项目
+		viewProject (row) {
+			this.projectInfoService.findById(row.programId).then((data)=>{
+				this.$refs.projectDia.init('view', data.id,data.auditId1, data.auditId2, data.auditId3,data.sealId,data.outInstanceId,data.reportsSubmitId,data.archiveId,data.eiaId)
+			})
+		},
+		//查看合同
+		viewContract (row) {
+			this.projectInfoService.findById(row.programId).then((data)=>{
+				this.$refs.contractAddForm.init('view', data.contractId)
+			})
+		},
 	}
   }
 </script>

+ 1 - 1
src/views/jy/monthly/MonthlyForm.vue

@@ -107,8 +107,8 @@
 			  <el-button type="primary" @click="doSubmit()" v-if="method !== 'view'" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
 			</span>
 			</template>
+			<ProjectDia  ref="projectDia" @refreshDataList="refreshList"></ProjectDia>
 		</el-dialog>
-		<ProjectDia  ref="projectDia" @refreshDataList="refreshList"></ProjectDia>
 
 	</div>
 </template>