This commit is contained in:
cun-nan 2024-01-25 09:18:06 +08:00
parent cd43e4f48a
commit 18ce89b555
2 changed files with 86 additions and 40 deletions

View File

@ -92,58 +92,47 @@
</el-form>
</template>
</el-table-column>
<el-table-column
prop="terminal"
label="终端"
width="100">
<el-table-column prop="terminal" label="终端" width="100">
<template slot-scope="scope">
<span>{{getType(terminalList,scope.row.terminal)}}</span>
</template>
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号"
width="220">
</el-table-column>
<el-table-column
prop="amount"
label="订单金额">
</el-table-column>
<el-table-column
prop="payAmount"
label="实付金额">
</el-table-column>
<el-table-column label="订单金额组成">
<el-table-column
prop="oilOrderAmount"
label="油品金额">
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
<el-table-column label="订单信息" align="center">
<el-table-column prop="oilGunNum" label="油品/油枪" align="center" width="120">
<template slot-scope="props">
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
</template>
</el-table-column>
<el-table-column
prop="goodsOrderAmount"
label="商品金额">
<el-table-column prop="orderAmount" label="订单金额" align="center" width="120"> </el-table-column>
<el-table-column prop="discountAmount" label="优惠金额" align="center" width="120"> </el-table-column>
</el-table-column>
<el-table-column label="付款信息" align="center">
<el-table-column prop="payAmount" label="实付金额" align="center" width="120"> </el-table-column>
<el-table-column prop="payUser" label="付款用户" align="center" > </el-table-column>
<el-table-column prop="payType" label="付款方式" align="center" width="120">
<template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus === 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.orderStatus === 'paid'">已支付</el-tag>
<el-tag type="danger" v-else-if="scope.row.orderStatus === 'refund'">已退款</el-tag>
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
<el-table-column
prop="payUser"
label="付款用户">
</el-table-column>
<el-table-column
prop="status"
label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
<template slot-scope="scope">
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime):"--" }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button style="width: 60px" size="mini"-->
<!-- @click="getOrdersInfo(scope.row.id)"-->
@ -220,6 +209,9 @@ import {cashierOrder, listCashierOrder,orderStatisticsApi} from "@/api/order/cas
import {getDicts} from "@/api/order/data";
import {queryStaffs} from "@/api/order/staff";
import { exportExcelCashierApi } from "@/api/order/exportExcel";
import {listOilOrder} from "@/api/order/oilorder";
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
import {getOilNameList} from "@/api/order/oilnumgun";
export default {
name: "order_Cashier",
@ -260,6 +252,9 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
theTotalAmountOfOil:'0',
theTotalAmountOfTheItem:'0',
},
oilNameList:[],
oilGunList:[],
payList:[],
}
},
created() {
@ -267,8 +262,58 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
this.getOrderStatistics();
this.getTerList();
this.getOilNameGun();
this.getOilGunList();
},
methods: {
//
getName(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.oilName;
_this.oilType = item.oilType;
}
})
}
return name;
},
//
getName1(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
getOilNameGun(){
getOilNameList().then( response => {
this.oilNameList = response.data;
})
getDicts("payment_type").then( response => {
this.payList = response.data;
})
},
//
getOilGunList(){
getOilNumberGun().then(res => {
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
i.oilName = item.oilName
this.oilGunList.push(i)
})
}
})
})
},
exportExcelApplet() {
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
@ -341,7 +386,7 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
this.queryParams.page = val
}
console.log("123123123",this.queryParams)
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
listOilOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
this.list = response.data.records;
this.total = response.data.total;
})

View File

@ -263,6 +263,7 @@ import {getOilNumberGun} from "@/api/cashier/oilGuns";
this.getTerList();
this.getOilNameGun();
this.getOilGunList();
},
methods:{
getOilNameGun(){