This commit is contained in:
parent
48d6583a03
commit
d29d8b7f93
|
|
@ -1,12 +1,14 @@
|
|||
<template>
|
||||
<div class="dialog_footer" v-for="(item, index) in props.flowingwater.list" :key="index">
|
||||
<div class="dialog_footer_left">
|
||||
<span>{{ item.biz_name }}</span>
|
||||
<span>{{ dayjs(item.create_time).format("YYYY-MM-DD") }}</span>
|
||||
</div>
|
||||
<div class="dialog_footer_right">
|
||||
<span>{{ item.balance }}</span>
|
||||
<span>{{ item.amount }}</span>
|
||||
<div class="box">
|
||||
<div class="dialog_footer" v-for="(item, index) in props.flowingwater.list" :key="index">
|
||||
<div class="dialog_footer_left">
|
||||
<span>{{ item.biz_name }}</span>
|
||||
<span>{{ dayjs(item.create_time).format("YYYY-MM-DD") }}</span>
|
||||
</div>
|
||||
<div class="dialog_footer_right">
|
||||
<span>{{ item.balance }}</span>
|
||||
<span>{{ item.amount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -24,49 +26,53 @@ const props = defineProps({
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog_footer:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.dialog_footer {
|
||||
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;
|
||||
}
|
||||
.box {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
.dialog_footer:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.dialog_footer_right {
|
||||
.dialog_footer {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 6px;
|
||||
|
||||
span:nth-child(1) {
|
||||
color: #fc3d3d;
|
||||
font-size: 16px;
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
.dialog_footer_right {
|
||||
display: flex;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@
|
|||
<keyboard v-if="props.membershow == '1'" @consumeFees="consumeFees"></keyboard>
|
||||
<div class="orderbox_right_button" v-if="props.membershow == '0'">
|
||||
<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>
|
||||
<el-button style="width: 60%;" type="primary">账户充值</el-button>
|
||||
<el-button style="width: 60%;" type="primary" @click="recharge = true">账户充值</el-button>
|
||||
</div>
|
||||
<div class="orderbox_right_button" v-if="props.membershow == '1'">
|
||||
<router-link to="/" style="width: 35%;">
|
||||
|
|
@ -209,6 +209,7 @@ const confirmEvent = async () => {//子组件 确认按钮
|
|||
})
|
||||
if (res == null) {
|
||||
recharge.value = false
|
||||
moneys.value = 0
|
||||
ElMessage({
|
||||
message: '充值成功',
|
||||
type: 'success',
|
||||
|
|
@ -273,9 +274,11 @@ const asyncqueryMembermember = async () => {//会员列表数据
|
|||
phone: tableData.phone
|
||||
})
|
||||
if (res) {
|
||||
tableData.list = res.list
|
||||
if (res.list.length != 0) {
|
||||
tableData.list = res.list
|
||||
MemberAccount()
|
||||
}
|
||||
tableData.total = res.total
|
||||
MemberAccount()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,65 +138,66 @@
|
|||
<el-dialog v-model="recharge" title="退单" width="800" :before-close="handlerecharge">
|
||||
<div class="recharge_footer">
|
||||
<div class="recharge_footer_item">
|
||||
<el-input v-model="textarea" style="width: 100%" :rows="2" type="textarea"
|
||||
placeholder="Please input" />
|
||||
<div class="recharge_footer_items">
|
||||
<el-input v-model="remark" style="width: 100%" :rows="2" type="textarea" placeholder="请输入退单原因" />
|
||||
<div class="recharge_footer_items" @click="remark = '顾客取消'">
|
||||
<div>顾客取消</div>
|
||||
</div>
|
||||
<div class="recharge_footer_items">
|
||||
<div class="recharge_footer_items" @click="remark = '等待时间长'">
|
||||
<div>等待时间长</div>
|
||||
</div>
|
||||
<div class="recharge_footer_items">
|
||||
<div class="recharge_footer_items" @click="remark = '支付错误'">
|
||||
<div>支付错误</div>
|
||||
</div>
|
||||
<div class="recharge_footer_items">
|
||||
<div class="recharge_footer_items" @click="remark = '商品不满意'">
|
||||
<div>商品不满意</div>
|
||||
</div>
|
||||
<div class="recharge_footer_items">
|
||||
<div class="recharge_footer_items" @click="remark = '服务态度不满意'">
|
||||
<div>服务态度不满意</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge_footer_itemright">
|
||||
<div class="recharge_footer_itemright_top">
|
||||
<div>
|
||||
单号:2525
|
||||
单号:{{ orderDetaildata.orderNo }}
|
||||
</div>
|
||||
<div>
|
||||
下单时间:2024-02-01 11:49:06
|
||||
下单时间:{{ orderDetaildata.createdAt }}
|
||||
</div>
|
||||
<div>
|
||||
<span>金额:¥14.00</span>
|
||||
<span>优惠:¥0.00</span>
|
||||
<span>包装费:¥14.00</span>
|
||||
<span>可退款:¥14.00</span>
|
||||
<span>金额:¥{{ orderDetaildata.orderAmount }}</span>
|
||||
<!-- <span>优惠:¥0.00</span> -->
|
||||
<span>包装费:¥{{ orderDetaildata.packFee }}</span>
|
||||
<!-- <span>可退款:¥{{ orderDetaildata.packFee }}</span> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge_footer_itemright_botton">
|
||||
<div class="recharge_footer_itemright_botton_top">
|
||||
<el-checkbox v-model="checked1" size="large" /><span
|
||||
style="margin-left: 10px;">全选,共10项目</span>
|
||||
<el-checkbox @change="changezong" v-model="changechecked" size="large" /><span
|
||||
style="margin-left: 10px;">全选,共项目</span>
|
||||
</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">
|
||||
<el-checkbox v-model="checked1" size="large" />
|
||||
<span style="margin-left: 10px;">葡萄汁</span>
|
||||
<el-checkbox @change="changezong(item, index, 1)" v-model="item.checked" size="large" />
|
||||
<span style="margin-left: 10px;">{{ item.productName }}</span>
|
||||
</div>
|
||||
<div class="recharge_footer_itemright_botton_itemtow">
|
||||
8
|
||||
{{ item.num }}
|
||||
</div>
|
||||
<div class="recharge_footer_itemright_botton_itemthere">
|
||||
¥8
|
||||
¥{{ item.price }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge_footer_itemright_botton_box">
|
||||
<div class="recharge_footer_itemright_botton_boxone">
|
||||
<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 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>
|
||||
|
|
@ -214,28 +215,37 @@ import { orderfindOrder, orderorderDetail, payreturnOrder } from '@/api/order/in
|
|||
import add from '@/views/order/components/add.vue'
|
||||
const store = useUser()
|
||||
const itemboxshow = ref(false)
|
||||
const drawershow = ref(true)
|
||||
|
||||
const handleClick = (Name) => {//切换teb
|
||||
ordereData.status = Name.props.name
|
||||
asyncorderfindOrder()
|
||||
}
|
||||
const firstinput = ref('')//搜索输入框
|
||||
|
||||
const recharge = ref(true)//退单切换
|
||||
const recharge = ref(false)//退单切换
|
||||
|
||||
const handlerecharge = () => {
|
||||
const handlerecharge = () => { //退单切换
|
||||
recharge.value = !recharge.value
|
||||
}
|
||||
|
||||
const payreturnOrderclick = async () => {
|
||||
if (refundamount.value == 0) {
|
||||
ElMessage.error('退款金额不能为0!')
|
||||
return false
|
||||
}
|
||||
try {
|
||||
let result = orderDetaildata.value.detailList.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
orderId: orderDetaildata.value.id
|
||||
let obj = {}
|
||||
if (item.checked) {
|
||||
obj = {
|
||||
id: item.id,
|
||||
orderId: orderDetaildata.value.id,
|
||||
remark: remark.value
|
||||
}
|
||||
}
|
||||
return obj
|
||||
})
|
||||
await payreturnOrder(result)
|
||||
recharge.value = false
|
||||
asyncorderfindOrder()
|
||||
} catch (error) {
|
||||
|
||||
|
|
@ -250,11 +260,47 @@ const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组
|
|||
})
|
||||
itemboxshow.value = true
|
||||
orderDetaildata.value = res
|
||||
console.log(orderDetaildata)
|
||||
orderDetaildata.value.detailList.forEach((e) => {
|
||||
e.checked = false
|
||||
})
|
||||
} 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({//详情数据
|
||||
// loading
|
||||
})
|
||||
|
|
@ -570,14 +616,16 @@ onMounted(() => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.recharge_footer_itemright_botton_boxoneabsolute {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
.recharge_footer_itemright_botton_boxonetext{
|
||||
font-size:26px;
|
||||
|
||||
.recharge_footer_itemright_botton_boxonetext {
|
||||
font-size: 26px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue