DESKTOP-2IO5MST\huting 1 год назад
Родитель
Сommit
ea66925f8d

+ 2
- 2
composables/order/useOrderList.ts Просмотреть файл

@@ -5,7 +5,7 @@ import { onLoad, onShow, onUnload } from "@dcloudio/uni-app";
import { reactive, ref } from 'vue';
import { hasLogin, msg } from "@/utils/utils";
export default function useOrderList() {
const tabbarRef = ref<{ changeTab: (index: Number) => void }>()
const tabbarRef = ref<{ changeTab : (index : Number) => void }>()

const data = reactive({
//登录状态
@@ -22,10 +22,10 @@ export default function useOrderList() {
{ id: 3, name: '待激活' },
{ id: 4, name: '退款/换货' }
],

})

onLoad((option) => {
console.log("option", option)
if (!option.index) {
data.tabIndex = 0
} else {

+ 1
- 1
pages/order/components/order-list-item.vue Просмотреть файл

@@ -101,7 +101,7 @@
}

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

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

+ 32
- 27
pages/order/components/order-tabbar.vue Просмотреть файл

@@ -1,17 +1,17 @@
<!-- 切换的tabBar -->
<template>
<view class="tab-bar" @touchmove.stop.prevent="()=>{}">
<scroll-view id="nav-bar" class="noScorll bar-view" scroll-x :scroll-left="data.scrollLeft">
<view v-for="(item,index) in tabs" :key="item.id" :class="{active:index === curIndex}" class="bar-item"
:style="{width: `${data.itemWidth}px`}" @click="changeTab(index)">
{{item.name}}
</view>
<scroll-view id="nav-bar" class="noScorll bar-view" scroll-x :scroll-left="data.scrollLeft">
<view v-for="(item,index) in tabs" :key="item.id" :class="{active:index === curIndex}" class="bar-item"
:style="{width: `${data.itemWidth}px`}" @click="changeTab(index)">
{{item.name}}
</view>
</scroll-view>
</view>
</template>

<script setup lang="ts">
import {ref,watch, reactive, PropType} from 'vue'
import { ref, watch, reactive, PropType } from 'vue'

const emit = defineEmits(['update:curIndex'])
const props = defineProps({
@@ -22,7 +22,7 @@
},
//标签选项数组
tabs: {
type: Array as PropType<{ id: number; name: string }[]>,
type: Array as PropType<{ id : number; name : string }[]>,
default: () => []
}
})
@@ -41,16 +41,16 @@

/*监听标签数组变化,来计算每个标签占的宽度*/
watch(() => props.tabs, (newVal) => {
if (newVal && newVal.length < 5) {
if (newVal && newVal.length < 5) {
data.itemWidth = data.windowWidth / newVal.length
}
}, {immediate: true});
}, { immediate: true });


/* 改变tab refresh:点击同个tab是否刷新*/
const changeTab = (index,refresh?:boolean) => {
console.log("index",index)
if(refresh){
const changeTab = (index, refresh ?: boolean) => {
console.log("index", index)
if (refresh) {
uni.$emit("refreshOrder");
return;
}
@@ -71,26 +71,28 @@
padding-bottom: 8rpx;
// border-bottom: 1px solid #efeff4;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
z-index: 9990;
position: fixed;
left: 0;
// z-index: 9990;
// position: fixed;
// left: 0;
.bar-view {
width: 100%;
text-align: center;
background-color: white;
white-space: nowrap; /* +++ 不换行*/
white-space: nowrap;
/* +++ 不换行*/
position: sticky;
top:0;
top: 0;
.bar-item {
flex: 1; //平均分配
font-size: 28rpx;
line-height: 80rpx;
position: relative;
display: inline-block; /*+++ 在一行显示*/
display: inline-block;
/*+++ 在一行显示*/
min-width: 150rpx;
&:after {
position: absolute;
content: '';
@@ -107,21 +109,24 @@
transition: .3s;
}
}
.active {
// color: #00B38B;
font-weight: bold;
font-size:30rpx;
font-size: 30rpx;

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

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

&:last-child {
&:after {
width: 95%;
}
@@ -129,4 +134,4 @@
}
}
}
</style>
</style>

+ 70
- 9
pages/order/order.vue Просмотреть файл

@@ -1,34 +1,53 @@
<!-- 订单列表2 -->
<template>
<filter>
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录"
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录"
@btnClick="$util.navTo('/login/login')">
</empty-view>

<view class="list-wrapper" v-else>
<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
v-if="data.tabsList.length > 0" ></order-tabbar>
<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"></order-tabbar>
</view>


<order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh">
</order-list-item>
</view>
</filter>
</filter>
</template>

<script setup lang="ts">
import orderTabbar from "./components/order-tabbar.vue";
import orderListItem from "./components/order-list-item";
import useOrderList from "@/composables/order/useOrderList";
import filter from '@/components/filter/filter.vue';
import { onLoad} from "@dcloudio/uni-app";
import filter from '@/components/filter/filter.vue';
import { onLoad } from "@dcloudio/uni-app";
import {
reactive
} from "vue";
const {
data,
tabbarRef
} = useOrderList();
onLoad((option)=>{
const state = reactive({
tabActive: "小程序",
flowPathTabList: ["小程序", "线下网点"],
})
onLoad((option) => {
// console.log("option",option)
// data.tabIndex=option.index
})
const flowPathTabHandle = (tab) => {
state.tabActive = tab;
};
</script>

<style lang="scss">
@@ -41,5 +60,47 @@
}
</style>
<style lang="scss" scoped>
.list-wrapper {}
</style>
.top-content {
position: fixed;
left: 0;
z-index: 99999;
background-color: white;
}

.top-menu {
display: flex;
justify-content: space-around;
}

.top-menu .tab {
font-size: 28rpx;
padding: 30rpx 30rpx;
color: #666666;
position: relative;
}

.top-menu .active .border {
position: absolute;
width: 70%;
height: 16rpx;
background: #00b38b;
opacity: 0.3;
bottom: 28rpx;
z-index: -99;
left: 15%;
border-radius: 6rpx;
}

.top-menu .active {
font-weight: bold;
font-size: 32rpx;
color: #0d0f26;
}

.top-menu .active::before {
width: 100%;
height: 16rpx;
background: #00b38b;
opacity: 0.3;
}
</style>

+ 66
- 5
subpackage/after-sale/equipment-upgrade/select-car.vue Просмотреть файл

@@ -22,14 +22,17 @@
ref
} from "vue"
import {
navTo
navTo, msg
} from "@/utils/utils"
import {
onLoad,
onShow
} from "@dcloudio/uni-app";
import {
orderList
orderList,
workOrderList,
userInfoQuery,
searchVehicleInfo
} from "@/utils/network/api.js";
import {
request
@@ -44,15 +47,38 @@
} from "@/utils/network/encryption";

const state = reactive({
list: []
list: [],
businessType: "",
customerId: "",
vehiclePlate: "",
vehiclePlateColor: ""
});
onLoad(() => {
state.businessType = getItem('key')['DASP_PUSH_TYPE'][0]['code']
quanCheckActionTrue().then((item : any) => {
state.list = item.data
console.log(item)

})
});

const searchVehicleInfoQuery = (vehicleId) => {
const options = {
type: 2,
data: {
vehicleId: vehicleId
},
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(searchVehicleInfo, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
const quanCheckActionTrue = () => {
let source = ""
// #ifdef MP-ALIPAY
@@ -87,8 +113,43 @@
const flag = ref('0')

const choose = (i, item) => {
console.log(item.cardId)
navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${item.id}`)
let id = item.id
searchVehicleInfoQuery(item.vehicleId).then((item : any) => {
console.log("====", item.vehicles[0])
state.customerId = item.vehicles[0]['customerId']
state.vehiclePlate = item.vehicles[0]['vehiclePlate']
state.vehiclePlateColor = item.vehicles[0]['vehiclePlateColor']
isWorkOrder().then((item : any) => {
console.log("查询是否有工单", item)
if (item.data) {
if (item.data[0]['status'] == '0') {
navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${id}&workId=${item.data[0]['id']}`)
}
} else {
msg('暂无工单')
}
})
})
}
const isWorkOrder = () => {
var data = {
vehiclePlate: state.vehiclePlate,
vehiclePlateColor: state.vehiclePlateColor,
customerId: state.customerId,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(workOrderList, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
</script>


+ 26
- 3
subpackage/after-sale/equipment-upgrade/upgrade-confirm.vue Просмотреть файл

@@ -101,7 +101,8 @@
modifyObuSysInfo,
modifyObuVehicleInfo,
obuActivation,
obuWriteAgain
obuWriteAgain,
changeWorkOrderStatus
} from "@/utils/network/api.js";

import {
@@ -121,7 +122,7 @@
showPopup: false,
flag: false,
disabled: false,
workId: ""
})
const orderInfos = reactive({
orderId: "",
@@ -172,9 +173,11 @@
});
let cmdRandNum = '';
onLoad((option) => {
console.log("options", option)
//请求订单详情
queryOrderDetail(option.id);
getOrderDetails(option.id)
state.workId = option.workId
});

onShow((option) => {
@@ -500,7 +503,9 @@
tools.hideLoadingAlert();
console.log("在线激活 请求", res);
if (res[0] == "9000") {
state.showPopup = true;
changeWorkOrderStatusRequest().then(() => {
state.showPopup = true;
})
}
});
})
@@ -549,6 +554,24 @@
}
});
};
const changeWorkOrderStatusRequest = () => {
var data = {
id: state.workId,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(changeWorkOrderStatus, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
</script>

<style>

+ 6
- 5
subpackage/orders/apply-ex-goods.vue Просмотреть файл

@@ -73,11 +73,12 @@
value: "ON_LINE",
name: "线上",
},
{
checked: false,
value: "OFFLINE",
name: "线下",
},
// 取消线下网点退货,隐藏对应模式,不要删除,后期可能还会重提业务修改
// {
// checked: false,
// value: "OFFLINE",
// name: "线下",
// },
],
},


+ 34
- 7
subpackage/personal-center/car-message-change.vue Просмотреть файл

@@ -240,7 +240,8 @@
ocrAllQuery,
etcCarOcrCard,
searchVehicleInfo,
carChangeApi
carChangeApi,
creactWorkOrder
} from "@/utils/network/api.js";

import {
@@ -391,6 +392,7 @@
outlineH: "",
isEnableChangeOCRCarInfo: false, //申办时是否允许修改OCR识别出来的车辆信息数据
// allData: {}
businessType: "",
});
const searchVehicleInfoQuery = () => {
const options = {
@@ -473,6 +475,8 @@
getGlobalParam(); //全局配置数据
console.log("option", option)
searchVehicleInfoQuery(); //车辆信息查询
state.businessType = getItem('key')['DASP_PUSH_TYPE'][0]['code']
console.log("getItem('key')['DASP_PUSH_TYPE']", getItem('key')['DASP_PUSH_TYPE'])
});

//监听页面滚动
@@ -725,18 +729,41 @@
request(carChangeApi, options)
.then((res) => {
const data = stringToJson(res.bizContent);
msg("车辆信息变更成功")
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 2000)
// 创建工单
creactWorkOrderRequest().then((val : any) => {
msg("车辆信息变更成功")
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 2000)
})
})
.catch((res) => {
console.log(res);
});
};
const creactWorkOrderRequest = () => {
const options = {
type: 2,
data: {
businessType: state.businessType,
vehiclePlate: state.form.vehicleIdNum,
vehiclePlateColor: state.vehiclePlateColor,
customerId: state.form.customerId
},
method: "POST",
showLoading: true,
};

return new Promise(async (resolve, reject) => {
const res = await request(creactWorkOrder, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
const selectConfirm = (index : any) => {
console.log(index);
state.form.useUserType = state.actionSheetList[index].value;

+ 16
- 10
subpackage/personal-center/setting/change-phone.vue Просмотреть файл

@@ -10,14 +10,14 @@
<input class="input" v-model="state.phone" focus placeholder="请输入手机号" placeholder-class="form-placeholder"
type="number" maxlength="11" />
</view>
<view class="tips">* 仅修改账号手机号,不能修改etc预留手机号</view>
<view class="agreement">
<checkbox-group @change="checkboxChange" class="group">
<checkbox :checked="state.checked" color="#00B38B" style="transform:scale(0.85)">
</checkbox>
<label>我已阅读并同意</label>
</checkbox-group>
<!-- <view class="txt-grey">我已阅读并同意</view> -->
<view class="txt-green" @click="toRead">《平台用户服务隐私协议》</view>
</view>
</view>
@@ -50,14 +50,14 @@
checked: false, //是否勾选阅读协议
});

const checkboxChange = (e) => {
console.log(e);
state.checked = !state.checked;
};
// 去协议页面
const toRead=()=>{
const toRead = () => {
navTo("/login/agreement")
}

@@ -88,12 +88,12 @@
.then((res) => {
msg("验证码发送成功!");
// #ifdef MP-ALIPAY
navTo(`/subpackage/personal-center/setting/change-phone-code-ali?phone=${state.phone}`);
navTo(`/subpackage/personal-center/setting/change-phone-code-ali?phone=${state.phone}`);
// #endif
// #ifdef MP-WEIXIN
navTo(`/subpackage/personal-center/setting/change-phone-code?phone=${state.phone}`);
navTo(`/subpackage/personal-center/setting/change-phone-code?phone=${state.phone}`);
// #endif
})
.catch((err) => {
console.log(err);
@@ -102,11 +102,17 @@
</script>

<style lang="scss" scoped>
.tips {
color: red;
padding: 30rpx 20rpx 0rpx 0rpx;
font-size: 30rpx;
}

.group {
display: flex;
align-items: center;
}
.register-main {
border-top: 1rpx solid #dcdcdc;
padding: 78rpx 30rpx 50rpx;
@@ -184,4 +190,4 @@
.btn {
margin: 200rpx 40rpx 0px;
}
</style>
</style>

+ 17
- 18
subpackage/personal-center/setting/personal-information/corrections.vue Просмотреть файл

@@ -2,50 +2,50 @@
<template v-for="(col,index) in list" :key="index">
<view class="title">{{col.title}}</view>
<u-cell-group>
<u-cell-item :title="item.title" v-for="(item,i) in col.columns" :key="i"
@click="itemClick(item)" :titleStyle="titleStyle"></u-cell-item>
<u-cell-item :title="item.title" v-for="(item,i) in col.columns" :key="i" @click="itemClick(item)"
:titleStyle="titleStyle"></u-cell-item>
</u-cell-group>
</template>
</template>

<script setup lang="ts">
import { msg, navTo } from '@/utils/utils';
const titleStyle = {fontSize:'28rpx',color:'#333333'};
const titleStyle = { fontSize: '28rpx', color: '#333333' };
const basePath = "/subpackage/personal-center/setting/";
const list = [
{
title:'账号信息',
columns:[
{title:'手机号码',path:'change-phone',login:true},
title: '账号信息',
columns: [
{ title: '账号手机号修改', path: 'change-phone', login: true },
]
},
{
title:'基础信息',
columns:[
{title:'用户信息变更',path:'personal-information/user-change',login:true},
title: '基础信息',
columns: [
{ title: '用户信息变更', path: 'personal-information/user-change', login: true },
// {title:'补传身份证',path:'personal-information/user-card',login:true},
]
},
]
/* item点击 */
const itemClick = (item) => {
if(!item.path){
if (!item.path) {
msg('找不到该界面哦!');
return;
}
if(item.path === 'phone'){
if (item.path === 'phone') {
msg('小程序唤起手机号更变');
return;
}
navTo(basePath + item.path,item.login);
navTo(basePath + item.path, item.login);
}
</script>

<style>
page{
page {
background: #EEF7F7;
}
</style>
@@ -60,5 +60,4 @@
padding-top: 30rpx;
padding-left: 30rpx
}

</style>
</style>

+ 28
- 21
subpackage/personal-center/setting/personal-information/user-change.vue Просмотреть файл

@@ -3,23 +3,24 @@
<u-field required labelWidth="180" v-model="state.ocrData.name" input-align='right' label="姓名" disabled
:fieldStyle="fieldStyle">
</u-field>
<!-- <u-field required labelWidth="180" v-model="state.ocrData.gender" input-align='right' label="性别"
<!-- <u-field required labelWidth="180" v-model="state.ocrData.gender" input-align='right' label="性别"
:fieldStyle="fieldStyle">
</u-field> -->
<u-field required labelWidth="180" v-model="state.ocrData.userCardId" input-align='right' label="身份证号"
:fieldStyle="fieldStyle" disabled>
</u-field>
<!-- <u-field required labelWidth="180" v-model="state.ocrData.add" input-align='right' label="地址"
<!-- <u-field required labelWidth="180" v-model="state.ocrData.add" input-align='right' label="地址"
:fieldStyle="fieldStyle">
</u-field> -->

<!-- <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
<!-- <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
:titleStyle="{fontSize:'28rpx',color:'#777777'}" :valueStyle="{fontSize:'28rpx',color:'#333333'}"
:value="state.ocrData.type"></u-cell-item> -->
<u-field required labelWidth="180" :borderTop="true" v-model="state.ocrData.tel" input-align='right'
label="联系方式" :fieldStyle="fieldStyle" disabled>
</u-field>
</view>
<view class="tips">* 修改的是etc预留手机号,不能修改登录账号手机号,修改后需要到票根网重新实名</view>
</view>

<view class="subBtn">
<submit-button title="去修改" form-type="submit" @submit="formSubmit">
@@ -40,7 +41,7 @@
import {
userInfoQuery
} from "@/utils/network/api.js";
import{
import {
getItem
} from "@/utils/storage.ts"
import {
@@ -51,33 +52,33 @@
color: '#333333',
fontSize: '28rpx'
};
import {onLoad} from"@dcloudio/uni-app"
import { onLoad } from "@dcloudio/uni-app"
const state = reactive({
ocrData: {
name:'',
gender:'',
userCardId:'',
add:"",
tel:''
name: '',
gender: '',
userCardId: '',
add: "",
tel: ''

},
customerId:''
customerId: ''
})

const getUserinfo = () => {
const options = {
type: 2,
data: {openId: getItem('openId')},
data: { openId: getItem('openId') },
method: "POST",
showLoading: true,
};
request(userInfoQuery, options).then((res) => {
const data = stringToJson(res.bizContent);
console.log(data,"用户信息");
state.ocrData.name=data.list[0].customerName
state.ocrData.userCardId=data.list[0].customerIdNum
state.ocrData.tel=data.list[0].tel
state.customerId=data.list[0].customerId
console.log(data, "用户信息");
state.ocrData.name = data.list[0].customerName
state.ocrData.userCardId = data.list[0].customerIdNum
state.ocrData.tel = data.list[0].tel
state.customerId = data.list[0].customerId
});
}

@@ -90,8 +91,8 @@
const formSubmit = () => {
navTo(`/subpackage/personal-center/setting/personal-information/user-card?customerId=${state.customerId}`)
};
onLoad(()=>{
onLoad(() => {
getUserinfo()
})
</script>
@@ -119,4 +120,10 @@
.subBtn {
padding: 500rpx 40rpx 60rpx;
}
</style>

.tips {
color: red;
padding: 20rpx 28rpx 20rpx 16rpx;
font-size: 30rpx;
}
</style>

+ 4
- 1
utils/network/api.js Просмотреть файл

@@ -280,4 +280,7 @@ export const transferSure = "11c38395b6244a11910beca537262780 " //过户激活
export const transferApply = "fc4f88f8f2e947b197ed8011ce27cb07" //过户激活申请
export const accountApi = "9b7e8508229b492f8dd588e0a4180334" //对公账户查询
export const queryPhoneApi = "068cf4d1a26f4c2ba37dcf92c7519f88" //对公账户忘记密码查询手机号
export const forgetPassApi = "edaf323b75ba4a2490c242305d692b40" //对公账户忘记密码提交
export const forgetPassApi = "edaf323b75ba4a2490c242305d692b40" //对公账户忘记密码提交
export const creactWorkOrder = "c0e9940b350a44c8a60c7d57691658d5" //创建工单
export const workOrderList = "9cc56a94b9e342228a89e389303f0898" //查询是否有工单
export const changeWorkOrderStatus = "154c93c9474046dc8c397c35f641e97c" //修改工单

Загрузка…
Отмена
Сохранить