订单相关

This commit is contained in:
zhaotianfeng 2024-09-12 09:26:32 +08:00
parent d182ba99ad
commit 3c54e50b7d
5 changed files with 310 additions and 1 deletions

View File

@ -41,6 +41,18 @@ export function exportExcelVipApi(data) {
data: data // 通过 data 参数传递需要的数据
});
}
// 导出积分商城订单
export function exportExcelPointsApi(data) {
return request({
url: 'business/integral/integralOrders/exportExcel',
method: 'post',
responseType: 'blob', // 表明响应类型为二进制流
data: data // 通过 data 参数传递需要的数据
});
}
// 导出小程序订单
export function exportExcelAppletApi(data) {

View File

@ -57,6 +57,7 @@
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelVip()">导出</el-button>
</el-form-item>
</el-form>
</el-card>
@ -126,6 +127,7 @@
<!-- <el-table-column label="商品名称" align="center" prop="giftName" />-->
<!-- </el-table-column>-->
<el-table-column label="商品名称" align="center" prop="giftName" />
<el-table-column label="数量" align="center" prop="exchangeQuantity" />
<el-table-column label="实付信息" align="center" >
<el-table-column label="积分" align="center" prop="integral" width=""/>
<el-table-column label="支付金额" align="center" prop="amount" width="">
@ -173,6 +175,7 @@
import {getOrderApi,getStatisticsApi } from "@/api/cashier/integralOrder/order";
import Detail from '@/views/cashier/NewComponents/integralOrder/detail'
import {getDicts} from "@/api/dict/data";
import { exportExcelPointsApi } from '@/api/order/exportExcel'
export default {
name: "pointsCashier",
@ -213,11 +216,32 @@ export default {
}
},
created() {
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.dateRange = [start,new Date()];
this.beginTime = start
this.endTime = new Date()
this.getList();
this.getStatistics();
},
methods: {
exportExcelVip() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelPointsApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob, '积分商城订单.xLsx')
})
},
getList(){
this.dateRange = []
if (this.beginTime && this.endTime) {

View File

@ -214,6 +214,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="scope.row.status != 0"
size="mini"
type="text"
@click="returnRecord(scope.row.id)"

View File

@ -270,6 +270,10 @@
@click="getOrdersInfo(scope.row.id)"
type="text" plain round>详情
</el-button>
<el-button style="color: #fe8c4a" size="mini"
@click="getOrdersInfo2(scope.row.id)"
type="text" plain round>详情2
</el-button>
<el-button style="color: #fe8c4a" size="mini"
@click="patchwork(scope.row)"
type="text" plain round>补打小票
@ -298,6 +302,191 @@
</div>
</div>
<!-- 新订单详情 -->
<el-drawer
title="订单详情"
:visible.sync="ordersDrawer"
size="50%">
<div style="padding-left: 10px">
<el-descriptions >
<el-descriptions-item label="订单号">{{ cashierOrder.realName }}</el-descriptions-item>
<el-descriptions-item label="订单类型">{{ cashierOrder.mobile }}</el-descriptions-item>
<el-descriptions-item label="用户手机号">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="支付方式">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="订单状态">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="订单完成时间">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="关联员工">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="操作人">{{ cashierOrder.orderNo }}</el-descriptions-item>
<el-descriptions-item label="操作账号">{{ cashierOrder.orderNo }}</el-descriptions-item>
</el-descriptions>
<span>金额详情</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>会员支付详情</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>油品信息</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>商品信息</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>优惠信息</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>消费有礼</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<span>退款明细</span>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
</div>
</el-drawer>
<!-- 订单详情-->
<el-dialog
@ -653,6 +842,36 @@ export default {
components: {ScanPayCodeDialog},
data() {
return {
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
ordersDrawer:false,
calculateRefundsV: 0,
// 退
refundRemark: "",
@ -1205,6 +1424,12 @@ export default {
}
return name;
},
getOrdersInfo2(id){
this.ordersDrawer=true;
},
//
getOrdersInfo(id) {
cashierOrder(id).then(response => {

View File

@ -315,7 +315,9 @@
<template slot-scope="scope">
<el-button style="color: #fe8c4a" @click="patchwork(scope.row)" type="text">补打
</el-button>
<el-button style="color: #fe8c4a" @click="handleRefund(scope.row.id)" type="text"
<!-- @click="handleRefund(scope.row.id)" -->
<el-button style="color: #fe8c4a" type="text" @click="refHandleRefund(scope.row.id)"
v-if="scope.row.orderStatus === 'paid' && scope.row.terminal=='applet'" >退款
</el-button>
</template>
@ -335,6 +337,25 @@
</div>
</div>
</div>
<!-- 订单退款 密码 -->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="refDialogRefund">
<div style="margin: 10px 0">
退款密码<br/>
</div>
<div>
<el-input placeholder="请输入退款密码" v-model="refPass" show-password></el-input>
<br/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="refDialogRefund = false"> </el-button>
<el-button type="primary" @click="refHandleRefundByif()"> </el-button>
</span>
</el-dialog>
<!-- 订单退款-->
<el-dialog
@ -432,11 +453,15 @@ import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
import {connectFlag, getLodop} from "@/api/LodopFuncs";
import {getInfoByIdApi} from "@/api/cashier/cardfavorablerecord";
import {printOilOrderReport} from "@/api/print";
import { ifRefPassApi } from '@/api/staff/store'
export default {
name: "order_Oil",
data() {
return {
//退
refPass:'',
refDialogRefund:false,
//
userName: "",
oilOrder: {},
@ -509,6 +534,22 @@ export default {
this.getUserList();
},
methods: {
async refHandleRefundByif() {
this.refDialogRefund = true;
await ifRefPassApi({refPass: this.refPass}).then(res => {
if (res.data) {
this.handleRefund(this.getId)
this.refDialogRefund = false;
} else {
this.$message({
type: 'info',
message: '密码错误'
});
}
})
},
async printLocally() {
if (!connectFlag) {
return
@ -593,6 +634,12 @@ export default {
},
async refHandleRefund(id) {
this.getId = id
this.refPass = ""
this.refDialogRefund = true;
},
//
oilOrderReport() {
console.log("22222222222222222")