|
@@ -0,0 +1,241 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="审计收费选择"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ v-dialogDrag
|
|
|
|
+ width="1100px"
|
|
|
|
+ height="500px"
|
|
|
|
+ @close="close"
|
|
|
|
+ append-to-body
|
|
|
|
+ @keyup.enter.native=""
|
|
|
|
+ :visible.sync="visible">
|
|
|
|
+ <div style="height: calc(100% - 80px);">
|
|
|
|
+ <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
|
|
|
|
+ <!-- 搜索框-->
|
|
|
|
+ <el-form-item label="发票号" prop="number">
|
|
|
|
+ <el-input size="small" v-model="searchForm.number" placeholder="请输入发票号" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="开票申请编号" prop="no">
|
|
|
|
+ <el-input size="small" v-model="searchForm.no" placeholder="请输入开票申请编号" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="报告号" prop="reportNo">
|
|
|
|
+ <el-input size="small" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="list1()" size="small" icon="el-icon-search">查询</el-button>
|
|
|
|
+ <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <vxe-table
|
|
|
|
+ border="inner"
|
|
|
|
+ auto-resize
|
|
|
|
+ resizable
|
|
|
|
+ height="400px"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ size="small"
|
|
|
|
+ ref="clientTable"
|
|
|
|
+ show-header-overflow
|
|
|
|
+ show-overflow
|
|
|
|
+ highlight-hover-row
|
|
|
|
+ :menu-config="{}"
|
|
|
|
+ :print-config="{}"
|
|
|
|
+ @sort-change=""
|
|
|
|
+ @checkbox-change="selectionChangeHandle"
|
|
|
|
+ :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="40px"></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">
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
+<!-- {{$dictUtils.getDictLabel('cw_work_client_type', scope.row.type, '-')}}-->
|
|
|
|
+<!-- </template>-->
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="发票号" field="number"></vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="开票金额(元)" field="account">
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
+<!-- {{$dictUtils.getDictLabel('cw_work_client_industry', scope.row.industry, '-')}}-->
|
|
|
|
+<!-- </template>-->
|
|
|
|
+ </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>
|
|
|
|
+ <vxe-pager
|
|
|
|
+ background
|
|
|
|
+ size="small"
|
|
|
|
+ :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>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
|
+ <el-button size="small" type="primary" v-if="method != 'view'" @click="getClient()" icon="el-icon-circle-check" v-noMoreClick>({{numberTest}})确定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
|
|
|
|
+export default {
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ dataListAllSelections: [],
|
|
|
|
+ numberTest: 0,
|
|
|
|
+ title: '',
|
|
|
|
+ method: '',
|
|
|
|
+ visible: false,
|
|
|
|
+ loading: false,
|
|
|
|
+ tablePage: {
|
|
|
|
+ total: 0,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ orders: []
|
|
|
|
+ },
|
|
|
|
+ dataList: [],
|
|
|
|
+ searchForm: {
|
|
|
|
+ number: '',
|
|
|
|
+ no: '',
|
|
|
|
+ reportNo: '',
|
|
|
|
+ affiliation: '',
|
|
|
|
+ cwWorkClientTypeDTO: {
|
|
|
|
+ ownershipType: ''
|
|
|
|
+ },
|
|
|
|
+ industry: '',
|
|
|
|
+ createDates: [],
|
|
|
|
+ status: '',
|
|
|
|
+ reportId: '',
|
|
|
|
+ selected: false
|
|
|
|
+ },
|
|
|
|
+ reportId: '' // 报告归档id
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ workClientService: null,
|
|
|
|
+ created () {
|
|
|
|
+ this.workClientService = new WorkClientService()
|
|
|
|
+ },
|
|
|
|
+ components: {
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ init (id) {
|
|
|
|
+ this.reportId = id
|
|
|
|
+ this.visible = true
|
|
|
|
+ this.list1()
|
|
|
|
+ },
|
|
|
|
+ // 表单提交
|
|
|
|
+ getClient () {
|
|
|
|
+ let row = this.$refs.clientTable.getCheckboxRecords()
|
|
|
|
+ if (this.commonJS.isEmpty(row)) {
|
|
|
|
+ this.$message.error('请选择一条数据')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ row.numberTest = this.numberTest
|
|
|
|
+ row.reportNo = this.reportNo
|
|
|
|
+ this.$emit('getClient2', row)
|
|
|
|
+ this.close()
|
|
|
|
+ console.log('row', row)
|
|
|
|
+ },
|
|
|
|
+ selectionChangeHandle (event) {
|
|
|
|
+ console.log('event', event)
|
|
|
|
+ if (event.checked) { // 选中触发
|
|
|
|
+ let delIndex = -1
|
|
|
|
+ console.log('event.row.programId', event.row.programId)
|
|
|
|
+ for (let i = 0; i < this.dataListAllSelections.length; i++) {
|
|
|
|
+ console.log('event.row.id', event.row.id)
|
|
|
|
+ console.log('this.dataListAllSelections[i].programId', this.dataListAllSelections[i].programId)
|
|
|
|
+ if (this.dataListAllSelections[i].account === event.row.account) {
|
|
|
|
+ delIndex = i
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.commonJS.isNotEmpty(delIndex) && delIndex === -1) {
|
|
|
|
+ this.numberTest = 0
|
|
|
|
+ this.dataListAllSelections.push(event.row)
|
|
|
|
+ let rows = this.dataListAllSelections
|
|
|
|
+ rows.forEach((item, index) => {
|
|
|
|
+ console.log('item', item)
|
|
|
|
+ this.numberTest += parseFloat(item.account)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else { // 取消选中触发
|
|
|
|
+ let delIndex = -1
|
|
|
|
+ for (let i = 0; i < this.dataListAllSelections.length; i++) {
|
|
|
|
+ if (this.dataListAllSelections[i].account === event.row.account) {
|
|
|
|
+ delIndex = i
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.commonJS.isNotEmpty(delIndex) && delIndex !== -1) {
|
|
|
|
+ this.numberTest = 0
|
|
|
|
+ this.dataListAllSelections.splice(delIndex, 1)
|
|
|
|
+ let rows = this.dataListAllSelections
|
|
|
|
+ rows.forEach((item, index) => {
|
|
|
|
+ console.log('item', item)
|
|
|
|
+ this.numberTest += parseFloat(item.account)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // if (this.commonJS.isNotEmpty(this.dataListAllSelections)) {
|
|
|
|
+ // let rows = this.dataListAllSelections
|
|
|
|
+ // rows.forEach((item, index) => {
|
|
|
|
+ // console.log('item', item)
|
|
|
|
+ // this.numberTest += parseFloat(item.account)
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ },
|
|
|
|
+ list1 () {
|
|
|
|
+ this.loading = true
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.reportId)) {
|
|
|
|
+ this.searchForm.reportId = this.reportId
|
|
|
|
+ this.searchForm.isTrue = '1'
|
|
|
|
+ this.workClientService.list1({
|
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
|
+ ...this.searchForm
|
|
|
|
+ }).then(({data}) => {
|
|
|
|
+ this.dataList = data.records
|
|
|
|
+ this.tablePage.total = data.total
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.dataList = []
|
|
|
|
+ this.tablePage.total = 0
|
|
|
|
+ this.loading = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 当前页
|
|
|
|
+ currentChangeHandle ({currentPage, pageSize}) {
|
|
|
|
+ this.tablePage.currentPage = currentPage
|
|
|
|
+ this.tablePage.pageSize = pageSize
|
|
|
|
+ this.list1()
|
|
|
|
+ },
|
|
|
|
+ resetSearch () {
|
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
|
+ this.list1()
|
|
|
|
+ },
|
|
|
|
+ close () {
|
|
|
|
+ this.dataListAllSelections = []
|
|
|
|
+ this.numberTest = 0
|
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
|
+ this.visible = false
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style scoped>
|
|
|
|
+/deep/ .el-dialog__body {
|
|
|
|
+ padding-top: 0px;
|
|
|
|
+ padding-bottom: 15px;
|
|
|
|
+}
|
|
|
|
+</style>
|