| | |
| | | trim: true |
| | | }) |
| | | } |
| | | // æ¥è¯¢ |
| | | export function doneApply(data) { |
| | | return request.post('/business/taxes/doneApply', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | } |
| | | }, |
| | | timer: null, |
| | | num: 0, |
| | |
| | | }) |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList); |
| | | console.log(file, fileList) |
| | | }, |
| | | // æ¥æ¶è¥ä¸æ§ç
§æ°æ® |
| | | result(data) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="50%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" style="width: 50%;"> |
| | | <el-form-item label="å票å·" prop="doneCode"> |
| | | <el-input v-model="form.doneCode" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="çµåå票" prop="imgurl"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'taxes' }" :file="form.file" @uploadSuccess="result3" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template v-slot:footer> |
| | | <el-button type="primary" @click="doSubmit">ç¡® å®</el-button> |
| | | <el-button @click="visible=false">åæ¶</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { doneApply } from '@/api/business/taxes' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | export default { |
| | | name: 'OperaTaxesUploadWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | // æç´¢ |
| | | form: { |
| | | id: null, |
| | | doneCode: null, |
| | | imgurl: null, |
| | | file: { } |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | doneCode: [ |
| | | { required: true, message: '请è¾å
¥å票å·' } |
| | | ], |
| | | imgurl: [ |
| | | { required: true, message: '请ä¸ä¼ å票çµåç' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/taxes', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form = { |
| | | id: null, |
| | | doneCode: null, |
| | | imgurl: null, |
| | | file: { } |
| | | }, |
| | | this.form.id = target.id |
| | | this.form.doneCode = target.doneCode |
| | | this.form.file = { imgurl: target.imgurl, imgurlfull: target.imgurlFull } |
| | | }, |
| | | result3 (data) { |
| | | this.form.imgurl = null |
| | | this.form.imgurl = data.imgurl |
| | | }, |
| | | doSubmit () { |
| | | this.$refs.form.validate((valid) => { |
| | | // debugger |
| | | if (!valid) { |
| | | return |
| | | } |
| | | doneApply(this.form) |
| | | .then(response => { |
| | | this.visible = false |
| | | this.$emit('success') |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.$tip.apiFailed(err) |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .info { |
| | | width: 100%; |
| | | .info_label { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | span { |
| | | font-size: 18px; |
| | | font-weight: 500; |
| | | color: #000000; |
| | | } |
| | | } |
| | | .info_list { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .info_list_item { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: start; |
| | | margin-bottom: 20px; |
| | | .info_list_item_label { |
| | | width: 150px; |
| | | flex-shrink: 0; |
| | | } |
| | | .info_list_item_val { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | .image { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | img { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | id: null |
| | | }, |
| | | // éªè¯è§å |
| | | rules: {} |
| | | rules: {}, |
| | | tableData:[] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }, |
| | | methods: { |
| | | open(title,target){ |
| | | this.form.id = null |
| | | this.form = { |
| | | id: null, |
| | | checkInfo: '' |
| | | }, |
| | | this.title=title |
| | | this.visible=true |
| | | this.form.id=target.id |
| | |
| | | <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> |
| | | |
| | |
| | | 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"; |
| | | 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 }, |
| | | components: { TableLayout, Pagination, OperaTaxesWindow, OperaTaxesUploadWindow, UploadAvatarImage }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | form: { |
| | | id: null, |
| | | doneCode: null, |
| | | imgurl: null, |
| | | file:{ }, |
| | | }, |
| | | companyList:[], |
| | | searchForm: { |
| | | status: '', |
| | |
| | | }, |
| | | methods: { |
| | | handleRemove(file, fileList) { |
| | | console.log(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 => { |