diff --git a/main.js b/main.js index 7465d9b..3fb744f 100644 --- a/main.js +++ b/main.js @@ -27,7 +27,7 @@ export function createApp() { const systemInfo = uni.getStorageSync('systemInfo') || {} app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android' app.config.globalProperties.$systemInfo = systemInfo - uni.setStorageSync('version', '1.0.4.sp4') + uni.setStorageSync('version', '1.0.4.sp5') app.config.globalProperties.$version = uni.getStorageSync('version') app.use(globalMethods); return { diff --git a/pages.json b/pages.json index ced3481..ab58f2a 100644 --- a/pages.json +++ b/pages.json @@ -66,6 +66,20 @@ "navigationBarTitleText": "添加订单", "navigationStyle": "custom" } + }, + { + "path": "jingdong/add-waimai/add-waimai", + "style": { + "navigationBarTitleText": "添加外卖订单页面", + "navigationStyle": "custom" + } + }, + { + "path": "jingdong/waimai-order-detail/waimai-order-detail", + "style": { + "navigationBarTitleText": "外卖订单详情", + "navigationStyle": "custom" + } } ] }, diff --git a/pages/shopping/jingdong/add-order/add-order.vue b/pages/shopping/jingdong/add-order/add-order.vue index 3737614..e2afe63 100644 --- a/pages/shopping/jingdong/add-order/add-order.vue +++ b/pages/shopping/jingdong/add-order/add-order.vue @@ -373,7 +373,7 @@ - + {{ item.label }} diff --git a/pages/shopping/jingdong/add-waimai/add-waimai.vue b/pages/shopping/jingdong/add-waimai/add-waimai.vue new file mode 100644 index 0000000..d4babe9 --- /dev/null +++ b/pages/shopping/jingdong/add-waimai/add-waimai.vue @@ -0,0 +1,1451 @@ + + + + + + \ No newline at end of file diff --git a/pages/shopping/jingdong/json/order.json b/pages/shopping/jingdong/json/order.json index 7f87681..b14a29d 100644 --- a/pages/shopping/jingdong/json/order.json +++ b/pages/shopping/jingdong/json/order.json @@ -395,5 +395,323 @@ "label": "已取消", "key": "yiquxiao" } + ], + "waimaiClassfiy": { + "weizhifu": { + "id": "123211111", + "type": "weizhifu", + "shopType": "waimai", + "shopName": "", + "status": "等待付款", + "statusDesc": "29分钟", + "deliveryTime": "11:17-11:32", + "address": "", + "phone": "", + "consignee": "", + "discountCarriage": "", + "carriage": "", + "products": [ + { + "image": "", + "title": "", + "desc": "一人份", + "price": "", + "count": "数量x1" + } + ], + "productsInfo": { + "cutleryCount": "商家按餐量提供", + "deliveryPreference": "允许敲门/按门铃;允许发短信", + "outOfStock": "缺货时与我电话沟通" + }, + "orderInfo": [ + { + "label": "订单编号", + "key": "orderNumber", + "value": "", + "type": "number" + }, + { + "label": "交易快照", + "key": "transactionSnapshot", + "value": "发生交易争执时,可作为判断依据" + }, + { + "label": "支付方式", + "key": "paymentMethod", + "value": "微信支付", + "type": "text" + }, + { + "label": "下单时间", + "key": "orderTime", + "value": "", + "type": "time" + } + ], + "promoType": "text", + "promoHighlight": "近90天600+人回购" + }, + "beicanzhong": { + "id": 9632554, + "shopType": "waimai", + "type": "beicanzhong", + "shopName": "安野屋 (AARYE) 京...", + "status": "骑手到店取餐中", + "trackingTitle": "10: 22-10: 55", + "trackingDesc": "骑手已到店,大王", + "trackingTime": "2026-03-10 15: 14: 30", + "products": [ + { + "image": "/static/image/shopping/jingdong/product1.png", + "title": "超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖", + "desc": "不支持7天无理由退货", + "service": "", + "tags": [], + "price": "69.00", + "count": "1", + } + ], + "productsInfo": { + "cutleryCount": "商家按餐量提供", + "deliveryPreference": "允许敲门/按门铃;允许发短信", + "outOfStock": "缺货时与我电话沟通" + }, + "orderInfo": [ + { + "label": "订单编号", + "key": "orderNumber", + "value": "", + "type": "number" + }, + { + "label": "交易快照", + "key": "transactionSnapshot", + "value": "发生交易争执时,可作为判断依据" + }, + { + "label": "下单时间", + "key": "orderTime", + "value": "", + "type": "time" + }, + { + "label": "支付时间", + "key": "paymentTime", + "value": "", + "type": "time" + }, + { + "label": "支付方式", + "key": "paymentMethod", + "value": "微信支付", + "type": "text" + }, + { + "label": "如遇缺货", + "key": "outOfStock", + "value": "缺货时与我电话沟通", + "type": "text" + } + ] + }, + "qvcanzhong": { + "id": "63254112", + "shopType": "waimai", + "type": "qvcanzhong", + "shopName": "安野屋 (AARYE) 京...", + "status": "商家备餐中", + "trackingTitle": "10: 22-10: 55", + "trackingDesc": "商家已接单,商品备餐中", + "trackingTime": "2026-03-10 15: 14: 30", + "products": [ + { + "image": "/static/image/shopping/jingdong/product1.png", + "title": "超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖", + "desc": "不支持7天无理由退货", + "service": "", + "tags": [], + "price": "69.00", + "count": "1" + } + ], + "productsInfo": { + "cutleryCount": "商家按餐量提供", + "deliveryPreference": "允许敲门/按门铃;允许发短信", + "outOfStock": "缺货时与我电话沟通" + }, + "orderInfo": [ + { + "label": "订单编号", + "key": "orderNumber", + "value": "", + "type": "number" + }, + { + "label": "交易快照", + "key": "transactionSnapshot", + "value": "发生交易争执时,可作为判断依据" + }, + { + "label": "下单时间", + "key": "orderTime", + "value": "", + "type": "time" + }, + { + "label": "支付时间", + "key": "paymentTime", + "value": "", + "type": "time" + }, + { + "label": "送达时间", + "key": "paymentMethod", + "value": "微信支付", + "type": "time" + }, + { + "label": "如遇缺货", + "key": "outOfStock", + "value": "缺货时与我电话沟通", + "type": "text" + } + ], + }, + "yiwancheng": { + "id": 78456211, + "shopType": "waimai", + "type": "yiwancheng", + "shopName": "瑞幸咖啡", + "status": "完成", + "statusColor": "gray", + "products": [ + { + "image": "/static/image/shopping/jingdong/product1.png", + "title": "多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好", + "desc": "不支持7天无理由退货", + "service": "", + "tags": [], + "price": "69.00", + "count": "1" + } + ], + "productsInfo": { + "cutleryCount": "商家按餐量提供", + "deliveryPreference": "允许敲门/按门铃;允许发短信", + "outOfStock": "缺货时与我电话沟通" + }, + "orderInfo": [ + { + "label": "订单编号", + "key": "orderNumber", + "value": "", + "type": "number" + }, + { + "label": "交易快照", + "key": "transactionSnapshot", + "value": "发生交易争执时,可作为判断依据" + }, + { + "label": "下单时间", + "key": "orderTime", + "value": "", + "type": "time" + }, + { + "label": "支付时间", + "key": "paymentTime", + "value": "", + "type": "time" + }, + { + "label": "支付方式", + "key": "paymentMethod", + "value": "微信支付", + "type": "text" + }, + { + "label": "如遇缺货", + "key": "outOfStock", + "value": "缺货时与我电话沟通", + "type": "text" + } + ], + "promoType": "coupon", + "promoText": "恭喜您获得3元京东购物券", + "promoAction": "去领券" + }, + "yiquxiao": { + "id": "52322221", + "shopType": "waimai", + "type": "yiquxiao", + "shopName": "瑞幸咖啡", + "status": "已取消", + "statusColor": "gray", + "products": [ + { + "image": "/static/image/shopping/jingdong/product1.png", + "title": "多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好", + "desc": "不支持7天无理由退货", + "tags": [], + "service": "", + "price": "69.00", + "count": "1" + } + ], + "productsInfo": { + "cutleryCount": "商家按餐量提供", + "deliveryPreference": "允许敲门/按门铃;允许发短信", + "outOfStock": "缺货时与我电话沟通" + }, + "orderInfo": [ + { + "label": "订单编号", + "key": "orderNumber", + "value": "", + "type": "number" + }, + { + "label": "交易快照", + "key": "transactionSnapshot", + "value": "发生交易争执时,可作为判断依据" + }, + { + "label": "下单时间", + "key": "orderTime", + "value": "", + "type": "time" + }, + { + "label": "支付时间", + "key": "paymentTime", + "value": "", + "type": "time" + } + ] + } + }, + "waimaiType": [ + { + "label": "未支付", + "key": "weizhifu" + }, + { + "label": "备餐中", + "key": "beicanzhong" + }, + { + "label": "取餐中", + "key": "qvcanzhong" + }, + { + "label": "已完成", + "key": "yiwancheng" + }, + { + "label": "取消", + "key": "yiquxiao" + } ] } \ No newline at end of file diff --git a/pages/shopping/jingdong/list-index.vue b/pages/shopping/jingdong/list-index.vue index a296671..7865469 100644 --- a/pages/shopping/jingdong/list-index.vue +++ b/pages/shopping/jingdong/list-index.vue @@ -112,6 +112,7 @@ import { ref, computed, onMounted, getCurrentInstance } from 'vue'; import { onShow } from '@dcloudio/uni-app'; import ShoppingCard from '@/components/shopping/jingdong/shopping-card.vue'; import { util } from '@/utils/common.js'; +import { shoppingType, waimaiType } from './json/order.json'; const showActionMenu = ref(false); const actionMenuState = ref({ x: 0, y: 0, item: null }); @@ -134,9 +135,12 @@ const buttonGroup = [ }, { name: "新增秒送订单", click: () => { - uni.showToast({ - title: '开发中,敬请期待', - icon: 'none' + // uni.showToast({ + // title: '开发中,敬请期待', + // icon: 'none' + // }); + uni.navigateTo({ + url: '/pages/shopping/jingdong/add-waimai/add-waimai' }); } }, @@ -198,7 +202,9 @@ const handleCardClick = (item) => { url: '/pages/shopping/jingdong/order-detail/order-detail?id=' + item.id }); } else { - + uni.navigateTo({ + url: '/pages/shopping/jingdong/waimai-order-detail/waimai-order-detail?id=' + item.id + }); } }; @@ -525,6 +531,36 @@ const tabList = ref([ const switchTab = (index) => { if (tabList.value[index].disabled) return; currentTab.value = index; + // 重置筛选 + currentFilter.value = -1; + // 动态更新筛选项 + updateFilterList(); +}; + +/** + * 根据当前Tab更新筛选项列表 + */ +const updateFilterList = () => { + if (currentTab.value === 1) { // 购物 + filterList.value = shoppingType.map(item => ({ + name: item.label, + key: item.key + })); + } else if (currentTab.value === 2) { // 秒送 (外卖) + filterList.value = waimaiType.map(item => ({ + name: item.label, + key: item.key + })); + } else { // 全部或服务 + filterList.value = [ + { name: '待付款' }, + { name: '待收货' }, + { name: '待使用', disabled: false }, + { name: '已完成' }, + { name: '待评价' }, + { name: '已取消' } + ]; + } }; const currentFilter = ref(-1); @@ -582,13 +618,33 @@ const filteredOrderList = computed(() => { if (currentFilter.value === -1) { result = baseList; } else { - const filterName = filterList.value[currentFilter.value].name; + const filterItem = filterList.value[currentFilter.value]; + const filterName = filterItem.name; + const filterKey = filterItem.key; + result = baseList.filter(item => { + // 如果有 key,优先使用 key 匹配 (适用于外卖或已定义的购物类型) + if (filterKey) { + if (item.shopType === 'waimai') { + if (filterKey === 'weizhifu') return item.status === '等待付款'; + if (filterKey === 'beicanzhong') return item.status === '商家备餐中' || item.status === '骑手到店取餐中'; + if (filterKey === 'qvcanzhong') return item.status === '取餐中' || item.status === '商家备餐中' || item.status === '骑手到店取餐中'; + if (filterKey === 'yiwancheng') return item.status === '完成' || item.status === '已完成'; + if (filterKey === 'yiquxiao') return item.status === '已取消'; + } + // 购物类型 key 匹配 + if (filterKey === 'dengdaifukuan') return item.status === '等待付款'; + if (filterKey === 'zhengzaichuku') return item.status === '正在出库' || item.status === '仓库处理中'; + if (filterKey === 'yiqianshou' || filterKey === 'wancheng') return item.status === '完成' || item.status === '已签收'; + if (filterKey === 'yiquxiao') return item.status === '已取消'; + } + + // 兜底使用原来基于名称的模糊模糊逻辑 if (filterName === '待付款') return item.status === '等待付款'; - if (filterName === '待收货') return item.status === '正在出库' || item.status === '待收货' || item.status === '运输中' || item.status === '已发货' || item.status === '商家备餐中' || item.status === '骑手到店取餐中'; + if (filterName === '待收货') return ['正在出库', '待收货', '运输中', '已发货', '商家备餐中', '骑手到店取餐中', '仓库处理中'].includes(item.status); if (filterName === '待使用') return item.status === '待使用'; - if (filterName === '已完成') return item.status === '完成' || item.status === '已完成' || item.status === '已签收'; - if (filterName === '待评价') return item.status === '待评价' || item.status === '完成' || item.status === '已完成'; + if (filterName === '已完成') return ['完成', '已完成', '已签收'].includes(item.status); + if (filterName === '待评价') return ['待评价', '完成', '已完成'].includes(item.status); if (filterName === '已取消') return item.status === '已取消'; return true; }); diff --git a/pages/shopping/jingdong/waimai-order-detail/waimai-order-detail.vue b/pages/shopping/jingdong/waimai-order-detail/waimai-order-detail.vue new file mode 100644 index 0000000..724e098 --- /dev/null +++ b/pages/shopping/jingdong/waimai-order-detail/waimai-order-detail.vue @@ -0,0 +1,484 @@ + + + + + + + diff --git a/static/image/shopping/jingdong/waimai/beican.png b/static/image/shopping/jingdong/waimai/beican.png new file mode 100644 index 0000000..bda1d09 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/beican.png differ diff --git a/static/image/shopping/jingdong/waimai/fenxiang.png b/static/image/shopping/jingdong/waimai/fenxiang.png new file mode 100644 index 0000000..7ee3e8a Binary files /dev/null and b/static/image/shopping/jingdong/waimai/fenxiang.png differ diff --git a/static/image/shopping/jingdong/waimai/fukuan.png b/static/image/shopping/jingdong/waimai/fukuan.png new file mode 100644 index 0000000..3ee18b9 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/fukuan.png differ diff --git a/static/image/shopping/jingdong/waimai/location.png b/static/image/shopping/jingdong/waimai/location.png new file mode 100644 index 0000000..764f004 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/location.png differ diff --git a/static/image/shopping/jingdong/waimai/notice.png b/static/image/shopping/jingdong/waimai/notice.png new file mode 100644 index 0000000..53c0541 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/notice.png differ diff --git a/static/image/shopping/jingdong/waimai/qianshou.png b/static/image/shopping/jingdong/waimai/qianshou.png new file mode 100644 index 0000000..c0c3ebb Binary files /dev/null and b/static/image/shopping/jingdong/waimai/qianshou.png differ diff --git a/static/image/shopping/jingdong/waimai/qvcan.png b/static/image/shopping/jingdong/waimai/qvcan.png new file mode 100644 index 0000000..a3eafef Binary files /dev/null and b/static/image/shopping/jingdong/waimai/qvcan.png differ diff --git a/static/image/shopping/jingdong/waimai/shuaxin.png b/static/image/shopping/jingdong/waimai/shuaxin.png new file mode 100644 index 0000000..613e746 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/shuaxin.png differ diff --git a/static/image/shopping/jingdong/waimai/songcan.png b/static/image/shopping/jingdong/waimai/songcan.png new file mode 100644 index 0000000..cccbe1b Binary files /dev/null and b/static/image/shopping/jingdong/waimai/songcan.png differ diff --git a/static/image/shopping/jingdong/waimai/waimai.png b/static/image/shopping/jingdong/waimai/waimai.png new file mode 100644 index 0000000..8f27230 Binary files /dev/null and b/static/image/shopping/jingdong/waimai/waimai.png differ