zhoujie 6 月之前
父節點
當前提交
d9cd4e3293

+ 125
- 0
components/nav-bar/nav-barNew.vue 查看文件

@@ -0,0 +1,125 @@
<template>
<view class="nav-bar" :class="scrollTop>navHeight?navbgClass:''" :style="{height:navHeight+'px',color:fontColor}">
<view class="title"
:style="{paddingTop:searchMarginTop+'px',height:searchHeight+'px',lineHeight:searchHeight+'px'}">
<block v-if="isBack && !isAlipay">
<image :src="`/static/image/icon-back-white.png`" :style="{height:searchHeight+'px',width:searchHeight+'px'}"
class="back" @click="back(title,type,userType,orderId)"></image>
</block>
<text>{{title}}</text>
</view>
</view>
<view class="blank" :style="{height:navHeight+'px'}"></view>
</template>

<script setup lang="ts">
import { msg } from "@/utils/utils";
import {
onMounted,
ref
} from "vue";
const navHeight = ref(0)
const searchMarginTop = ref(0)
const searchHeight = ref(0)
const searchWidth = ref(0)
const isAlipay = ref(false)
onMounted(() => {
const type = uni.getSystemInfoSync().uniPlatform
isAlipay.value = type === 'mp-alipay'

const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
const {
top,
width,
height,
right
} = menuButtonInfo
uni.getSystemInfo({
success: (res) => {
const {
statusBarHeight
} = res
const margin = top - statusBarHeight
navHeight.value = (height + statusBarHeight + (margin * 2)) //导航栏总高
searchMarginTop.value = statusBarHeight + margin // 状态栏 + 胶囊按钮边距
searchHeight.value = height // 与胶囊按钮同高
searchWidth.value = right - width // 胶囊按钮右边坐标 - 胶囊按钮宽度 = 按钮左边可使用宽度
},
})
})

const props = defineProps({
title: {
type: String,
default: ''
},
orderId: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
userType: {
type: String,
default: ''
},
isBack: {
type: Boolean,
default: true
},
scrollTop: {
type: Number,
default: 0
},
navbgClass: {
type: String,
default: 'nav-bg'
},
fontColor: {
type: String,
default: '#000'
},
})
const back = () => {
uni.navigateBack({
delta: 1
})
}
</script>

<style scoped>
.nav-bg {
background: #01243A;
}
.nav-bgXin {
background: #01243A;
color:#fff;
}
.blank {
width: 100%;
display: none;
}

.nav-bar {
position: fixed;
width: 100%;
z-index: 999;

}

.nav-bar .title {
text-align: center;
width: 100%;
font-size: 28rpx;
font-weight: bold;
position: relative;
color: white;
}

.back {
position: absolute;
left: 10rpx;
}
</style>

+ 1
- 2
components/submit-button/submit-button.vue 查看文件

@@ -19,13 +19,12 @@
border: none;
}
.button{
background: linear-gradient(to right,#13E7C1,#43A1E0);
background: linear-gradient(to right,#01243A,#004576);
opacity: 1;
border-radius: 100rpx;
color: #fff;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223,223,223,0.5);
}
</style>

+ 1
- 1
composables/order/useOrderListItem.ts 查看文件

@@ -116,7 +116,7 @@ export default function useOrderListItem(props) {
"tabIndex": props.index + '',
"pageNo": params.pageNum,
"pageSize": params.pageSize,
"promotionModes": 1,
// "promotionModes": 1,
},
method: 'POST',
showLoading: true

+ 1
- 1
login/login.vue 查看文件

@@ -85,7 +85,7 @@
const state = reactive({
checked: false, //是否勾选协议
isPwdType: true, //是不是密码类型
loginType: "pwd", //pwd-密码登录 code-验证码登录
loginType: "code", //pwd-密码登录 code-验证码登录
username: "", //用户名
password: "", //密码
code: "", //验证码

+ 7
- 3
pages.json 查看文件

@@ -689,7 +689,8 @@
"path": "replace-equipment/order-confirm-receipt",
"style": {
"navigationBarTitleText": "更换ETC设备-确认收货",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
@@ -1289,7 +1290,8 @@
{
"path": "order-confirm-receipt",
"style": {
"navigationBarTitleText": "确认收货"
"navigationBarTitleText": "确认收货",
"navigationStyle": "custom"
}
},
{
@@ -1325,7 +1327,9 @@
{
"path": "order-details-new",
"style": {
"navigationBarTitleText": "订单详情"
"navigationBarTitleText": "订单详情",
"navigationStyle": "custom",
"navigationBarTextStyle":"white"
}
},
{

+ 88
- 38
pages/order/components/order-list-item-new.vue 查看文件

@@ -5,41 +5,49 @@
@click.stop="gotoOrderDetails(item,1)">
<view class="head">
<view class="name">
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon" mode="aspectFill"></image>
<text class="title">{{item.productName ?item.productName: ''}}</text>
</view>

<view class="status text-orange" v-if="item.orderStatus == OrderStatus.已取消">已取消</view>
<!--异地 orderStatus=-1,你判断这个remoteStatus 是字符串7,就显示审核未通过 -->
<view class="status text-orange" v-else-if="item.orderStatus == OrderStatus.已取消 && item.remoteStatus=='7' && item.deviceType == deviceType">审核不通过</view>
<view class="status text-green" v-else
:class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
|| item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
{{(item.orderStep==12 && item.reshipment==1)?"补货中":getOrderStatusName(item.orderStep)}}
<image :src="`${$imgUrl}order/icon-car.png`" class="icon" mode="aspectFit"></image>
<text class="title">{{item.vehiclePlate ?item.vehiclePlate: ''}}</text>
</view>
<view v-if="item.promotionModes==1" class="xiao">小程序</view>
<view v-else class="xianxia">线下网点</view>
</view>
<view class="detail">
<view class="orders">
<view class="order-text">
<text class="type">新办单号:</text>
<text class="value">{{item.orderId}}</text>
</view>
<!-- <view class="order-text odd">
<text class="type">业务类型:</text>
<text class="value">{{getOrderTypeName(item.orderType)}}</text>
</view> -->
<view class="order-text">
<text class="type">订单车牌号:</text>
<text class="value">{{item.vehiclePlate}}</text>
<view>
</view>
<view class="content">
<view class="picture">
<view>
<view style="padding-bottom: 10rpx;">
<text>车牌颜色:</text>
<text>{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
</view>
<view>
<text>产品名称:</text>
<text>{{item.productName ?item.productName: ''}}</text>
</view>
</view>
<view class="order-text odd">
<text class="type">订单车牌颜色:</text>
<text class="value">{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
<view>
<view v-if="item.orderStatus == OrderStatus.已取消">
<image class="tupian" :src="`${$imgUrl}order/yiquxiao.png`" mode="aspectFill"></image>
</view>
<!--异地 orderStatus=-1,你判断这个remoteStatus 是字符串7,就显示审核未通过 -->
<view v-else-if="item.orderStatus == OrderStatus.已取消 && item.remoteStatus=='7' && item.deviceType == deviceType">
<image class="tupian" :src="`${$imgUrl}order/nopass.png`" mode="aspectFill"></image>
</view>
<view v-else
:class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
|| item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
<image class="tupian" v-if="item.orderStep==12 && item.reshipment==1" :src="`${$imgUrl}order/buhuozhong.png`" mode="aspectFill"></image>
<image class="tupian" v-else :src="`${$imgUrl}order/${getOrderStatusNameNew(item.orderStep)}.png`" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="money"><text class="cny">¥</text><text class="amount"
v-if="item.amount">{{item.amount / 100}}</text><text class="amount" v-else>0.00</text>
<view>
<text class="type">新办订单号:</text>
<text class="value">{{item.orderId}}</text>
</view>
<view class="all">合计:<text class="cny">¥</text><text class="amount"
v-if="item.amount">{{item.amount / 100}}</text><text class="amount" v-else>0.00</text></view>
</view>
<!-- item.orderSource==1 app -->
<view v-if="item.orderStatus != OrderStatus.已取消 && !item.orderSource">
@@ -170,6 +178,7 @@
import { deviceType } from "@/utils/network/difference";
import {
getOrderStatusName,
getOrderStatusNameNew,
msg,
getOrderTypeName
} from "@/utils/utils";
@@ -244,8 +253,10 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 28rpx;
padding: 20rpx 0;
border-bottom: 1px solid #dcdcdc;
width:95%;
margin: 0 auto;
}

.item .head {
@@ -268,8 +279,8 @@
}

.item .head .icon {
width: 48rpx;
height: 48rpx;
width: 37rpx;
height: 31rpx;
}

.item .head .name {
@@ -294,8 +305,10 @@
}

.title {
font-size: 30rpx;
color: #333;
font-size: 30rpx !important;
color: #333 !important;
margin-left: 10rpx;
font-weight: bold !important;
}

.tag-green {
@@ -419,8 +432,8 @@
}

.btn-primary {
border: 1px solid #00b38b;
color: #00b38b;
color:white;
background-color: #133850 ;
}

.btn-disable {
@@ -430,11 +443,48 @@
}

.btn-normal {
border: 1px solid #dcdcdc;
color: #333;
border: 1px solid #133850 ;
color: #133850 ;
}

.evaluation {
display: flex;
}
.content{
font-size: 26rpx;
padding: 6rpx 20rpx;
}
.all{
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 10rpx;
}
.picture{
display: flex;
align-items: center;
justify-content: space-between;
margin: 10rpx 0;
}
.picture>view:first-child{
width: 65%;
}
.xiao{
background: #42D175;
border-radius: 5rpx 5rpx 5rpx 5rpx;
color: white;
font-size: 20rpx;
padding: 4rpx 6rpx;
}
.xianxia{
background: #CCB375;
border-radius: 5rpx 5rpx 5rpx 5rpx;
color: white;
font-size: 20rpx;
padding: 4rpx 6rpx;
}
.tupian{
width: 90rpx;
height: 80rpx;
}
</style>

+ 4
- 8
pages/order/components/order-list-item.vue 查看文件

@@ -4,9 +4,8 @@
<view class="as-layout-horizontal as-gravity-center-start search-layout">
<view class="search-box">
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image>
<input class="search" placeholder="请输入车牌号" @input="onKeyInput" v-model="searchKeyWords" />
<input class="search" placeholder="请输入车牌号" @blur="onKeyInput" v-model="searchKeyWords" />
</view>
<view class="search-btn" @click="doSearch">搜索</view>
</view>

<!-- 数据为空 -->
@@ -25,10 +24,8 @@

<script setup lang="ts">
import orderListItemNew from "./order-list-item-new.vue";
import { OrderTypes } from "@/datas/enum";
import useOrderListItem from "@/composables/order/useOrderListItem";
import { reactive, watch } from "vue";
import { onLoad } from "@dcloudio/uni-app";

const state = reactive({
triggered: false, //设置当前下拉刷新的状态
@@ -48,7 +45,7 @@
}
})
console.log("props.index", props)
const { config, params, ordersList, doSearch, onKeyInput, refreshList, searchKeyWords } = useOrderListItem(props);
const { config, params, ordersList, onKeyInput, refreshList, searchKeyWords } = useOrderListItem(props);
//自定义下拉刷新被触发
const onRefresh = () => {
console.log("22222")
@@ -75,13 +72,12 @@
}

.search-layout {
padding-top: 180rpx;

padding-top: 90rpx;
.search-box {
margin: 30rpx 30rpx 0rpx 30rpx;
height: 80rpx;
background: #FFFFFF;
border: 1px solid #DCDCDC;
// border: 1px solid #DCDCDC;
border-radius: 40rpx;
display: flex;
justify-content: center;

+ 7
- 7
pages/order/components/order-tabbar.vue 查看文件

@@ -95,12 +95,12 @@
content: '';
width: 0;
height: 0;
border-bottom: 6rpx solid #00B38B;
border-bottom: 6rpx solid #01243A;
left: 50%;
bottom: 18rpx;
bottom: 8rpx;
z-index: -99;
height: 16rpx;
background: #00b38b;
height: 6rpx;
background: #01243A;
opacity: 0.3;
transform: translateX(-50%);
transition: .3s;
@@ -112,19 +112,19 @@
font-size: 30rpx;

&:after {
width: 70%;
width: 50%;
border-radius: 6rpx;
}

&:first-child {
&:after {
width: 50%;
width: 30%;
}
}

&:last-child {
&:after {
width: 95%;
width: 75%;
}
}
}

+ 7
- 254
pages/order/order.vue 查看文件

@@ -7,92 +7,13 @@

<view class="list-wrapper" v-else>
<view class="top-content">
<view class="top-menu">
<view :class="item == state.tabActive ? 'tab active' : 'tab'" v-for="item in state.flowPathTabList"
:key="item" @click="flowPathTabHandle(item)">
<view class="border"></view>{{ item }}
</view>
</view>
<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
v-if="data.tabsList.length > 0" @index="test"></order-tabbar>
v-if="data.tabsList.length > 0"></order-tabbar>
</view>

<order-list-item v-if="state.tabActive=='小程序'" ref="mescrollItem" :index="data.tabIndex"
<order-list-item ref="mescrollItem" :index="data.tabIndex"
:refresh="data.refresh">
</order-list-item>
<view v-else>
<!-- 搜索框 -->
<view class="as-layout-horizontal as-gravity-center-start search-layout">
<view class="search-box">
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image>
<input class="search" placeholder="请输入车牌号" @input="onKeyInput" />
</view>
<view class="search-btn" @click="doSearch">搜索</view>
</view>
<!-- 数据为空 -->
<empty-view :mode="config.emptyHint.mode" :content="config.emptyHint.hint"
v-if="state.appOrdersList.length === 0" />
<block v-for="(item,index) in state.appOrdersList" :key="index">
<view :class="item.orderStatus == OrderStatus.已取消 ? 'item finished' : 'item'"
@click.stop="gotoOrderDetails(item,2)">
<view class="head">
<view class="name">
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon" mode="aspectFill">
</image>
<text class="title">{{item.productName ?item.productName: ''}}</text>
</view>

<view class="status text-orange" v-if="item.orderStatus == OrderStatus.已取消">已取消</view>
<view class="status text-green" v-else
:class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
|| item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
{{getOrderStatusName(item.orderStep)}}
</view>
</view>
<view class="detail">
<view class="orders">
<view class="order-text">
<text class="type">新办单号:</text>
<text class="value">{{item.orderId}}</text>
</view>
<view class="order-text odd">
<text class="type">业务类型:</text>
<text class="value">{{getOrderTypeName(item.orderType)}}</text>
</view>
<view class="order-text">
<text class="type">订单车牌号:</text>
<text class="value">{{item.vehiclePlate}}</text>
</view>
<view class="order-text odd">
<text class="type">订单车牌颜色:</text>
<text class="value">{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
</view>
</view>
<view class="money"><text class="cny">¥</text>
<text class="amount" v-if="item.amount">{{item.amount / 100}}</text>
<text class="amount" v-else>0.00</text>
</view>
</view>

<!-- 待激活 -->
<view class="btns" v-if="item.orderStep == OrderStatus.待激活 && item.cardId && item.obuId">
<view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
</view>
<!-- 已完成 -->
<view class="btns" v-else-if="item.orderStep == OrderStatus.已完成">

<view class="btn btn-normal" v-if="item.isStaff==1 && item.isProduct==1">
已评价
</view>
<view class='evaluation' v-else>
<view class="btn btn-primary" @click.stop="gotoEvaluateSalesman(item)">去评价</view>
</view>
</view>
</view>
</block>
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt"
v-if="state.appOrdersList.length > 0" />
</view>
</view>
</filter>
</template>
@@ -102,46 +23,19 @@
import orderListItem from "./components/order-list-item";
import useOrderList from "@/composables/order/useOrderList";
import filter from '@/components/filter/filter.vue';
import { onLoad, onReachBottom, onShow, onPullDownRefresh } from "@dcloudio/uni-app";
import useOrderListItem from "@/composables/order/useOrderListItem";
import useOrderSkip from "@/composables/order/useOrderSkip";
import {
getOrderStatusName,
msg,
getOrderTypeName,
hasLogin, timesDiff
} from "@/utils/utils";
import {
vehiclePlateColor
} from "@/datas/vehiclePlateColor";
import { getItem, StorageKeys, setItem } from "@/utils/storage";
import { PageData } from "@/datas/enum";
import {
OrderStatus
} from "@/datas/enum";
import {
reactive, watch, ref
reactive,
} from "vue";
import { requestNew } from "@/utils/network/request.js";
import { appPage } from "@/utils/network/api";
import { log } from "console";
const tools = require("../../static/etcUtil/tools.js");
const state = reactive({
tabActive: "小程序",
flowPathTabList: ["小程序", "线下网点"],
appOrdersList: [],
index: 0
})
const {
data,
tabbarRef
} = useOrderList();
//办理订单按钮跳转业务逻辑
const {
gotoActiveOrder,
gotoOrderDetails,
gotoEvaluateSalesman
} = useOrderSkip();
//请求参数
const params = reactive({
pageNum: PageData.NUM,
@@ -150,16 +44,7 @@
status: 'more',
reload: false,
})
function test(index) {
console.log("test", index, data.tabIndex)
state.index = index
if (state.tabActive == '小程序') {
changeTab(state.tabActive)
} else {
console.log("apppppppp",)
getList()
}
}

const props = defineProps({
index: {
@@ -174,143 +59,12 @@
}
})

const { changeTab, config, refreshList } = useOrderListItem(props);

onLoad((option) => {
// 一进来就调一遍
changeTab(state.tabActive)
})
let searchKeyWords = '';
//获取车牌颜色文字
const getVehiclePlateColor = (id : number) => {

const colors = vehiclePlateColor.filter(item => item.id == id);
return colors[0].color
}
const flowPathTabHandle = (tab) => {
console.log("tab", tab)
state.tabActive = tab;
if (state.tabActive == '小程序') {
changeTab(state.tabActive)
} else {
console.log("apppppppp",)
getList()
}

};
//搜索
const doSearch = () => {
// #ifdef MP-WEIXIN
if (!searchKeyWords) {
msg('请输入需要搜索的车牌号!');
return;
}
getList();
// #endif
// #ifdef MP-ALIPAY
tools.showLoadingAlert("加载中");
getList();
tools.hideLoadingAlert();
// #endif

}
//订单车牌号输入
const onKeyInput = (event) => {
searchKeyWords = event.target.value;
if (searchKeyWords == '') {
getList();
}
}


const getList = async () => {
if (!hasLogin()) {
uni.stopPullDownRefresh();
return;
}
const options = {
type: 2,
data: {
"opId": getItem(StorageKeys.OpenId),
"vehiclePlate": searchKeyWords,
"tabIndex": state.index + '',
"pageNo": params.pageNum,
"pageSize": params.pageSize,
},
method: 'POST',
showLoading: true
}
requestNew(appPage, options).then((res) => {
uni.hideLoading()
var data = res;
console.log("state.appOrdersList", data)

params.total = data.totalCount;

if (params.pageNum === 1) {
state.appOrdersList = [];
}
if (params.total > 0) {
const curList = data.data || [];
state.appOrdersList = params.reload ? curList : state.appOrdersList.concat(curList);
params.reload = false;
}

if (params.total === state.appOrdersList.length) {
params.reload = false;
params.status = 'noMore';
}

if (params.pageNum === 1) {
uni.stopPullDownRefresh();
}
// 订单发货后未激活 30天 以后 结束订单功能 insertTime >30 算出来距离今天是负数 updateTime<30(结束订单)
for (var k = 0; k < state.appOrdersList.length; k++) {
if (state.appOrdersList[k]['insertTime']) {
if (timesDiff(state.appOrdersList[k]['insertTime'].replace("T", " ")).days > 30) {
state.appOrdersList[k]['finishOrder'] = true //可以结束
} else {
state.appOrdersList[k]['finishOrder'] = false //不可以结束
}
}
if (state.appOrdersList[k]['updateTime']) {
if (timesDiff(state.appOrdersList[k]['updateTime'].replace("T", " ")).days <= 30) {
state.appOrdersList[k]['isUseAgain'] = true //可以再次使用
} else {
state.appOrdersList[k]['isUseAgain'] = false //不可以再次使用
}
}
}
uni.$emit("refreshOrder");
console.log("data.refresh===============", props.refresh, state.appOrdersList)
})
.catch((err) => {
console.log(err);
});
}
onReachBottom(() => {
loadMore();
});
/* 加载更多 */
const loadMore = () => {
if (params.total > state.appOrdersList.length) {
params.status = 'loading';
params.pageNum++;
getList();
} else {
params.status = 'noMore';
}
}
onPullDownRefresh(() => {
if (hasLogin()) {
getList();
}
});
</script>

<style lang="scss">
page {
background: #eef7f7;
background: #E9EDF0;
}

:deep(.u-mode-center-box) {
@@ -363,7 +117,6 @@
}

.search-layout {
padding-top: 180rpx;

.search-box {
margin: 30rpx 30rpx 0rpx 30rpx;

+ 19
- 4
pages/user/user.vue 查看文件

@@ -192,7 +192,7 @@
import navBar from "../../components/nav-bar/nav-bar2.vue";
import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app";
import {
userInfoIndex, selectCarInfo, delCarInfo, showEquityListApi
userInfoIndex, selectCarInfo, delCarInfo, showEquityListApi,orderinfosumquery
} from "@/utils/network/api.js";
import {
request,requestNew
@@ -352,11 +352,10 @@
state.monthFlowingVo = data.monthFlowingVo;
state.isTrajectory = true;
}
// state.orderInfoSumQueryVo = data.orderInfoSumQueryVo
// state.userVehicleInfoSumQueryVo.vehicleSum = JSON.parse(JSON.stringify(data.userVehicleInfoSumQueryVo)).vehicleSum;
// state.userVehicleInfoSumQueryVo.orderStatus0 = JSON.parse(JSON.stringify(data.userVehicleInfoSumQueryVo)).orderStatus0;
console.log("获取用户信息", data);
queryCarMsg();
// 个人订单信息数据查询(待发货,待收货,待激活,退换货)
orderinfosumqueryQ()
})
.catch((err) => {
console.log(err);
@@ -426,6 +425,22 @@
const goEquity = () => {
navTo('/subpackage/service/equityList/equityList')
}
const orderinfosumqueryQ = () => {
const options = {
type: 2,
data: {},
method: "POST",
showLoading: true,
};
//调用方式
requestNew(orderinfosumquery, options).then((res) => {
console.log("orderinfosumquery", res)
state.orderInfoSumQueryVo=res
})
.catch((err) => {
console.log('输出内容', err)
});
}
</script>
<style>
page {

+ 2
- 2
subpackage/after-sale/progress-query/progress-query-business-details.vue 查看文件

@@ -91,8 +91,8 @@
padding: 20rpx 0;
}
.btn-primary {
border: 1px solid #00b38b;
color: #00b38b;
color:white;
background-color: #133850 ;
}
.btn {
height: 60rpx;

+ 133
- 88
subpackage/after-sale/replace-equipment/order-confirm-receipt.vue 查看文件

@@ -1,61 +1,69 @@
<!-- 订单详情-确认收货 -->
<template>
<view class="card-box">
<view class="as-layout-horizontal as-gravity-center-start title">
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image>
<text class="txt-title">{{ state.orderInfo.productName }}</text>
<navBar title="确认收货" :scrollTop="scrollTop"></navBar>
<view class="bg-img">
<image :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill" class="icon"></image>
</view>
<view class="content">
<view class="status">
<text>待收货</text>
</view>
<view style="border-bottom: 1px solid #dcdcdc" />

<!-- 订单信息 -->
<view class="order-box">
<view class="order-item" v-for="(item, index) in state.list" :key="index">
<order-info-item :label="item.label" :value="item.value"></order-info-item>
<view>
<text>创建时间:</text>
<text>{{getOrderTime(state.orderInfo.insertTime)}}</text>
</view>
<view class="order">
<view class="num">
<text>订单号:</text>
<text>{{state.orderInfo.orderNo}}</text>
</view>
<view class="name">
<text>产品名称:</text>
<text>{{state.orderInfo.productName ?state.orderInfo.productName: ''}}</text>
</view>
</view>
<view class="message" v-if="state.orderInfo.cardId">
<view class="message-top1">
<view class="msg">
<view class="vehiclePlate">
<text>订单车牌:</text>
<text>{{state.orderInfo.vehiclePlate}}</text>
</view>
<view>
<text>发货卡号:</text>
<text>{{state.orderInfo.cardId ?state.orderInfo.cardId: ''}}</text>
</view>
<view >
<text>发货签号:</text>
<text>{{state.orderInfo.obuId ?state.orderInfo.obuId: ''}}</text>
</view>
</view>
</view>
</view>
</view>

<view class="hint">请核对实收货物与上述货物编号是否一致!</view>
<view class="btn">
<view class="btn-wrap">
<view class="hint">请核对实收货物与上述货物编号是否一致!</view>
<submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')"></submit-button>
</view>
</template>

<script setup lang="ts">
import orderInfoItem from "../components/order-info-item";
import { reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import navBar from "@/components/nav-bar/nav-barNew.vue";
import { reactive,ref } from "vue";
import { onLoad,onPageScroll } from "@dcloudio/uni-app";
import {requestNew } from "@/utils/network/request.js";
import {confirm, getOrderStatusName } from "@/utils/utils";
import {confirm,getOrderTime } from "@/utils/utils";
import {orderReceiveGoodsSH,changeCardObuView } from "@/utils/network/api";
import { getItem, StorageKeys } from "@/utils/storage";

const scrollTop = ref(0); //滚动距离
//监听页面滚动
onPageScroll((e) => {
scrollTop.value = e.scrollTop;
});
const state = reactive({
//订单信息
orderInfo: {} as any,
//显示订单信息
list: [
{
label: "订单编号:",
value: "",
},
{
label: "订单车牌:",
value: "",
},
{
label: "订单状态:",
value: "",
},
{
label: "发货卡号:",
value: "",
},
{
label: "发货签号:",
value: "",
},
],
});

//确认收货
@@ -82,14 +90,6 @@
);
});
}
// onUnload(() => {
// //移除监听
// uni.$off('bluetoothLink')
// })
//确认收货
const confirmReceiptClick = (e) => {
navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + state.orderInfo.id); //去连接蓝牙
};

//获取订单详情
const getOrderDetails = (id) => {
@@ -102,11 +102,6 @@
requestNew(changeCardObuView, options).then((res) => {
console.log("获取订单详情",res)
state.orderInfo =res;
state.list[0].value = state.orderInfo.orderNo;
state.list[1].value = state.orderInfo.vehiclePlate;
state.list[2].value = state.orderInfo.orderStepStr;
state.list[3].value = state.orderInfo.newCardId ? state.orderInfo.newCardId : "";
state.list[4].value = state.orderInfo.newObuId ? state.orderInfo.newObuId : "";
});
};

@@ -117,49 +112,99 @@

<style>
page {
background-color: #eef7f7;
background: #E9EDF0;
padding-bottom: 30rpx;
font-size: 28rpx;
}
</style>
<style lang="scss" scoped>
.card-box {
background-color: white;
border-radius: 20rpx;
box-shadow: 0px 0px 6rpx 2rpx rgba(223, 223, 223, 0.3);
margin: 30rpx;
padding: 20rpx 0;

.title {
padding: 0 20rpx 20rpx;
}

.icon {
width: 48rpx;
height: 48rpx;
margin-right: 10rpx;
}

.txt-title {
font-size: 30rpx;
color: #333333;
}

.order-box {
padding: 0px 24rpx 10rpx;

.order-item {
padding: 28rpx 0px 0px;
}
}
}

.hint {
font-size: 28rpx;
color: #ff8000;
margin-top: 60rpx;
color: #CCB375;
text-align: center;
}

.btn {
margin: 500rpx 40rpx 50rpx;
}
.bg-img {
width: 100%;
position: absolute;
z-index: 0;
.icon {
width: 100%;
height: 534rpx;
}
}
.content {
position: relative;
color: white;
padding:0 30rpx ;
padding-top: 200rpx;
}
.status>text{
font-weight: bold;
font-size: 40rpx;
line-height: 82rpx;
}
.order{
height: 136rpx;
background:linear-gradient(to bottom,rgb(188, 195, 205),#ffffff);;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 1rpx solid #FFFFFF;
color: black;
font-weight: 400;
font-size: 30rpx;
margin-top: 80rpx;
padding: 20rpx;
box-sizing: border-box;
}
.order>.num{
color: #111111;
}
.order>.name{
color: #666666;
margin-top: 10rpx;
}
.message{
background: white;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 1rpx solid #FFFFFF;
color: #666666;
margin-top: 30rpx;
padding: 20rpx 20rpx 0 20rpx;
}
.message-top1{
display: flex;
padding-bottom: 20rpx;
align-items: center;
}
.message-top1>.msg>view{
line-height: 50rpx;
}
.message-top{
display: flex;
border-bottom: 2rpx solid #E6E9EB;
padding-bottom: 20rpx;
}
.vehiclePlate{
font-weight: 400;
font-size: 30rpx;
color: #111111;
}
.btn-wrap{
position: fixed;
bottom: 0;
left: 0;
background-color: white;
width: 100%;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding: 0 50rpx;
display: flex;
flex-direction: column;
justify-content: space-evenly;
box-sizing: border-box;
height: 188rpx;
}
</style>

subpackage/orders/apply-ex-goods - 副本.vue → subpackage/orders/apply-ex-goods - 以前的.vue 查看文件


+ 165
- 0
subpackage/orders/order-confirm-receipt-删除.vue 查看文件

@@ -0,0 +1,165 @@
<!-- 订单详情-确认收货 -->
<template>
<view class="card-box">
<view class="as-layout-horizontal as-gravity-center-start title">
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image>
<text class="txt-title">{{ state.orderInfo.productName }}</text>
</view>
<view style="border-bottom: 1px solid #dcdcdc" />

<!-- 订单信息 -->
<view class="order-box">
<view class="order-item" v-for="(item, index) in state.list" :key="index">
<order-info-item :label="item.label" :value="item.value"></order-info-item>
</view>
</view>
</view>

<view class="hint">请核对实收货物与上述货物编号是否一致!</view>
<view class="btn">
<submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')"></submit-button>
</view>
</template>

<script setup lang="ts">
import orderInfoItem from "./components/order-info-item";
import { reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import {requestNew } from "@/utils/network/request.js";
import {confirm, getOrderStatusName } from "@/utils/utils";
import {orderReceiveGoods,orderDetailQuery } from "@/utils/network/api";
import { getItem, StorageKeys } from "@/utils/storage";

const state = reactive({
//订单信息
orderInfo: {} as any,
//显示订单信息
list: [
{
label: "订单编号:",
value: "",
},
{
label: "订单车牌:",
value: "",
},
{
label: "订单状态:",
value: "",
},
{
label: "发货卡号:",
value: "",
},
{
label: "发货签号:",
value: "",
},
],
});

//确认收货
const confirmReceipt = (e) => {
const options = {
type: 2,
data: {
opId: getItem(StorageKeys.OpenId),
orderId:state.orderInfo.orderNo
},
method: "POST",
showLoading: true,
};
requestNew(orderReceiveGoods, options).then((res) => {
confirm(
"您已完成订单收货",
() => {
uni.$emit("refreshOrder");
uni.navigateBack();
},
"收货完成",
false
);
});
}
// onUnload(() => {
// //移除监听
// uni.$off('bluetoothLink')
// })
//确认收货
const confirmReceiptClick = (e) => {
navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + state.orderInfo.id); //去连接蓝牙
};

//获取订单详情
const getOrderDetails = (id) => {
const options = {
type: 2,
data: { id: id },
method: "POST",
showLoading: true,
};
requestNew(orderDetailQuery, options).then((res) => {
console.log("获取订单详情",res)
state.orderInfo =res.data;

state.list[0].value = state.orderInfo.orderNo;
state.list[1].value = state.orderInfo.vehiclePlate;
state.list[2].value = getOrderStatusName(state.orderInfo.orderStep);
state.list[3].value = state.orderInfo.cardId ? state.orderInfo.cardId : "";
state.list[4].value = state.orderInfo.obuId ? state.orderInfo.obuId : "";
});
};

onLoad((options) => {
getOrderDetails(options.id);
});
</script>

<style>
page {
background-color: #eef7f7;
}
</style>
<style lang="scss" scoped>
.card-box {
background-color: white;
border-radius: 20rpx;
box-shadow: 0px 0px 6rpx 2rpx rgba(223, 223, 223, 0.3);
margin: 30rpx;
padding: 20rpx 0;

.title {
padding: 0 20rpx 20rpx;
}

.icon {
width: 48rpx;
height: 48rpx;
margin-right: 10rpx;
}

.txt-title {
font-size: 30rpx;
color: #333333;
}

.order-box {
padding: 0px 24rpx 10rpx;

.order-item {
padding: 28rpx 0px 0px;
}
}
}

.hint {
font-size: 28rpx;
color: #ff8000;
margin-top: 60rpx;
text-align: center;
}

.btn {
margin: 500rpx 40rpx 50rpx;
}
</style>

+ 134
- 85
subpackage/orders/order-confirm-receipt.vue 查看文件

@@ -1,61 +1,70 @@
<!-- 订单详情-确认收货 -->
<template>
<view class="card-box">
<view class="as-layout-horizontal as-gravity-center-start title">
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image>
<text class="txt-title">{{ state.orderInfo.productName }}</text>
<navBar title="确认收货" :scrollTop="scrollTop"></navBar>
<view class="bg-img">
<image :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill" class="icon"></image>
</view>
<view class="content">
<view class="status">
<text>待收货</text>
</view>
<view style="border-bottom: 1px solid #dcdcdc" />

<!-- 订单信息 -->
<view class="order-box">
<view class="order-item" v-for="(item, index) in state.list" :key="index">
<order-info-item :label="item.label" :value="item.value"></order-info-item>
<view>
<text>创建时间:</text>
<text>{{getOrderTime(state.orderInfo.insertTime)}}</text>
</view>
<view class="order">
<view class="num">
<text>订单号:</text>
<text>{{state.orderInfo.orderNo}}</text>
</view>
<view class="name">
<text>产品名称:</text>
<text>{{state.orderInfo.productName ?state.orderInfo.productName: ''}}</text>
</view>
</view>
<view class="message" v-if="state.orderInfo.cardId">
<view class="message-top1">
<view class="msg">
<view class="vehiclePlate">
<text>订单车牌:</text>
<text>{{state.orderInfo.vehiclePlate}}</text>
</view>
<view>
<text>发货卡号:</text>
<text>{{state.orderInfo.cardId ?state.orderInfo.cardId: ''}}</text>
</view>
<view >
<text>发货签号:</text>
<text>{{state.orderInfo.obuId ?state.orderInfo.obuId: ''}}</text>
</view>
</view>
</view>
</view>
</view>

<view class="hint">请核对实收货物与上述货物编号是否一致!</view>
<view class="btn">
<view class="btn-wrap">
<view class="hint">请核对实收货物与上述货物编号是否一致!</view>
<submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')"></submit-button>
</view>
</template>

<script setup lang="ts">
import orderInfoItem from "./components/order-info-item";
import { reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
// import orderInfoItem from "./components/order-info-item";
import navBar from "@/components/nav-bar/nav-barNew.vue";
import { reactive,ref } from "vue";
import { onLoad,onPageScroll } from "@dcloudio/uni-app";
import {requestNew } from "@/utils/network/request.js";
import {confirm, getOrderStatusName } from "@/utils/utils";
import {confirm,getOrderTime } from "@/utils/utils";
import {orderReceiveGoods,orderDetailQuery } from "@/utils/network/api";
import { getItem, StorageKeys } from "@/utils/storage";

const scrollTop = ref(0); //滚动距离
//监听页面滚动
onPageScroll((e) => {
scrollTop.value = e.scrollTop;
});
const state = reactive({
//订单信息
orderInfo: {} as any,
//显示订单信息
list: [
{
label: "订单编号:",
value: "",
},
{
label: "订单车牌:",
value: "",
},
{
label: "订单状态:",
value: "",
},
{
label: "发货卡号:",
value: "",
},
{
label: "发货签号:",
value: "",
},
],
});

//确认收货
@@ -81,10 +90,6 @@
);
});
}
// onUnload(() => {
// //移除监听
// uni.$off('bluetoothLink')
// })
//确认收货
const confirmReceiptClick = (e) => {
navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + state.orderInfo.id); //去连接蓝牙
@@ -101,12 +106,6 @@
requestNew(orderDetailQuery, options).then((res) => {
console.log("获取订单详情",res)
state.orderInfo =res.data;

state.list[0].value = state.orderInfo.orderNo;
state.list[1].value = state.orderInfo.vehiclePlate;
state.list[2].value = getOrderStatusName(state.orderInfo.orderStep);
state.list[3].value = state.orderInfo.cardId ? state.orderInfo.cardId : "";
state.list[4].value = state.orderInfo.obuId ? state.orderInfo.obuId : "";
});
};

@@ -117,49 +116,99 @@

<style>
page {
background-color: #eef7f7;
background: #E9EDF0;
padding-bottom: 30rpx;
font-size: 28rpx;
}
</style>
<style lang="scss" scoped>
.card-box {
background-color: white;
border-radius: 20rpx;
box-shadow: 0px 0px 6rpx 2rpx rgba(223, 223, 223, 0.3);
margin: 30rpx;
padding: 20rpx 0;

.title {
padding: 0 20rpx 20rpx;
}

.icon {
width: 48rpx;
height: 48rpx;
margin-right: 10rpx;
}

.txt-title {
font-size: 30rpx;
color: #333333;
}

.order-box {
padding: 0px 24rpx 10rpx;

.order-item {
padding: 28rpx 0px 0px;
}
}
}

.hint {
font-size: 28rpx;
color: #ff8000;
margin-top: 60rpx;
color: #CCB375;
text-align: center;
}

.btn {
margin: 500rpx 40rpx 50rpx;
}
.bg-img {
width: 100%;
position: absolute;
z-index: 0;
.icon {
width: 100%;
height: 534rpx;
}
}
.content {
position: relative;
color: white;
padding:0 30rpx ;
padding-top: 200rpx;
}
.status>text{
font-weight: bold;
font-size: 40rpx;
line-height: 82rpx;
}
.order{
height: 136rpx;
background:linear-gradient(to bottom,rgb(188, 195, 205),#ffffff);;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 1rpx solid #FFFFFF;
color: black;
font-weight: 400;
font-size: 30rpx;
margin-top: 80rpx;
padding: 20rpx;
box-sizing: border-box;
}
.order>.num{
color: #111111;
}
.order>.name{
color: #666666;
margin-top: 10rpx;
}
.message{
background: white;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 1rpx solid #FFFFFF;
color: #666666;
margin-top: 30rpx;
padding: 20rpx 20rpx 0 20rpx;
}
.message-top1{
display: flex;
padding-bottom: 20rpx;
align-items: center;
}
.message-top1>.msg>view{
line-height: 50rpx;
}
.message-top{
display: flex;
border-bottom: 2rpx solid #E6E9EB;
padding-bottom: 20rpx;
}
.vehiclePlate{
font-weight: 400;
font-size: 30rpx;
color: #111111;
}
.btn-wrap{
position: fixed;
bottom: 0;
left: 0;
background-color: white;
width: 100%;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding: 0 50rpx;
display: flex;
flex-direction: column;
justify-content: space-evenly;
box-sizing: border-box;
height: 188rpx;
}
</style>

+ 325
- 674
subpackage/orders/order-details-new.vue
文件差異過大導致無法顯示
查看文件


+ 1
- 3
subpackage/service/equity/equity.vue 查看文件

@@ -139,7 +139,6 @@

let singleEquityId = ref('')
let couponAgencyType = ref('')
let equityId = ref('')
let purchasedEquityId = ref('')
let couponId = ref('')
let exchangeCodes: any = ref([])
@@ -151,7 +150,6 @@
couponId.value = options.couponId
singleEquityId.value = options.singleEquityId
couponAgencyType.value = options.couponAgencyType
equityId.value = options.equityId
purchasedEquityId.value = options.purchasedEquityId
loadExchangeCodes();
})
@@ -164,7 +162,7 @@
mobile: getItem('mobile') + "",
loginSource: getItem("loginSource"),
singleEquityId: singleEquityId.value,
equityId: equityId.value,
equityId: singleEquityId.value,
couponAgencyType: couponAgencyType.value,
couponId: couponId.value,
purchasedEquityId:purchasedEquityId.value

+ 1
- 0
utils/network/api.js 查看文件

@@ -442,6 +442,7 @@ export const regist = "/iaw/portal/register"; // 统一会员平台个人账号
// 我的页面
export const userInfoIndex = "/iaw/portal/getAccountInfoSimple"; //USER-获取用户个人简单信息
export const appPage = "/iaw/issue/order/wchatorderapppage" //app分页
export const orderinfosumquery = "/iaw/issue/order/orderinfosumquery" //个人订单信息数据查询(待发货,待收货,待激活,退换货)
//菜单配置
export const queryMenuConfig = '/iaw/rbac/menuListBySystemTypeAndOpenId'
export const getGlobalParam = "/iaw/rbac/portalConfigLoginSource" //全局配置

+ 77
- 2
utils/utils.ts 查看文件

@@ -218,12 +218,87 @@ export const getOrderStatusName = (status) => {
break;
}
}

//根据订单状态获取订单状态文字
export const getOrderStatusNameNew = (status) => {
switch (Number(status)) {
case Number(OrderStatus.完成填写基本信息):
return 'shenqingzhong';
break;
case Number(OrderStatus["完成个人/单位信息上传"]):
return 'shenqingzhong';
break;
case Number(OrderStatus.完成车辆信息上传):
return 'shenqingzhong';
break;
case Number(OrderStatus.待支付):
return 'daizhifu';
break;
case Number(OrderStatus.待支付3):
return 'shenqingzhong';
break;
case Number(OrderStatus.待支付2):
return 'daizhifu';
break;
case Number(OrderStatus.完成签约):
return 'finishqianyue';
break;
case Number(OrderStatus.待审核):
return 'daishenhe';
break;
case Number(OrderStatus.审核不通过):
return 'nopass';
break;
case Number(OrderStatus.待发货):
return 'daifanhuo';
break;
case Number(OrderStatus.待收货):
return 'daishouhuo';
break;
case Number(OrderStatus.待激活):
return 'dajihuo';
break;
case Number(OrderStatus.已完成):
return 'yiwancheng';
break;
case Number(OrderStatus["已申请-换货"]):
return 'huanhuozhong';
break;
case Number(OrderStatus["已申请-退货"]):
return 'tuihuozhong';
break;
case Number(OrderStatus.已结束):
return 'yijieshu';
break;
case Number(OrderStatus.退款中):
return 'tuikuanzhong';
break;
case Number(OrderStatus.退款成功):
return 'tuikuanchenggong';
break;
case Number(OrderStatus.退货成功):
return 'tuihuosuccess';
break;
case Number(OrderStatus["换货-设备已回收"]):
return 'huanhuochenggong';
break;
case Number(OrderStatus["完成车辆信息上传/待支付"]):
return 'daizhifu';
break;
case Number(OrderStatus["已支付/待签约"]):
return 'daiqianyue';
break;
default:
break;
}
}
//根据订单类型获取订单类型文字
export const getOrderTypeName = (orderType) => {
return OrderTypes[orderType];
}

//根据订单类型获取订单类型文字
export const getOrderTypeNameNew = (orderType) => {
return OrderTypesNew[orderType];
}
//根据车辆类型获取车辆名称
export const getCarTypeName = (carType : any) => {
switch (carType) {

Loading…
取消
儲存