|
@@ -6,7 +6,10 @@
|
|
|
<span class="mr-4">订单编号: {{ order.orderId }} <el-button link type="primary" size="small"
|
|
<span class="mr-4">订单编号: {{ order.orderId }} <el-button link type="primary" size="small"
|
|
|
@click="handleCopy(order.orderId)">复制</el-button></span>
|
|
@click="handleCopy(order.orderId)">复制</el-button></span>
|
|
|
<span class="mr-4">创建时间: {{ order.createTime }}</span>
|
|
<span class="mr-4">创建时间: {{ order.createTime }}</span>
|
|
|
- <span class="mr-4">支付渠道: {{ getPayType(order.payType) }}</span>
|
|
|
|
|
|
|
+ <span class="mr-4">支付渠道:
|
|
|
|
|
+ <dict-data v-if="order.payType" code="shop_order_pay_type" type="text" :model-value="order.payType" />
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </span>
|
|
|
<span class="mr-4">订单来源: 商城小程序</span>
|
|
<span class="mr-4">订单来源: 商城小程序</span>
|
|
|
<span class="flag-icon" v-if="order.flag"><el-icon>
|
|
<span class="flag-icon" v-if="order.flag"><el-icon>
|
|
|
<Flag />
|
|
<Flag />
|
|
@@ -35,7 +38,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-price">¥ {{ product.price }}</div>
|
|
<div class="col-price">¥ {{ product.price }}</div>
|
|
|
- <div class="col-qty">x1</div>
|
|
|
|
|
|
|
+ <div class="col-qty">x{{ product.num }}</div>
|
|
|
<div class="col-aftersales">
|
|
<div class="col-aftersales">
|
|
|
<span
|
|
<span
|
|
|
:class="{ 'text-blue': product.status === '3', 'text-red': product.status === '2' }">
|
|
:class="{ 'text-blue': product.status === '3', 'text-red': product.status === '2' }">
|
|
@@ -62,7 +65,7 @@
|
|
|
<div>{{ order.waybillCode }}</div>
|
|
<div>{{ order.waybillCode }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-merged col-status">
|
|
<div class="col-merged col-status">
|
|
|
- <div :class="getStatusColor(order.status)">{{ getStatusText(order.status) }}</div>
|
|
|
|
|
|
|
+ <dict-data code="shop_order_status" type="text" :model-value="order.status" />
|
|
|
<el-button link type="primary" @click="$emit('view-detail', order)">[查看详情]</el-button>
|
|
<el-button link type="primary" @click="$emit('view-detail', order)">[查看详情]</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-merged col-action">
|
|
<div class="col-merged col-action">
|
|
@@ -83,7 +86,6 @@
|
|
|
import { Flag, CopyDocument } from '@element-plus/icons-vue';
|
|
import { Flag, CopyDocument } from '@element-plus/icons-vue';
|
|
|
import { EleMessage } from 'ele-admin-plus/es';
|
|
import { EleMessage } from 'ele-admin-plus/es';
|
|
|
import { useClipboard } from '@vueuse/core';
|
|
import { useClipboard } from '@vueuse/core';
|
|
|
-import { useDictData } from '@/utils/use-dict-data';
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
order: {
|
|
order: {
|
|
@@ -95,7 +97,6 @@ const props = defineProps({
|
|
|
defineEmits(['view-detail', 'push-sms', 'refund']);
|
|
defineEmits(['view-detail', 'push-sms', 'refund']);
|
|
|
|
|
|
|
|
const { copy } = useClipboard();
|
|
const { copy } = useClipboard();
|
|
|
-const [shop_order_status] = useDictData(['shop_order_status']);
|
|
|
|
|
|
|
|
|
|
const handleCopy = async (text) => {
|
|
const handleCopy = async (text) => {
|
|
|
try {
|
|
try {
|
|
@@ -106,16 +107,6 @@ const handleCopy = async (text) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const getStatusText = (status) => {
|
|
|
|
|
- const item = shop_order_status.value.find(d => d.dictValue == status);
|
|
|
|
|
- return item ? item.dictLabel : status;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const getStatusColor = (status) => {
|
|
|
|
|
- // Implement color logic if needed, e.g. return 'text-red'
|
|
|
|
|
- return '';
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const getDetailStatusText = (status) => {
|
|
const getDetailStatusText = (status) => {
|
|
|
const map = {
|
|
const map = {
|
|
|
'1': '正常',
|
|
'1': '正常',
|
|
@@ -145,18 +136,6 @@ const getRecycleStatusText = (status) => {
|
|
|
};
|
|
};
|
|
|
return map[status] || '-';
|
|
return map[status] || '-';
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
-const getPayType = (type) => {
|
|
|
|
|
- if (!type) {
|
|
|
|
|
- return '-';
|
|
|
|
|
- }
|
|
|
|
|
- const map = {
|
|
|
|
|
- '1': '余额支付',
|
|
|
|
|
- '2': '微信支付',
|
|
|
|
|
- '3': '支付宝支付'
|
|
|
|
|
- };
|
|
|
|
|
- return map[type] || type;
|
|
|
|
|
-};
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|