Merge branch 'wwz' of gitee.com:shaanxi-super-shopkeeper_1/cashierdesktop into gyq

This commit is contained in:
gyq 2024-03-06 10:49:56 +08:00
commit 5d96435125
4 changed files with 153 additions and 80 deletions

View File

@ -1,12 +1,14 @@
<template> <template>
<div class="dialog_footer" v-for="(item, index) in props.flowingwater.list" :key="index"> <div class="box">
<div class="dialog_footer_left"> <div class="dialog_footer" v-for="(item, index) in props.flowingwater.list" :key="index">
<span>{{ item.biz_name }}</span> <div class="dialog_footer_left">
<span>{{ dayjs(item.create_time).format("YYYY-MM-DD") }}</span> <span>{{ item.biz_name }}</span>
</div> <span>{{ dayjs(item.create_time).format("YYYY-MM-DD") }}</span>
<div class="dialog_footer_right"> </div>
<span>{{ item.balance }}</span> <div class="dialog_footer_right">
<span>{{ item.amount }}</span> <span>{{ item.balance }}</span>
<span>{{ item.amount }}</span>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -24,49 +26,53 @@ const props = defineProps({
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.dialog_footer:nth-child(1) { .box {
margin-top: 0; height: 400px;
} overflow: auto;
.dialog_footer:nth-child(1) {
.dialog_footer { margin-top: 0;
margin-top: 10px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #ccc;
padding-bottom: 6px;
.dialog_footer_left {
display: flex;
flex-direction: column;
align-items: flex-start;
span:nth-child(1) {
font-size: 18px;
font-weight: 500;
}
span:nth-child(2) {
margin-top: 10px;
color: #333;
}
} }
.dialog_footer_right { .dialog_footer {
margin-top: 10px;
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
align-items: flex-end; align-items: center;
border-bottom: 1px solid #ccc;
padding-bottom: 6px;
span:nth-child(1) { .dialog_footer_left {
color: #fc3d3d; display: flex;
font-size: 16px; flex-direction: column;
align-items: flex-start;
span:nth-child(1) {
font-size: 18px;
font-weight: 500;
}
span:nth-child(2) {
margin-top: 10px;
color: #333;
}
} }
span:nth-child(2) { .dialog_footer_right {
margin-top: 10px; display: flex;
font-size: 14px; flex-direction: column;
align-items: flex-end;
span:nth-child(1) {
color: #fc3d3d;
font-size: 16px;
}
span:nth-child(2) {
margin-top: 10px;
font-size: 14px;
}
} }
} }
} }

View File

@ -82,9 +82,9 @@
<keyboard v-if="props.membershow == '1'" @consumeFees="consumeFees"></keyboard> <keyboard v-if="props.membershow == '1'" @consumeFees="consumeFees"></keyboard>
<div class="orderbox_right_button" v-if="props.membershow == '0'"> <div class="orderbox_right_button" v-if="props.membershow == '0'">
<router-link to="/" style="width: 35%;"> <router-link to="/" style="width: 35%;">
<el-button style="width: 100%;" @click="recharge = true">创建订单</el-button> <el-button style="width: 100%;" >创建订单</el-button>
</router-link> </router-link>
<el-button style="width: 60%;" type="primary">账户充值</el-button> <el-button style="width: 60%;" type="primary" @click="recharge = true">账户充值</el-button>
</div> </div>
<div class="orderbox_right_button" v-if="props.membershow == '1'"> <div class="orderbox_right_button" v-if="props.membershow == '1'">
<router-link to="/" style="width: 35%;"> <router-link to="/" style="width: 35%;">
@ -209,6 +209,7 @@ const confirmEvent = async () => {//子组件 确认按钮
}) })
if (res == null) { if (res == null) {
recharge.value = false recharge.value = false
moneys.value = 0
ElMessage({ ElMessage({
message: '充值成功', message: '充值成功',
type: 'success', type: 'success',
@ -273,9 +274,11 @@ const asyncqueryMembermember = async () => {//会员列表数据
phone: tableData.phone phone: tableData.phone
}) })
if (res) { if (res) {
tableData.list = res.list if (res.list.length != 0) {
tableData.list = res.list
MemberAccount()
}
tableData.total = res.total tableData.total = res.total
MemberAccount()
} }
} }

View File

@ -138,65 +138,66 @@
<el-dialog v-model="recharge" title="退单" width="800" :before-close="handlerecharge"> <el-dialog v-model="recharge" title="退单" width="800" :before-close="handlerecharge">
<div class="recharge_footer"> <div class="recharge_footer">
<div class="recharge_footer_item"> <div class="recharge_footer_item">
<el-input v-model="textarea" style="width: 100%" :rows="2" type="textarea" <el-input v-model="remark" style="width: 100%" :rows="2" type="textarea" placeholder="请输入退单原因" />
placeholder="Please input" /> <div class="recharge_footer_items" @click="remark = '顾客取消'">
<div class="recharge_footer_items">
<div>顾客取消</div> <div>顾客取消</div>
</div> </div>
<div class="recharge_footer_items"> <div class="recharge_footer_items" @click="remark = '等待时间长'">
<div>等待时间长</div> <div>等待时间长</div>
</div> </div>
<div class="recharge_footer_items"> <div class="recharge_footer_items" @click="remark = '支付错误'">
<div>支付错误</div> <div>支付错误</div>
</div> </div>
<div class="recharge_footer_items"> <div class="recharge_footer_items" @click="remark = '商品不满意'">
<div>商品不满意</div> <div>商品不满意</div>
</div> </div>
<div class="recharge_footer_items"> <div class="recharge_footer_items" @click="remark = '服务态度不满意'">
<div>服务态度不满意</div> <div>服务态度不满意</div>
</div> </div>
</div> </div>
<div class="recharge_footer_itemright"> <div class="recharge_footer_itemright">
<div class="recharge_footer_itemright_top"> <div class="recharge_footer_itemright_top">
<div> <div>
单号2525 单号{{ orderDetaildata.orderNo }}
</div> </div>
<div> <div>
下单时间2024-02-01 11:49:06 下单时间{{ orderDetaildata.createdAt }}
</div> </div>
<div> <div>
<span>金额14.00</span> <span>金额{{ orderDetaildata.orderAmount }}</span>
<span>优惠0.00</span> <!-- <span>优惠0.00</span> -->
<span>包装费14.00</span> <span>包装费{{ orderDetaildata.packFee }}</span>
<span>可退款14.00</span> <!-- <span>可退款{{ orderDetaildata.packFee }}</span> -->
</div> </div>
</div> </div>
<div class="recharge_footer_itemright_botton"> <div class="recharge_footer_itemright_botton">
<div class="recharge_footer_itemright_botton_top"> <div class="recharge_footer_itemright_botton_top">
<el-checkbox v-model="checked1" size="large" /><span <el-checkbox @change="changezong" v-model="changechecked" size="large" /><span
style="margin-left: 10px;">全选10项目</span> style="margin-left: 10px;">全选项目</span>
</div> </div>
<div class="recharge_footer_itemright_botton_item" v-for="item in 10" :key="item"> <div class="recharge_footer_itemright_botton_item"
v-for="(item, index) in orderDetaildata.detailList" :key="index">
<div class="recharge_footer_itemright_botton_itemone"> <div class="recharge_footer_itemright_botton_itemone">
<el-checkbox v-model="checked1" size="large" /> <el-checkbox @change="changezong(item, index, 1)" v-model="item.checked" size="large" />
<span style="margin-left: 10px;">葡萄汁</span> <span style="margin-left: 10px;">{{ item.productName }}</span>
</div> </div>
<div class="recharge_footer_itemright_botton_itemtow"> <div class="recharge_footer_itemright_botton_itemtow">
8 {{ item.num }}
</div> </div>
<div class="recharge_footer_itemright_botton_itemthere"> <div class="recharge_footer_itemright_botton_itemthere">
8 {{ item.price }}
</div> </div>
</div> </div>
</div> </div>
<div class="recharge_footer_itemright_botton_box"> <div class="recharge_footer_itemright_botton_box">
<div class="recharge_footer_itemright_botton_boxone"> <div class="recharge_footer_itemright_botton_boxone">
<div class="recharge_footer_itemright_botton_boxoneabsolute">退单金额</div> <div class="recharge_footer_itemright_botton_boxoneabsolute">退单金额</div>
<div class="recharge_footer_itemright_botton_boxonetext">100</div> <div class="recharge_footer_itemright_botton_boxonetext">{{ refundamount }}</div>
</div> </div>
<div class="recharge_footer_itemright_botton_boxtow"> <div class="recharge_footer_itemright_botton_boxtow">
<el-button type="primary" style="width: 100%; height: 100%;">支付退回</el-button> <el-button type="primary" style="width: 100%; height: 100%;"
@click="payreturnOrderclick">支付退回</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -214,28 +215,37 @@ import { orderfindOrder, orderorderDetail, payreturnOrder } from '@/api/order/in
import add from '@/views/order/components/add.vue' import add from '@/views/order/components/add.vue'
const store = useUser() const store = useUser()
const itemboxshow = ref(false) const itemboxshow = ref(false)
const drawershow = ref(true)
const handleClick = (Name) => {//teb const handleClick = (Name) => {//teb
ordereData.status = Name.props.name ordereData.status = Name.props.name
asyncorderfindOrder() asyncorderfindOrder()
} }
const firstinput = ref('')//
const recharge = ref(true)//退 const recharge = ref(false)//退
const handlerecharge = () => { const handlerecharge = () => { //退
recharge.value = !recharge.value recharge.value = !recharge.value
} }
const payreturnOrderclick = async () => { const payreturnOrderclick = async () => {
if (refundamount.value == 0) {
ElMessage.error('退款金额不能为0')
return false
}
try { try {
let result = orderDetaildata.value.detailList.map(item => { let result = orderDetaildata.value.detailList.map(item => {
return { let obj = {}
id: item.id, if (item.checked) {
orderId: orderDetaildata.value.id obj = {
id: item.id,
orderId: orderDetaildata.value.id,
remark: remark.value
}
} }
return obj
}) })
await payreturnOrder(result) await payreturnOrder(result)
recharge.value = false
asyncorderfindOrder() asyncorderfindOrder()
} catch (error) { } catch (error) {
@ -250,11 +260,47 @@ const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组
}) })
itemboxshow.value = true itemboxshow.value = true
orderDetaildata.value = res orderDetaildata.value = res
console.log(orderDetaildata) orderDetaildata.value.detailList.forEach((e) => {
e.checked = false
})
} catch (error) { } catch (error) {
} }
} }
const remark = ref('')//
const changechecked = ref(false) //
const refundamount = ref(0)//退
const changezong = (e, b, c) => {
if (c == 1) {
if (e.checked) {
refundamount.value = (Number(refundamount.value) + (Number(e.num) * Number(e.price))).toFixed(2)
} else {
refundamount.value = (Number(refundamount.value) - (Number(e.num) * Number(e.price))).toFixed(2)
}
if (orderDetaildata.value.detailList.every(item => item.checked == true)) {//
changechecked.value = true
} else {
changechecked.value = false
}
} else {
orderDetaildata.value.detailList.forEach((e) => {
if (changechecked.value) {
e.checked = true
refundamount.value = orderDetaildata.value.orderAmount
} else {
e.checked = false
refundamount.value = 0
}
})
}
}
const orderDetaildata = ref({// const orderDetaildata = ref({//
// loading // loading
}) })
@ -570,14 +616,16 @@ onMounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.recharge_footer_itemright_botton_boxoneabsolute { .recharge_footer_itemright_botton_boxoneabsolute {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
color: #c0c0c0; color: #c0c0c0;
} }
.recharge_footer_itemright_botton_boxonetext{
font-size:26px; .recharge_footer_itemright_botton_boxonetext {
font-size: 26px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
} }

16
src/views/work/index.vue Normal file
View File

@ -0,0 +1,16 @@
<template>
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
<div class="drawer_wrap">
</div>
</el-drawer>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'
const dialogVisible = ref(false)
</script>
<style scoped lang="scss"></style>