合并代码

This commit is contained in:
sx 2025-01-23 22:26:04 +08:00
parent 9b9b2a568d
commit 9fbf092756
2 changed files with 80 additions and 31 deletions

View File

@ -5,6 +5,7 @@
reactive,
getCurrentInstance,
defineExpose,
onMounted
} from 'vue'
//
import util from '@/common/js/util';
@ -20,6 +21,15 @@
//
trackingNumber: '',
})
//
const expressList = reactive([])
//
const expressIndex = ref('')
onMounted(() => {
//
getExpressList()
})
//
function getExpressList() {
@ -27,6 +37,7 @@
path: ['express_company'],
}).then(rs => {
if (rs.code == 200) {
Object.assign(expressList, rs.data)
return
}
util.alert({
@ -36,6 +47,18 @@
})
}
/**
* 选择物流公司
* @param {Object} ev
*/
function handleExpressIndex(ev) {
console.log('ev', ev)
const index = ev.detail.value
if(expressIndex.value === index) return
expressIndex.index = index
form.expressName = expressList[index].dictLabel
}
//
function open() {
proxy.$refs.express.open()
@ -44,6 +67,12 @@
//
function close() {
proxy.$refs.express.close()
//
setTimeout(() => {
form.expressName = ''
form.trackingNumber = ''
})
}
defineExpose({
@ -54,23 +83,29 @@
<template>
<uni-popup ref="express" type="center">
<view class="expressAlt">
<view class="header rows">
<view class="expressAlt popMid bfff">
<view class="header rows ptb20 plr20">
<view>填写快递单号</view>
<uni-icons type="closeempty" />
<uni-icons type="closeempty" @click="close" />
</view>
<view class="form">
<view class="line df aic">
<view class="">快递公司</view>
<input type="text" placeholder="输入快递公司" />
<view class="form ooh mtb30 plr30 c333 f30">
<view class="line mtb30">
<picker :range="expressList" range-key="dictLabel" @change="handleExpressIndex">
<view class="rows">
<view class="mr20">快递公司</view>
<input type="text" placeholder="输入快递公司" />
</view>
</picker>
</view>
<view class="line df aic">
<view class="">快递单号</view>
<view class="mr20">快递单号</view>
<input type="text" placeholder="输入快递公司" />
</view>
</view>
<view class="btn warm mtb30 mlr30">保存</view>
</view>
</uni-popup>
</template>

View File

@ -71,6 +71,8 @@
})
//
const apexBgColor = ref('#ffffff00')
//
const orderDetail = reactive({})
onLoad((options) => {
// this.params.currentTab = options.currentTab / 1
@ -216,9 +218,16 @@
refreshList()
})
}
// 退
function handleExpress(item) {
Object.assign(orderDetail, {}, item)
proxy.$refs.expressRef.open()
}
</script>
<template>
<!-- 顶部导航栏 -->
<apex :bgColor="apexBgColor" mode="flex">
<template #content>
<view class="search rows f1 mr30 plr20 bf8f8f8 br10">
@ -228,30 +237,33 @@
</template>
</apex>
<!-- 页面框架 -->
<view class="app">
<view class="shopHeaderBg bgColor"></view>
<!-- tab选项卡 -->
<view class="f1 pr">
<JyShopNavigation :list="tabs" @tabItemClick="itemClick" />
</view>
<view class="product mlr20 pr">
<!-- 订单列表 -->
<view class="order">
<template v-for="(item,index) in list.data" :key="index">
<view class="mtb30">
<orderItem :item="item" mode="mine" @item="handleItem">
<!-- 操作按钮 -->
<template #menu="scope">
<view class="menu ptb20 df jcr" v-if="[0,1,4,5,6].includes(scope.item.status)">
<template v-if="scope.item.refundStatus == 1">
<view class="btn bar warmHollow plr30" @click.stop="handleCancel(scope.item)">
填写退货物流信息</view>
</template>
<template v-else-if="scope.item.status == 0">
<!-- 订单列表 -->
<view class="order mlr20 pr">
<template v-for="(item,index) in list.data" :key="index">
<view class="mtb30">
<orderItem :item="item" mode="mine" @item="handleItem">
<!-- 操作按钮 -->
<template #menu="scope">
<view class="menu ptb20 df jcr" v-if="[0,1,4,5,6].includes(scope.item.status)">
<template v-if="scope.item.refundStatus == 1">
<view class="btn bar warmHollow plr30" @click.stop="handleExpress(scope.item)">
填写退货物流信息</view>
</template>
<template v-else>
<template v-if="scope.item.status == 0">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">继续付款
<view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">
继续付款
</view>
</template>
<template v-else-if="scope.item.status == 1">
@ -262,9 +274,11 @@
<template v-else-if="scope.item.status == 4">
<view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(item)">申请退款</view>
<view class="btn bar closeHollow plr30" @click.stop="order.logistics(item)">查看物流
<view class="btn bar closeHollow plr30" @click.stop="order.logistics(item)">
查看物流
</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived(item)">确认收货
<view class="btn bar warmHollow plr30" @click.stop="handleReceived(item)">
确认收货
</view>
</template>
<template v-else-if="scope.item.status == 5">
@ -277,12 +291,12 @@
<view class="btn bar closeHollow plr30">钱款去向</view>
<view class="btn bar warmHollow plr30">平台介入</view>
</template>
</view>
</template>
</orderItem>
</view>
</template>
</view>
</template>
</view>
</template>
</orderItem>
</view>
</template>
</view>
</view>