Commit 6fb64619 authored by 许珑标's avatar 许珑标

Merge branch 'feat/tax' into test

parents 4d21037c c21f1419
......@@ -83,3 +83,42 @@ export function updateInvoiceStatus(data) {
data: data
})
}
// 通过外部付款卡号获取销售方开票信息
export function getSellerInvoiceInfo(cardNo) {
return request({
url: `/business/laborSign/getSellerInvoiceInfo/${cardNo}`,
method: 'get',
})
}
// 一键开票
export function onlineInvoicing(data) {
return request({
url: '/business/invoiceApply/onlineGen',
method: 'post',
data: data
})
}
//获取人脸登录二维码
export function getFaceLoginCode(query) {
console.log('获取人脸登录二维码:', query)
return request({
url: '/business/invoiceApply/getFaceLoginQrCode',
method: 'get',
params: query
})
}
// 获取人脸识别登录结果
export function getFaceLoginStatus(query) {
console.log('获取人脸识别登录结果:', query)
return request({
url: '/business/invoiceApply/getFaceLoginStatus',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询办税人信息列表
export function listLoginUser(query) {
return request({
url: '/business/loginUser/list',
method: 'get',
params: query
})
}
// 查询办税人信息所有列表
export function listAllLoginUser(query) {
return request({
url: '/business/loginUser/listAll',
method: 'get',
params: query
})
}
// 查询办税人信息详细
export function getLoginUser(id) {
return request({
url: '/business/loginUser/getInfo/' + id,
method: 'get'
})
}
// 新增办税人信息
export function addLoginUser(data) {
return request({
url: '/business/loginUser/add',
method: 'post',
data: data
})
}
// 修改办税人信息
export function updateLoginUser(data) {
return request({
url: '/business/loginUser/edit',
method: 'post',
data: data
})
}
// 删除办税人信息
export function delLoginUser(id) {
return request({
url: '/business/loginUser/remove/' + id,
method: 'get'
})
}
......@@ -201,6 +201,7 @@ export default {
/** 查询付款主体信息列表 */
getList() {
this.loading = true;
this.queryParams.bindType = 1
listCompanyInfo(this.queryParams).then(response => {
this.companyInfoList = response.rows;
this.total = response.total;
......
......@@ -155,6 +155,13 @@
v-hasPermi="['business:invoiceApply:uploadInvoiceFile']"
@click="uploadInvoiceDailog(scope.row)"
>上传发票</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-help"
v-hasPermi="['business:invoiceApply:uploadInvoiceFile']"
@click="onlineInvoice(scope.row)"
>一键开票</el-button>
<el-button
size="mini"
type="text"
......@@ -426,7 +433,47 @@
<el-button @click="uploadInvoiceOpen = false">取 消</el-button>
</span>
</el-dialog>
<!-- 一键发票对话框 -->
<el-dialog title="自助开票" :visible.sync="onlineInvoiceForm.panel">
<el-form :model="onlineInvoiceForm" ref="onlineInvoiceForm" size="small" label-width="100px">
<el-select v-model="onlineInvoiceForm.taxpayerId" placeholder="请选择开票员" clearable>
<el-option v-for="item in taxpayerList" :key="item.loginUserIdCard" :label="item.loginName" :value="item.id" />
</el-select>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="onlineGen">确 定</el-button>
<el-button @click="onlineInvoiceForm.panel = false">取 消</el-button>
</span>
</el-dialog>
<el-dialog title="人脸识别二维码" :visible.sync="faceCodeForm.panel" width="30%">
<el-tabs value="first" @tab-click="codeCheckClick">
<el-tab-pane label="个人所得税App" name="first">
<el-span>请打开个人所得税App扫码进行人脸验证,验证完成后请点按下方按钮。</el-span>
<el-image style="width:100%" :src="faceCodeForm.faceQRCode" fit="fill"/>
<el-row>
<el-col :span="14" style="text-align: right;">
<el-button type="success" round @click="refreshThisPage()">我已完成</el-button>
</el-col>
<el-col :span="10" style="text-align: right;">
<el-button type="primary" icon="el-icon-refresh-right" @click="getFaceLoginCode()" circle></el-button>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="当地电子税局App" name="second">
<el-span>请打开当地电子税局App扫码进行人脸验证,验证完成后请点按下方按钮。</el-span>
<el-image style="width:100%" :src="faceCodeForm.faceQRCode" fit="fill"/>
<el-row>
<el-col :span="14" style="text-align: right;">
<el-button type="success" round @click="refreshThisPage()">我已完成</el-button>
</el-col>
<el-col :span="10" style="text-align: right;">
<el-button type="primary" icon="el-icon-refresh-right" @click="getFaceLoginCode()" circle></el-button>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
......@@ -437,11 +484,12 @@ import {
delInvoiceApply,
addInvoiceApply,
updateInvoiceApply,
uploadInvoiceFile, updateInvoiceStatus, getInvoiceApplyDetail
uploadInvoiceFile, updateInvoiceStatus, getInvoiceApplyDetail, onlineInvoicing, getFaceLoginCode, getFaceLoginStatus
} from '@/api/business/invoiceApply'
import { listCompanyInfo } from '@/api/business/companyInfo'
import fa from 'element-ui/src/locale/lang/fa'
import { laborSign, querySignList } from '@/api/business/unitInfo'
import { listAllLoginUser } from '@/api/business/taxUser'
export default {
name: "InvoiceApply",
......@@ -453,6 +501,20 @@ export default {
dicts: ['invoice_status', 'tax_invoice_type'],
data() {
return {
// 人脸识别弹窗表单
faceCodeForm: {
panel: false,
faceQRCode: null,
},
// 一键开票
onlineInvoiceForm: {
panel: false,
taxpayerId: null,
invoiceApplyId: null,
smsCode: null,
verifyAppType: null
},
verifyAppType: 2,
//上传发票
applyInvoiceId: null,
viewInvoiceFileOpen : false,
......@@ -586,7 +648,8 @@ export default {
invocieUrl: [
{ required: true, message: "发票文件地址不能为空", trigger: "blur" }
],
}
},
taxpayerList: [],
};
},
created() {
......@@ -816,6 +879,111 @@ export default {
this.form = response.data;
});
},
onlineInvoice(row) {
let taxpayerQuery = {
// companyType: 2,
// companyId: row.taxCompanyId
}
listAllLoginUser(taxpayerQuery).then(resp => {
if (200 === resp.code) {
this.taxpayerList = resp.data
}
})
this.onlineInvoiceForm = {
panel: true,
taxpayerId: null,
invoiceApplyId: row.id,
smsCode: null,
verifyAppType: null
}
},
onlineGen() {
this.$prompt('请输入返回值', '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
let testData = {
code: value
}
this.invoicingAfter(testData)
})
// onlineInvoicing(this.onlineInvoiceForm).then(resp => {
// if (200 === resp.code) {
// this.invoicingAfter(resp.data)
// }
// })
},
invoicingAfter(data) {
let code = data.code
if (code == 200) {
this.$modal.msgSuccess('开具成功')
this.getList()
} else if (code == 202) {
this.$modal.msgWarning('本次开票需要进行人脸识别验证。')
this.faceCodeForm = {
faceQRCode: data.base64,
panel: true
}
} else if (code == 201) {
this.$modal.msgWarning('本次开票需要短信验证')
this.$prompt('请输入短信验证码', '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
// todo 重新发起
this.onlineInvoiceForm.smsCode = value
// this.onlineGen()
this.$message({
type: 'success',
message: '你输入的短信验证码是: ' + value
});
console.log('一键开票请求参数:', this.onlineInvoiceForm)
})
} else if (code == 500) {
this.$modal.msgError(data.msg)
}
},
// 获取新的扫脸二维码
getFaceLoginCode(fn) {
const loading = this.$loading({
lock: true,
text: '正在获取中请稍等...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let params = {
verifyAppType: this.verifyAppType,
taxpayerId: this.onlineInvoiceForm.taxpayerId
}
getFaceLoginCode(params).then(res => {
if (res.code == 200) {
if (fn && typeof fn === 'function') {
fn()
}
this.faceCodeForm.faceQRCode = res.data;
}
}).finally(() => {
loading.close()
})
},
// 查询人脸识别状态
refreshThisPage() {
getFaceLoginStatus({
taxpayerId: this.onlineInvoiceForm.taxpayerId
}).then(res => {
if (res.data) {
this.faceCodeForm.panel = false;
this.$modal.msgSuccess('验证成功')
} else {
this.$alert('查询人脸识别结果为失败,请刷新二维码后重新操作', '操作提示', {
});
}
})
},
codeCheckClick(tab) {
this.verifyAppType = tab.name === "second" ? 1 : 2 //1:电子税局 App(当地使用的) 2:个人所得税 App
this.getFaceLoginCode();
},
},
};
</script>
......
......@@ -17,7 +17,8 @@
</el-form-item>
<el-form-item label="开票状态" prop="payStatus">
<el-select v-model="queryParams.invoiceStatus" placeholder="请选择开票状态" @change="handleQuery" clearable>
<el-option v-for="dict in dict.type.batch_pay_order_invoice_status" :key="dict.value" :label="dict.label" :value="dict.value" />
<el-option v-for="dict in dict.type.batch_pay_order_invoice_status" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
......@@ -28,12 +29,12 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="batchApplyInvoice"
:disabled="multiple" v-hasPermi="['business:invoiceApply:apply']" >批量申请开票</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="batchApplyInvoice" :disabled="multiple"
v-hasPermi="['business:invoiceApply:apply']">批量申请开票</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
:disabled="multiple" v-hasPermi="['business:payOrder:export']">批量导出</el-button>
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :disabled="multiple"
v-hasPermi="['business:payOrder:export']">批量导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -62,144 +63,263 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-s-order" v-show="showInvoiceButton(scope.row)"
v-hasPermi="['business:invoiceApply:apply']" @click="applyInvoice(scope.row)">申请开票</el-button>
v-hasPermi="['business:invoiceApply:apply']" @click="applyInvoice(scope.row)">申请开票</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<el-dialog title="申请开票" :visible.sync="openApply" width="1000px">
<el-dialog title="申请开票" key="openDialog" :visible.sync="openApply" width="87%">
<el-form ref="formApply" :model="formApply" :rules="rulesApply" label-width="130px">
<el-row>
<el-col :span="10">
<el-descriptions title="购买方信息" :column="1" size="medium">
<el-descriptions-item label="名称" :contentStyle="{ 'font-size': '14px' }">
{{ formApply.applyCompanyInvoice.invoiceTitle }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" :contentStyle="{ 'font-size': '14px' }">
{{ formApply.applyCompanyInvoice.taxRegistrationNumber }}
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="10">
<el-descriptions title="销售方信息" :column="1" size="medium">
<el-descriptions-item label="名称" :contentStyle="{ 'font-size': '14px' }">
{{ formApply.taxCompanyInvoice.invoiceTitle }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" :contentStyle="{ 'font-size': '14px' }">
{{ formApply.taxCompanyInvoice.taxRegistrationNumber }}
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
<el-divider content-position="left">开票类目</el-divider>
<el-row style="text-align: right; margin-bottom: 5px">
<el-button type="primary" size="mini" @click="addItemClick">新增类目</el-button>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table ref="multipleTable" :data="formApply.items" style="width: 100%"
:cell-style="{ 'text-align': 'center' }" :header-cell-style="{ 'text-align': 'center' }">
<el-table-column prop="goodsName" label="项目名称">
<template slot-scope="scope">
<el-form-item label-width="0px">
<span> {{ scope.row.goodsName }}</span>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="goodsSize" label="规格型号">
<template slot="header">
<div style="display: flex;align-items: center;"><span style="color: red;font-size: 16px;">*</span>规格型号
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :key="scope.$index" :prop="'items.' + scope.$index + '.goodsSize'"
:rules="rulesApply.goodsSize">
<el-input @input="changeItemForceupdate" v-model="formApply.items[scope.$index].goodsSize"
size="small" placeholder="请输入规格型号" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="goodsUnit" label="单位">
<template slot="header">
<div style="display: flex;align-items: center;"><span style="color: red;font-size: 16px;">*</span>单位
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :prop="'items.' + scope.$index + '.goodsUnit'"
:rules="rulesApply.goodsUnit">
<el-input @input="changeItemForceupdate" v-model="formApply.items[scope.$index].goodsUnit"
size="small" placeholder="请输入单位" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="taxClassifyRate" label="税率">
<template slot="header">
<div style="display: flex;align-items: center;"><span style="color: red;font-size: 16px;">*</span>税率
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :prop="'items.' + scope.$index + '.taxClassifyRate'"
:rules="rulesApply.taxClassifyRate">
<el-select @change="countPriceFn" placeholder="请选择税率"
v-model="formApply.items[scope.$index].taxClassifyRate">
<el-option v-for="(item, index) in scope.row.taxRateData" :key="index" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="免税类型" prop="freeType" width="180">
<template slot="header">
<div style="display: flex;align-items: center;">免税类型
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :prop="'items.' + scope.$index + '.freeType'"
:rules="rulesApply.freeType">
<el-select :disabled="Number(scope.row.taxClassifyRate) != 0" @change="changeItemForceupdate"
v-model="formApply.items[scope.$index].freeType" size="small" placeholder="请选择免税类型">
<el-option v-for="dict in dict.type.tax_free_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="goodsCount" label="数量" width="180">
<template slot="header">
<div style="display: flex;align-items: center;"><span style="color: red;font-size: 16px;">*</span>数量
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :prop="'items.' + scope.$index + '.goodsCount'"
:rules="rulesApply.goodsCount">
<el-input placeholder="请输入数量" type="number" @input="countPriceFn" v-model="scope.row.goodsCount"
size="small"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="goodsPrice" label="单价">
<template slot-scope="scope">
<el-form-item label-width="0px">
{{ scope.row.goodsPrice }}
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="amountTax" label="价税合计" width="180">
<template slot="header">
<div style="display: flex;align-items: center;"><span style="color: red;font-size: 16px;">*</span>价税合计
</div>
</template>
<template slot-scope="scope">
<el-form-item label-width="0px" :prop="'items.' + scope.$index + '.amountTax'"
:rules="rulesApply.amountTax">
<el-input placeholder="价税合计" type="number" @input="countPriceFn" v-model="scope.row.amountTax"
size="small"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额(不含税)">
<template slot-scope="scope">
<el-form-item label-width="0px">
{{ scope.row.amount }}
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope">
<el-form-item label-width="0px">
{{ scope.row.taxAmount }}
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<!-- <el-form-item label-width="0px"> -->
<el-button type="danger" size="mini" @click="removeItem(scope.$index)" icon="el-icon-delete"
circle>移除</el-button>
<!-- <el-button size="mini" style="float: right; margin-bottom: 5px"
@click="removeItem(scope.$index)">移除</el-button> -->
<!-- </el-form-item> -->
</template>
</el-table-column>
</el-table>
<!-- </el-form-item> -->
</el-row>
<el-card shadow="hover" class="invoice-info-card">
<div>
<h3 class="title-bold" strong >开票金额</h3>
<h3 class="title-bold">开票金额</h3>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="价税合计金额/元" prop="totalAmountTax">
<el-input v-model="formApply.totalAmountTax" placeholder="请输入价税合计金额/元" disabled/>
<el-input v-model="formApply.totalAmountTax" placeholder="请输入价税合计金额/元" disabled />
</el-form-item>
<el-form-item label="发票类型" prop="invoieType">
<el-radio-group v-model="formApply.invoieType">
<el-radio v-for="dict in dict.type.tax_invoice_type" :key="dict.value" :label="dict.value" >{{dict.label}}</el-radio>
<el-radio v-for="dict in dict.type.tax_invoice_type" :key="dict.value" :label="dict.value">{{
dict.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</div>
</el-card>
<el-card shadow="hover" class="invoice-info-card">
<div>
<h3 class="title-bold" strong >采购方信息</h3>
<el-divider></el-divider>
<!-- 采购企业选择 -->
<el-row>
<el-col :span="24">
<el-form-item label="采购方" prop="applyCompanyId">
<el-select v-model="formApply.applyCompanyId" placeholder="请选择采购方" clearable @change="applyCompanyChange">
<el-option v-for="item in applyCompanyList" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<p>名称:{{formApply.applyCompanyInvoice.invoiceTitle}}</p>
</el-col>
<el-col :span="8">
<p>纳税人识别号:{{formApply.applyCompanyInvoice.taxRegistrationNumber}}</p>
</el-col>
<el-col :span="8">
<p>开户银行:{{formApply.applyCompanyInvoice.bankName}}</p>
</el-col>
<el-col :span="8">
<p>开户账号:{{formApply.applyCompanyInvoice.bankAccount}}</p>
</el-col>
<el-col :span="8">
<p>地址:{{formApply.applyCompanyInvoice.address}}</p>
</el-col>
<el-col :span="8">
<p>电话:{{formApply.applyCompanyInvoice.phone}}</p>
</el-col>
</el-row>
</div>
</el-card>
<el-card shadow="hover" class="invoice-info-card">
<div>
<h3 class="title-bold" strong >销售方信息</h3>
<el-divider></el-divider>
<el-form-item label="销售方" prop="taxCompanyId">
<el-select v-model="formApply.taxCompanyId" placeholder="请选择销售方" clearable @change="taxCompanyChange">
<el-option v-for="item in taxCompanyList" :key="item.id" :label="item.taxUnitName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="8">
<p>名称:{{formApply.taxCompanyInvoice.invoiceTitle}}</p>
</el-col>
<el-col :span="8">
<p>纳税人识别号:{{formApply.taxCompanyInvoice.taxRegistrationNumber}}</p>
</el-col>
<el-col :span="8">
<p>开户银行:{{formApply.taxCompanyInvoice.bankName}}</p>
</el-col>
<el-col :span="8">
<p>开户账号:{{formApply.taxCompanyInvoice.bankAccount}}</p>
</el-col>
<el-col :span="8">
<p>地址:{{formApply.taxCompanyInvoice.address}}</p>
</el-col>
<el-col :span="8">
<p>电话:{{formApply.taxCompanyInvoice.phone}}</p>
</el-col>
</el-row>
</div>
</el-card>
<!-- <el-card shadow="hover" class="invoice-info-card">
<div>
<h3 class="title-bold" strong >开票信息</h3>
<el-divider></el-divider>
<el-form-item label="价税合计金额/元" prop="invoiceTitle">
<el-input v-model="formApply.totalAmountTax" placeholder="请输入价税合计金额/元" disabled/>
</el-form-item>
<el-form-item label="发票类型">
<el-radio-group v-model="formApply.invoieType">
<el-radio v-for="dict in dict.type.tax_invoice_type" :key="dict.value" :label="dict.value" >{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="开票类目" prop="invoiceTitle">
<el-input v-model="formApply.invoiceTitle" placeholder="请输入发票抬头"/>
</el-form-item>
<el-form-item label="税率" prop="invoiceTitle">
<el-input v-model="formApply.invoiceTitle" placeholder="请输入税率"/>
</el-form-item>
<el-form-item label="税额" prop="invoiceTitle">
<el-input v-model="formApply.invoiceTitle" placeholder="请输入税额"/>
</el-form-item>
<el-form-item label="票面名称" prop="bankName">
<el-input v-model="formApply.bankName" placeholder="请输入票面名称" />
</el-form-item>
<el-form-item label="票面规格型号" prop="bankName">
<el-input v-model="formApply.bankName" placeholder="请输入票面规格型号" />
</el-form-item>
<el-form-item label="票面单位" prop="bankAccount">
<el-input v-model="formApply.bankAccount" placeholder="请输入票面单位" />
</el-form-item>
<el-form-item label="票面数量" prop="address">
<el-input v-model="formApply.address" placeholder="请输入票面数量"/>
</el-form-item>
<el-form-item label="票面备注" prop="phone">
<el-input v-model="formApply.phone" placeholder="请输入电话" />
</el-form-item>
</div>
</el-card>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitApply">确认申请开票</el-button>
<el-button type="primary" @click="submitApply"
:disabled="Number(taxIncludedTotalAmount) > Number(formApply.totalAmountTax)">确认申请开票</el-button>
<el-button @click="openApply = false">取消</el-button>
</div>
</el-dialog>
<el-dialog :title="taxCategoryPanel.title" :visible.sync="taxCategoryPanel.open" width="600px" append-to-body>
<el-table :data="taxCategoryPanel.data" stripe style="width: 100%">
<el-table-column prop="goodsName" label="类目名称" width="180" />
<el-table-column prop="code" label="类目编码" width="180" />
<el-table-column prop="vatRate" label="税率" />
<el-table-column prop="vatRate" label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="addItem(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="taxCategoryPanel.open = false">关 闭</el-button>
</div>
</el-dialog>
<!-- <el-dialog title="添加商品" :visible.sync="classifyRateFormPanel" width="600px" append-to-body>
<el-form :model="classifyRateForm" label-width="110px">
<el-form-item label="类目名称">
<el-input v-model="classifyRateForm.goodsName" disabled></el-input>
</el-form-item>
<el-form-item label="规格">
<el-input v-model="classifyRateForm.goodsSize" placeholder="规格/型号"></el-input>
</el-form-item>
<el-form-item label="单位">
<el-input v-model="classifyRateForm.goodsUnit" placeholder="单位"></el-input>
</el-form-item>
<el-form-item label="费率">
<el-select @change="countPriceFn" v-model="classifyRateForm.taxClassifyRate" placeholder="请选择费率">
<el-option v-for="(item, index) in classifyRates" :key="index" :label="item" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="免税类型">
<el-select :disabled="!classifyRateForm.taxClassifyRate || classifyRateForm.taxClassifyRate > 0"
v-model.trim="classifyRateForm.freeType" size="small" placeholder="请选择免税类型">
<el-option v-for="dict in dict.type.tax_free_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="数量">
<el-input-number v-model="classifyRateForm.goodsCount" :precision="0" :step="1" :min="1"
style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item label="单价(含税)">
<el-input-number v-model="classifyRateForm.goodsMoney" :precision="2" :step="0.1" :min="0.1"
style="width: 150px"></el-input-number>
</el-form-item>
<el-form-item label="单价(不含税)">
<el-input-number v-model="classifyRateForm.goodsPrice" :precision="2" :step="0.1" :min="0.1"
style="width: 150px"></el-input-number>
</el-form-item>
<el-form-item label="金额(不含税)">
<el-input-number disabled v-model="classifyRateForm.amount" :precision="2" :step="1" :min="1"
style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item label="税额">
<el-input-number disabled v-model="classifyRateForm.taxAmount" :precision="2" :step="1" :min="1"
style="width: 100%"></el-input-number>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitItem">确认</el-button>
<el-button @click="classifyRateFormPanel = false">取消</el-button>
</div>
</el-dialog> -->
</div>
</template>
......@@ -213,12 +333,12 @@ import {
getInvoiceInfo,
getInvoiceInfoByCompanyId
} from '@/api/business/invoiceInfo'
import { addApplyInvoice } from '@/api/business/invoiceApply'
import { laborSign, querySignList } from '@/api/business/unitInfo'
import { addApplyInvoice, getSellerInvoiceInfo } from '@/api/business/invoiceApply'
import { getUnitTaxCategories, laborSign, querySignList } from '@/api/business/unitInfo'
export default {
name: "PayOrder",
components: { RePay },
dicts: ['pay_status', 'batch_pay_order_invoice_status', 'pay_type_title','tax_invoice_type'],
dicts: ['pay_status', 'batch_pay_order_invoice_status', 'pay_type_title', 'tax_invoice_type', 'tax_free_type'],
data() {
return {
//人力公司list
......@@ -280,9 +400,20 @@ export default {
// 表单参数
formApply: {
invoieType: 'NORMAL_TAX',
applyCompanyInvoice: {},
taxCompanyInvoice: {},
applyCompanyInvoice: {
invoiceTitle: '',
taxRegistrationNumber: ''
},
taxCompanyInvoice: {
invoiceTitle: '',
taxRegistrationNumber: ''
},
totalAmountTax: 0,
totalAmount: 0,
totalTax: 0,
items: []
},
taxIncludedTotalAmount: 0, //列表中的含税金额总计
// 表单校验
rulesApply: {
applyCompanyId: [
......@@ -296,7 +427,105 @@ export default {
],
invoieType: [
{ required: true, message: "请选择发票类型", trigger: "change" }
],
goodsSize: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].goodsSize) {
callback(new Error('请输入规格'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
],
goodsUnit: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].goodsUnit) {
callback(new Error('请输入单位'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
],
taxClassifyRate: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].taxClassifyRate) {
callback(new Error('请选择税率'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
],
freeType: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].freeType && Number(this.formApply.items[arr[1]].taxClassifyRate) == 0) {
callback(new Error('请选择免税类型'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
],
goodsCount: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].goodsCount) {
callback(new Error('请输入数量'));
} else if (Number(this.formApply.items[arr[1]].goodsCount) <= 0) {
callback(new Error('数量不能小于等于0'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
],
amountTax: [
{
validator: (rule, value, callback) => {
let arr = rule.field.split('.');
if (!this.formApply.items[arr[1]].amountTax) {
callback(new Error('请输入价税合计'));
} else if (Number(this.formApply.items[arr[1]].amountTax) <= 0) {
callback(new Error('价税合计不能小于等于0'));
} else if (Number(this.formApply.items[arr[1]].amountTax > Number(this.formApply.totalAmountTax))) {
callback(new Error('不能大于开票金额的价税合计'));
} else {
callback();
}
}, trigger: ['blur', 'change']
}
]
},
taxCategoryPanel: {
title: '支持的税收分类编码列表',
open: false,
data: []
},
classifyRates: [],
classifyRateFormPanel: false,
classifyRateForm: {
freeType: '',
taxClassifyCode: '',
goodsName: '',
taxClassifyRate: '',
goodsMoney: '',
goodsPrice: '',
goodsSize: '',
goodsUnit: '',
goodsCount: '',
amount: '',
taxAmount: ''
}
};
},
......@@ -305,7 +534,47 @@ export default {
this.getListgetCompanyList(1);
// this.getListgetCompanyList(2);
},
computed: {
// 计算属性,计算选中的数量
countPriceFnComputed() {
}
},
methods: {
countPriceFn() {
// console.log('执行计算', this.formApply.items);
if (this.formApply.items.length > 0) {
this.formApply.totalAmount = 0;
this.formApply.totalTax = 0;
this.taxIncludedTotalAmount = 0
this.formApply.items.forEach(item => {
if (item.amountTax) {
this.taxIncludedTotalAmount += Number(item.amountTax);
if (this.formApply.totalAmountTax < this.taxIncludedTotalAmount) {
this.$modal.msgError(`价税合计金额(${this.taxIncludedTotalAmount})不能大于开票金额价税金额的(${this.formApply.totalAmountTax})总和`)
}
}
if (item.taxClassifyRate && item.goodsCount && item.amountTax) {
item.taxAmount = Math.round((Number(item.amountTax) - Number(item.amountTax) / (1 + Number(item.taxClassifyRate))) * 100) / 100;
item.amount = Math.round((Number(item.amountTax) - Number(item.taxAmount)) * 100) / 100;
item.goodsPrice = Math.round((Number(item.amount) / Number(item.goodsCount)) * 10000) / 10000;
if (item.amount) {
this.formApply.totalAmount += item.amount;
}
if (item.taxAmount) {
this.formApply.totalTax += item.taxAmount;
}
}
});
}
this.$forceUpdate()
// this.countPriceFnComputed()
},
//更新视图方法
changeItemForceupdate() {
console.log('执行立刻', this.formApply.items);
this.$forceUpdate()
},
//获取企业信息数据
getListgetCompanyList(bindType) {
this.loading = true;
......@@ -317,14 +586,14 @@ export default {
listCompanyInfo(queryParams).then(response => {
if (bindType == 1) {
this.applyCompanyList = response.rows;
}else if (bindType == 2) {
} else if (bindType == 2) {
this.taxCompanyList = response.rows;
}
this.loading = false;
});
},
//查询合作机构list
queryTaxCompanyList(applyCompanyId){
queryTaxCompanyList(applyCompanyId) {
const queryParams = {
inviterId: applyCompanyId,
signStatus: 2,
......@@ -333,7 +602,7 @@ export default {
}
laborSign(queryParams).then(response => {
if (response.code == 200) {
if(response.total == 0){
if (response.total == 0) {
this.$modal.msgError("该企业未签约,无法申请开票");
return;
}
......@@ -365,7 +634,7 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.batchNos = selection.map(item => item.batchNo)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
console.log(this.ids);
console.log(this.batchNos);
......@@ -385,21 +654,40 @@ export default {
let payFlag = false;
//未开票 或 开票失败
if (row.invoiceStatus === 1 || row.invoiceStatus === 3) {
invoicueFlag = true;
invoicueFlag = true;
}
// 支付成功 或 部分成功
if (row.payStatus === 3 || row.payStatus === 5) {
payFlag = true;
payFlag = true;
}
return (invoicueFlag && payFlag);
},
// 申请开票
applyInvoice(row) {
this.openApply = true;
this.formApply.totalAmountTax = row.successAmount;
this.formApply.batchPayIds =[row.id];
this.formApply.batchPayOrderIds = row.id;
console.log(this.formApply);
this.formApply.totalAmountTax = row.successAmount
this.formApply.batchPayIds = [row.id]
this.formApply.batchPayOrderIds = row.id
getSellerInvoiceInfo(row.payerAccNo).then(resp => {
if (200 === resp.code) {
this.formApply.taxCompanyId = resp.data.taxUnitId
this.formApply.taxCompanyInvoice.companyId = resp.data.taxUnitId
this.formApply.taxCompanyInvoice.invoiceTitle = resp.data.taxUnitName
this.formApply.taxCompanyInvoice.companyName = resp.data.taxUnitName
this.formApply.taxCompanyInvoice.taxRegistrationNumber = resp.data.taxUnitCode
this.formApply.applyCompanyId = resp.data.inviterId
this.formApply.applyCompanyInvoice.companyId = resp.data.inviterId
this.formApply.applyCompanyInvoice.companyName = resp.data.inviterName
this.formApply.applyCompanyInvoice.invoiceTitle = resp.data.inviterName
this.formApply.applyCompanyInvoice.taxRegistrationNumber = resp.data.inviterCode
this.openApply = true
// 不需要额外的开票信息
// getInvoiceInfoByCompanyId(resp.data.inviterId).then(response => {
// this.formApply.applyCompanyInvoice = response.data;
// }).finally(() => {
// this.loading = false;
// });
}
})
return;
},
//采购方选择
......@@ -445,6 +733,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(this.formApply)
addApplyInvoice(this.formApply).then(response => {
this.loading = false;
if (response.code == 200) {
......@@ -455,11 +744,11 @@ export default {
this.$message.error(response.msg);
}
})
})
}).finally(() => {
this.loading = false;
});
}
}).finally(() => {
this.loading = false;
});
})
},
// 批量申请开票
batchApplyInvoice(row) {
......@@ -472,7 +761,7 @@ export default {
}).then(() => {
this.openApply = true;
//ids转字符串,逗号隔开
this.formApply.batchPayIds = ids;
this.formApply.batchPayIds = ids;
this.formApply.batchPayOrderIds = ids.join(',');
const selectItemList = this.payOrderList.filter(item => ids.includes(item.id));
let sumSuccessAmount = 0;
......@@ -482,6 +771,67 @@ export default {
this.formApply.totalAmountTax = Number.parseFloat(sumSuccessAmount).toFixed(2);
})
},
addItemClick() {
/** 查看企业可开票类目 **/
getUnitTaxCategories(this.formApply.taxCompanyId).then(resp => {
if (200 === resp.code) {
this.taxCategoryPanel.data = resp.data
this.taxCategoryPanel.open = true
this.taxCategoryPanel.title = `[${this.formApply.taxCompanyInvoice.invoiceTitle}]支持的税收分类编码列表`
}
})
},
addItem(classify) {
// console.log('表格数据', this.formApply.items);
classify.taxRateData = classify.vatRate.split(',')
classify.taxClassifyRate = null
classify.goodsSize = ''
classify.goodsUnit = null
classify.goodsCount = null
classify.goodsPrice = ''
classify.amountTax = null
classify.amount = ''
classify.taxAmount = ''
classify.freeType = ''
this.formApply.items.push(classify)
console.log('表格数据', this.formApply);
this.taxCategoryPanel.open = false
// this.$forceUpdate()
// let rate = classify.vatRate.split(",")
// if (rate.length > 1) {
// this.classifyRateFormPanel = true
// this.classifyRateForm = {
// goodsName: classify.goodsName,
// taxClassifyCode: classify.code,
// taxClassifyRate: ''
// }
// this.classifyRates = rate
// } else {
// this.formApply.items.push({
// taxClassifyCode: classify.code,
// goodsName: classify.goodsName,
// taxClassifyRate: rate[0]
// })
// }
},
removeItem(index) {
this.formApply.items.splice(index, 1)
},
submitItem() {
this.classifyRateFormPanel = false
this.formApply.items.push({
taxClassifyCode: this.classifyRateForm.taxClassifyCode,
goodsName: this.classifyRateForm.goodsName,
taxClassifyRate: this.classifyRateForm.taxClassifyRate,
freeType: this.classifyRateForm.freeType,
goodsSize: this.classifyRateForm.goodsSize,
goodsCount: this.classifyRateForm.goodsCount,
goodsUnit: this.classifyRateForm.goodsUnit,
amount: this.classifyRateForm.amount,
taxAmount: this.classifyRateForm.taxAmount
})
}
}
};
</script>
......@@ -491,9 +841,11 @@ export default {
padding: 0 !important;
}
}
.invoice-info-card {
margin-bottom: 10px;
}
.title-bold {
text-align: left;
font-weight: bold;
......
......@@ -257,7 +257,8 @@ export default {
bankAccount: [
{ required: true, message: "开户账号不能为空", trigger: "blur" },
{
pattern: /^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/,
//银行账号校验 16-19位
pattern: /^\d{16,19}$/,
message: "请输入正确的开户账号",
trigger: "blur"
}
......@@ -400,7 +401,7 @@ export default {
getListgetCompanyList() {
this.loading = true;
const queryParams = {
bindType: '1',
// bindType: '1',
pageNum: 1,
pageSize: 1000
}
......
......@@ -154,7 +154,7 @@
</el-form-item>-->
<el-form-item label="服务时间" prop="serviceTime">
<el-date-picker clearable placeholder="请选择服务时间" v-model="form.serviceTimeArr" @change="changeServiceTime"
type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="零工人数" prop="needNum">
......@@ -288,9 +288,7 @@ export default {
releaseTime: null,
},
// 表单参数
form: {
serviceTimeArr: [],
},
form: {},
// 表单校验
rules: {
id: [
......@@ -459,6 +457,7 @@ export default {
araeCode: null,
area: null,
address: null,
serviceTimeArr: [],
serviceTime: null,
serviceTimeStart: null,
serviceTimeEnd: null,
......@@ -472,7 +471,6 @@ export default {
batchPayOrderId: null,
releaseTime: null,
};
this.form.serviceTimeArr = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
......
......@@ -61,7 +61,11 @@
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="企业名称" align="center" prop="unitName" fixed/>
<el-table-column label="信用代码" align="center" prop="unitCode" fixed/>
<el-table-column label="所属行业" align="center" prop="sectorDictDataVal"/>
<el-table-column label="所属行业" align="center" prop="sectorDictDataVal">
<template slot-scope="scope">
<dict-tag :options="dict.type.unit_business_type" :value="scope.row.sectorDictDataVal"/>
</template>
</el-table-column>
<el-table-column label="法人姓名" align="center" prop="legalPersonName"/>
<el-table-column label="法人联系电话" align="center" prop="legalPersonMobile"/>
<el-table-column label="所属地址" align="center" prop="address"/>
......@@ -162,7 +166,7 @@ import { listUnitInfo, delUnitInfo, getUnitTaxCategories, updateUnitInfo } from
export default {
name: 'UnitInfo',
dicts: ['tax_invoice_status', 'tax_invoice_type'],
dicts: ['tax_invoice_status', 'tax_invoice_type', 'unit_business_type'],
data() {
return {
taxCategoryPanel: {
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="企业名称" prop="taxpayerName">
<el-input
v-model="queryParams.taxpayerName"
placeholder="请输入企业名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="税务账号" prop="loginAccount">
<el-input
v-model="queryParams.loginAccount"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="办税人姓名" prop="loginName" label-width="120px">
<el-input
v-model="queryParams.loginName"
placeholder="请输入办税人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="loginUserList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="办税地区" align="center" prop="areaCode">
<template slot-scope="scope">
<dict-tag :options="dict.type.area_code_taxes" :value="scope.row.areaCode" />
</template>
</el-table-column>
<el-table-column label="企业名称" align="center" prop="taxpayerName" />
<el-table-column label="企业信用代码" align="center" prop="taxpayerNumber" />
<el-table-column label="办税人姓名" align="center" prop="loginName" />
<el-table-column label="角色" align="center" prop="loginIdentity">
<template slot-scope="scope">
<dict-tag :options="dict.type.taxpayer_role" :value="scope.row.loginIdentity" />
</template>
</el-table-column>
<el-table-column label="登录账号" align="center" prop="loginAccount" />
<el-table-column label="身份证号" align="center" prop="loginUserIdCard" />
<el-table-column label="联系方式" align="center" prop="loginUserMobile" />
<!-- <el-table-column label="状态" align="center" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.taxpayer_status" :value="scope.row.status" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-s-check"-->
<!-- @click="doAuth(scope.row)"-->
<!-- v-if="scope.row.status === 'saved'"-->
<!-- >认证</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改办税人信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="所属企业" prop="companyId">
<el-select v-model="form.companyId" placeholder="请选择所属企业">
<el-option v-for="item in unitList" :key="item.unitCode" :label="item.unitName"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="所属地区" prop="areaCode">
<el-select v-model="form.areaCode" placeholder="请选择办税地区">
<el-option v-for="dict in dict.type.area_code_taxes" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="办税人姓名" prop="loginName">
<el-input v-model="form.loginName" placeholder="请输入办税人姓名" />
</el-form-item>
<el-form-item label="身份证号" prop="loginUserIdCard">
<el-input v-model="form.loginUserIdCard" placeholder="请输入办税人身份证号" />
</el-form-item>
<el-form-item label="联系方式" prop="loginUserMobile">
<el-input v-model="form.loginUserMobile" placeholder="请输入办税人联系方式" />
</el-form-item>
<el-form-item label="办税人角色" prop="loginIdentity">
<el-select v-model="form.loginIdentity" placeholder="请选择办税人角色">
<el-option v-for="dict in dict.type.taxpayer_role" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="登录账号" prop="loginAccount">
<el-input v-model="form.loginAccount" placeholder="请输入登录账号" />
</el-form-item>
<el-form-item label="登录密码" prop="loginPwd">
<el-input type="password" v-model="form.loginPwd" placeholder="请输入登录密码" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listLoginUser, getLoginUser, delLoginUser, addLoginUser, updateLoginUser } from "@/api/business/taxUser";
import { listAllUnitInfo } from '@/api/business/unitInfo'
export default {
name: "LoginUser",
dicts: ['taxpayer_role', 'area_code_taxes', 'taxpayer_status'],
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 办税人信息表格数据
loginUserList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: null,
taxpayerName: null,
taxpayerNumber: null,
loginName: null,
loginIdentity: null,
loginAccount: null,
loginPwd: null,
loginType: null,
loginUserIdCard: null,
loginUserMobile: null,
companyType: null,
companyId: null,
isDefault: null,
status: null,
deptId: null,
},
unitList: [],
// 表单参数
form: {},
// 表单校验
rules: {
loginName: [
{ required: true, message: "办税人姓名不能为空", trigger: "blur" }
],
loginIdentity: [
{ required: true, message: "登录身份不能为空", trigger: "blur" }
],
loginAccount: [
{ required: true, message: "登录账号不能为空", trigger: "blur" }
],
loginPwd: [
{ required: true, message: "登录密码不能为空", trigger: "blur" }
],
loginUserIdCard: [
{ required: true, message: "登录人身份证号不能为空", trigger: "blur" }
],
loginUserMobile: [
{ required: true, message: "登录人联系方式不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询办税人信息列表 */
getList() {
this.loading = true;
listLoginUser(this.queryParams).then(response => {
this.loginUserList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
areaCode: null,
taxpayerName: null,
taxpayerNumber: null,
loginName: null,
loginIdentity: null,
loginAccount: null,
loginPwd: null,
loginType: null,
loginUserIdCard: null,
loginUserMobile: null,
companyType: null,
companyId: null,
isDefault: null,
status: "0",
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.getAllUnit()
this.open = true;
this.title = "添加办税人信息";
},
getAllUnit() {
console.log(this.unitList)
if (!this.unitList || this.unitList.length < 1) {
listAllUnitInfo().then(resp => {
if (200 === resp.code) {
this.unitList = resp.data
}
})
}
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.getAllUnit()
const id = row.id || this.ids
getLoginUser(id).then(response => {
this.form = response.data;
this.form.loginPwd = atob(response.data.loginPwd)
console.log(this.form.loginPwd)
this.open = true;
this.title = "修改办税人信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateLoginUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addLoginUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 开票员登录认证 **/
doAuth(row) {
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除办税人信息编号为"' + ids + '"的数据项?').then(function() {
return delLoginUser(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/loginUser/export', {
...this.queryParams
}, `loginUser_${new Date().getTime()}.xlsx`)
}
}
};
</script>
......@@ -33,7 +33,7 @@
<div class="bottom clearfix">
<el-pagination layout="prev, pager, next" v-show="pending.total > 0" :total="pending.total"
:page.sync="pending.params.pageNum" :limit.sync="pending.params.pageSize"
@pagination="getPendingTable" />
@current-change="handleCurrentChange" />
</div>
</el-card>
</el-col>
......@@ -69,6 +69,11 @@ export default {
this.getPendingTable()
},
methods: {
handleCurrentChange(val) {
this.pending.params.pageNum = val
this.getPendingTable()
// console.log(`当前页: ${val}`);
},
getPendingTable() {
listPending(this.pending.params).then(resp => {
if (200 === resp.code) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment