This commit is contained in:
cun-nan 2024-01-24 15:14:48 +08:00
parent e423293f5c
commit 5470356f7e
4 changed files with 95 additions and 46 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>
<el-table-column
prop="goodsOrderAmount"
label="商品金额">
</el-table-column>
<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="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
prop="payUser"
label="付款用户">
</el-table-column>
<el-table-column
prop="status"
label="状态">
<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">
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
<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 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/cashier/
import {getDicts} from "@/api/dict/data";
import {queryStaffs} from "@/api/cashier/staff";
import {exportExcelCashierApi} from "@/api/order/exportExcel";
import {listOilOrder} from "@/api/cashier/oilorder";
import {getOilNameList} from "@/api/cashier/oilnumgun";
import {getOilNumberGun} from "@/api/cashier/oilGuns";
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,30 @@ import {exportExcelCashierApi} from "@/api/order/exportExcel";
this.getOrderStatistics();
this.getTerList();
this.getOilNameGun();
},
methods:{
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 +358,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;
})
@ -363,6 +380,33 @@ import {exportExcelCashierApi} from "@/api/order/exportExcel";
// this.resetForm("queryForm");
this.handleQuery();
},
//
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;
},
}
}
</script>

View File

@ -122,10 +122,10 @@
<span>{{ props.row.mobile }}</span>
</el-form-item>
<el-form-item label="操作人">
<span>{{ props.row.realName }}</span>
<span>{{ props.row.realName || "--" }}</span>
</el-form-item>
<el-form-item label="操作人手机号">
<span>{{ props.row.staffMobile }}</span>
<span>{{ props.row.staffMobile || "--" }}</span>
</el-form-item>
<el-form-item label="储值优惠">
<span>充值满{{ props.row.rechargeBalance }}元赠送{{ props.row.giftBalance }}</span>
@ -149,7 +149,11 @@
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column prop="realName" label="交易员工"></el-table-column>
<el-table-column prop="realName" label="交易员工">
<template slot-scope="scope">
<span>{{scope.row.realName || "--"}}</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="充值备注">
<template slot-scope="scope">
<span>{{ scope.row.remark ? scope.row.remark:"--" }}</span>

View File

@ -434,9 +434,8 @@ import { callWithErrorHandling } from "vue"
.toFixed(1)
_this.store = response.data.store
uni.setStorageSync("storeId", response.data.store.id)
uni.setStorageSync("chainStoreId", response.data.store
.chainStoreId)
console.log(uni.getStorageSync("chainStoreId"));
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
// console.log(uni.getStorageSync("chainStoreId"));
let welfare = response.data.store.welfare
if (welfare) {
if (welfare.includes(",")) {

View File

@ -243,6 +243,8 @@
_this.getStaffList(id)
_this.store = res.data
_this.storeId = res.data.id;
uni.setStorageSync("storeId", _this.store.id)
uni.setStorageSync("chainStoreId", _this.store.chainStoreId)
let welfare = res.data.welfare
if (welfare) {
if (welfare.includes(",")) {