Files
guilixu-admin/src/components/PayMethod/index.vue
赵忠林 894592c290 feat(shop): 新增线下付款支持及优化Dashboard数据统计
- 新增线下付款(payType=9)支付方式,支持订单中标识和确认收款操作
- 实现商家确认线下付款后订单进入待发货状态功能
- 更新支付方式组件和订单列表及详情页的支付状态显示
- 优化shop/dashboard快捷操作按钮为商城常用功能,修正快速入口路由路径
- 修复Dashboard待发货订单数统计时未过滤商城订单导致数据不准的问题
- 修复Dashboard运行天数为0的异常,将租户信息请求独立处理,避免某些请求失败影响
- 修复statisticsStore中couponUsedCount与getter同名冲突,改名为safeCouponUsedCount并同步更新引用
2026-07-14 22:17:39 +08:00

107 lines
2.1 KiB
Vue

<!-- 选择下拉框 -->
<template>
<a-select
:allow-clear="true"
:show-search="true"
optionFilterProp="label"
:options="options"
:value="value"
:placeholder="placeholder"
@update:value="updateValue"
:style="`width: 200px`"
@blur="onBlur"
/>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { SelectProps } from 'ant-design-vue';
const emit = defineEmits<{
(e: 'update:value', value: string, item: any): void;
(e: 'blur'): void;
}>();
const props = withDefaults(
defineProps<{
value?: any;
type?: any;
placeholder?: string;
dictCode?: string;
}>(),
{
placeholder: '请选择支付方式'
}
);
// 字典数据
const options = ref<SelectProps['options']>([
{
value: 0,
label: '余额支付',
key: 'balancePay',
icon: 'PayCircleOutlined'
},
{ value: 1, label: '微信支付', key: 'wxPay', icon: 'WechatOutlined' },
{
value: 2,
label: '支付宝',
key: 'aliPay',
icon: 'AlipayCircleOutlined'
},
{
value: 3,
label: '银联支付',
key: 'unionPay',
icon: 'IdcardOutlined'
},
{
value: 4,
label: '现金支付',
key: 'cashPayment',
icon: 'PayCircleOutlined'
},
{
value: 5,
label: 'POS机支付',
key: 'posPay',
icon: 'IdcardOutlined'
},
{
value: 6,
label: '免费',
key: 'freePay',
icon: 'IdcardOutlined'
},
{
value: 7,
label: '积分支付',
key: 'pointsPay',
icon: 'IdcardOutlined'
},
{
value: 8,
label: '货到付款',
key: 'codPay',
icon: 'IdcardOutlined'
},
{
value: 9,
label: '线下付款',
key: 'offlinePay',
icon: 'IdcardOutlined'
}
]);
/* 更新选中数据 */
const updateValue = (value: string) => {
const item = options.value?.find((d) => d.value == value);
console.log(item);
emit('update:value', value, item);
};
/* 失去焦点 */
const onBlur = () => {
emit('blur');
};
</script>