| | |
| | | <span v-if="row.type === 1">纸质发票</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="发票电子版" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <img v-if="row.imgurlfull!=null" :src="row.imgurlfull" style="width: 90px;height: 90px"> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text">上传发票</el-button> |
| | | <el-button v-if="row.status==0" type="text" @click="$refs.OperaTaxesUploadWindow.open('上传发票',row)">上传发票</el-button> |
| | | <el-button v-if="row.status ==1 " type="text" @click="$refs.OperaTaxesUploadWindow.open('修改发票',row)">修改发票</el-button> |
| | | <el-button type="text">申请详情</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <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' |
| | | 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: '' |
| | | }, |
| | | 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) |
| | | }, |
| | | 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> |