| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <div>
- <div class="normal-margin">
- <add class="inline-16" v-if="tool.checkAuth($route.name,'quotationInfoManage') && mainData.disabled" :data="mainData" @onSuccess="queryfinancialinfo"></add>
- <el-input
- style="width:300px"
- placeholder="请输入内容"
- v-model="search"
- clearable
- @clear="clearData()"
- size="small"
- @keyup.enter.native="queryClick()">
- <i slot="prefix" class="el-icon-search" @click="queryClick()"></i>
- </el-input>
- </div>
-
- <el-table
- :header-cell-style="{background:'#EEEEEE',color:'#333'}"
- :data="tableData"
- stripe
- size="mini"
- style="width: 100%"
- border>
- <el-table-column
- prop="enterprisename"
- label="开票抬头">
- </el-table-column>
- <el-table-column
- prop="taxno"
- label="纳税识别号">
- </el-table-column>
- <el-table-column
- prop="bank"
- label="开户银行">
- </el-table-column>
- <el-table-column
- prop="bankcardno"
- label="开户账号">
- </el-table-column>
- <el-table-column
- prop="address"
- label="开票地址">
- <!-- <template slot-scope="scope">
- {{scope.row.address}} <i style="color:red" v-if="scope.row.isdefault === 1" class="el-icon-place"></i>
- </template>-->
- </el-table-column>
- <el-table-column
- prop="phonenumber"
- label="电话">
- </el-table-column>
- <el-table-column
- prop="remarks"
- label="备注">
- </el-table-column>
- <el-table-column
- label="操作"
- width="100">
- <template slot-scope="scope">
- <edit class="inline-16" :data="scope.row" :disable="mainData.disabled" @onSuccess="queryfinancialinfo"></edit>
- <el-button type="text" size="mini" :disabled="!tool.checkAuth($route.name,'quotationInfoManage') || !mainData.disabled" @click="deleteRow(scope.row)">删 除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="container normal-panel" style="text-align:right">
- <el-pagination
- background
- small
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- :page-sizes="[20, 50, 100, 200]"
- layout="total,sizes, prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </div>
- </div>
- </template>
- <script>
- import add from './modules/add.vue'
- import edit from './modules/edit.vue'
- export default {
- props:['mainData'],
- data () {
- return {
- search:'',
- tableData:[],
- param:{
- "id": 20221013160602,
- "content": {
- "sys_enterpriseid":0,
- "pageNumber": 1,
- "pageSize": 20,
- "where": {
- "condition": ""
- }
- },
- },
- total:0,
- currentPage:0
- }
- },
- components:{
- add,
- edit
- },
- methods:{
- async queryfinancialinfo () {
- this.param.content.sys_enterpriseid = this.mainData.sys_enterpriseid
- const res = await this.$api.requested(this.param)
- this.tableData = res.data
- this.total = res.total
- this.currentPage = res.pageNumber
- },
- handleSizeChange(val) {
- // console.log(`每页 ${val} 条`);
- this.param.content.pageSize = val
- this.queryfinancialinfo()
- },
- handleCurrentChange(val) {
- // console.log(`当前页: ${val}`);
- this.param.content.pageNumber = val
- this.queryfinancialinfo()
- },
- async deleteRow (row) {
- const res = await this.$api.requested({
- "id": 20221013160502,
- "content": {
- "sys_enterprise_financeids": [row.sys_enterprise_financeid]
- },
- })
- this.tool.showMessage(res,()=>{
- this.queryfinancialinfo()
- })
- },
- clearData(){
- this.search = ""
- },
- queryClick(){
- this.params.content.where.condition = this.search
- this.listData()
- }
- },
- mounted () {
- this.queryfinancialinfo()
- }
- }
- </script>
- <style scoped>
- /deep/.el-input__prefix {
- display: flex;
- align-items: center;
- }
- </style>
|