| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- import { h } from 'vue';
- import { NFlex, NImage, NTag } from 'naive-ui';
- // import { fetchGetAllStoreList } from '@/service/api/goods/desk-category';
- import { fetchGetStoreList } from '@/service/api/xsb-manage/store-info';
- import { fetchGetDictDataList } from '@/service/api/system-manage';
- // import { useAuth } from '@/hooks/business/auth';
- import type { FormSchema } from '@/components/zt/Form/types/form';
- export const SearchForm: FormSchema[] = [
- {
- label: '业务类型',
- field: 'businessType',
- component: 'ApiSelect',
- componentProps: {
- api: fetchGetDictDataList,
- labelFeild: 'name',
- valueFeild: 'value',
- resultFeild: 'data.list',
- params: {
- typeCode: 'sys_business_type'
- }
- }
- },
- {
- label: '门店名称',
- component: 'ApiSelect',
- field: 'shopId',
- componentProps: {
- api: fetchGetStoreList,
- resultFeild: 'data.list',
- labelFeild: 'shopName',
- valueFeild: 'shopId'
- }
- },
- // {
- // label: '订单类型',
- // component: 'NSelect',
- // field: 'dvyType',
- // componentProps: {
- // options: [
- // {
- // label: '全部',
- // value: ''
- // },
- // {
- // label: '快递',
- // value: 1
- // },
- // {
- // label: '配送',
- // value: 3
- // }
- // ]
- // }
- // },
- // {
- // label: '父订单编号',
- // component: 'NInput',
- // field: 'parentOrderNumber'
- // },
- {
- label: '订单编号',
- component: 'NInput',
- field: 'orderNumber'
- },
- {
- label: '收货人姓名',
- component: 'NInput',
- field: 'consigneeName'
- },
- {
- label: '收货人电话',
- component: 'NInput',
- field: 'consigneeMobile'
- },
- // {
- // label: '售后状态',
- // component: 'NSelect',
- // field: 'refundStatus',
- // componentProps: {
- // options: [
- // {
- // label: '申请退款',
- // value: 1
- // },
- // {
- // label: '退款成功',
- // value: 2
- // },
- // {
- // label: '部分退款成功',
- // value: 3
- // },
- // {
- // label: '退款失败',
- // value: 4
- // }
- // ]
- // }
- // },
- {
- label: '下单时间',
- component: 'NDatePicker',
- field: 'createTime',
- componentProps: {
- type: 'datetimerange',
- defaultTime: ['00:00:00', '23:59:59']
- }
- }
- // {
- // field: 'userAttrType',
- // label: '人员属性',
- // component: 'dictSelect',
- // componentProps: {
- // dictCode: 'user_attr_type',
- // immediate: true
- // },
- // show: useAuth().hasAuth('user:attr:type')
- // }
- ];
- export enum orderStatusEnum {
- /**
- *
- * 待支付
- */
- WAIT_PAY = 0,
- /**
- * 待发货
- */
- WAIT_DELIVERY = 1,
- /**
- * 订单已接单(待拣货)
- */
- ORDER_ACCEPT = 20,
- /**
- * 订单待配送(拣货完成/自提类订单为待自提)
- */
- ORDER_WAIT_DELIVERY = 30,
- /**
- * 订单配送中
- */
- ORDER_DELIVERY = 40,
- /**
- * 订单取消待审核
- */
- ORDER_CANCEL_WAIT_AUDIT = 50,
- /**
- * 订单已取消
- */
- ORDER_CANCEL = 60,
- /**
- * 订单已送达
- */
- ORDER_ARRIVE = 70,
- /**
- * 订单已完成
- */
- ORDER_COMPLETE = 80
- }
- /**
- * 发货按钮显示状态
- */
- export const ShippingButton = [
- orderStatusEnum.WAIT_DELIVERY,
- orderStatusEnum.ORDER_ACCEPT,
- orderStatusEnum.ORDER_DELIVERY,
- orderStatusEnum.ORDER_WAIT_DELIVERY
- ];
- /**
- * // 0-待支付 1-待发货,20-订单已接单(待拣货),30-订单待配送(拣货完成/自提类订单为待自提),40-订单配送中
- // ,50-订单取消待审核,60-订单已取消,70-订单已送达,80-订单已完成
- */
- export const orderStatus = {
- [orderStatusEnum.WAIT_PAY]: '待支付',
- [orderStatusEnum.WAIT_DELIVERY]: '待发货',
- [orderStatusEnum.ORDER_ACCEPT]: '订单已接单(待拣货)',
- [orderStatusEnum.ORDER_WAIT_DELIVERY]: '订单待配送(拣货完成/自提类订单为待自提)',
- [orderStatusEnum.ORDER_DELIVERY]: '订单配送中',
- [orderStatusEnum.ORDER_CANCEL_WAIT_AUDIT]: '订单取消待审核',
- [orderStatusEnum.ORDER_CANCEL]: '订单已取消',
- [orderStatusEnum.ORDER_ARRIVE]: '订单已送达',
- [orderStatusEnum.ORDER_COMPLETE]: '订单已完成'
- };
- export enum yppStatusEnum {
- /**
- *
- * 待支付
- */
- WAIT_PAY = 0,
- /**
- * 已支付
- */
- WAIT_DELIVERY = 1,
- /**
- * 出票成功
- */
- SUCCESS = 4,
- /**
- * 出票失败(退款)
- */
- REFUND_FAIL = 7,
- /**
- * 超时未支付(取消)
- */
- TIMEOUT_CANCEL = 8
- }
- export const yppStatus = {
- [yppStatusEnum.WAIT_PAY]: '待支付',
- [yppStatusEnum.WAIT_DELIVERY]: '已支付',
- [yppStatusEnum.SUCCESS]: '出票成功',
- [yppStatusEnum.REFUND_FAIL]: '出票失败(退款)',
- [yppStatusEnum.TIMEOUT_CANCEL]: '超时未支付(取消)'
- };
- /**
- // 1:申请退款 2:退款成功 3:部分退款成功 4:退款失败
- *
- */
- export const refundStatus = {
- 1: '申请退款',
- 2: '退款成功',
- 3: '部分退款成功',
- 4: '退款失败'
- };
- /**
- *
- * 配送方式
- */
- export const dvyStatus = {
- 1: '快递',
- 2: '自提',
- 3: '即时配送'
- };
- export const orderColumns: NaiveUI.TableColumn<Api.delivery.OrderItemElement>[] = [
- {
- title: '商品',
- key: 'goods',
- width: 300,
- render: row => {
- const goodsNodes = [
- h(NImage, { src: row.pic, width: 80, height: 80 }),
- h('div', { class: 'ml-2 ' }, [
- h('div', { class: 'text-15px font-semibold' }, row.skuName),
- h('div', { class: 'text-gray' }, `规格:${row.spec || '--'}`)
- ])
- ];
- return h('div', { class: 'flex items-center' }, goodsNodes);
- }
- },
- {
- title: '单价(元)',
- key: 'price',
- width: 100
- },
- {
- title: '数量',
- key: 'prodCount',
- width: 250,
- render: row => {
- const nodes = [h('div', { class: 'mr-2' }, row.prodCount)];
- if (row.refundSuccessCount) {
- nodes.push(h(NTag, { class: 'ml2', type: 'success' }, () => `退款成功:${row.refundSuccessCount}`));
- }
- if (row.refundIngCount && !row.refundSuccessCount) {
- nodes.push(h(NTag, { class: 'ml2', type: 'error' }, () => `售后处理:${row.refundIngCount}`));
- }
- return h(NFlex, { align: 'center' }, () => nodes);
- }
- },
- {
- title: '小计/元',
- key: 'productTotalAmount',
- width: 100
- }
- ];
- export const deliveryInfo: FormSchema[] = [
- {
- label: '配送方式',
- component: 'NGradientText',
- field: 'dvyMethod',
- render() {
- return h('div', {}, '快递');
- }
- },
- {
- label: '收货人姓名',
- component: 'NGradientText',
- field: 'receiver',
- render({ model, field }) {
- return h('div', {}, model[field]);
- }
- },
- {
- label: '收货人手机号',
- component: 'NInput',
- field: 'mobile',
- render({ model, field }) {
- return h('div', {}, model[field]);
- }
- },
- {
- label: '收货地址',
- component: 'NInput',
- field: 'address',
- render({ model, field }) {
- return h('div', {}, model[field]);
- }
- }
- ];
|