123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>线上开票确认</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
- <!-- 所有的 css js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <style type="text/css">
- .c-panel .c-label {
- width: 8em;
- }
- </style>
- </head>
- <body>
- <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
- <!-- ------- 内容部分 ------- -->
- <div class="s-body">
- <div class="c-panel">
- <el-form>
- <el-row>
- <el-collapse value='1'>
- <el-collapse-item name="1">
- <div slot="title">
- 基础信息
- </div>
- <div>
- <el-row>
- <el-col span="12">
- <sa-info name="开票总额" br>{{m.totalMoney}}元</sa-info>
- <sa-info name="主体名称" br>{{m.entityName}}</sa-info>
- <sa-info name="税号" br>{{m.taxIdNo}}</sa-info>
- </el-col>
- <el-col span="12">
- <sa-info name="开户银行" br>{{m.bank}}</sa-info>
- <sa-info name="银行账号" br>{{m.bankNo}}</sa-info>
- <sa-info name="地址" br>{{m.address}}</sa-info>
- <sa-info name="电话" br>{{m.phone}}</sa-info>
- <sa-info name="邮箱" br>{{m.email}}</sa-info>
- </el-col>
- </el-row>
- </div>
- </el-collapse-item>
- </el-collapse>
- </el-row>
- <el-row>
- <el-collapse value='1'>
- <el-collapse-item name="1">
- <div slot="title">
- 实际开票
- </div>
- <el-table :data="invioceDetails" style="width: 100%">
- <el-table-column type="index" width="50" label="序号"></el-table-column>
- <el-table-column label="单据编号" prop="id"></el-table-column>
- <el-table-column label="金额(元)" prop="money"></el-table-column>
- <el-table-column label="发票号" prop="invoiceNo"></el-table-column>
- <el-table-column label="发票代码" prop="invoiceCode"></el-table-column>
- <el-table-column label="发票预览">
- <template slot-scope="s" >
- <img v-if="s.row.imageUrl" :src="s.row.imageUrl" class="td-img" @click="sa.showImage(s.row.imageUrl, '400px', '400px')" />
- <span v-else></span>
- </template>
- </el-table-column>
- <sa-td name="发票预览" prop="imageUrl" type="img"></sa-td>
- <el-table-column label="操作" width="140px">
- <template slot-scope="s">
- <el-button class="c-btn" type="success" @click="showFee(s.row.id)">费用详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-collapse-item>
- </el-collapse>
- </el-row>
- </el-form>
- </div>
- </div>
- <!-- ------- 底部按钮 ------- -->
- <div class="s-foot">
- <el-button v-if="m.applyAble!=1&&m.isApply!=1&&m.isApply!=2&&comfirmButton==0&&m.status==0&¤tCustomerId==1" type="success" @click="comfirmFn">确定开票</el-button>
- <el-button @click="sa.closeCurrIframe()">取消</el-button>
- </div>
- <el-dialog title="费用明细" :visible.sync="showFeeDate.visible" width="90%">
- <el-table :data="feeDetails" style="width: 100%">
- <el-table-column label="业务类型" prop="itemTypeName" ></el-table-column>
- <el-table-column label="数量" prop="num" ></el-table-column>
- <el-table-column label="单价(元)" prop="unitPrice" ></el-table-column>
- <el-table-column label="总价(元)" prop="itemPrice" ></el-table-column>
- <el-table-column label="税率(%)" >
- <template slot-scope="s">
- <span>{{s.row.taxRate * 100}}</span>
- </template>
- </el-table-column>
- <el-table-column label="税款(元)" >
- <template slot-scope="s">
- <span>{{Number(s.row.taxPrice).toFixed(2)}}</span>
- </template>
- </el-table-column>
- <el-table-column label="不含税金额(元)" >
- <template slot-scope="s">
- <span>{{Number(s.row.noTaxPrice).toFixed(2)}}</span>
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showFeeDate.visible = false">关闭</el-button>
- </span>
- </el-dialog>
- <el-dialog title="请填写开票人" :visible.sync="drawerDate.visible" width="38%">
- <div class="c-item">
- <label class="c-label">开票人:</label>
- <el-input type="text" v-model="drawerDate.form.drawer"></el-input>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="drawerDate.visible = false">取 消</el-button>
- <el-button type="primary" @click="comfirm">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
- },
- el: '.vue-box',
- data: {
- infoId: sa.p('id', 0), // 获取数据ID
- m: {},
- invioceDetails: [],
- feeDetails:[],
- showFeeDate: {
- visible: false,
- },
- comfirmButton: 0,
- drawerDate: {
- visible: false,
- form: {
- infoId: sa.p('id', 0),
- drawer:"",
- }
- },
- currentCustomerId: '1',
- },
- methods: {
- getCustomer() {
- sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
- this.currentCustomerId = resp.data;
- }.bind(this));
- },
- showFee(id){
- sa.ajax('/TbInvoiceDetails/groupFeeDetails?id=' + id, function (res) {
- this.feeDetails = res.data;
- this.showFeeDate.visible = true;
- }.bind(this))
- },
- comfirmFn() {
- // this.drawerDate.visible = true;
- this.$confirm(' 点击确定开始开票', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: ''
- }).then(() => {
- sa.ajax('/InvoiceApply/applyInvoice?infoId='+this.infoId, function(resp) {
- if(resp.code == 200){
- this.comfirmButton = 1;
- sa.alert('申请成功', this.close);
- }else{
- sa.alert('开票失败', this.close);
- }
- }.bind(this));
- });
- },
- comfirm() {
- sa.checkNull(this.drawerDate.form.drawer, '输入 [开票人]');
- sa.ajax('/InvoiceApply/applyInvoice', this.drawerDate.form, function () {
- this.drawerDate.visible = false;
- this.comfirmButton = 1;
- sa.alert('操作成功', this.close);
- }.bind(this))
- },
- close(){
- parent.app.f5();
- sa.closeCurrIframe();
- },
- getInfo() {
- sa.ajax('/TbInvoiceInfo/getById?id=' + this.infoId, function(res) {
- this.m = res.data;
- if(res.data == null) {
- sa.alert('未能查找到 id=' + this.infoId + " 开票信息数据");
- }
- }.bind(this))
- },
- getDetails() {
- sa.ajax('/TbInvoiceDetails/onlineInvoice?infoId=' + this.infoId, function (res) {
- this.invioceDetails = res.data;
- }.bind(this))
- }
- },
- mounted: function () {
- this.getCustomer();
- this.getInfo();
- this.getDetails();
- }
- })
- </script>
- </body>
- </html>
|