| | |
| | | <el-option label="待处理" value="0"></el-option> |
| | | <el-option label="已开票" value="1"></el-option> |
| | | <el-option label="平台撤回" value="2"></el-option> |
| | | <el-option label="已冲红" value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="申请日期" prop="status"> |
| | | <el-form-item label="申请日期" prop="time"> |
| | | <el-date-picker |
| | | v-model="searchForm.status" |
| | | v-model="searchForm.time" |
| | | @change="changeTime" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="申请开票企业" prop="companyId"> |
| | | <el-form-item label="申请开票企业" prop="companyId" v-if="userInfo.type === 0"> |
| | | <el-select v-model="searchForm.companyId" placeholder="请选择" @change="search"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="开票状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status === 0">待处理</span> |
| | | <span v-if="row.status === 1">已开票</span> |
| | | <span v-if="row.status === 2">平台撤回</span> |
| | | <span :class="'tax-status'+row.status" v-if="row.status === 0">待处理</span> |
| | | <span :class="'tax-status'+row.status" v-if="row.status === 1">已开票</span> |
| | | <span :class="'tax-status'+row.status" v-if="row.status === 2">平台撤回</span> |
| | | <span :class="'tax-status'+row.status" v-if="row.status === 3">已冲红</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="companyId" label="申请企业" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyId" label="申请开票时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyId" label="申请人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="price" label="开票金额(元)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="申请企业" min-width="100px" v-if="userInfo.type === 0"></el-table-column> |
| | | <el-table-column prop="createDate" label="申请开票时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="creatorName" label="申请人" min-width="100px"></el-table-column> |
| | | <el-table-column label="开票金额(元)" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.applyType === 0">-</span> |
| | | <span v-else>{{row.price}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="投保类型" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.applyType === 0">委托开票</span> |
| | | <span v-if="row.applyType === 1">直保</span> |
| | | <span v-if="row.applyType === 0">委托投保</span> |
| | | <span v-if="row.applyType === 1">直接投保</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="接收方式" min-width="100px"> |
| | |
| | | <span v-if="row.type === 1">纸质发票</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="100px"> |
| | | <el-table-column prop="type" label="发票电子版" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text">上传发票</el-button> |
| | | <el-button type="text">申请详情</el-button> |
| | | <el-image |
| | | v-if="row.imgurlFull!=null" |
| | | style="width: 40px; height: 40px" |
| | | :src="row.imgurlFull" |
| | | :preview-src-list="[row.imgurlFull]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="180px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button v-if="row.status == 0 && userInfo.type === 0" type="text" @click="$refs.OperaTaxesUploadWindow.open('上传发票',row)">上传发票</el-button> |
| | | <el-button v-if="row.status == 1 && userInfo.type === 0" type="text" @click="$refs.OperaTaxesUploadWindow.open('修改发票',row)">修改发票</el-button> |
| | | <el-button type="text" @click="$refs.OperaTaxesWindow.open('开票详情',row)">申请详情</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <div class="form_item"> |
| | | <div class="form_item_label">发票号:</div> |
| | | <div class="form_item_val"> |
| | | <input type="text" placeholder="请输入" /> |
| | | <input v-model="form.doneCode" type="text" placeholder="请输入" /> |
| | | </div> |
| | | </div> |
| | | <div class="form_item"> |
| | | <div class="form_item_label">上传发票:</div> |
| | | <div class="form_item_val"> |
| | | <el-upload |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | list-type="picture-card" |
| | | :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <UploadAvatarImage :uploadData="{ folder: 'taxes' }" :file="form.file" @uploadSuccess="result3" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="visible = false">取 消</el-button> |
| | | <el-button type="primary" @click="visible = false">提 交</el-button> |
| | | <el-button type="primary" @click="doneApplyDo">提 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <OperaTaxesWindow ref="OperaTaxesWindow" @success="handlePageChange"/> |
| | | <OperaTaxesUploadWindow ref="OperaTaxesUploadWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaTaxesWindow from '@/components/business/OperaTaxesWindow' |
| | | import {all as solutionAll} from "@/api/business/solutions"; |
| | | import {pageAll as companyAll} from "@/api/business/company"; |
| | | export default { |
| | | name: 'Taxes', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaTaxesWindow }, |
| | | data () { |
| | | return { |
| | | // 搜索 |
| | | companyList:[], |
| | | searchForm: { |
| | | status: '', |
| | | companyId: '' |
| | | }, |
| | | visible: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '发票信息表', |
| | | api: '/business/taxes', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadSelectList() |
| | | }, |
| | | methods: { |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList); |
| | | }, |
| | | loadSelectList() { |
| | | solutionAll({dataType:0}).then(res => { |
| | | this.solutionList = res |
| | | }).catch(err => { |
| | | }) |
| | | companyAll({}).then(res => { |
| | | this.companyList = res |
| | | }).catch(err => { |
| | | }) |
| | | } |
| | | } |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaTaxesWindow from '@/components/business/OperaTaxesWindow' |
| | | import OperaTaxesUploadWindow from '@/components/business/OperaTaxesUploadWindow' |
| | | import { all as solutionAll } from '@/api/business/solutions' |
| | | import { pageAll as companyAll } from '@/api/business/company' |
| | | import { doneApply } from '@/api/business/taxes' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | name: 'Taxes', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaTaxesWindow, OperaTaxesUploadWindow, UploadAvatarImage }, |
| | | data () { |
| | | return { |
| | | // 搜索 |
| | | form: { |
| | | id: null, |
| | | doneCode: null, |
| | | imgurl: null, |
| | | file:{ }, |
| | | }, |
| | | companyList: [], |
| | | searchForm: { |
| | | status: '', |
| | | companyId: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | time: '', |
| | | }, |
| | | visible: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '发票信息表', |
| | | api: '/business/taxes', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadSelectList() |
| | | }, |
| | | methods: { |
| | | reset () { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.startDate = '' |
| | | this.searchForm.endDate = '' |
| | | this.search() |
| | | }, |
| | | changeTime(e) { |
| | | if (e.length > 0) { |
| | | this.searchForm.startDate = e[0] + ' 00:00:00' |
| | | this.searchForm.endDate = e[1] + ' 23:59:59' |
| | | } else { |
| | | this.searchForm.startDate = '' |
| | | this.searchForm.endDate = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | handleRemove (file, fileList) { |
| | | console.log(file, fileList) |
| | | }, |
| | | uploadImg (row) { |
| | | this.form = { |
| | | id: row.id, |
| | | doneCode: row.doneCode, |
| | | imgurl:null |
| | | }, |
| | | this.form.file= {imgurl: row.imgurl, imgurlfull: row.imgurlFull } |
| | | this.visible = true |
| | | }, |
| | | result3 (data) { |
| | | this.form.imgurl = null |
| | | this.form.imgurl = data.imgurl |
| | | }, |
| | | doneApplyDo () { |
| | | doneApply(this.form) |
| | | .then(response => { |
| | | this.visible = false |
| | | this.search() |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.$tip.apiFailed(err) |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }, |
| | | loadSelectList () { |
| | | solutionAll({ dataType: 0 }).then(res => { |
| | | this.solutionList = res |
| | | }).catch(err => { |
| | | }) |
| | | companyAll({}).then(res => { |
| | | this.companyList = res |
| | | }).catch(err => { |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |