Browse Source

订单和发票信息的导出功能

master
453530270@qq.com 3 years ago
parent
commit
cf198627e4
  1. 590
      src/api/index.js
  2. 594
      src/components/page/afterService/invoice.vue
  3. 652
      src/components/page/order/index.vue

590
src/api/index.js

@ -1,288 +1,302 @@
import request from '../utils/request'; import request from '../utils/request';
//全部文化数据查询 //全部文化数据查询
export const getAllDate = query => { export const getAllDate = query => {
return request({ return request({
url: '/admin/goods.Goods/list', url: '/admin/goods.Goods/list',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//标的信息 //标的信息
export const goodsDetail = query => { export const goodsDetail = query => {
return request({ return request({
url: '/admin/goods.Goods/goodsDetail', url: '/admin/goods.Goods/goodsDetail',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//标的信息-资源详情 //标的信息-资源详情
export const sourceDetail = query => { export const sourceDetail = query => {
return request({ return request({
url: '/admin/goods.Goods/sourceDetail', url: '/admin/goods.Goods/sourceDetail',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//获取操作记录 //获取操作记录
export const getLog = query => { export const getLog = query => {
return request({ return request({
url: '/admin/Log/getLog', url: '/admin/Log/getLog',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//文化数据类别列表查询 //文化数据类别列表查询
export const ClassifyList = query => { export const ClassifyList = query => {
return request({ return request({
url: '/admin/goods.Classify/list', url: '/admin/goods.Classify/list',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//获取一级分类 //获取一级分类
export const getTop = query => { export const getTop = query => {
return request({ return request({
url: '/admin/goods.Classify/getTop', url: '/admin/goods.Classify/getTop',
method: 'get', method: 'get',
params: query params: query
}); });
}; };
//获取二级分类 //获取二级分类
export const getSon = query => { export const getSon = query => {
return request({ return request({
url: '/admin/goods.Classify/getSon', url: '/admin/goods.Classify/getSon',
method: 'get', method: 'get',
params: query params: query
}); });
}; };
//获取用户 //获取用户
export const getUser = query => { export const getUser = query => {
return request({ return request({
url: '/admin/user.User/getUser', url: '/admin/user.User/getUser',
method: 'get', method: 'get',
params: query params: query
}); });
}; };
//增加分类 //增加分类
export const addClass = query => { export const addClass = query => {
return request({ return request({
url: '/admin/goods.Classify/addClass', url: '/admin/goods.Classify/addClass',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//修改分类状态 //修改分类状态
export const updateStatus = query => { export const updateStatus = query => {
return request({ return request({
url: '/admin/goods.Classify/updateStatus', url: '/admin/goods.Classify/updateStatus',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//订单列表查询 //订单列表查询
export const getOrderList = query => { export const getOrderList = query => {
return request({ return request({
url: '/admin/order.Order/list', url: '/admin/order.Order/list',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//订单标的信息 //订单标的信息
export const orderDetail = query => { export const orderDetail = query => {
return request({ return request({
url: '/admin/order.Order/orderDetail', url: '/admin/order.Order/orderDetail',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//排行榜 //排行榜
export const rankingList = query => { export const rankingList = query => {
return request({ return request({
url: '/admin/goods.Goods/rankingList', url: '/admin/goods.Goods/rankingList',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//添加到排行榜 //添加到排行榜
export const addRanking = query => { export const addRanking = query => {
return request({ return request({
url: '/admin/goods.Goods/addRanking', url: '/admin/goods.Goods/addRanking',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//从排行榜删除 //从排行榜删除
export const delRanking = query => { export const delRanking = query => {
return request({ return request({
url: '/admin/goods.Goods/delRanking', url: '/admin/goods.Goods/delRanking',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
//排行榜上移下移 //排行榜上移下移
export const rankingSort = query => { export const rankingSort = query => {
return request({ return request({
url: '/admin/goods.Goods/rankingSort', url: '/admin/goods.Goods/rankingSort',
method: 'post', method: 'post',
data: query data: query
}); });
}; };
// 导出订单xls // 导出订单xls
export const xlsdc =query => { export const xlsdc =query => {
return request({ return request({
url: '/admin/order.Order/export', url: '/admin/order.Otrder/export',
method: 'post', method: 'post',
data: query, data: query,
// //
responseType:'blob', responseType:'blob',
//请求头 //请求头
headers:{ headers:{
"Content-Type":"application/json;charset=UTF-8;" "Content-Type":"application/json;charset=UTF-8;"
} }
}); });
}; };
//订单详情 // 导出发票信息xls
export const orderInfo = query => { export const fpxlsdc =query => {
return request({ return request({
url: '/admin/order.Order/orderInfo', url: '/admin/order.InvoiceManagement2/export',
method: 'post', method: 'post',
data: query data: query,
}); //
}; responseType:'blob',
//订单关闭 //请求头
export const orderShut = query => { headers:{
return request({ "Content-Type":"application/json;charset=UTF-8;"
url: '/admin/order.Order/orderShut', }
method: 'post', });
data: query };
}); //订单详情
}; export const orderInfo = query => {
//订单关闭 return request({
export const home = query => { url: '/admin/order.Order/orderInfo',
return request({ method: 'post',
url: '/admin/Index/home', data: query
method: 'post', });
data: query };
}); //订单关闭
}; export const orderShut = query => {
//手动获取 return request({
export const manualGetGoods = query => { url: '/admin/order.Order/orderShut',
return request({ method: 'post',
url: '/admin/goods.Goods/manualGetGoods', data: query
method: 'get', });
params: query };
}); //订单关闭
}; export const home = query => {
//资金结算对账账单列表 return request({
export const closeList = query => { url: '/admin/Index/home',
return request({ method: 'post',
url: '/admin/order.AccountClose/closeList', data: query
method: 'get', });
params: query };
}); //手动获取
}; export const manualGetGoods = query => {
//资金结算获取账户详情 return request({
export const getCloseAccountInfo = query => { url: '/admin/goods.Goods/manualGetGoods',
return request({ method: 'get',
url: '/admin/order.AccountClose/getCloseAccountInfo', params: query
method: 'get', });
params: query };
}); //资金结算对账账单列表
}; export const closeList = query => {
//资金结算获取账单明细 return request({
export const getBillDetail = query => { url: '/admin/order.AccountClose/closeList',
return request({ method: 'get',
url: '/admin/order.AccountClose/getBillDetail', params: query
method: 'post', });
data: query };
}); //资金结算获取账户详情
}; export const getCloseAccountInfo = query => {
//分账比例设置列表 return request({
export const ratioList = query => { url: '/admin/order.AccountClose/getCloseAccountInfo',
return request({ method: 'get',
url: '/admin/order.AccountClose/ratioList', params: query
method: 'post', });
data: query };
}); //资金结算获取账单明细
}; export const getBillDetail = query => {
//修改分账比例状态 return request({
export const ratioStatus = query => { url: '/admin/order.AccountClose/getBillDetail',
return request({ method: 'post',
url: '/admin/order.AccountClose/ratioStatus', data: query
method: 'post', });
data: query };
}); //分账比例设置列表
}; export const ratioList = query => {
//设置分账比例 return request({
export const setRatio = query => { url: '/admin/order.AccountClose/ratioList',
return request({ method: 'post',
url: '/admin/order.AccountClose/setRatio', data: query
method: 'post', });
data: query };
}); //修改分账比例状态
}; export const ratioStatus = query => {
//分账比例设置详情 return request({
export const ratioDetail = query => { url: '/admin/order.AccountClose/ratioStatus',
return request({ method: 'post',
url: '/admin/order.AccountClose/ratioDetail', data: query
method: 'post', });
data: query };
}); //设置分账比例
}; export const setRatio = query => {
//获取支付方式 return request({
export const getPaySetting = query => { url: '/admin/order.AccountClose/setRatio',
return request({ method: 'post',
url: '/admin/order.AccountClose/getPaySetting', data: query
method: 'get', });
params: query };
}); //分账比例设置详情
}; export const ratioDetail = query => {
//设置支付方式 return request({
export const setPaySetting = query => { url: '/admin/order.AccountClose/ratioDetail',
return request({ method: 'post',
url: '/admin/order.AccountClose/setPaySetting', data: query
method: 'post', });
data: query };
}); //获取支付方式
}; export const getPaySetting = query => {
//手动下架委托数据 return request({
export const offGoods = query => { url: '/admin/order.AccountClose/getPaySetting',
return request({ method: 'get',
url: '/admin/goods.Goods/offGoods', params: query
method: 'post', });
data: query };
}); //设置支付方式
}; export const setPaySetting = query => {
//获取用户信息 return request({
export const getUserData = query => { url: '/admin/order.AccountClose/setPaySetting',
return request({ method: 'post',
url: '/admin/user.User/getUserData', data: query
method: 'get', });
params: query };
}); //手动下架委托数据
}; export const offGoods = query => {
//服务发票列表 return request({
export const InvoiceManagementList = query => { url: '/admin/goods.Goods/offGoods',
return request({ method: 'post',
url: '/admin/order.InvoiceManagement/list', data: query
method: 'post', });
data: query };
}); //获取用户信息
}; export const getUserData = query => {
//下载发票 return request({
export const downloadInvoice = query => { url: '/admin/user.User/getUserData',
return request({ method: 'get',
url: '/admin/order.InvoiceManagement/downloadInvoice', params: query
method: 'get', });
params: query };
}); //服务发票列表
}; export const InvoiceManagementList = query => {
//检查是否能够下架 return request({
export const whetherOff = query => { url: '/admin/order.InvoiceManagement/list',
return request({ method: 'post',
url: '/admin/goods.Goods/whetherOff', data: query
method: 'get', });
params: query };
}); //下载发票
}; export const downloadInvoice = query => {
return request({
url: '/admin/order.InvoiceManagement/downloadInvoice',
method: 'get',
params: query
});
};
//检查是否能够下架
export const whetherOff = query => {
return request({
url: '/admin/goods.Goods/whetherOff',
method: 'get',
params: query
});
};

594
src/components/page/afterService/invoice.vue

@ -1,297 +1,297 @@
<template> <template>
<div> <div>
<div class="breadcrumb"> <div class="breadcrumb">
<a-breadcrumb> <a-breadcrumb>
<a-breadcrumb-item>交易订单售后服务管理</a-breadcrumb-item> <a-breadcrumb-item>交易订单售后服务管理</a-breadcrumb-item>
<a-breadcrumb-item>服务发票</a-breadcrumb-item> <a-breadcrumb-item>服务发票</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
</div> </div>
<div class="body"> <div class="body">
<div class="query"> <div class="query">
<a-row justify="space-between" > <a-row justify="space-between" >
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>发票编号</span> <span>发票编号</span>
<a-input v-model="query.invoice_number"/> <a-input v-model="query.invoice_number"/>
</a-col> </a-col>
<!-- <a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <!-- <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>销方纳税人</span> <span>销方纳税人</span>
<a-input placeholder="名称/纳税人识别号" v-model="query.seller"/> <a-input placeholder="名称/纳税人识别号" v-model="query.seller"/>
</a-col> --> </a-col> -->
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>购方纳税人</span> <span>购方纳税人</span>
<a-input placeholder="名称/纳税人识别号" v-model="query.buy"/> <a-input placeholder="名称/纳税人识别号" v-model="query.buy"/>
</a-col> </a-col>
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>订单编号</span> <span>订单编号</span>
<a-input v-model="query.batchcode"/> <a-input v-model="query.batchcode"/>
</a-col> </a-col>
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>开票状态</span> <span>开票状态</span>
<a-select v-model="query.ticketstatus" :getPopupContainer="(triggerNode) => triggerNode.parentNode"> <a-select v-model="query.ticketstatus" :getPopupContainer="(triggerNode) => triggerNode.parentNode">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="1">未开票</a-select-option> <a-select-option value="1">未开票</a-select-option>
<a-select-option value="2">开票中</a-select-option> <a-select-option value="2">开票中</a-select-option>
<a-select-option value="3">开票成功</a-select-option> <a-select-option value="3">开票成功</a-select-option>
<a-select-option value="4">开票失败</a-select-option> <a-select-option value="4">开票失败</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<!-- <a-col :lg="8" :xl="8" :xxl="6" class="query_item" > <!-- <a-col :lg="8" :xl="8" :xxl="6" class="query_item" >
<span>订单类型</span> <span>订单类型</span>
<a-select default-value="全部" > <a-select default-value="全部" >
<a-select-option value="全部"> <a-select-option value="全部">
全部 全部
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-col> --> </a-col> -->
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>订单状态</span> <span>订单状态</span>
<a-select v-model="query.status" :getPopupContainer="(triggerNode) => triggerNode.parentNode"> <a-select v-model="query.status" :getPopupContainer="(triggerNode) => triggerNode.parentNode">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="2">待交付订单</a-select-option> <a-select-option value="2">待交付订单</a-select-option>
<a-select-option value="3">待结算订单</a-select-option> <a-select-option value="3">待结算订单</a-select-option>
<a-select-option value="4">已终止订单</a-select-option> <a-select-option value="4">已终止订单</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<a-col :lg="8" :xl="8" :xxl="6" class="query_item query_item2"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item query_item2">
<span>生成时间</span> <span>生成时间</span>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="query.createtime"/> <a-range-picker valueFormat="YYYY-MM-DD" v-model="query.createtime"/>
</a-col> </a-col>
<a-col :lg="8" :xl="8" :xxl="6" class="query_item"> <a-col :lg="8" :xl="8" :xxl="6" class="query_item">
<span>发票号码</span> <span>发票号码</span>
<a-input v-model="query.batchcode"/> <a-input v-model="query.batchcode"/>
</a-col> </a-col>
<a-col :lg="12" :xl="12" :xxl="8" class="query_item query_item1"> <a-col :lg="12" :xl="12" :xxl="8" class="query_item query_item1">
<a-space :size="21"> <a-space :size="21">
<a-button type="primary" class="query_button" @click="getAllDate(1)"> </a-button> <a-button type="primary" class="query_button" @click="getAllDate(1)"> </a-button>
<a-button class="query_button" @click="resetQurey"> </a-button> <a-button class="query_button" @click="resetQurey"> </a-button>
<a-button type="default" class="query_button" @click="xlsdc"> </a-button> <a-button type="default" class="query_button" @click="xlsdc"> </a-button>
</a-space> </a-space>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<div class="table"> <div class="table">
<div class="table_title"> <div class="table_title">
<span>查询结果</span> <span>查询结果</span>
<!-- <a-button type="primary" class="query_button"> </a-button> --> <!-- <a-button type="primary" class="query_button"> </a-button> -->
<!-- <a-button type="primary" class="query_button"> </a-button> --> <!-- <a-button type="primary" class="query_button"> </a-button> -->
</div> </div>
<a-table :columns="columns" :data-source="data" bordered :pagination="false" rowKey="id"> <a-table :columns="columns" :data-source="data" bordered :pagination="false" rowKey="id">
<template slot="ticketstatus" slot-scope="ticket_status"> <template slot="ticketstatus" slot-scope="ticket_status">
<span>{{ticket_status==1?'未开票':ticket_status==2?'开票中':ticket_status==3?'开票成功':'开票失败'}}</span> <span>{{ticket_status==1?'未开票':ticket_status==2?'开票中':ticket_status==3?'开票成功':'开票失败'}}</span>
</template> </template>
<template slot="status" slot-scope="status"> <template slot="status" slot-scope="status">
<span>{{status==2?'待交付订单':status==3?'待结算订单':'已终止订单'}}</span> <span>{{status==2?'待交付订单':status==3?'待结算订单':'已终止订单'}}</span>
</template> </template>
<template slot="operation" slot-scope="item"> <template slot="operation" slot-scope="item">
<a-space :size="24"> <a-space :size="24">
<!-- <span class="table_operation">发票详情</span> --> <!-- <span class="table_operation">发票详情</span> -->
<a :href="item.pdfUrl" class="table_operation" target="_blank" rel="nofollow">发票详情</a> <a :href="item.pdfUrl" class="table_operation" target="_blank" rel="nofollow">发票详情</a>
<!-- <a :href="item.pdfUrl" class="table_operation" download="pdfUrl" @click="downloadPdfUrl(item.pdfUrl)">下载发票</a> --> <!-- <a :href="item.pdfUrl" class="table_operation" download="pdfUrl" @click="downloadPdfUrl(item.pdfUrl)">下载发票</a> -->
<span class="table_operation" @click="downloadPdfUrl(item.id)">下载发票</span> <span class="table_operation" @click="downloadPdfUrl(item.id)">下载发票</span>
</a-space> </a-space>
</template> </template>
</a-table> </a-table>
<a-pagination <a-pagination
class="pagination" class="pagination"
size="small" size="small"
:total="total" :total="total"
v-model="page" v-model="page"
:page-size="limit" :page-size="limit"
:show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" :show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`"
:page-size-options="pageSizeOptions" :page-size-options="pageSizeOptions"
@showSizeChange="onShowSizeChange" @showSizeChange="onShowSizeChange"
@change="changePage" @change="changePage"
show-size-changer > show-size-changer >
<template slot="buildOptionText" slot-scope="props"> <template slot="buildOptionText" slot-scope="props">
<span >{{ props.value }}/</span> <span >{{ props.value }}/</span>
</template> </template>
</a-pagination> </a-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Operation from '../../Operation.vue' import Operation from '../../Operation.vue'
import {InvoiceManagementList,downloadInvoice} from '../../../api/index' import {InvoiceManagementList,downloadInvoice,fpxlsdc} from '../../../api/index'
export default { export default {
data() { data() {
return{ return{
query:{ query:{
invoice_number:'', invoice_number:'',
seller:'', seller:'',
buy:'', buy:'',
batchcode:'', batchcode:'',
status:'', status:'',
createtime:[], createtime:[],
ticketstatus:'' ticketstatus:''
}, },
pageSizeOptions: ['10', '20', '30', '40', '50'], pageSizeOptions: ['10', '20', '30', '40', '50'],
// //
total:500, total:500,
startTotal:1, startTotal:1,
endTotal:10, endTotal:10,
limit:10, limit:10,
page:1, page:1,
data:[], data:[],
columns:[ columns:[
// { // {
// title: '', // title: '',
// className: 'table_column', // className: 'table_column',
// dataIndex: 'id', // dataIndex: 'id',
// width:'65px', // width:'65px',
// align:'center' // align:'center'
// }, // },
{ {
title: '生成时间', title: '生成时间',
dataIndex: 'tickettime', dataIndex: 'tickettime',
width:'160px' width:'160px'
// align:'center' // align:'center'
}, },
{ {
title: '发票号码', title: '发票号码',
dataIndex: 'ticketid', dataIndex: 'ticketid',
width:'120px' width:'120px'
// align:'center' // align:'center'
}, },
// { // {
// title: '', // title: '',
// dataIndex: 'batchcode', // dataIndex: 'batchcode',
// width:'120px' // width:'120px'
// // align:'center' // // align:'center'
// }, // },
{ {
title: '销方纳税人名称', title: '销方纳税人名称',
dataIndex: 'seller_name', dataIndex: 'seller_name',
width:'135px' width:'135px'
// align:'center', // align:'center',
}, },
{ {
title: '订单编号', title: '订单编号',
dataIndex: 'batchcode', dataIndex: 'batchcode',
// align:'center' // align:'center'
}, },
{ {
title: '购方纳税人名称', title: '购方纳税人名称',
dataIndex: 'name', dataIndex: 'name',
width:'135px' width:'135px'
// align:'center' // align:'center'
}, },
{ {
title: '购方纳税人识别号', title: '购方纳税人识别号',
dataIndex: 'uscc', dataIndex: 'uscc',
// align:'center' // align:'center'
}, },
// { // {
// title: '', // title: '',
// dataIndex: '', // dataIndex: '',
// align:'center' // align:'center'
// }, // },
{ {
title: '发票金额', title: '发票金额',
dataIndex: 'ticketmoney', dataIndex: 'ticketmoney',
width:'90px' width:'90px'
// align:'center' // align:'center'
}, },
{ {
title: '开票状态', title: '开票状态',
dataIndex: 'ticket_status', dataIndex: 'ticket_status',
scopedSlots: { customRender: 'ticketstatus' }, scopedSlots: { customRender: 'ticketstatus' },
width:'90px' width:'90px'
// align:'center' // align:'center'
}, },
{ {
title: '交易状态', title: '交易状态',
dataIndex: 'status', dataIndex: 'status',
scopedSlots: { customRender: 'status' }, scopedSlots: { customRender: 'status' },
width:'90px' width:'90px'
// align:'center' // align:'center'
}, },
{ {
title: '失败原因', title: '失败原因',
dataIndex: 'ticketApiMessage', dataIndex: 'ticketApiMessage',
width:'90px' width:'90px'
// align:'center' // align:'center'
}, },
{ {
title: '操作', title: '操作',
scopedSlots: { customRender: 'operation' }, scopedSlots: { customRender: 'operation' },
align:'center', align:'center',
width:'170px' width:'170px'
}, },
], ],
} }
}, },
components:{ components:{
Operation Operation
}, },
created(){ created(){
this.getAllDate() this.getAllDate()
}, },
methods:{ methods:{
downloadPdfUrl(id){ downloadPdfUrl(id){
// console.info(this.$host) // console.info(this.$host)
// return // return
location.href=this.$host+'/admin/order.InvoiceManagement/downloadInvoice?id='+id location.href=this.$host+'/admin/order.InvoiceManagement/downloadInvoice?id='+id
}, },
// xls // xls
xlsdc(){ xlsdc(){
xlsdc(this.query).then(res=>{ fpxlsdc(this.query).then(res=>{
const fname = new Date().getTime()+".xlsx" const fname = new Date().getTime()+".xlsx"
let bloburl = window.URL.createObjectURL(new Blob([res])) let bloburl = window.URL.createObjectURL(new Blob([res]))
const a = document.createElement('a') const a = document.createElement('a')
a.download = fname a.download = fname
a.href = bloburl a.href = bloburl
// add click // add click
a.click() a.click()
window.URL.revokeObjectURL(bloburl) window.URL.revokeObjectURL(bloburl)
}) })
.catch(err=>{ .catch(err=>{
console.error(err) console.error(err)
}); });
}, },
// query // query
resetQurey(){ resetQurey(){
Object.assign(this.query, this.$options.data().query) Object.assign(this.query, this.$options.data().query)
this.getAllDate() this.getAllDate()
}, },
getAllDate(type){ getAllDate(type){
let data=this.query let data=this.query
data.limit=this.limit data.limit=this.limit
if(type==1){ if(type==1){
this.page=1 this.page=1
} }
data.page=this.page data.page=this.page
InvoiceManagementList(data).then(res=>{ InvoiceManagementList(data).then(res=>{
// console.info(res) // console.info(res)
if(res.code==200){ if(res.code==200){
this.data=res.data.data this.data=res.data.data
this.startTotal=res.data.start this.startTotal=res.data.start
this.endTotal=res.data.end this.endTotal=res.data.end
this.total=res.data.total this.total=res.data.total
}else{ }else{
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
}, },
// //
onShowSizeChange(current, pageSize){ onShowSizeChange(current, pageSize){
this.page=1 this.page=1
this.limit = pageSize; this.limit = pageSize;
this.getAllDate() this.getAllDate()
}, },
// //
changePage(page, pageSize){ changePage(page, pageSize){
this.page=page this.page=page
this.getAllDate() this.getAllDate()
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
a:hover{ a:hover{
/* border-bottom: 1px solid #1890FF; */ /* border-bottom: 1px solid #1890FF; */
text-decoration: underline; text-decoration: underline;
} }
</style> </style>

652
src/components/page/order/index.vue

@ -1,326 +1,326 @@
<template> <template>
<div> <div>
<div class="breadcrumb"> <div class="breadcrumb">
<a-breadcrumb> <a-breadcrumb>
<a-breadcrumb-item>交易订单管理</a-breadcrumb-item> <a-breadcrumb-item>交易订单管理</a-breadcrumb-item>
<a-breadcrumb-item>全部交易订单</a-breadcrumb-item> <a-breadcrumb-item>全部交易订单</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
</div> </div>
<div class="body"> <div class="body">
<div class="query"> <div class="query">
<a-row type="flex" justify="space-between"> <a-row type="flex" justify="space-between">
<a-col :lg="12" :xl="8" :xxl="6" class="query_item"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item">
<span>订单编号</span> <span>订单编号</span>
<a-input v-model="query.batchcode" /> <a-input v-model="query.batchcode" />
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item3"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item3">
<span>委托方/授权方</span> <span>委托方/授权方</span>
<a-input v-model="query.entrust_name" placeholder="名称/交易主体唯一标志码" /> <a-input v-model="query.entrust_name" placeholder="名称/交易主体唯一标志码" />
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item3"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item3">
<span>购买方/被授权方</span> <span>购买方/被授权方</span>
<a-input v-model="query.buy_name" placeholder="名称/交易主体唯一标志码" /> <a-input v-model="query.buy_name" placeholder="名称/交易主体唯一标志码" />
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item">
<span>交易标的</span> <span>交易标的</span>
<a-input v-model="query.goods_name" placeholder="名称/标的ISLI标志码" /> <a-input v-model="query.goods_name" placeholder="名称/标的ISLI标志码" />
</a-col> </a-col>
<!-- <a-col :span="5" class="query_item" > <!-- <a-col :span="5" class="query_item" >
<span>订单类型</span> <span>订单类型</span>
<a-select default-value="" v-model="query.order_type" :getPopupContainer="(triggerNode) => triggerNode.parentNode"> <a-select default-value="" v-model="query.order_type" :getPopupContainer="(triggerNode) => triggerNode.parentNode">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="1">委托订单</a-select-option> <a-select-option value="1">委托订单</a-select-option>
<a-select-option value="2">认证订单</a-select-option> <a-select-option value="2">认证订单</a-select-option>
<a-select-option value="3">服务订单</a-select-option> <a-select-option value="3">服务订单</a-select-option>
</a-select> </a-select>
</a-col> --> </a-col> -->
<a-col :lg="12" :xl="8" :xxl="6" class="query_item"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item">
<span>收费类型</span> <span>收费类型</span>
<a-select default-value="" v-model="query.charges_type" <a-select default-value="" v-model="query.charges_type"
:getPopupContainer="(triggerNode) => triggerNode.parentNode"> :getPopupContainer="(triggerNode) => triggerNode.parentNode">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="1">免费</a-select-option> <a-select-option value="1">免费</a-select-option>
<a-select-option value="2">付费</a-select-option> <a-select-option value="2">付费</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item">
<span>交易方式</span> <span>交易方式</span>
<a-select default-value="" v-model="query.entrust_type" <a-select default-value="" v-model="query.entrust_type"
:getPopupContainer="(triggerNode) => triggerNode.parentNode"> :getPopupContainer="(triggerNode) => triggerNode.parentNode">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="1">转让</a-select-option> <a-select-option value="1">转让</a-select-option>
<a-select-option value="2">授权</a-select-option> <a-select-option value="2">授权</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item" style="display:none"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item" style="display:none">
<span>订单状态</span> <span>订单状态</span>
<a-select default-value="" v-model="query.transaction_status" <a-select default-value="" v-model="query.transaction_status"
:getPopupContainer="triggerNode => { return triggerNode.parentNode || document.body}"> :getPopupContainer="triggerNode => { return triggerNode.parentNode || document.body}">
<a-select-option value="" @click.native='selectAll'>全部</a-select-option> <a-select-option value="" @click.native='selectAll'>全部</a-select-option>
<a-select-option value="1">待付款</a-select-option> <a-select-option value="1">待付款</a-select-option>
<a-select-option value="2">待交付</a-select-option> <a-select-option value="2">待交付</a-select-option>
<a-select-option value="3">待结算</a-select-option> <a-select-option value="3">待结算</a-select-option>
<a-select-option value="4">已终止</a-select-option> <a-select-option value="4">已终止</a-select-option>
<a-select-option value="5">已关闭</a-select-option> <a-select-option value="5">已关闭</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item2"> <a-col :lg="12" :xl="8" :xxl="6" class="query_item query_item2">
<span>创建时间</span> <span>创建时间</span>
<a-range-picker v-model="query.createtime" valueFormat="YYYY-MM-DD" /> <a-range-picker v-model="query.createtime" valueFormat="YYYY-MM-DD" />
</a-col> </a-col>
<!-- <a-col :lg="12" :xl="8" :xxl="12" class="query_item query_item3" style="display:noen"> <!-- <a-col :lg="12" :xl="8" :xxl="12" class="query_item query_item3" style="display:noen">
<span>标的金额</span> <span>标的金额</span>
<a-input v-model="query.biaodi_start" placeholder="最小值" /> <a-input v-model="query.biaodi_start" placeholder="最小值" />
<el-col :span="10" v-html="'\u00a0'" /> <el-col :span="10" v-html="'\u00a0'" />
<el-col style="color:#d9d9d9;">-</el-col> <el-col style="color:#d9d9d9;">-</el-col>
<el-col :span="10" v-html="'\u00a0'" /> <el-col :span="10" v-html="'\u00a0'" />
<a-input v-model="query.biaodi_end" placeholder="最大值" /> <a-input v-model="query.biaodi_end" placeholder="最大值" />
</a-col> --> </a-col> -->
<!-- <a-col :lg="12" :xl="8" :xxl="12" class="query_item query_item3"> <!-- <a-col :lg="12" :xl="8" :xxl="12" class="query_item query_item3">
<span>订单金额</span> <span>订单金额</span>
<a-input v-model="query.dingdan_start" placeholder="最小值" /> <a-input v-model="query.dingdan_start" placeholder="最小值" />
<el-col :span="10" v-html="'\u00a0'" /> <el-col :span="10" v-html="'\u00a0'" />
<el-col style="color:#d9d9d9;">-</el-col> <el-col style="color:#d9d9d9;">-</el-col>
<el-col :span="10" v-html="'\u00a0'" /> <el-col :span="10" v-html="'\u00a0'" />
<a-input v-model="query.dingdan_end" placeholder="最大值" /> <a-input v-model="query.dingdan_end" placeholder="最大值" />
</a-col> --> </a-col> -->
<a-col :lg="24" :xl="8" :xxl="24" class="query_item query_item1"> <a-col :lg="24" :xl="8" :xxl="24" class="query_item query_item1">
<a-space :size="21"> <a-space :size="21">
<a-button type="primary" class="query_button" @click="getList(1)"> </a-button> <a-button type="primary" class="query_button" @click="getList(1)"> </a-button>
<a-button class="query_button" @click="resetQurey"> </a-button> <a-button class="query_button" @click="resetQurey"> </a-button>
<a-button type="default" class="query_button" @click="xlsdc"> </a-button> <a-button type="default" class="query_button" @click="xlsdc"> </a-button>
</a-space> </a-space>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<div class="table"> <div class="table">
<div class="table_title"> <div class="table_title">
<span>查询结果</span> <span>查询结果</span>
<!-- <a-button type="primary" class="query_button"> </a-button> --> <!-- <a-button type="primary" class="query_button"> </a-button> -->
</div> </div>
<a-table :columns="columns" :data-source="data" bordered :pagination="false" rowKey="id"> <a-table :columns="columns" :data-source="data" bordered :pagination="false" rowKey="id">
<template slot="type" slot-scope="type"> <template slot="type" slot-scope="type">
<span>{{ type == 1 ? '委托订单' : type == 2 ? '认证订单' : '服务订单' }}</span> <span>{{ type == 1 ? '委托订单' : type == 2 ? '认证订单' : '服务订单' }}</span>
</template> </template>
<template slot="status" slot-scope="status"> <template slot="status" slot-scope="status">
<span>{{ status == 1 ? '待付款' : status == 2 ? '待交付' : status == 3 ? '待结算' : status == 4 ? '已终止' : '已关闭' }}</span> <span>{{ status == 1 ? '待付款' : status == 2 ? '待交付' : status == 3 ? '待结算' : status == 4 ? '已终止' : '已关闭' }}</span>
</template> </template>
<template slot="operation" slot-scope="item"> <template slot="operation" slot-scope="item">
<a-space :size="24"> <a-space :size="24">
<span class="table_operation" @click="SelectDate(item.batchcode)">标的信息</span> <span class="table_operation" @click="SelectDate(item.batchcode)">标的信息</span>
<span class="table_operation" @click="SelectOrder(item.batchcode)">订单详情</span> <span class="table_operation" @click="SelectOrder(item.batchcode)">订单详情</span>
</a-space> </a-space>
</template> </template>
</a-table> </a-table>
<a-pagination class="pagination" size="small" :total="total" v-model="page" :page-size="limit" <a-pagination class="pagination" size="small" :total="total" v-model="page" :page-size="limit"
:show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" :page-size-options="pageSizeOptions" :show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" :page-size-options="pageSizeOptions"
@showSizeChange="onShowSizeChange" @change="changePage" show-size-changer> @showSizeChange="onShowSizeChange" @change="changePage" show-size-changer>
<template slot="buildOptionText" slot-scope="props"> <template slot="buildOptionText" slot-scope="props">
<span>{{ props.value }}/</span> <span>{{ props.value }}/</span>
</template> </template>
</a-pagination> </a-pagination>
</div> </div>
</div> </div>
<orderDataSelect :visible.sync="visible" v-if="visible" :batchcode="batchcode" :type="1"></orderDataSelect> <orderDataSelect :visible.sync="visible" v-if="visible" :batchcode="batchcode" :type="1"></orderDataSelect>
<orderDetails :visible.sync="visible2" v-if="visible2" :batchcode="batchcode"></orderDetails> <orderDetails :visible.sync="visible2" v-if="visible2" :batchcode="batchcode"></orderDetails>
</div> </div>
</template> </template>
<script> <script>
import Operation from '../../Operation.vue' import Operation from '../../Operation.vue'
import { getOrderList,xlsdc } from '../../../api/index' import { getOrderList,xlsdc } from '../../../api/index'
export default { export default {
data() { data() {
return { return {
query: { query: {
batchcode: '', batchcode: '',
entrust_name: '', entrust_name: '',
buy_name: '', buy_name: '',
goods_name: '', goods_name: '',
order_type: '', order_type: '',
entrust_type: '', entrust_type: '',
transaction_status: '', transaction_status: '',
createtime: [], createtime: [],
goods_isli: '', goods_isli: '',
charges_type: '', charges_type: '',
// biaodi_start: '', // biaodi_start: '',
// biaodi_end: '', // biaodi_end: '',
// dingdan_start: '', // dingdan_start: '',
// dingdan_end: '', // dingdan_end: '',
}, },
batchcode: '', batchcode: '',
visible: false, visible: false,
visible2: false, visible2: false,
pageSizeOptions: ['10', '20', '30', '40', '50'], pageSizeOptions: ['10', '20', '30', '40', '50'],
total: 0, total: 0,
startTotal: 1, startTotal: 1,
endTotal: 10, endTotal: 10,
limit: 10, limit: 10,
// //
page: 1, page: 1,
data: [], data: [],
columns: [ columns: [
// { // {
// title: '', // title: '',
// dataIndex: 'id', // dataIndex: 'id',
// width:'65px', // width:'65px',
// align:'center' // align:'center'
// }, // },
{ {
title: '订单创建时间', title: '订单创建时间',
width: '120px', width: '120px',
dataIndex: 'createtime', dataIndex: 'createtime',
// align:'center' // align:'center'
}, },
{ {
title: '订单编号', title: '订单编号',
dataIndex: 'batchcode', dataIndex: 'batchcode',
// align:'center' // align:'center'
}, },
{ {
title: '委托方/授权方', title: '委托方/授权方',
dataIndex: 'entrust_name', dataIndex: 'entrust_name',
width: '125px', width: '125px',
// align:'center' // align:'center'
}, },
{ {
title: '标的名称', title: '标的名称',
dataIndex: 'goods_name', dataIndex: 'goods_name',
// align:'center' // align:'center'
}, },
{ {
title: '购买方/被授权方', title: '购买方/被授权方',
width: '135px', width: '135px',
dataIndex: 'buy_username', dataIndex: 'buy_username',
// width:'130px', // width:'130px',
// align:'center' // align:'center'
}, },
// { // {
// title: '', // title: '',
// dataIndex: 'type', // dataIndex: 'type',
// scopedSlots: { customRender: 'type' }, // scopedSlots: { customRender: 'type' },
// align:'center' // align:'center'
// }, // },
{ {
title: '交易方式', title: '交易方式',
width: '90px', width: '90px',
dataIndex: 'entrust_type', dataIndex: 'entrust_type',
// align:'center' // align:'center'
}, },
{ {
title: '标的金额', title: '标的金额',
dataIndex: 'goods_price', dataIndex: 'goods_price',
width: '90px', width: '90px',
// align:'center' // align:'center'
}, },
{ {
title: '交易佣金', title: '交易佣金',
dataIndex: 'total_service_charge', dataIndex: 'total_service_charge',
width: '90px', width: '90px',
// align:'center' // align:'center'
}, },
{ {
title: '订单金额', title: '订单金额',
dataIndex: 'total_money', dataIndex: 'total_money',
width: '90px', width: '90px',
// align:'center' // align:'center'
}, },
{ {
title: '交易状态', title: '交易状态',
width: '90px', width: '90px',
dataIndex: 'status', dataIndex: 'status',
scopedSlots: { customRender: 'status' }, scopedSlots: { customRender: 'status' },
// align:'center' // align:'center'
}, },
{ {
title: '操作', title: '操作',
width: '170px', width: '170px',
scopedSlots: { customRender: 'operation' }, scopedSlots: { customRender: 'operation' },
align: 'center' align: 'center'
}, },
] ]
} }
}, },
components: { components: {
Operation, Operation,
orderDataSelect: () => import('../../dateSelect/order.vue'), orderDataSelect: () => import('../../dateSelect/order.vue'),
orderDetails: () => import('../../orderDetails/index.vue'), orderDetails: () => import('../../orderDetails/index.vue'),
}, },
created() { created() {
if (this.$route.query) { if (this.$route.query) {
this.query.goods_isli = this.$route.query.goods_islicode this.query.goods_isli = this.$route.query.goods_islicode
} }
this.getList() this.getList()
}, },
methods: { methods: {
// query // query
resetQurey() { resetQurey() {
Object.assign(this.query, this.$options.data().query) Object.assign(this.query, this.$options.data().query)
this.getList() this.getList()
}, },
// xls // xls
xlsdc(){ xlsdc(){
xlsdc(this.query).then(res=>{ xlsdc(this.query).then(res=>{
console.log(res) const fname = new Date().getTime()+".xlsx"
const fname = new Date().getTime()+".xlsx" let bloburl = window.URL.createObjectURL(new Blob([res]))
// let bloburl = window.URL.createObjectURL(res)
let bloburl = window.URL.createObjectURL(new Blob([res])) // let bloburl = 'data:text/csv;charset=utf-8,' + encodeURIComponent(res)
const a = document.createElement('a') const a = document.createElement('a')
a.download = fname a.download = fname
a.href = bloburl a.href = bloburl
// add click // add click
a.click() a.click()
window.URL.revokeObjectURL(bloburl) window.URL.revokeObjectURL(bloburl)
console.log(a) // console.log(a)
}) })
.catch(err=>{ .catch(err=>{
console.error(err) console.error(err)
}); });
}, },
getList(type) { getList(type) {
let data = this.query let data = this.query
data.limit = this.limit data.limit = this.limit
if (type == 1) { if (type == 1) {
this.page = 1 this.page = 1
} }
data.page = this.page data.page = this.page
getOrderList(data).then(res => { getOrderList(data).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.data = res.data.data this.data = res.data.data
this.startTotal = res.data.start this.startTotal = res.data.start
this.endTotal = res.data.end this.endTotal = res.data.end
this.total = res.data.total this.total = res.data.total
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
}, },
SelectOrder(val) { SelectOrder(val) {
this.batchcode = val this.batchcode = val
this.visible2 = true this.visible2 = true
}, },
SelectDate(val) { SelectDate(val) {
this.visible = true this.visible = true
this.batchcode = val this.batchcode = val
}, },
// //
onShowSizeChange(current, pageSize) { onShowSizeChange(current, pageSize) {
this.page = 1 this.page = 1
this.limit = pageSize; this.limit = pageSize;
this.getList() this.getList()
}, },
// //
changePage(page, pageSize) { changePage(page, pageSize) {
this.page = page this.page = page
this.getList() this.getList()
}, },
// //
selectAll() { selectAll() {
} }
} }
} }
</script> </script>
<style scoped></style> <style scoped></style>

Loading…
Cancel
Save