bztang-admin/plugins/min-app/views/pay-order-list.blade.php

277 lines
12 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.base')
@section('title', "支付管理")
@section('content')
<link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
<style>
.p-text {
font-family: SourceHanSansCN-Regular;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333333;
/* border:1px solid red; */
text-align: center;
}
</style>
<div class="all">
<div id="app" v-cloak>
<div class="vue-head">
<div class="vue-main-title" style="margin-bottom:20px">
<div class="vue-main-title-left"></div>
<div class="vue-main-title-content">筛选条件</div>
<div class="vue-main-title-button">
</div>
</div>
<div class="vue-search">
<div>
<el-form :inline="true" :model="search_form" class="demo-form-inline">
<el-form-item label="">
<el-input v-model="search_form.pay_sn" placeholder="支付单号"></el-input>
</el-form-item>
<el-form-item label="">
<el-select v-model="search_form.status" clearable placeholder="状态" style="width:150px">
<el-option label="未支付" value="0"></el-option>
<el-option label="待分账" value="1"></el-option>
<el-option label="已分账" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-button type="primary" icon="el-icon-search" @click="search(1)">搜索
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div class="vue-main">
<div class="vue-main-title" style="">
<div class="vue-main-title-left"></div>
<div class="vue-main-title-content">
支付列表
<span style="text-align:left;font-size:14px;color:#999">
<span style="color: red">提示微信规定支付时间超过7天以上的才可进行分账</span>&nbsp;&nbsp;&nbsp;
</span>
</div>
<div class="vue-main-title-button">
<a target="_blank" class="btn btn-success" href="{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.fix')!!}" >同步旧数据</a>
</div>
</div>
<div class="vue-main-title" style="margin-bottom:20px">
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="支付时间" align="center">
<template slot-scope="scope">
<span>[[scope.row.pay_time_str]]</span>
</template>
</el-table-column>
<el-table-column label="支付单号" align="center">
<template slot-scope="scope">
<span>[[scope.row.trade_no]]</span>
</template>
</el-table-column>
<el-table-column label="金额" align="center">
<template slot-scope="scope">
<span v-if="scope.row.notice_params.amount" style="margin-left: 10px">[[scope.row.notice_params.amount]]</span>
</template>
</el-table-column>
<el-table-column label="会员ID" align="center">
<template slot-scope="scope">
<span v-if="scope.row.has_one_min_openid !== null" style="margin-left: 10px">[[scope.row.has_one_min_openid.member_id]]</span>
</template>
</el-table-column>
<el-table-column label="关联订单ID" align="center">
<template slot-scope="scope">
<span v-if="scope.row.has_one_order_pay !== null" style="margin-left: 10px">[[scope.row.has_one_order_pay.order_ids]]</span>
</template>
</el-table-column>
<el-table-column width="80px" label="状态" align="center" prop="status_name"></el-table-column>
<el-table-column label="错误信息">
<template slot-scope="scope">
<span style="margin-left: 10px">[[scope.row.error_msg]]</span>
</template>
</el-table-column>
<el-table-column prop="" label="操作" align="center" width="170px">
<template slot-scope="scope">
<div>
<el-button v-if="scope.row.status == 1" :disabled="isLock" @click="divideAccount(scope.row.id)" size="mini" type="primary">分账</el-button>
<el-button v-if="!scope.row.openid" @click="bindMemberShow(scope.row.id)" size="mini" type="warning">
绑定用户
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 分页 -->
<div class="vue-page" v-if="total>0">
<el-row>
<el-col align="right">
<el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
:page-size="per_size" :current-page="current_page" background
></el-pagination>
</el-col>
</el-row>
</div>
<el-dialog :visible.sync="member_show" width="700px" center title="绑定用户微信标识">
<div style="overflow:auto">
<div style="text-align: center;margin-bottom: 10px">
警告:只能绑定一次无法重复绑定, 切记切记切记
</div>
<el-form label-width="20%">
<el-form-item label="会员ID">
<el-input style="width:50%;" v-model="bing_member_id" placeholder="输入会员ID"></el-input>
<div style="font-size:16px;color: red">
由于不可抗因素支付记录可能没有保存到会员的微信openid<br/>
所以需要人工手动绑定下该笔支付记录对应的会员,<br/>
分账需要用户小程序微信openid
</div>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="success" @click="bindOpenid()">绑定</el-button>
<el-button @click="single_synchronize_goods = false"> </el-button>
</span>
</el-dialog>
</div>
</div>
<script>
var app = new Vue({
el: "#app",
delimiters: ['[[', ']]'],
name: 'test',
data() {
return {
member_show:false,
bind_order_id:'',
bing_member_id:'',
isLock:false,
search_form:{},
list: [],
//页码数
current_page: 1,
//一页显示数据
per_size: 1,
//总页数
total: 1,
//加载
loading: false,
operationType:'',
operationOrder:{},
dialog_show:0,
}
},
created() {
// let result = this.viewReturn();
// this.__initial(result);
this.search(1);
},
mounted() {
// console.log(this.search_form);
},
methods: {
search(page) {
let that = this;
that.loading = true;
that.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.get-list')!!}", {
page: page,
search: that.search_form,
}).then(response => {
console.log(response);
if (response.data.result == 1) {
that.list = response.data.data.data;
that.total = response.data.data.total;
that.current_page = response.data.data.current_page;
that.per_size = response.data.data.per_page;
} else {
that.$message.error(response.data.msg);
}
that.loading = false;
}), function (res) {
console.log(res);
that.loading = false;
};
},
bindMemberShow(id) {
this.bind_order_id = id;
this.member_show = true;
},
bindOpenid() {
this.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.bind-openid')!!}", {
bind_order_id:this.bind_order_id,
bing_member_id:this.bing_member_id,
}).then(res => {
if (res.data.result === 1) {
this.$message.success(res.data.msg);
this.member_show = false;
this.search(this.currentPage);
} else {
this.$message.error(res.data.msg)
}
}), function (res) {
console.log(res);
};
},
divideAccount(id) {
this.isLock = true;
//点击确定的操作(调用接口)
this.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.divide-account')!!}", {id: id}).then(res => {
if (res.data.result === 1) {
this.$message.success(res.data.msg);
this.search(this.currentPage);
} else {
this.$message.error(res.data.msg)
}
this.isLock = false;
}), function (res) {
console.log(res);
this.isLock = false;
};
},
// 字符转义
escapeHTML(a) {
a = "" + a;
return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");;
},
getParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
},
},
})
</script>
@endsection