This commit is contained in:
ChenQiuYu 2025-05-16 16:23:18 +08:00
parent 6a7926ea79
commit 31ea8a4fac
5 changed files with 278 additions and 221 deletions

View File

@ -1,14 +1,13 @@
<template> <template>
<Mask :width="1000" :height="560" :is-show="show" @close="show = false" title="订单详情"> <Mask :width="1252" :height="777" :is-show="show" @close="show = false" title="订单详情"
<div class="container"> :show-footer="orderInfo?.status == 1">
<div class="title"> <template #default>
<CloseBtn @click="show = false"></CloseBtn>
</div>
<div class="content"> <div class="content">
<div class="left"> <div class="left">
<div class="goods-detail"> <div class="goods-detail">
<div class="title">药品详情</div> <div class="title">药品详情</div>
<el-table border :header-cell-style="{ backgroundColor: '#f5f7fa' }" :data="orderInfo.goodsDetail" style="height: 100%"> <el-table border :header-cell-style="{ backgroundColor: '#F1F5FB' }" :data="orderInfo.goodsDetail"
style="flex: 1">
<el-table-column label="商品" prop="name" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="商品" prop="name" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" prop="number" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="数量" prop="number" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="单位" prop="unit" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="单位" prop="unit" width="100" show-overflow-tooltip></el-table-column>
@ -36,7 +35,8 @@
</div> </div>
<div class="service-detail"> <div class="service-detail">
<div class="title">服务详情</div> <div class="title">服务详情</div>
<el-table border :header-cell-style="{ backgroundColor: '#f5f7fa' }" :data="orderInfo.serviceDetail" style="height: 100%"> <el-table border :header-cell-style="{ backgroundColor: '#FBF6EB' }" :data="orderInfo.serviceDetail"
style="flex: 1">
<el-table-column label="商品" prop="name" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="商品" prop="name" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" prop="number" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="数量" prop="number" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="单位" prop="unit" width="100" show-overflow-tooltip></el-table-column> <el-table-column label="单位" prop="unit" width="100" show-overflow-tooltip></el-table-column>
@ -127,19 +127,23 @@
</div> </div>
</div> </div>
</div> </div>
</template>
<template #footer>
<div class="footer"> <div class="footer">
<!-- <el-button type="primary" plain>追溯码</el-button>--> <!-- <el-button type="primary" plain>追溯码</el-button>-->
<div> <div>
<!-- <el-button type="danger" plain @click="cancel" v-if="orderInfo.status == 0">取消</el-button>--> <!-- <el-button type="danger" plain @click="cancel" v-if="orderInfo.status == 0">取消</el-button>-->
<el-button type="danger" plain @click="refund" v-if="orderInfo.status == 1">退款</el-button> <el-button type="danger" plain @click="refund" v-if="orderInfo.status == 1">退款</el-button>
<el-button type="primary" @click="print" v-if="orderInfo.status == 1"> <el-button type="primary" @click="print" v-if="orderInfo.status == 1">
打印<el-icon class="el-icon--right"><Upload /></el-icon> 打印
<el-icon class="el-icon--right">
<Upload/>
</el-icon>
</el-button> </el-button>
</div> </div>
</div> </div>
</div> </template>
</Mask> </Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, onUnmounted, ref} from "vue"; import {onMounted, onUnmounted, ref} from "vue";
@ -262,52 +266,62 @@ onUnmounted(() => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@use "@/assets/scss/base"; @use "@/assets/scss/base";
:deep(.el-scrollbar__view) { :deep(.el-scrollbar__view) {
height: 100%; height: 100%;
} }
.container {
.content {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column;
min-height: 0; min-height: 0;
padding:0 24px;
.title {
height: 35px;
}
.content {
flex: 1;
display: flex;
.left { .left {
flex: 2; flex: 1;
height: 100%; height: 100%;
margin-right: 10px; margin-right: 10px;
min-height: 0; min-height: 0;
.goods-detail{ display: flex;
flex-direction: column;
min-width: 0;
.goods-detail {
height: 311px;
background: #F9FAFC;
padding: 24px;
display: flex;
flex-direction: column;
height: 40%;
.title { .title {
font-weight: bold; font-weight: bold;
margin-bottom: 24px;
} }
} }
.service-detail { .service-detail {
height: 40%; flex: 1;
margin-top: 50px; background: #FEFCF8;
padding: 24px;
min-height: 0;
display: flex;
flex-direction: column;
.title { .title {
font-weight: bold; font-weight: bold;
margin-bottom: 24px;
} }
} }
} }
.right { .right {
min-width: 100px; width: 314px;
height: 100%; height: 100%;
flex: 1;
min-height: 0;
border: solid 1px #e6e6e6; border: solid 1px #e6e6e6;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.right_head { .right_head {
padding: 10px; padding: 10px;
@ -344,10 +358,12 @@ onUnmounted(() => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.value { .value {
color: base.$warning-color; color: base.$warning-color;
} }
} }
.right_foot { .right_foot {
flex: 1; flex: 1;
padding: 0 10px; padding: 0 10px;
@ -358,31 +374,34 @@ onUnmounted(() => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.label { .label {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
height: 100%; height: 100%;
.pay { .pay {
color: #000; color: #000;
} }
.name { .name {
margin: 5px 0; margin: 5px 0;
} }
} }
.value { .value {
color: #000; color: #000;
} }
} }
} }
} }
.footer { .footer {
height: 40px; height: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 15px; padding: 24px;
} }
}
</style> </style>

View File

@ -5,13 +5,14 @@
<div class="btns"> <div class="btns">
<div <div
class="btn" class="btn"
style="cursor: pointer"
:style="{ :style="{
backgroundColor: backgroundColor:
selectedIndex == index selectedIndex === index
? item.activeBackgroundColor ? item.activeBackgroundColor
: hoverIndex == index : hoverIndex === index
? item.activeBackgroundColor ? item.activeBackgroundColor
: item.backgrountColor, : item.backgrountColor
}" }"
v-for="(item, index) in btnsList" v-for="(item, index) in btnsList"
:key="index" :key="index"
@ -42,7 +43,7 @@
<template #footer> <template #footer>
<div class="footer"> <div class="footer">
<el-checkbox v-model="printReceipt">同时打印凭证</el-checkbox> <el-checkbox v-model="printReceipt">同时打印凭证</el-checkbox>
<el-button @click="completeSettlement()" type="primary">完成收费</el-button> <div class="default-btn" @click="completeSettlement()" type="primary">完成收费</div>
</div> </div>
</template> </template>
</Mask> </Mask>
@ -77,6 +78,7 @@ const close = () => {
show.value = false; show.value = false;
payType.value = null; payType.value = null;
selectedIndex.value = null selectedIndex.value = null
loading.value = false
} }
const init = async (code: any, psnNo: any) => { const init = async (code: any, psnNo: any) => {
retailOrder.value = await post("charge/getByCode", {code: code}); retailOrder.value = await post("charge/getByCode", {code: code});
@ -111,8 +113,12 @@ const completeSettlement = () => {
} else { } else {
// //
loading.value = true; loading.value = true;
post('charge/completeOrder', {id: retailOrder.value.id, payType: payType.value}).then((res: any) => { post('charge/completeOrder', {id: retailOrder.value.id, payType: payType.value}, {catch_error:true}).then((res: any) => {
orderCompleted() orderCompleted()
loading.value = false
}).catch((e)=>{
loading.value = false
ElMessage.error(e)
}) })
} }
@ -263,12 +269,14 @@ const btnsList = [
//color: #fff; //color: #fff;
//background-color: #409EFF; //background-color: #409EFF;
border: 1px solid #409EFF; border: 1px solid #409EFF;
cursor: pointer;
} }
} }
.active { .active {
color: #fff !important; color: #fff !important;
background-color: #409EFF; background-color: #409EFF;
cursor: pointer;
} }
} }

View File

@ -1,8 +1,8 @@
<template> <template>
<Mask :width="798" :height="540" :is-show="isFlowingWater" @close="isFlowingWater = false" title="流水记录" <Mask :width="798" :height="540" :is-show="isFlowingWater" @close="close" title="流水记录"
:show-footer="true"> :show-footer="true">
<template #default> <template #default>
<div class="content"> <div class="content-flowing">
<div class="head"> <div class="head">
<img style="width: 60px;height: 60px" <img style="width: 60px;height: 60px"
:src="'/static/images/member/' + (props.info.sex === 1 ? 'man' : 'women') + '.png'" :src="'/static/images/member/' + (props.info.sex === 1 ? 'man' : 'women') + '.png'"
@ -23,18 +23,17 @@
</div> </div>
</div> </div>
</div> </div>
<el-table class="body_list" :data="tableData" <el-table class="body_list" :data="tableData" style="width: 100%;height: 100%"
style="border-radius: 8px;border: 1px solid #EAEAEC;border-bottom: none"
:header-cell-style="{ backgroundColor: '#F1F5FB'}"> :header-cell-style="{ backgroundColor: '#F1F5FB'}">
<el-table-column prop="createTime" label="创建时间" width="180"> <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ formatDate(scope.row.createTime) }} {{ formatDate(scope.row.createTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="beforeIntegral" label="变化前"/> <el-table-column prop="beforeIntegral" label="变化前" show-overflow-tooltip/>
<el-table-column prop="changeIntegral" label="变化量"/> <el-table-column prop="changeIntegral" label="变化量" show-overflow-tooltip/>
<el-table-column prop="afterIntegral" label="变化后"/> <el-table-column prop="afterIntegral" label="变化后" show-overflow-tooltip/>
<el-table-column prop="remark" label="备注"/> <el-table-column prop="remark" label="备注" show-overflow-tooltip/>
</el-table> </el-table>
</div> </div>
</template> </template>
@ -63,37 +62,33 @@ const props = defineProps({
type: Object, type: Object,
default: () => ({}) default: () => ({})
}, },
id: {
type: String || Number,
default: ""
}
}) })
const currentPage = ref(1) const currentPage = ref(1)
const tableData: any = ref<any>([]) const tableData: any = ref<any>([])
const total = ref(0) const total = ref(0)
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
const close = () => { const close = () => {
isFlowingWater.value = false
id.value = ""
emit('close') emit('close')
} }
onMounted(() => {
if (!props.id) return
init()
})
const changePage = (page: any) => { const changePage = (page: any) => {
const query = { const query = {
pageNum: page, pageNum: page,
pageSize: 20, pageSize: 20,
vipId: props.id vipId: id.value
} }
post('vip/integral/list', {query: query}).then((res: any) => { post('vip/integral/list', {query: query}).then((res: any) => {
tableData.value.splice(0, tableData.length, ...res.list) tableData.value.splice(0, tableData.length, ...res.list)
}) })
} }
const init = () => { const id = ref('')
const init = (id: any) => {
if (!id) return
const query = { const query = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
vipId: props.id vipId: id
} }
post('vip/integral/list', {query: query}).then((res: any) => { post('vip/integral/list', {query: query}).then((res: any) => {
tableData.value.splice(0, tableData.length, ...res.list) tableData.value.splice(0, tableData.length, ...res.list)
@ -105,15 +100,18 @@ const formatDate = (isoStr: any) => {
const date = new Date(isoStr); const date = new Date(isoStr);
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`; return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
} }
defineExpose({init})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content-flowing {
width: 100%;
padding-top: 24px; padding-top: 24px;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.head { .head {
width: 100%;
height: 60px; height: 60px;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -157,7 +157,7 @@
<VipLevelEdit ref="levelEditRef" @close="init"></VipLevelEdit> <VipLevelEdit ref="levelEditRef" @close="init"></VipLevelEdit>
<Grant v-model="isGrant" :info="listItem" @close="closeGrant()"></Grant> <Grant v-model="isGrant" :info="listItem" @close="closeGrant()"></Grant>
<Exchange v-model="isExchange" :info="listItem" @close="closeExchange()"></Exchange> <Exchange v-model="isExchange" :info="listItem" @close="closeExchange()"></Exchange>
<FlowingWater :id="flowingId" v-model="isFlowingWater" :info="listItem"></FlowingWater> <FlowingWater v-model="isFlowingWater" ref="flowingWaterRef" :info="listItem"></FlowingWater>
<OrderDetail ref="orderDetailRef" @updateOrderList="getChargeList(listItem.id)"></OrderDetail> <OrderDetail ref="orderDetailRef" @updateOrderList="getChargeList(listItem.id)"></OrderDetail>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -378,10 +378,15 @@ const levelEditRef = ref();
const antysList = ref<any>(Object.entries(antys).map(([id, name]) => ({id, name}))) const antysList = ref<any>(Object.entries(antys).map(([id, name]) => ({id, name})))
const certTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name}))) const certTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})))
const flowingId = ref(); const flowingId = ref();
const flowingWaterRef = ref();
const openFlowingWater=()=>{ const openFlowingWater=()=>{
isFlowingWater.value=true isFlowingWater.value=true
flowingId.value=listItem.value.id flowingId.value=listItem.value.id
nextTick(()=>{
flowingWaterRef.value?.init(flowingId.value)
})
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@use "@/assets/scss/base.scss"; @use "@/assets/scss/base.scss";

View File

@ -52,26 +52,32 @@
v-model:current-page="current_page" @current-change="change_page"/> v-model:current-page="current_page" @current-change="change_page"/>
</div> </div>
</div> </div>
<Mask :is-show="UpdateDirectoryLoading" :width="300" :height="300" title="更新版本" :close="false"> <Mask :is-show="UpdateDirectoryLoading" :width="540" :height="163" title="更新版本" :close="false">
{{ tip_message }} <div class="updateDirectory">
<div class="demo-progress" style="margin-top: 20px"> <div>{{ tip_message }}</div>
<div class="demo-progress">
<el-progress :percentage="100" :stroke-width="15" striped <el-progress :percentage="100" :stroke-width="15" striped
striped-flow :show-text="false"/> striped-flow :show-text="false"/>
</div> </div>
</div>
</Mask> </Mask>
<Mask :is-show="isUpdate1312" :width="540" :height="347" title="有效期更新" @close="isUpdate1312=false">
<Mask :is-show="isUpdate1312" :width="600" :height="300" title="有效期更新" @close="isUpdate1312=false">
<div class="update_box"> <div class="update_box">
<el-date-picker <el-date-picker
v-model="updt_time" v-model="updt_time"
type="date" type="date"
placeholder="选择一个起始日期" placeholder="选择一个起始日期"
size="default" size="default"
style="flex: 1;height: 42px"
/> />
<div class="btn" @click="update1312(1)">开始更新</div> <div class="default-btn" @click="update1312(1)"
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}" style="margin-left: 24px">
开始更新
</div>
</div>
<div class="tip-body">
<div class="tip">{{ tip }}</div> <div class="tip">{{ tip }}</div>
</div> </div>
</Mask> </Mask>
</div> </div>
</template> </template>
@ -109,9 +115,12 @@ const tabs = [
]; ];
let tableData: any = ref([]) let tableData: any = ref([])
let content: any = ref(null); let content: any = ref(null);
const showBtn = ref(false)
let update1312 = (current_page: number) => { let update1312 = (current_page: number) => {
showBtn.value = true
if (current_page == 1) { if (current_page == 1) {
tip.value = "开始更新第1页" tip.value = "开始更新第1页"
showBtn.value = false
} }
post("social/directory_upinfo/get_page", { post("social/directory_upinfo/get_page", {
updt_time: updt_time.value, updt_time: updt_time.value,
@ -127,11 +136,13 @@ let update1312 = (current_page: number) => {
} else { } else {
tip.value = "所有更新已完成" tip.value = "所有更新已完成"
isUpdate1312.value = false isUpdate1312.value = false
showBtn.value = false
} }
}).catch((err: any) => { }).catch((err: any) => {
isUpdate1312.value = false; isUpdate1312.value = false;
current_page = 1; current_page = 1;
showBtn.value = false
}) })
} }
const openUpdateBox = (type: number) => { const openUpdateBox = (type: number) => {
@ -254,10 +265,10 @@ let download = (ver: any, type: any) => {
<style scoped lang="scss"> <style scoped lang="scss">
.update_box { .update_box {
position: relative;
width: 100%; width: 100%;
height: 100%; height: 90px;
padding: 20px; padding: 24px;
display: flex;
} }
.container-wrapper { .container-wrapper {
@ -328,4 +339,20 @@ let download = (ver: any, type: any) => {
} }
.tip-body {
height: 100%;
padding: 0 24px;
.tip {
width: 492px;
height: 160px;
background: #F9FAFC;
border-radius: 8px;
padding: 24px;
font-weight: 500;
font-size: 16px;
color: #999999;
font-style: normal;
}
}
</style> </style>