| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>手续费未成功</span>
- </div>
- </div>
- <div class="table-body">
- <!-- 查询 -->
- <el-form
- :inline="true"
- :model="searchData"
- size="mini"
- >
- <el-row>
- <el-form-item label="批次号/订单号">
- <el-input v-model="searchData.keyword"></el-input>
- </el-form-item>
- </el-row>
- <el-row>
- <el-form-item>
- <el-button type="primary" @click="onSubmit">查询</el-button>
- <el-button @click="resetForm">重置</el-button>
- </el-form-item>
- </el-row>
- </el-form>
- <!-- 订单信息 -->
- <template>
- <el-table ref="multipleTable" :data="list" @selection-change="handleSelectionChange" v-loading="listLoading">
- <!-- 空数据 -->
- <template slot="empty">
- <el-empty description="暂无记录"></el-empty>
- </template>
- <el-table-column type="selection"></el-table-column>
- <el-table-column prop="id" align="center" label="ID"></el-table-column>
- <el-table-column prop="batch_num" align="center" label="batch_num"></el-table-column>
- <el-table-column prop="order_sn" align="center" label="order_sn"></el-table-column>
- <el-table-column prop="error" align="center" label="error"></el-table-column>
- <el-table-column prop="created_at" align="center" label="创建时间">
- <template slot-scope="scope">
- {{ scope.row.created_at|dateTimeFormat('Y-m-d H:i:s') }}
- </template>
- </el-table-column>
- <el-table-column prop="right_btn" label="操作" align="center">
- <template slot-scope="scope">
- <el-button
- type="text"
- @click="subSuccess(scope.row.id)"
- >成功</el-button>
- <el-button
- type="text"
- @click="subFail(scope.row.id)"
- >失败</el-button>
- </template>
- </el-table-column>
- </el-table>
- </template>
- <!-- 分页 -->
- <el-row type="flex" class="page" justify="end" style="margin-top: 20px;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount" v-if="list"></el-pagination>
- </el-row>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
-
- el: '#app',
- data() {
- return {
- searchData: {
- keyword: undefined,
- },
- list: [],
- pageCount: 0,
- page: 1,
- currentPage: null,
- listLoading: false,
- }
- },
- methods: {
- handleSelectionChange(val) {
- this.select_order = val
- },
- // 全选
- allSelect() {
- if (this.checked) {
- this.goods_list.forEach(function(item, index) {
- if (!item.storage) {
- item.is_select = true
- }
- })
- } else {
- this.goods_list.forEach(function(item, index) {
- item.is_select = false
- })
- }
- },
- //搜索
- onSubmit() {
- this.page = 1
- this.getList()
- },
- pagination(currentPage) {
- this.page = currentPage
- this.getList()
- },
- getList() {
- this.listLoading = true;
- let params = {
- r: 'avoid-tax/sokabe/list',
- page: this.page,
- limit: 20
- }
- params = Object.assign(params, this.searchData)
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code === 0) {
- this.list = e.data.data.list
- this.pageCount = e.data.data.page_count
- this.currentPage = e.data.data.pagination.current_page
- } else {
- this.$message.error(e.data.msg)
- }
- this.listLoading = false
- }).catch(e => {
- this.listLoading = false
- })
- },
- resetForm() {
- this.searchData = {
- keyword: undefined
- }
- },
- subSuccess(id) {
- this.$confirm('是否确定重新提交?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.queryBookLoad = true
- request({
- params: {
- r: 'avoid-tax/sokabe/sub-success',
- id: id,
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success('操作成功')
- this.queryBookLoad = false
- } else {
- this.$message.error(e.data.msg)
- }
- }).catch()
- }).catch()
- },
- subFail(id) {
- this.$confirm('是否确定重新提交?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.queryBookLoad = true
- request({
- params: {
- r: 'avoid-tax/sokabe/sub-fail',
- id: id,
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success('操作成功')
- this.queryBookLoad = false
- } else {
- this.$message.error(e.data.msg)
- }
- }).catch()
- }).catch()
- },
- },
- mounted: function() {
- this.page = getQuery('page') ? getQuery('page') : 1
- this.getList()
- }
- });
- </script>
- <style>
- .notice {
- border: 1px solid rgb(250, 236, 216);
- background: rgb(253, 246, 236);
- margin-top: 10px;
- padding: 10px;
- border-radius: 5px;
- }
- .notice li + li {
- margin-top: 5px;
- }
- </style>
|