This commit is contained in:
cun-nan 2024-01-23 16:02:28 +08:00
parent 3646bc94b9
commit 15ca62967e
2 changed files with 68 additions and 9 deletions

View File

@ -446,7 +446,7 @@
{{ +oilActualPay + (+goodsActualPay) }}
</div>
<div style="text-align: center;margin-bottom: 10px">
合计金额{{ oilAmount + goodsAmount }}优惠合计{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}
合计金额{{ (oilAmount + goodsAmount).toFixed(2) }}优惠合计{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}
</div>
<div v-if="map.payType != 'CASH'">
<div>
@ -751,6 +751,37 @@
<el-button type="primary" @click="addCredit"> </el-button>
</span>
</el-dialog>
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box" v-for="(item,index) in oilOrder" :key="index">
<div>{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>
<div>{{ item.amount }}</div>
</div>
<div class="input-box" v-for="(item,index) in goodsOrder" :key="index">
<div>{{ item.name }}</div>
<div v-if="isMember == false">{{ item.retailPrice }}</div>
<div v-else>{{ item.memberPrice }}</div>
</div>
<div class="input-box">
<div>合计</div>
<div>{{ oilAmount+(+goodsAmount) }}</div>
</div>
<div class="input-box" v-if="(oilDiscount + goodsDiscount + fullReduction + couponAmount)>0">
<div>优惠合计</div>
<div>{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}</div>
</div>
<div class="input-box">
<div>实付款</div>
<div>{{ (+oilActualPay)+(+goodsActualPay) }}</div>
</div>
<div class="input-box" v-if="seekZero>0">
<div>找零</div>
<div>{{ seekZero }}</div>
</div>
</div>
</div>
</div>
</template>
@ -1085,6 +1116,14 @@
},
},
methods:{
async printLocally() {
const printHTML = document.querySelector('#reportSuccess').innerHTML
//
window.document.body.innerHTML = printHTML
window.print() // window
window.location.reload() //
},
clear(){
this.dialogVisiblej = false
this.seekZero = 0
@ -2672,6 +2711,7 @@
_this.oilPreferentialData[i].oilPreferential.cardFavorableId = _this.cardFavorableId
usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {})
}
_this.printLocally()
return;
}
}
@ -2682,6 +2722,7 @@
_this.seekZero = 0
_this.amount = 0
_this.resetting1()
_this.printLocally()
return;
}
}
@ -2801,6 +2842,7 @@
_this.isQuery = false;
_this.amount = 0
_this.printLocally()
_this.loading = false;
if (response.data.oilOrderAmount>0){
for (let i =0;i<_this.oilPreferentialData.length;i++){
@ -3276,6 +3318,14 @@
/*color: white;*/
}
.box-center{
width: 100%;
//height: 10px;
background-color: white;
margin: 10px auto;
box-sizing: border-box;
overflow: auto;
}
.center-left-bottom{
width: 100%;
background-color: white;
@ -3315,6 +3365,20 @@
margin: 15px 10px ;
}
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.bottom-price{
font-size: 26px;
font-weight: bold;

View File

@ -86,9 +86,9 @@
<view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
</view> -->
</view>
</view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;">
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
@ -216,9 +216,6 @@ import { callWithErrorHandling } from "vue"
uni.setStorageSync("inviteStaffId", staffId)
this.storeId = uni.getStorageSync("storeId")
this.staffId = uni.getStorageSync("inviteStaffId")
uni.showLoading({
title: uni.getStorageSync("storeId") + "++" + uni.getStorageSync("inviteStaffId") + q
})
this.getUserAuthority();
this.getOilType();
} else {
@ -404,9 +401,7 @@ import { callWithErrorHandling } from "vue"
})
}
}).catch((res) => {
uni.showLoading({
title: res + "---" + 1
})
})
},
//