|
@@ -107,22 +107,40 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'请输入审计收费(元)', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input-number
|
|
|
- @input="fixedAccount"
|
|
|
- :precision="2"
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ v-on:input="inputForm.auditMoney=inputForm.auditMoney.replace(/[^\d.]/g,'')
|
|
|
+ .replace(/^\./g,'')
|
|
|
+ .replace(/\.{2,}/g,'.')
|
|
|
+ .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
|
|
+ .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
|
|
v-model="inputForm.auditMoney"
|
|
|
controls-position="right"
|
|
|
:controls="false"
|
|
|
style="width:100%;"
|
|
|
- :min="0.00"
|
|
|
- :max="9999999999999999"
|
|
|
- :step="0.01"
|
|
|
placeholder="请输入审计收费(元)"
|
|
|
- clearable>
|
|
|
- </el-input-number>
|
|
|
+ :disabled="this.inputForm.auditMoney==this.accountTotal && this.accountTotal != 0?true:false"
|
|
|
+ clearable
|
|
|
+ @keyup="inputMoney"
|
|
|
+ >
|
|
|
+ <template #suffix>
|
|
|
+ <el-button style="background-color: white;color: #1b1e25;border-color: white;" type="primary" @click="openInvoice(this.inputForm.id)" icon="el-icon-search"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
</el-col>
|
|
|
+ <el-col :span="12" v-if="isShow">
|
|
|
+ <el-form-item label="关联报告" prop="connectReport"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'关联报告不能为空', trigger:'blur'},
|
|
|
+ {required: true, message:'关联报告不能为空', trigger:'change'}
|
|
|
+ ]">
|
|
|
+ <el-input :readonly="true" v-model="inputForm.connectReport" @focus="openReport" placeholder="请填写关联报告" clearable>
|
|
|
+ <el-button slot="append" @focus="openReport" icon="el-icon-search"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="档案年度" prop="year"
|
|
|
:rules="[
|
|
@@ -277,6 +295,126 @@
|
|
|
<WorkClientChooseByProjectCom ref="workClientChooseByProjectCom" @getClient="getClient"></WorkClientChooseByProjectCom>
|
|
|
<ReportChooseByProjectCom ref="reportChooseByProjectCom" @getReport="getReport"></ReportChooseByProjectCom>
|
|
|
</div>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="开票信息选择"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ draggable
|
|
|
+ width="1100px"
|
|
|
+ height="500px"
|
|
|
+ @close="closeTable"
|
|
|
+ append-to-body
|
|
|
+ destroy-on-close="true"
|
|
|
+ :visible.sync="dialogTableVisible"
|
|
|
+ v-if="dialogTableVisible"
|
|
|
+ v-model="dialogTableVisible">
|
|
|
+ <div style="height: calc(100% - 80px);">
|
|
|
+ <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
|
|
|
+ <!-- 搜索框-->
|
|
|
+ <el-form-item label="发票号" prop="number">
|
|
|
+ <el-input v-model="searchForm.number" placeholder="请输入发票号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开票申请编号" prop="no">
|
|
|
+ <el-input v-model="searchForm.no" placeholder="请输入开票申请编号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="报告号" prop="reportNo">
|
|
|
+ <el-input v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="getReport(this.inputForm.id)" 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="400px"
|
|
|
+ :loading="loading"
|
|
|
+ ref="auditData"
|
|
|
+ show-header-overflow
|
|
|
+ show-overflow="title"
|
|
|
+ highlight-hover-row
|
|
|
+ @checkbox-change="selectionChangeHandle"
|
|
|
+ :menu-config="{}"
|
|
|
+ :print-config="{}"
|
|
|
+ :sort-config="{remote:true}"
|
|
|
+ :data="dataList"
|
|
|
+ :row-config="{isCurrent: true}"
|
|
|
+ :radio-config="{trigger: 'row'}">
|
|
|
+
|
|
|
+ <vxe-column type="seq" width="60" title="序号"></vxe-column>
|
|
|
+ <vxe-column type="checkbox" width="60px"></vxe-column>
|
|
|
+ <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="报告号" field="reportNo"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="开票申请编号" field="no"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="发票号" field="number"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="开票金额(元)" field="account"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="开票申请人" field="billingPeople"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="开票时间" field="billingDate"></vxe-column>
|
|
|
+
|
|
|
+ </vxe-table>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="closeReport" icon="el-icon-circle-close">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="getData()" icon="el-icon-circle-check" :disabled="this.searchForm.totalAudit==0?true:false" v-noMoreClick>({{this.searchForm.totalAudit}})确定</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="关联报告信息"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ draggable
|
|
|
+ width="1100px"
|
|
|
+ height="500px"
|
|
|
+ @close="close1"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="reportVisible"
|
|
|
+ v-if="reportVisible"
|
|
|
+ v-model="reportVisible">
|
|
|
+ <div style="height: calc(100% - 80px);">
|
|
|
+ <vxe-table
|
|
|
+ border="inner"
|
|
|
+ auto-resize
|
|
|
+ resizable
|
|
|
+ height="400px"
|
|
|
+ :loading="loading"
|
|
|
+ ref="clientTable"
|
|
|
+ show-header-overflow
|
|
|
+ show-overflow
|
|
|
+ highlight-hover-row
|
|
|
+ :menu-config="{}"
|
|
|
+ :print-config="{}"
|
|
|
+ :sort-config="{remote:true}"
|
|
|
+ :data="reportData"
|
|
|
+ :row-config="{isCurrent: true}"
|
|
|
+ :radio-config="{trigger: 'row'}"
|
|
|
+ >
|
|
|
+ <vxe-column type="seq" width="60" title="序号"></vxe-column>
|
|
|
+ <vxe-column type="radio" width="60px"></vxe-column>
|
|
|
+ <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="报告号" field="reportNo"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="审计收费(元)" field="auditFees">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="创建人" field="loginName"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="创建时间" field="createTime">
|
|
|
+ </vxe-column>
|
|
|
+
|
|
|
+ </vxe-table>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="close1()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
+ <el-button type="primary" v-if="method != 'view'" @click="getClient1()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -287,6 +425,7 @@
|
|
|
import ReportChooseByProjectCom from '@/views/cw/projectReportArchive/ReportChooseByProjectCom'
|
|
|
import officeService from '@/api/sys/officeService'
|
|
|
import processService from '@/api/flowable/processService'
|
|
|
+ import ProjectRecordsService from "../../../api/cw/projectRecords/ProjectRecordsService";
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -304,6 +443,8 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ reportVisible:false,
|
|
|
+ dialogTableVisible:false,
|
|
|
title: '',
|
|
|
method: '',
|
|
|
loading: false,
|
|
@@ -346,6 +487,7 @@
|
|
|
status: '',
|
|
|
contractId: ''
|
|
|
},
|
|
|
+ connectReport:'',
|
|
|
auditedUnitsName: '',
|
|
|
fileNumber: '',
|
|
|
reportDate: '',
|
|
@@ -364,7 +506,31 @@
|
|
|
},
|
|
|
keyWatch: '',
|
|
|
activeName: 'files',
|
|
|
- tableKeyReport: ''
|
|
|
+ tableKeyReport: '',
|
|
|
+ dataList:[],
|
|
|
+ searchForm:{
|
|
|
+ projectName:'',
|
|
|
+ reportNo:'',
|
|
|
+ no:'',
|
|
|
+ number:'',
|
|
|
+ billingPeople:'',
|
|
|
+ account:'',
|
|
|
+ billingDate:'',
|
|
|
+ totalAudit:''
|
|
|
+ },
|
|
|
+ accountTotal:'',
|
|
|
+ reportData:[],
|
|
|
+ reportInno:{
|
|
|
+ projectName:'',
|
|
|
+ reportNo:'',
|
|
|
+ auditFees:'',
|
|
|
+ createTime:'',
|
|
|
+ loginName:''
|
|
|
+ },
|
|
|
+ selectRecord:[],
|
|
|
+ isShow:false,
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
projectReportArchiveService: null,
|
|
@@ -380,7 +546,8 @@
|
|
|
set (val) {
|
|
|
this.businessId = val
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
watch: {
|
|
|
'keyWatch': {
|
|
@@ -399,14 +566,15 @@
|
|
|
console.log(newVal)
|
|
|
this.$emit('changeLoading', newVal)
|
|
|
this.$refs.uploadComponent.changeLoading(newVal)
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
UpLoadComponent,
|
|
|
ProjectRecordsChooseCom,
|
|
|
WorkClientChooseByProjectCom,
|
|
|
- ReportChooseByProjectCom
|
|
|
+ ReportChooseByProjectCom,
|
|
|
},
|
|
|
methods: {
|
|
|
getKeyWatch (keyWatch) {
|
|
@@ -456,6 +624,7 @@
|
|
|
contractId: ''
|
|
|
},
|
|
|
auditedUnitsName: '',
|
|
|
+ connectReport:'',
|
|
|
fileNumber: '',
|
|
|
reportDate: '',
|
|
|
reportNo: '',
|
|
@@ -469,8 +638,9 @@
|
|
|
procDefId: '',
|
|
|
procDefKey: '',
|
|
|
formTitle: '',
|
|
|
- title: ''
|
|
|
+ title: '',
|
|
|
}
|
|
|
+ this.selectRecord=[]
|
|
|
this.inputForm.id = id
|
|
|
this.loading = false
|
|
|
this.$nextTick(() => {
|
|
@@ -777,6 +947,7 @@
|
|
|
contractId: ''
|
|
|
},
|
|
|
auditedUnitsName: '',
|
|
|
+ connectReport:'',
|
|
|
fileNumber: '',
|
|
|
reportDate: '',
|
|
|
reportNo: '',
|
|
@@ -870,24 +1041,89 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- fixedAccount () {
|
|
|
- if (isNaN(this.inputForm.auditMoney) && !/^-$/.test(this.inputForm.auditMoney)) {
|
|
|
- this.inputForm.auditMoney = ''
|
|
|
- }
|
|
|
- if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.inputForm.auditMoney)) {
|
|
|
- this.inputForm.auditMoney = this.inputForm.auditMoney.replace(/\.\d{2,}$/, this.inputForm.auditMoney.substr(this.inputForm.account.indexOf('.'), 3))
|
|
|
+ openInvoice(id){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.getReportList(id)
|
|
|
+ // this.$refs.searchForm.resetFields()
|
|
|
+ this.searchForm.totalAudit=0
|
|
|
+ })
|
|
|
+ this.dialogTableVisible=true
|
|
|
+
|
|
|
+ },
|
|
|
+ getReportList(id){
|
|
|
+ console.log(id)
|
|
|
+ ProjectRecordsService.getReportById({
|
|
|
+ id:this.inputForm.id,
|
|
|
+ cwProjectRecordsDTO:this.searchForm
|
|
|
+ }).then((data)=>{
|
|
|
+ this.dataList=data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ resetSearch () {
|
|
|
+ this.dataListAllSelections=[]
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
+ this.getReportList(this.inputForm.id)
|
|
|
+ },
|
|
|
+ getData(){
|
|
|
+ this.accountTotal = this.countTotal(this.selectRecord, 'account')
|
|
|
+ this.dialogTableVisible = false
|
|
|
+ this.inputForm.auditMoney=this.accountTotal
|
|
|
+ },
|
|
|
+ countTotal: function (arr, keyName) {
|
|
|
+ let total1 = 0
|
|
|
+ let number = 0;
|
|
|
+ for (var i = 0;i<arr.length;i++){
|
|
|
+ number = parseFloat(arr[i].account);
|
|
|
+ total1 = number+total1;
|
|
|
}
|
|
|
- // 禁止录入整数部分两位以上,但首位为0
|
|
|
- var regStrs = [
|
|
|
- ['^(\\-)?0(\\d+)$', '$1']
|
|
|
- ]
|
|
|
- for (var i = 0; i < regStrs.length; i++) {
|
|
|
- var reg = new RegExp(regStrs[i][0])
|
|
|
- var result = this.inputForm.auditMoney.replace(reg, regStrs[i][1])
|
|
|
- this.inputForm.auditMoney = result
|
|
|
+ return total1
|
|
|
+ },
|
|
|
+ closeReport () {
|
|
|
+ this.dialogTableVisible = false
|
|
|
+ this.inputForm.auditMoney=''
|
|
|
+ },
|
|
|
+ selectionChangeHandle(){
|
|
|
+ this.selectRecord = this.$refs.auditData.getCheckboxRecords()
|
|
|
+ this.searchForm.totalAudit=this.countTotal(this.selectRecord, 'account')
|
|
|
+ },
|
|
|
+ getReportByProjectId(id){
|
|
|
+ this.loading=true
|
|
|
+ ProjectRecordsService.getReportByProjectId(id).then(data=>{
|
|
|
+ this.reportData=data
|
|
|
+ this.loading=false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openReport(){
|
|
|
+ this.reportVisible=true
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.getReportByProjectId(this.inputForm.projectId)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ close1(){
|
|
|
+ this.reportVisible = false
|
|
|
+ },
|
|
|
+ getClient1(){
|
|
|
+ let row = this.$refs.clientTable.getRadioRecord()
|
|
|
+ console.log(row)
|
|
|
+ if (this.commonJS.isEmpty(row)) {
|
|
|
+ this.$message.error('请选择一条数据')
|
|
|
+ return
|
|
|
}
|
|
|
+ this.reportVisible = false
|
|
|
+ this.inputForm.connectReport=row.projectName
|
|
|
+ },
|
|
|
+ closeTable(){
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
+ this.dialogTableVisible = false
|
|
|
},
|
|
|
- }
|
|
|
+ inputMoney(){
|
|
|
+ if (this.inputForm.auditMoney==0 || this.inputForm.auditMoney==''){
|
|
|
+ this.isShow=!this.isShow
|
|
|
+ this.inputForm.connectReport=''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|