文化云后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

249 lines
9.1 KiB

<template>
<div>
<div class="crumbs">
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<i class="el-icon-lx-cascades"></i> 交易管理
</el-breadcrumb-item>
<el-breadcrumb-item>已完成订单</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container">
<div class="handle-box">
<el-input placeholder="订单编号" v-model="query.batchcode" class="handle-input mr10"></el-input>
<el-input v-model="query.firm_name" placeholder="商家名称" class="handle-input mr10"></el-input>
<el-input placeholder="摘牌方名称" v-model="query.pay_username" class="handle-input mr10"></el-input>
<el-input placeholder="资产名称" v-model="query.account_name" class="handle-input mr10"></el-input>
<el-select placeholder="交易方式" v-model="query.trade_type" class="handle-select mr10">
<el-option key="1" label="线下" value="1"></el-option>
<el-option key="2" label="网银" value="2"></el-option>
</el-select>
<el-select v-model="query.auditID" placeholder="审核人员" class="handle-select mr10">
</el-select>
<el-date-picker
class="mr10"
v-model="query.time"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="至"
value-format="yyyy-MM-dd h:m:s"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
>
</el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
</div>
<el-table
:data="tableData"
border
class="table"
ref="multipleTable"
header-cell-class-name="table-header"
>
<el-table-column prop="id" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="业务编码" prop="serial_number" ></el-table-column>
<el-table-column prop="create_time" label="创建时间" :formatter="formatDate"></el-table-column>
<el-table-column label="订单编号" prop="batchcode"></el-table-column>
<el-table-column prop="sell_firm_name" label="商家名称"></el-table-column>
<el-table-column label="资产名称" prop="serial_name"></el-table-column>
<el-table-column label="摘牌方名称" prop="firm_name"></el-table-column>
<el-table-column label="交易方式">
<template slot-scope="scope">
<span>{{scope.row.order_pay_mode==1? '线下':'网银'}}</span>
</template>
</el-table-column>
<el-table-column prop="count" label="交易数量"></el-table-column>
<el-table-column prop="price" label="交易金额"></el-table-column>
<el-table-column label="挂牌方服务费" prop="service_charge"></el-table-column>
<el-table-column label="摘牌方服务费" prop="service_charge"></el-table-column>
<el-table-column prop="auditID_name" label="审核人员"></el-table-column>
<el-table-column label="操作" width="280" align="center">
<template slot-scope="scope">
<el-button
type="text"
@click="handleEdit(scope.$index, scope.row)"
>资产查看</el-button>
<el-button
type="text"
@click="orderDetails(scope.$index, scope.row)"
>订单详情</el-button>
<el-button
type="text"
@click="close(scope.$index, scope.row)"
>关闭订单</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
layout="total, prev, pager, next"
:current-page="query.page"
:page-size="query.limit"
:total="pageTotal"
@current-change="handlePageChange"
></el-pagination>
</div>
</div>
<whyDialog v-if="editVisible" :isshow="editVisible" :dialogID="dialogID"
:dialogType="dialogType" @MisShow="MisShow" :assets_type="1" >
</whyDialog>
<orderDialog v-if="orderShowVisible" :isshow="orderShowVisible" :batchcode="order_batchcode"
@orderShow="orderShow" >
</orderDialog>
</div>
</template>
<script>
import { orderList,close } from '../../../api/index';
import moment from 'moment'
export default {
data() {
return {
orderShowVisible:false,
order_batchcode:'',
query: {
page: 1,
limit: 10,
batchcode:'',
firm_name:'',
pay_username:'',
account_name:'',
trade_type:'',
auditID:'',
time:'',
order_type:8
},
tableData: [],
multipleSelection: [],
delList: [],
editVisible: false,
dialogID:'',
dialogType:3,
pageTotal: 0,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
components:{
whyDialog: () => import('../../common/dialog/insex.vue'),
orderDialog: () => import('../../common/orderDialog/index.vue')
},
created() {
this.getData();
},
methods: {
close(index,row){
let data={batchcode:row.batchcode}
close(data).then(res=>{
console.info(res)
if (res.code==100) {
this.$message.success('关闭订单成功!')
this.getData();
}else{
this.$message.error(res.msg)
}
})
},
MisShow(){
this.editVisible=false
},
orderShow(){
this.orderShowVisible=false
},
//时间戳转换时间
formatDate(row,colnum){
return moment(row.create_time*1000).format('YYYY-MM-DD HH:mm:ss')
},
// 获取 easy-mock 的模拟数据
getData() {
orderList(this.query).then(res => {
console.log(res);
this.tableData = res.data.list;
this.pageTotal = res.data.count ;
});
},
// 触发搜索按钮
handleSearch() {
this.$set(this.query, 'pageIndex', 1);
this.getData();
},
// 编辑操作
handleEdit(index, row) {
this.dialogID=row.asset_id;
this.editVisible = true;
},
orderDetails(index, row) {
this.order_batchcode=row.batchcode;
this.orderShowVisible = true;
},
// 分页导航
handlePageChange(val) {
this.$set(this.query, 'page', val);
this.getData();
}
}
};
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 120px;
}
.handle-input {
width: 150px;
display: inline-block;
}
.table {
width: 100%;
font-size: 14px;
}
.red {
color: #ff0000;
}
.mr10 {
margin-right: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
</style>