This commit is contained in:
ds 2024-11-14 10:07:11 +08:00
parent 28d72ff386
commit 5f34ef7020
5 changed files with 28 additions and 7 deletions

View File

@ -123,6 +123,7 @@
<![CDATA[ and ccu.update_time <= concat(#{obj.end},' 23:59:59') ]]> <![CDATA[ and ccu.update_time <= concat(#{obj.end},' 23:59:59') ]]>
</if> </if>
</where> </where>
order by ccu.update_time desc
</select> </select>

View File

@ -97,20 +97,27 @@
count(CASE WHEN goods_order_amount > 0 THEN 1 ELSE null END) AS s9 -- 商品订单数量 count(CASE WHEN goods_order_amount > 0 THEN 1 ELSE null END) AS s9 -- 商品订单数量
from cashier_order from cashier_order
<where> <where>
status = 'paid'
<if test="order.staffId != null and order.staffId != ''"> <if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId} and staff_id = #{order.staffId}
</if> </if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}
</if>
<if test="order.orderNo != null and order.orderNo != ''"> <if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%') and order_no like concat('%', #{order.orderNo}, '%')
</if> </if>
<if test="order.payUser != null and order.payUser != ''">
and pay_user like concat('%', #{order.payUser}, '%')
</if>
<if test="order.terminal != null and order.terminal != ''"> <if test="order.terminal != null and order.terminal != ''">
and terminal like concat('%', #{order.terminal}, '%') and terminal like concat('%', #{order.terminal}, '%')
</if> </if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"> <if test="order.params.beginTime != null and order.params.beginTime != ''">
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d') and date_format(create_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if> </if>
<if test="order.params.endTime != null and order.params.endTime != ''"> <if test="order.params.endTime != null and order.params.endTime != ''">
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d') and date_format(create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if> </if>
</where> </where>

View File

@ -548,7 +548,8 @@
sum( CASE WHEN pay_type = 'card_value' THEN pay_amount END ) AS cardValue sum( CASE WHEN pay_type = 'card_value' THEN pay_amount END ) AS cardValue
from oil_order from oil_order
<where> <where>
store_id = #{order.storeId} order_status = 'paid'
and store_id = #{order.storeId}
<if test="order.userId != null and order.userId != ''"> <if test="order.userId != null and order.userId != ''">
and user_id = #{order.userId} and user_id = #{order.userId}
</if> </if>

View File

@ -103,7 +103,7 @@
</div> </div>
</template> </template>
<script> <script>
import { parseTime } from '@/utils/fuint'
import { selectVerifiedList } from "@/api/online"; import { selectVerifiedList } from "@/api/online";
import { queryStaffs } from '@/api/cashier/staff' import { queryStaffs } from '@/api/cashier/staff'
export default { export default {
@ -132,6 +132,8 @@ export default {
}, },
methods:{ methods:{
getList(){ getList(){
this.queryParams.begin = parseTime(this.queryParams.begin)
this.queryParams.end = parseTime(this.queryParams.end)
selectVerifiedList(this.queryParams).then(res => { selectVerifiedList(this.queryParams).then(res => {
this.list = res.data.records; this.list = res.data.records;
this.total = res.data.total this.total = res.data.total

View File

@ -40,7 +40,7 @@
> >
<el-option v-for="item in oilGunList" <el-option v-for="item in oilGunList"
:key="item.id" :key="item.id"
:label="item.gunName" :label="item.oilName"
:value="item.id"> :value="item.id">
<span style="float: left">{{ item.oilName }}</span> <span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
@ -205,8 +205,18 @@
<el-table-column prop="discountAmount" label="优惠金额(元)" align="center"></el-table-column> <el-table-column prop="discountAmount" label="优惠金额(元)" align="center"></el-table-column>
<el-table-column prop="payAmount" label="实付金额(元)" align="center"></el-table-column> <el-table-column prop="payAmount" label="实付金额(元)" align="center"></el-table-column>
<el-table-column prop="balanceAmount" label="储值卡付款金额(元)" align="center" /> <el-table-column prop="balanceAmount" label="储值卡付款金额(元)" align="center">
<el-table-column prop="oilCardAmount" label="囤油卡付款金额(元)" align="center" /> <template slot-scope="scope">
<span v-if="scope.row.payType=='card_value'">{{ scope.row.payAmount }}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column prop="oilCardAmount" label="囤油卡付款金额(元)" align="center">
<template slot-scope="scope">
<span v-if="scope.row.payType=='fule_card'">{{ scope.row.payAmount }}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column prop="payUser" label="付款用户" align="center" ></el-table-column> <el-table-column prop="payUser" label="付款用户" align="center" ></el-table-column>
<el-table-column prop="payType" label="支付方式" align="center"> <el-table-column prop="payType" label="支付方式" align="center">
<template slot-scope="scope"> <template slot-scope="scope">