sangwenwei 1 anno fa
parent
commit
e17d499e20

+ 8 - 1
src/api/cw/invoice/CwFinanceInvoiceService.js

@@ -130,7 +130,14 @@ export default {
 			params: {id: param}
 		})
 
-	}
+	},
+	listByProgramId: function (params) {
+		return request({
+			url: prefix + "/cw_finance/invoice/listByProgramId",
+			method: "get",
+			params: params,
+		});
+	},
 
 
 

+ 15 - 1
src/api/cw/projectRecords/ProjectRecordsService.js

@@ -16,6 +16,13 @@ export default {
 			params: params,
 		});
 	},
+	preInvoiceList: function (params) {
+		return request({
+			url: prefix + "/cwProjectRecords/preInvoiceList",
+			method: "get",
+			params: params,
+		});
+	},
 	getList: function (params) {
 		return request({
 			url: prefix + "/cwProjectRecords/getList",
@@ -127,7 +134,14 @@ export default {
 			params:{id:id,projectId:projectId}
 		})
 
-	}
+	},
+	getInvoiceTotal: function (id) {
+		return request({
+			url: prefix + "/cwProjectRecords/getInvoiceTotal",
+			method: "get",
+			params: { id: id },
+		});
+	},
 
 
 };

+ 200 - 0
src/views/cw/invoice/FinanceInvoiceRadioForm.vue

@@ -0,0 +1,200 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择发票"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close()"
+      append-to-body
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+		  <el-form :inline="true"
+				   class="query-form m-b-10"
+				   ref="searchForm"
+				   :model="searchForm"
+				   @keyup.enter.native="list()"
+				   @submit.native.prevent>
+			  <!-- 搜索框-->
+			  <el-row :gutter="0">
+				  <el-form-item prop="no" label="发票申请编号">
+					  <el-input v-model="searchForm.no" placeholder="请输入发票申请编号" clearable></el-input>
+				  </el-form-item>
+				  <el-form-item prop="number" label="发票号">
+					  <el-input v-model="searchForm.number" placeholder="请输入发票号" clearable></el-input>
+				  </el-form-item>
+				  <!--        <el-form-item prop="programName" label="项目名称">-->
+				  <!--          <el-input  v-model="searchForm.programName" placeholder="请输入项目名称" clearable @clear="clearProgram">-->
+				  <!--            <el-button slot="append" @click="openProgramPageForm()" icon="el-icon-search"></el-button>-->
+				  <!--          </el-input>-->
+				  <!--        </el-form-item>-->
+				  <el-form-item  prop="billingDateList" label="开票日期">
+					  <el-date-picker
+						  @change="changeBillingDateList"
+						  v-model="searchForm.billingDateList"
+						  type="daterange"
+						  value-format="YYYY-MM-DD"
+						  range-separator="至"
+						  style="width: 100%  "
+						  start-placeholder="开始日期"
+						  end-placeholder="结束日期"
+						  placement="bottom-start"
+						  clearabl>
+					  </el-date-picker>
+				  </el-form-item>
+				  <el-form-item>
+					  <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+					  <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+				  </el-form-item>
+			  </el-row>
+		  </el-form>
+		  <vxe-table
+			  border="inner"
+			  auto-resize
+			  resizable
+			  :loading="loading"
+			  ref="invoiceTable"
+			  show-header-overflow
+			  show-overflow
+			  highlight-hover-row
+			  :menu-config="{}"
+			  @sort-change="sortChangeHandle"
+			  :export-config="{
+                    remote: true,
+                    filename: `兴光会计发票数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: `兴光会计发票数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    exportMethod: exportMethod,
+                    types: ['xls'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+			  :sort-config="{remote:true}"
+			  :data="dataList"
+			  :checkbox-config="{}">
+			  <vxe-column type="seq" width="60" title="序号"></vxe-column>
+			  <vxe-column type="radio" width="60px"></vxe-column>
+			  <vxe-column min-width="150" title="发票申请编号" align="center" field="no"></vxe-column>
+			  <vxe-column min-width="150" title="发票号" align="center" field="number"></vxe-column>
+			  <vxe-column min-width="150" title="实际开票单位" align="center" field="billingWorkplaceReal"></vxe-column>
+			  <vxe-column min-width="150" title="创建人" align="center" field="createName"></vxe-column>
+			  <vxe-column min-width="120" title="开票日期" align="center" field="billingDate"></vxe-column>
+
+		  </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import financeInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+			no: '',
+          number: '',
+			billingDateList: [],
+          status: '',
+			programId:''
+        },
+		  id:''
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    methods: {
+      init (id) {
+      	console.log('id',id)
+        this.visible = true
+		  this.id = id
+        this.list()
+
+      },
+      // 表单提交
+      getProject () {
+        let row = this.$refs.invoiceTable.getRadioRecord()
+		  let total = this.tablePage.total
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getInvoice', row,total)
+      },
+      list () {
+        this.loading = true
+        // this.searchForm.createId = this.$store.state.user.id
+        this.searchForm.status = '5'
+        this.searchForm.programId = this.id
+		  if (!this.commonJS.isEmpty(this.searchForm.billingDateList)) {
+			  if (!this.commonJS.isEmpty(this.searchForm.billingDateList[0]) && !this.commonJS.isEmpty(this.searchForm.billingDateList[1])) {
+				  this.searchForm.billingDateBegin = this.searchForm.billingDateList[0]
+				  this.searchForm.billingDateEnd = this.searchForm.billingDateList[1]
+			  }
+		  } else {
+			  this.searchForm.billingDateBegin = ''
+			  this.searchForm.billingDateEnd = ''
+		  }
+		  financeInvoiceService.listByProgramId({
+			  'current': this.tablePage.currentPage,
+			  'size': this.tablePage.pageSize,
+			  'orders': this.tablePage.orders,
+			  ...this.searchForm,
+		  }).then((data) => {
+			  console.log('data', data.records)
+			  this.dataList = data.records
+			  this.tablePage.total = data.total
+			  this.loading = false
+		  })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 94 - 40
src/views/cw/invoice/InvoiceFormTask.vue

@@ -64,6 +64,11 @@
 						</el-input>
 					</template>
 				</vxe-table-column>
+				<vxe-table-column field="isPreInvoice" align="center" title="是否预开票" :edit-render="{}">
+					<template #default="scope">
+						{{$dictUtils.getDictLabel('is_pre_invoice', scope.row.isPreInvoice, '')}}
+					</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"/>-->
@@ -784,6 +789,8 @@
   import WorkClientBillingChooseRadio from '@/views/cw/workClientInfo/WorkClientBillingChooseRadio'
   import XEUtils from 'xe-utils'
   import userService from "../../../api/sys/userService";
+  import processService from '@/api/flowable/processService'
+  import CommonApi from '@/api/cw/common/CommonApi'
   export default {
 	  props: {
 		  businessId: {
@@ -857,7 +864,9 @@
 				  billingId: '',
 				  reportType: '',
 				  tenantId: '',
-				  actualDrawerEmailAddress: ''
+				  actualDrawerEmailAddress: '',
+				  procDefId: '',
+				  procDefKey: '',
 			  },
 			  programRow: '',
 			  bankList: [],
@@ -873,9 +882,12 @@
 			  userName: this.$store.state.user.name,
 			  userEmail: '',
 			  userPhone: '',
+			  isPreInvoice:''
 		  }
 	  },
+	  commonApi: null,
 	  created() {
+		  this.commonApi = new CommonApi()
 	  },
 	  mounted() {
 	  },
@@ -1175,16 +1187,15 @@
 				  this.inputForm.status = '2'
 			  } else if (status === 'agree') {
 				  // 审核同意
-				  // if (this.commonJS.isEmpty(this.inputForm.programId)){
-				  // 	if (this.$store.state.user.office.name==='总经办'){
-				  // 		this.inputForm.status= '5'
-				  // 	}else {
-				  // 		this.inputForm.status= '2'
-				  // 	}
-				  // }else {
-				  // 	this.inputForm.status = '5'
-				  // }
-				  this.inputForm.status = '5'
+				  await this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+					  if (this.commonJS.isNotEmpty(data)) {
+						  if (data === '发票管理员审核') {
+							  this.inputForm.status = '5'
+						  }else {
+							  this.inputForm.status = '2'
+						  }
+					  }
+				  })
 			  } else if (status === 'reapply') {
 				  this.inputForm.status = '2'
 			  }
@@ -1273,6 +1284,22 @@
 					  throw new Error('开票时间不可以为空')
 				  }
 			  }
+
+			  if (this.commonJS.isNotEmpty(this.isPreInvoice) && this.isPreInvoice === '1'){
+				  await processService.getByName('会计-预开票申请').then((data) => {
+					  if (!this.commonJS.isEmpty(data.id)) {
+						  this.inputForm.procDefId = data.id
+						  this.inputForm.procDefKey = data.key
+					  }
+				  })
+			  }else {
+				  await processService.getByName('会计-发票申请').then((data) => {
+					  if (!this.commonJS.isEmpty(data.id)) {
+						  this.inputForm.procDefId = data.id
+						  this.inputForm.procDefKey = data.key
+					  }
+				  })
+			  }
 			  this.$refs['inputForm'].validate((valid) => {
 				  if (valid) {
 					  this.loading = true
@@ -1359,6 +1386,10 @@
 						  this.$message.warning('非项目,只能有一条非项目数据')
 						  return
 					  }
+					  if (this.inputForm.financeInvoiceBaseDTOList[0].isPreInvoice === '1') {
+						  this.$message.warning('只能有一条预开票项目')
+						  return
+					  }
 				  }
 				  this.$refs.baseTable.insertAt({})
 				  this.inputForm.financeInvoiceBaseDTOList.push({})
@@ -1410,37 +1441,60 @@
 			  this.programRow = rowIndex
 		  },
 		  getProgram(rows) {
-			  rows.forEach((item, index) => {
-				  this.inputForm.programId = item.id
-				  if (index === 0) {
-					  let r = this.inputForm.financeInvoiceBaseDTOList[this.programRow]
-					  r.programName = item.projectName
-					  r.contractName = item.contractName
-					  r.programNo = item.projectNumber
-					  r.contractId = item.contractId
-					  r.programId = item.id
-					  r.reportNo = item.reportNo
-					  r.reportType = item.reportType
-					  this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
-					  this.bj1 = rows.bj1
-				  } else {
-					  let r = {
-						  programName: item.projectName,
-						  contractName: item.contractName,
-						  programNo: item.projectNumber,
-						  contractId: item.contractId,
-						  programId: item.id,
-						  reportNo: item.reportNo,
-						  reportType: item.reportType
+		  	console.log('rows',rows)
+			  if(rows.length >0){
+				  rows.forEach((item, index) => {
+					  this.inputForm.programId = item.id
+					  if (index === 0) {
+						  let r = this.inputForm.financeInvoiceBaseDTOList[this.programRow]
+						  r.programName = item.projectName
+						  r.contractName = item.contractName
+						  r.programNo = item.projectNumber
+						  r.contractId = item.contractId
+						  r.programId = item.id
+						  r.reportNo = item.reportNo
+						  r.reportType = item.reportType
+						  r.isPreInvoice = item.isPreInvoice
+						  this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
+						  this.bj1 = rows.bj1
+					  } else {
+						  let r = {
+							  programName: item.projectName,
+							  contractName: item.contractName,
+							  programNo: item.projectNumber,
+							  contractId: item.contractId,
+							  programId: item.id,
+							  reportNo: item.reportNo,
+							  reportType: item.reportType,
+							  isPreInvoice : item.isPreInvoice
+						  }
+						  this.$refs.baseTable.insertAt(r)
+						  this.inputForm.financeInvoiceBaseDTOList.push(r)
+						  this.bj1 = rows.bj1
+						  this.baseKey = Math.random()
+
 					  }
-					  this.$refs.baseTable.insertAt(r)
-					  this.inputForm.financeInvoiceBaseDTOList.push(r)
-					  this.bj1 = rows.bj1
-					  this.baseKey = Math.random()
+				  })
+				  this.$forceUpdate()
+				  this.programRow = ''
+			  }else {
+				  let r = {
+					  programName: rows.projectName,
+					  contractName: rows.contractName,
+					  programNo: rows.projectNumber,
+					  contractId: rows.contractId,
+					  programId: rows.id,
+					  reportNo: rows.reportNo,
+					  reportType: rows.reportType,
+					  isPreInvoice : rows.isPreInvoice
 				  }
-			  })
-			  this.$forceUpdate()
-			  this.programRow = ''
+				  this.$refs.baseTable.insertAt(r)
+				  this.inputForm.financeInvoiceBaseDTOList[0] = r
+				  this.baseKey = Math.random()
+				  this.isPreInvoice = rows.isPreInvoice
+				  this.inputForm.programId = rows.id
+			  }
+
 			  // this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
 		  },
 		  openContractForm() {

+ 102 - 47
src/views/cw/invoice/InvoiceList.vue

@@ -390,6 +390,8 @@
         procDefKey: '',
         processDefinitionInvalidId: '',
         procDefInvalidKey: '',
+		  processDefinitionIdPreInvoice: '',
+		  procDefKeyPreInvoice: '',
         isAdmin: false,
 	    financeInvoiceBaseDTOList:[],
 		  recordType:''
@@ -541,6 +543,12 @@
             this.procDefInvalidKey = data.key
           }
         })
+		  processService.getByName('会计-预开票申请').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.processDefinitionIdPreInvoice = data.id
+				  this.procDefKeyPreInvoice = data.key
+			  }
+		  })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -621,36 +629,62 @@
       },
       // 发起发票申请审批
       invoicePush (row) {
-        // 读取流程表单
-        let title = `发起流程【会计-发票申请】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[会计-发票申请]`
-        let status = 'startAndHold'
-        if (row.status === '3') {
-          status = 'startAndClose'
-        } else if (row.status === '4') {
-          status = 'reapplyFlag'
-        }
-        taskService.getTaskDef({ procDefId: this.processDefinitionId,
-          businessId: row.id,
-          businessTable: 'cw_finance_invoice'}).then((data) => {
-            this.$router.push({
-              path: '/flowable/task/TaskForm',
-              query: {
-                ...pick(data,  'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-                procDefId: this.processDefinitionId,
-                procDefKey: this.procDefKey,
-                title: title,
-                formType: data.formType,
-                formUrl: data.formUrl,
-                formTitle: processTitle,
-                businessTable: 'finance_invoice',
-                businessId: row.id,
-                isShow: 'false',
-                status: status,
-                routePath: '/cw/invoice/InvoiceList'
-              }
-            })
-          })
+		  // 读取流程表单
+		  let title = `发起流程【会计-发票申请】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[会计-发票申请]`
+		  let status = 'startAndHold'
+		  if (row.status === '3') {
+			  status = 'startAndClose'
+		  } else if (row.status === '4') {
+			  status = 'reapplyFlag'
+		  }
+      	if (this.commonJS.isNotEmpty(row.isPreInvoice) && row.isPreInvoice === '1'){
+			taskService.getTaskDef({ procDefId: this.processDefinitionIdPreInvoice,
+				businessId: row.id,
+				businessTable: 'cw_finance_invoice'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data,  'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionIdPreInvoice,
+						procDefKey: this.procDefKeyPreInvoice,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'finance_invoice',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/invoice/InvoiceList'
+					}
+				})
+			})
+		}else {
+			taskService.getTaskDef({ procDefId: this.processDefinitionId,
+				businessId: row.id,
+				businessTable: 'cw_finance_invoice'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data,  'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionId,
+						procDefKey: this.procDefKey,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'finance_invoice',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/invoice/InvoiceList'
+					}
+				})
+			})
+		}
+
+
       },
       // 发起发票作废审批
       invoiceInvalidPush (row) {
@@ -691,23 +725,44 @@
           if (row.status === '6' || row.status === '7' || row.status === '8' || row.status === '9') {
             this.invoiceInvalidDetail(row)
           } else {
-            taskService.getTaskDef({
-              procInsId: row.procInsId,
-              procDefId: this.processDefinitionId
-            }).then((data) => {
-              this.$router.push({
-                path: '/flowable/task/TaskFormDetail',
-                query: {
-                  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-                  isShow: 'false',
-                  readOnly: true,
-                  title: '会计-发票申请' + '流程详情',
-                  formTitle: '会计-发票申请' + '流程详情',
-                  businessId: row.id,
-                  status: 'reback'
-                }
-              })
-            })
+          	if (this.commonJS.isNotEmpty(row.isPreInvoice) && row.isPreInvoice === '1'){
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionIdPreInvoice
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '会计-发票申请' + '流程详情',
+							formTitle: '会计-发票申请' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}else {
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '会计-发票申请' + '流程详情',
+							formTitle: '会计-发票申请' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}
+
           }
         }
       },

+ 94 - 1
src/views/cw/invoice/ProgramPageForm.vue

@@ -12,6 +12,7 @@
       <div v-if="isShow">
 	  	<el-radio v-model="checkType" label="2" style="margin-right: 20px">报告</el-radio>
         <el-radio v-model="checkType" label="1" style="margin-right: 20px">项目</el-radio>
+        <el-radio v-model="checkType" label="4" style="margin-right: 20px">预开票项目</el-radio>
 	    <el-radio v-model="checkType" v-if="hasPermission('cw_finance:invoice:add:report')" label="3" style="margin-right: 20px">其他</el-radio>
       </div>
 		<!--报告        -->
@@ -159,6 +160,70 @@
           </el-row>
         </el-form>
       </div>
+		<div v-if="checkType === '4'" >
+			<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+				<!-- 搜索框-->
+				<el-form-item label="项目名称" prop="projectName">
+					<el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="项目编号" prop="projectNumber">
+					<el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="创建时间" prop="createDates">
+					<el-date-picker
+						placement="bottom-start"
+						format="YYYY-MM-DD HH:mm:ss"
+						value-format="YYYY-MM-DD HH:mm:ss"
+						v-model="searchForm.createDates"
+						type="datetimerange"
+						range-separator="至"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期">
+					</el-date-picker>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="list()"  icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+				</el-form-item>
+			</el-form>
+
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="550px"
+				:loading="loading"
+				ref="preInvoiceTable"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				:sort-config="{remote:true}"
+				:data="dataList2"
+				:row-config="{isCurrent: true}"
+				:checkbox-config="{trigger: 'row'}"
+			>
+				<vxe-column type="seq" width="60" title="序号"></vxe-column>
+				<vxe-column type="radio" width="60px"></vxe-column>
+				<vxe-column min-width="160" align="center" title="项目名称" field="projectName" show-overflow="title"></vxe-column>
+				<vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+
+			</vxe-table>
+			<vxe-pager
+				background
+				:current-page="tablePage2.currentPage"
+				:page-size="tablePage2.pageSize"
+				:total="tablePage2.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle">
+			</vxe-pager>
+		</div>
 		<template #footer>
 			<span class="dialog-footer">
 			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
@@ -191,8 +256,15 @@
 		  pageSize: 10,
 		  orders: []
 	    },
+		  tablePage2: {
+			  total: 0,
+			  currentPage: 1,
+			  pageSize: 10,
+			  orders: []
+		  },
         dataList: [],
         dataList1: [],
+        dataList2: [],
         searchForm: {
           name: '',
           no: '',
@@ -260,6 +332,7 @@
         this.visible = true
         this.list()
 	    this.list1()
+	    this.list2()
       },
       // 表单提交
       getProgram () {
@@ -300,7 +373,13 @@
 				}
 			}
 			rows = this.$refs.projectTable1.getCheckboxRecords()
-		} else {
+		}else if (this.checkType === '4'){
+			if (this.commonJS.isEmpty(this.$refs.preInvoiceTable.getRadioRecord())) {
+				this.$message.error('请选择一条数据')
+				return
+			}
+			rows = this.$refs.preInvoiceTable.getRadioRecord()
+		}else {
           if (this.commonJS.isEmpty(this.detail)) {
             this.$message.error('请填写开票详情')
             return
@@ -340,6 +419,20 @@
 			this.loading = false
 		  })
 	  },
+		list2 () {
+			this.loading = true
+			this.searchForm.status = '5'
+			projectRecordsService.preInvoiceList({
+				'current': this.tablePage2.currentPage,
+				'size': this.tablePage2.pageSize,
+				'orders': this.tablePage2.orders,
+				...this.searchForm
+			}).then((data) => {
+				this.dataList2 = data.records
+				this.tablePage2.total = data.total
+				this.loading = false
+			})
+		},
       // 当前页
       currentChangeHandle ({currentPage, pageSize}) {
         this.tablePage.currentPage = currentPage

+ 1 - 0
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -696,6 +696,7 @@
               this.inputForm.projectMoney = ''
             }
             this.checkProject()
+			  this.preInvoice()
             this.loading = false
           })
         })

+ 13 - 2
src/views/cw/projectRecords/ProjectRecordsForm.vue

@@ -194,6 +194,15 @@
 						  </el-select>
 					  </el-form-item>
 				  </el-col>
+				  <el-col :span="12">
+					  <el-form-item label="是否预开票" prop="isPreInvoice"
+									:rules="[
+
+                  ]">
+						  <el-radio v-model="inputForm.isPreInvoice" v-for="item in $dictUtils.getDictList('is_pre_invoice')" :label="item.value" style="margin-right: 20px">
+							  {{item.label}}</el-radio>
+					  </el-form-item>
+				  </el-col>
                 <el-col :span="12">
                   <el-form-item label="审计期间" prop="auditYear"
                                 :rules="[
@@ -616,7 +625,8 @@
 			projectClassification: '',
           cwProjectClientContactDTOList: [],
           cwProjectMembersDTOList: [],
-			isHaveReport:''
+			isHaveReport:'',
+			isPreInvoice:''
         },
         keyWatch: '',
         activeName: 'client',
@@ -749,7 +759,8 @@
           clientContactsName: '',
           cwProjectClientContactDTOList: [],
           cwProjectMembersDTOList: [],
-			isHaveReport:''
+			isHaveReport:'',
+			isPreInvoice:''
         }
         this.inputForm.id = id
         this.loading = false

+ 101 - 8
src/views/cw/reportManagement/ReportReviewTakeNumberForm.vue

@@ -157,6 +157,13 @@
 								<el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="12">
+							<el-form-item label="开票编号" prop="invoiceNumber"
+										  :rules="[{required: true, message:'开票编号不能为空', trigger:'change'}
+                   ]">
+								<el-input v-if="preInvoice" @focus="openInoviceForm()" :disabled="status === 'audit' || status === 'taskFormDetail'"  v-model="inputForm.invoiceNumber" placeholder="请填写开票编号" clearable></el-input>
+							</el-form-item>
+						</el-col>
 
 					</el-row>
 					<el-divider content-position="left"><i class="el-icon-document"></i> 报告信息</el-divider>
@@ -445,7 +452,21 @@
 		</el-row>
 		<ProjectRecoredChooseCom  ref="projectRecoredChooseCom" @getProject="getContract"></ProjectRecoredChooseCom>
 		<ReportServiceUnitForm ref="reportServiceUnitForm" @getWorkClientChoose="getWorkClientChoose"></ReportServiceUnitForm>
+		<FinanceInvoiceRadioForm ref="financeInvoiceRadioForm" @getInvoice="getInvoice"></FinanceInvoiceRadioForm>
 		<!--    <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>-->
+		<el-dialog v-model="visible" title="Warning" width="300" center>
+    <span>
+      该项目是否已完成预开票关联
+    </span>
+			<template #footer>
+				<div class="dialog-footer">
+					<el-button @click="noComplete">否</el-button>
+					<el-button type="primary" @click="complete">
+						是
+					</el-button>
+				</div>
+			</template>
+		</el-dialog>
 	</div>
 </template>
 
@@ -464,6 +485,9 @@
 	import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 	import userService from "@/api/sys/userService";
+	import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+	import FinanceInvoiceRadioForm from "../invoice/FinanceInvoiceRadioForm";
+	import financeInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
 	export default {
 		props: {
 			businessId: {
@@ -484,6 +508,7 @@
 				title: '',
 				method: '',
 				loading: false,
+				visible:false,
 				reviewBys: [],
 				inputForm: {
 					cwFileInfoList3: [],
@@ -556,6 +581,8 @@
 					reviewComments2:'',
 					takeNumberType:'',
 					improperTakeCause: '',
+					invoiceNumber:'',
+					isCompleteInvoice:''
 				},
 				keyWatch: '',
 				activeName: 'enclosure',
@@ -563,7 +590,13 @@
 				tableKeyClient: '1',
 				tableKeyClient2: '1',
 				tableKeyClient3: '1',
-				reimbursementTypeFlag: false
+				reimbursementTypeFlag: false,
+				preInvoice:false,
+				invoiceTotal:'', //这个为选择发票时已有的发票总数
+				total:'',//页面初始化时查询出的发票总数
+				searchForm: {
+					programId:''
+				},
 			}
 		},
 		ReportCancellApplyService: null,
@@ -604,6 +637,12 @@
 					this.$emit('changeLoading', newVal)
 					this.$refs.enclosure.changeLoading(newVal)
 				}
+			},
+			visible(newVal) {
+				if (newVal === false) {
+					this.inputForm.reviewStatus = '2';
+					this.inputForm.assignee = this.inputForm.reviewBy;
+				}
 			}
 		},
 		components: {
@@ -613,7 +652,8 @@
 			SelectTree,
 			UserSelect,
 			UserSelect2,
-			UserSelectAll
+			UserSelectAll,
+			FinanceInvoiceRadioForm
 			// ReportCancellApplyChooseCom
 		},
 		methods: {
@@ -693,7 +733,8 @@
 					industry: '',
 					takeNumberType:'',
 					improperTakeCause: '',
-					businessObjects: ''
+					businessObjects: '',
+					invoiceNumber:''
 				}
 				this.inputForm.id = id
 				this.loading = false
@@ -707,6 +748,7 @@
 						// this.$refs.uploadComponent.clearUpload()
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(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')
 						}
@@ -736,6 +778,16 @@
 							this.inputForm.signatureType = '1'
 						}
 						this.$refs.enclosure.newUpload(this.method, data.cwFileInfoList3, 'cwWorkContract', null, null, null, null, false)
+						this.checkIsPreInvoice()
+						if (this.preInvoice = true){
+							financeInvoiceService.listByProgramId({
+								...this.searchForm,
+							}).then((data) => {
+								this.total = data.total
+								console.log('total',this.total)
+							})
+						}
+
 						this.loading = false
 					})
 				})
@@ -793,7 +845,11 @@
 							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						} else {
-							this.doSubmit('start', callback)
+							this.checkTotal()
+							setTimeout(()=>{
+								this.doSubmit('start', callback)
+							},5000)
+
 						}
 					})
 				} else {
@@ -875,9 +931,10 @@
 					});
 					return
 				} else if (status === 'start') {
-					// 送审  待审核
-					this.inputForm.reviewStatus = '2'
-					this.inputForm.assignee = this.inputForm.reviewBy
+					if (this.visible === false) {
+						this.inputForm.reviewStatus = '2';
+						this.inputForm.assignee = this.inputForm.reviewBy;
+					}
 				} else if (status === 'agree') {
 					// 审核同意
 					this.inputForm.cwFileInfoList3 = this.$refs.enclosure.getDataList()
@@ -1043,7 +1100,8 @@
 					projectMasterId1: '',
 					projectMasterId2: '',
 					industry: '',
-					businessObjects: ''
+					businessObjects: '',
+					invoiceNumber:''
 				}
 				this.reviewBys = []
 				// this.$refs.uploadComponent.clearUpload()
@@ -1077,6 +1135,8 @@
 				this.clearClientList()
 				this.$forceUpdate()
 				this.inputForm.cwProjectInfoList = []
+				//校验当前项目是否预开票及项目下是否存在已开票信息
+				this.checkIsPreInvoice()
 			},
 			openWorkClient () {
 				this.$refs.reportServiceUnitForm.init(this.inputForm.projectId)
@@ -1167,6 +1227,39 @@
 				}
 
 			},
+			checkIsPreInvoice(){
+				projectRecordsService.getInvoiceTotal(this.inputForm.projectId).then((data)=>{
+					if (data.isPreInvoice === '1' && data.invoiceTotal > 0){
+						this.preInvoice = true
+					}
+				})
+			},
+			//打开发票列表
+			openInoviceForm(){
+				this.$refs.financeInvoiceRadioForm.init(this.inputForm.projectId)
+			},
+			getInvoice(row,total){
+				this.inputForm.invoiceNumber = row.number
+				this.invoiceTotal = total
+				console.log('total',this.invoiceTotal)
+			},
+			noComplete(){
+				this.inputForm.isCompleteInvoice = '0'
+				this.visible = false
+				this.loading = false
+			},
+			complete(){
+				this.inputForm.isCompleteInvoice = '1'
+				this.visible = false
+				this.loading = false
+			},
+			checkTotal(){
+				if(this.invoiceTotal === 1 || this.total === 0){
+					this.visible = true
+					this.loading = true
+				}
+			}
+
 		}
 	}
 </script>

+ 10 - 0
src/views/flowable/task/NoticePageList.vue

@@ -69,6 +69,7 @@
 	  <KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
 	  <DepartPopup ref="departPopup"></DepartPopup>
 	  <DepartProvePopup ref="departProvePopup"></DepartProvePopup>
+	  <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
   </div>
 </template>
 
@@ -80,6 +81,7 @@
   import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
   import DepartPopup from '@/views/human/depart/handover/DepartPopup'
   import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
+  import ProjectRecordsForm from "@/views/cw/projectRecords/ProjectRecordsForm";
   import pick from 'lodash.pick'
   export default {
     data () {
@@ -117,6 +119,7 @@
 		KeyCardPopup,
 		DepartPopup,
 		DepartProvePopup,
+		ProjectRecordsForm,
     },
     methods: {
       // 获取数据列表
@@ -181,6 +184,13 @@
 			}
 			noticeService.stockUpdate(this.inputForm)
 			this.resetSearch()
+		}else if (row.taskName === '预开票项目未关联') {
+			this.$refs.projectRecordsForm.init('view',row.defId)
+			this.inputForm = {
+				id: row.id
+			}
+			noticeService.stockUpdate(this.inputForm)
+			this.resetSearch()
 		}else {
           this.inputForm = {
             taskId: '',

+ 3 - 1
src/views/flowable/task/TaskForm.vue

@@ -764,6 +764,7 @@ export default {
 		// Process_1709606246355 财务-报告签章
 		// Process_1709716869089 评估-报告签章
 		// Process_1710204867282 评估-项目作废
+		// Process_1710983508724 会计-预开票申请
 		// 驳回
 		reject(vars) {
 			if (this.procDefId.includes('Process_1667978088459') ||
@@ -848,7 +849,8 @@ export default {
 				this.procDefId.includes('Process_1709606246355') ||
 				this.procDefId.includes('Process_1709716622665') ||
 				this.procDefId.includes('Process_1709716869089') ||
-				this.procDefId.includes('Process_1710204867282')
+				this.procDefId.includes('Process_1710204867282') ||
+				this.procDefId.includes('Process_1710983508724')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {