This commit is contained in:
tx 2024-10-16 17:49:16 +08:00
parent 6c5456615b
commit ea72be6625
12 changed files with 903 additions and 319 deletions

View File

@ -9,8 +9,9 @@ const install = (Vue, vm) => {
// 测试环境 // 测试环境
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api', // baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
// 俞山岛 // 俞山岛
baseUrl: 'https://testzc.chuangtewl.com/prod-api',
// baseUrl: 'http://47.120.68.19:8090', // baseUrl: 'http://47.120.68.19:8090',
baseUrl: 'http://192.168.2.228:8090', // baseUrl: 'http://192.168.2.20:8090',
// 创特 // 创特
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 10000, loadingTime: 10000,

View File

@ -35,9 +35,11 @@
// //
tabberPageLoadFlag: [], tabberPageLoadFlag: [],
ispop: false, ispop: false,
AccountInfo:{}
} }
}, },
mounted() { mounted() {
this.getAccountInfo()
this.currentTabbarIndex = this.indexs this.currentTabbarIndex = this.indexs
// const index = Number(this.indexs || 0) // const index = Number(this.indexs || 0)
// // tabbar // // tabbar
@ -47,12 +49,27 @@
// this.changeTabbar(index) // this.changeTabbar(index)
}, },
methods:{ methods:{
getAccountInfo(){
this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
if (res.code === 200) {
this.AccountInfo=res.data
} else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
});
},
changeTabbar(index) { changeTabbar(index) {
let that =this let that =this
if (this.currentTabbarIndex === index) return if (this.currentTabbarIndex === index) return
// this._switchTabbarPage(index) // this._switchTabbarPage(index)
if(this.AccountInfo.userId){
if(index==0){ if(index==0){
uni.redirectTo({ uni.redirectTo({
url:'/pages/index/index', url:'/pages/index/index',
@ -71,6 +88,13 @@
} }
}) })
} }
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
}, },
} }
} }

View File

@ -51,7 +51,7 @@
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"libVersion" : "latest", "libVersion" : "latest",
"appid" : "wx21a50f113c30d41a", "appid" : "wxc89e4a21f3907a53",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : true "minified" : true

View File

@ -186,6 +186,18 @@
} }
}, },
methods: { methods: {
callPhone(phone) {
uni.makePhoneCall({
phoneNumber: phone
})
},
todetal(item){
uni.navigateTo({
url:'/page_Delivery/OrderDetail?orderNo='+item.orderNo
})
},
getDetail(){ getDetail(){
this.$u.get(`appAdmin/deliveryOrderinfo/` + this.deliveryId).then((res) => { this.$u.get(`appAdmin/deliveryOrderinfo/` + this.deliveryId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -203,16 +215,11 @@
} }
}); });
}, },
todetal(item){
uni.navigateTo({
url:'/page_Delivery/OrderDetail?orderNo='+item.orderNo
})
},
goDeli(item) { goDeli(item) {
this.$u.get(`appAdmin/inDelivery?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/inDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getDetail()
uni.showToast({ uni.showToast({
title: '开始配送', title: '开始配送',
icon: 'none', icon: 'none',
@ -230,10 +237,10 @@
}); });
}, },
overDeli(item) { overDeli(item) {
this.$u.get(`appAdmin/endDelivery?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/endDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getDetail()
uni.showToast({ uni.showToast({
title: '配送完成', title: '配送完成',
icon: 'none', icon: 'none',
@ -251,10 +258,10 @@
}); });
}, },
getOrder(item) { getOrder(item) {
this.$u.get(`appAdmin/orderTaking?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/orderTaking?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getDetail()
uni.showToast({ uni.showToast({
title: '接单成功', title: '接单成功',
icon: 'none', icon: 'none',
@ -292,7 +299,7 @@
if (num == 0) { if (num == 0) {
result.text = '待接单'; result.text = '待接单';
result.color = '#F14C4C'; // result.color = '#F14C4C'; //
} else if (num == 1) { } else if (num == 1) {w
result.text = '待配送'; result.text = '待配送';
result.color = '#F38C42'; // result.color = '#F38C42'; //
} else if (num == 2) { } else if (num == 2) {

View File

@ -150,13 +150,19 @@
this.getList() this.getList()
}, },
methods: { methods: {
callPhone(phone) {
uni.makePhoneCall({
phoneNumber: phone
})
},
todetal(item){ todetal(item){
uni.navigateTo({ uni.navigateTo({
url:'/page_Delivery/OrderDetail?deliveryId='+item.deliveryId url:'/page_Delivery/OrderDetail?deliveryId='+item.deliveryId
}) })
}, },
goDeli(item) { goDeli(item) {
this.$u.get(`appAdmin/inDelivery?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/inDelivery?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
@ -177,7 +183,7 @@
}); });
}, },
overDeli(item) { overDeli(item) {
this.$u.get(`appAdmin/endDelivery?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/endDelivery?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
@ -198,7 +204,7 @@
}); });
}, },
getOrder(item) { getOrder(item) {
this.$u.get(`appAdmin/orderTaking?orderNo=` + this.item.orderNo).then((res) => { this.$u.post(`appAdmin/orderTaking?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
@ -280,7 +286,7 @@
this.tabindex = index this.tabindex = index
console.log(item, 'aaa'); console.log(item, 'aaa');
this.tabstause = item.value this.tabstause = item.value
// this.getList(); // this.getList(); //
}, },
getList() { getList() {

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="店铺管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45'></u-navbar> <u-navbar title="店铺管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar>
<view class="card"> <view class="card">
<view class="card_li"> <view class="card_li">
<view class="word"> <view class="word">
@ -81,9 +82,11 @@
</view> </view>
</view> </view>
<view class="up_rignt"> <view class="up_rignt">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u08cpfIllwweGcS9awYP" mode="" v-if="data.picture==''" @click="btn()"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/u08cpfIllwweGcS9awYP" mode=""
v-if="data.picture==''" @click="btn()"></image>
<image :src="data.picture" mode="" v-else></image> <image :src="data.picture" mode="" v-else></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uFp9riSLtpmuq6gyKfdr" mode="" class="close" v-if="data.picture!=''" @click="data.picture=''"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uFp9riSLtpmuq6gyKfdr" mode="" class="close"
v-if="data.picture!=''" @click="data.picture=''"></image>
</view> </view>
</view> </view>
</view> </view>
@ -91,10 +94,10 @@
保存 保存
</view> </view>
<u-picker mode="region" v-model="showcity" @confirm="confirm2"></u-picker> <u-picker mode="region" v-model="showcity" @confirm="confirm2"></u-picker>
<u-picker mode="time" v-model="time" :params="params" @confirm="confirm" title='请选择营业开始时间' :default-time='pickertime' <u-picker mode="time" v-model="time" :params="params" @confirm="confirm" title='请选择营业开始时间'
></u-picker> :default-time='pickertime'></u-picker>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1" title='请选择营业结束时间' :default-time='pickertime1' <u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1" title='请选择营业结束时间'
></u-picker> :default-time='pickertime1'></u-picker>
</view> </view>
</template> </template>
@ -437,6 +440,7 @@
font-size: 40rpx; font-size: 40rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.card { .card {
padding: 44rpx 36rpx; padding: 44rpx 36rpx;
margin: 0 auto; margin: 0 auto;
@ -445,6 +449,7 @@
// height: 1262rpx; // height: 1262rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
.card_lis { .card_lis {
padding-top: 24rpx; padding-top: 24rpx;
display: flex; display: flex;
@ -453,12 +458,14 @@
justify-content: space-between; justify-content: space-between;
// border-bottom: 1rpx solid #D8D8D8 ; // border-bottom: 1rpx solid #D8D8D8 ;
padding-bottom: 18rpx; padding-bottom: 18rpx;
.up_left { .up_left {
.txt1 { .txt1 {
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.txt2 { .txt2 {
margin-top: 16rpx; margin-top: 16rpx;
font-weight: 400; font-weight: 400;
@ -466,16 +473,19 @@
color: #3D3D3D; color: #3D3D3D;
} }
} }
.up_rignt { .up_rignt {
border-radius: 10rpx; border-radius: 10rpx;
position: relative; position: relative;
border: 1rpx solid #808080; border: 1rpx solid #808080;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
image { image {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.close { .close {
background: #FFFFFF; background: #FFFFFF;
// border-radius: 50%; // border-radius: 50%;
@ -486,6 +496,7 @@
height: 25rpx; height: 25rpx;
} }
} }
.card_left { .card_left {
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
@ -496,13 +507,16 @@
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
span { span {
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.input { .input {
text-align: right; /* 输入框内容靠右显示 */ text-align: right;
/* 输入框内容靠右显示 */
} }
} }
} }
@ -513,12 +527,14 @@
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
.word { .word {
width: 128rpx; width: 128rpx;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.ipt { .ipt {
padding-left: 10rpx; padding-left: 10rpx;
display: flex; display: flex;
@ -532,6 +548,7 @@
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;
.input { .input {
width: 100%; width: 100%;
} }

View File

@ -181,7 +181,7 @@
</view> </view>
<view class="info"> <view class="info">
<view class="info_top"> <view class="info_top">
{{staReturn(item.statusChange)}}- {{item.amountChange}} {{item.details}}
</view> </view>
<view class="info_bot"> <view class="info_bot">
2024-09-11 13:56:03 2024-09-11 13:56:03
@ -244,9 +244,27 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bot_btn"> <view class="order_code" >
<view class="btn"> <view class="tits">
立即接单 配送信息
</view>
<view class="code_li" v-if='orderInfo.deliveryOrder'>
<view class="code">
配送状态 {{typeReturns(orderInfo.deliveryOrder.status).text}}
</view>
</view>
<view class="code_li">
<view class="code">
配送人员 {{orderInfo.deliveryOrder.deliveryman?orderInfo.deliveryOrder.deliveryman:'--'}}
</view>
</view>
<view class="code_li">
<view class="code">
联系电话 {{orderInfo.deliveryOrder.deliverymanPhone?orderInfo.deliveryOrder.deliverymanPhone:'--'}}
</view>
</view> </view>
</view> </view>
<u-mask :show="showcs" @click="showcs = false" :z-index='100' /> <u-mask :show="showcs" @click="showcs = false" :z-index='100' />
@ -364,7 +382,17 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bot_btn" v-if="orderInfo.deliveryOrder.status!=3">
<view class="btn" @click="getOrder()" v-if="orderInfo.deliveryOrder.status==0">
立即接单
</view>
<view class="btn" @click.stop="goDeli(orderInfo)" v-if="orderInfo.deliveryOrder.status==1&&orderInfo.deliveryOrder.deliverymanPhone==AccountInfo.phonenumber">
立即配送
</view>
<view class="btn" v-if="orderInfo.deliveryOrder.status==2&&orderInfo.deliveryOrder.deliverymanPhone==AccountInfo.phonenumber" @click.stop="overDeli(orderInfo)">
配送完成
</view>
</view>
</view> </view>
</template> </template>
@ -375,7 +403,7 @@
return { return {
typeidx: 1, typeidx: 1,
height: 0, height: 0,
showtips: true, showtips: false,
orderNo:"", orderNo:"",
orderInfo:{}, orderInfo:{},
modelInfo:{}, modelInfo:{},
@ -383,8 +411,9 @@
deliveryFee:0, deliveryFee:0,
dispatchFee:0, dispatchFee:0,
leaseFee:0, leaseFee:0,
showcs:true, showcs:false,
csmoney:0 csmoney:0.,
AccountInfo:{}
} }
}, },
onShow() { onShow() {
@ -394,10 +423,114 @@
if(e.orderNo){ if(e.orderNo){
this.orderNo=e.orderNo this.orderNo=e.orderNo
this.getOrderInfo() this.getOrderInfo()
this.getAccountInfo()
} }
}, },
methods: { methods: {
typeReturns(num) {
console.log(num,'aaaaaaaaaaaa');
let result = {
text: '',
color: '#4297F3' //
};
if (num == 0) {
result.text = '待接单';
result.color = '#F14C4C'; //
} else if (num == 1) {
result.text = '待配送';
result.color = '#F38C42'; //
} else if (num == 2) {
result.text = '配送中';
result.color = '#4297F3'; //
} else if (num == 3) {
result.text = '已完成';
result.color = '#000000'; //
} else if (num == 8) {
result.text = '已取消';
result.color = '#ccc'; //
}
return result;
},
getAccountInfo(){
this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
if (res.code === 200) {
this.AccountInfo=res.data
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
goDeli(item) {
this.$u.post(`appAdmin/inDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
this.getOrderInfo()
uni.showToast({
title: '开始配送',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
overDeli(item) {
this.$u.post(`appAdmin/endDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
this.getOrderInfo()
uni.showToast({
title: '配送完成',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getOrder(item) {
this.$u.post(`appAdmin/orderTaking?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
this.getOrderInfo()
uni.showToast({
title: '接单成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
backyj(){ backyj(){
this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => { this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -642,6 +775,40 @@
.page { .page {
width: 750rpx; width: 750rpx;
padding-bottom: 220rpx; padding-bottom: 220rpx;
.order_code {
width: 696rpx;
margin: 0 auto;
margin-top: 16rpx;
padding: 20rpx 28rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.tits {
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
.code_li {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
.code {
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
.btn {
font-weight: 400;
font-size: 28rpx;
color: #4297F3;
}
}
}
.tip_box { .tip_box {
position: fixed; position: fixed;
left: 72rpx; left: 72rpx;

View File

@ -128,6 +128,7 @@
page {} page {}
.page { .page {
padding-bottom: 170rpx;
.modelCard { .modelCard {
margin-top: 22rpx; margin-top: 22rpx;
width: 750rpx; width: 750rpx;

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="车辆管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' <u-navbar title="车型编辑" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar> height='45'></u-navbar>
<view class="card"> <view class="card">
<view class="card_li"> <view class="card_li">
@ -8,23 +8,25 @@
车型名称 车型名称
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="text" v-model="data.model" placeholder="请输入SN码" class="input" <input type="text" v-model="data.model" placeholder="请输入车型名称" class="input"
placeholder-style="color:#C7CDD3"> placeholder-style="color:#C7CDD3">
</view> </view>
</view> </view>
<view class="card_li" style="margin-top: 30rpx;"> <view class="card_li" style="margin-top: 30rpx;">
<view class="up_left"> <view class="up_left">
<view class="txt1"> <view class="txt1">
上传门头照 上传车辆照片
</view> </view>
<view class="txt2"> <view class="txt2">
门头照片必须清晰方正易于辨识 门头照片必须清晰方正易于辨识
</view> </view>
</view> </view>
<view class="up_rignt"> <view class="up_rignt">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u08cpfIllwweGcS9awYP" mode="" v-if="data.picture==''" @click="btn()"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/u08cpfIllwweGcS9awYP" mode=""
v-if="data.picture==''" @click="btn()"></image>
<image :src="data.picture" mode="" v-else></image> <image :src="data.picture" mode="" v-else></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uFp9riSLtpmuq6gyKfdr" mode="" class="close" v-if="data.picture!=''" @click="data.picture=''"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uFp9riSLtpmuq6gyKfdr" mode="" class="close"
v-if="data.picture!=''" @click="data.picture=''"></image>
</view> </view>
</view> </view>
</view> </view>
@ -34,7 +36,7 @@
最高电压 最高电压
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="text" v-model="searchKeyword" placeholder="请输入电压" class="input" <input type="text" v-model="data.fullVoltage" placeholder="请输入电压" class="input"
placeholder-style="color:#C7CDD3"><span> v</span> placeholder-style="color:#C7CDD3"><span> v</span>
</view> </view>
</view> </view>
@ -43,7 +45,7 @@
最低电压 最低电压
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="text" v-model="searchKeyword" placeholder="请输入电压" class="input" <input type="text" v-model="data.lowVoltage" placeholder="请输入电压" class="input"
placeholder-style="color:#C7CDD3"><span> v</span> placeholder-style="color:#C7CDD3"><span> v</span>
</view> </view>
</view> </view>
@ -52,11 +54,31 @@
满电续航 满电续航
</view> </view>
<view class="card_right"> <view class="card_right">
<input type="text" v-model="searchKeyword" placeholder="请输入续航公里" class="input" <input type="text" v-model="data.fullEndurance" placeholder="请输入续航公里" class="input"
placeholder-style="color:#C7CDD3"> placeholder-style="color:#C7CDD3">
<span> KM</span> <span> KM</span>
</view> </view>
</view> </view>
<view class="card_li">
<view class="card_left">
押金
</view>
<view class="card_right">
<input type="text" v-model="data.deposit" placeholder="请输入押金金额" class="input"
placeholder-style="color:#C7CDD3">
<span> </span>
</view>
</view>
<view class="card_li">
<view class="card_left">
车型简介
</view>
<view class="card_right">
<input type="text" v-model="data.description" placeholder="请输入车型简介" class="input"
placeholder-style="color:#C7CDD3">
</view>
</view>
</view> </view>
<!-- <view class="card"> <!-- <view class="card">
<view class="card_li"> <view class="card_li">
@ -72,11 +94,13 @@
</view> --> </view> -->
<view class="card"> <view class="card">
<view class="card_li"> <view class="card_li" @click="showpart=true">
<view class="card_left"> <view class="card_left">
车辆配件 车辆配件
</view> </view>
<view class="card_right"> <view class="card_right">
<span v-if="data.accessoryIds.length>0">{{getAccessoryNames()}}</span>
<view class="iconfont icon-xiangyou1 " style="color: #CBCBCB;"> <view class="iconfont icon-xiangyou1 " style="color: #CBCBCB;">
</view> </view>
@ -84,7 +108,7 @@
</view> </view>
</view> </view>
<u-mask :show="showpart" @click="closevehicle()" :z-index='100' /> <u-mask :show="showpart" :z-index='100' />
<view class="choose_part" v-if="showpart"> <view class="choose_part" v-if="showpart">
<view class="tit"> <view class="tit">
选择配件 选择配件
@ -107,7 +131,7 @@
<view class="btn1"> <view class="btn1">
取消 取消
</view> </view>
<view class="btn2"> <view class="btn2" @click="sub">
保存 保存
</view> </view>
</view> </view>
@ -130,20 +154,22 @@
fullVoltage: "", fullVoltage: "",
lowVoltage: "", lowVoltage: "",
fullEndurance: "", fullEndurance: "",
remark:"", accessoryIds: [],
intro:"",
deposit: "", deposit: "",
picture: "", picture: "",
description: "", description: "",
}, },
token: '', token: '',
upurl:'' upurl: '',
modelId: ''
} }
}, },
onLoad(e) { onLoad(e) {
if (e.modelId) { if (e.modelId) {
console.log(e);
this.modelId = e.modelId
this.getmodelInfo()
} }
this.getQiniuToken() this.getQiniuToken()
}, },
@ -153,6 +179,71 @@
}, },
methods: { methods: {
getmodelInfo() {
let data = {
modelId: this.modelId
}
this.$u.get("app/getModelById?", data).then((res) => {
if (res.code == 200) {
this.data = res.data
if (this.data.accessorys && this.data.accessorys.length > 0) {
this.data.accessoryIds = this.data.accessorys.map(accessory => accessory.accessoryId);
} else {
// accessoryIds
this.data.accessoryIds = [];
}
this.chooseIdxArr = this.data.accessoryIds.map(accessoryId => {
// Accessorylist accessoryId
const index = this.Accessorylist.findIndex(item => item.accessoryId ==
accessoryId);
return index > -1 ? index : null; // null
}).filter(idx => idx !== null); // null
// chooseIdxArr
console.log('选中的索引数组:', this.chooseIdxArr);
// getAccessoryNames
const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
const selectedAccessoryNames = this.getAccessoryNames(selectedAccessoryIds);
console.log(this.data.accessorys,'this.data.accessorysthis.data.accessorysthis.data.accessorys');
}
});
},
sub() {
if (!this.data.model) {
uni.showToast({
title: '请填写车型名称',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.deposit) {
uni.showToast({
title: '请填写押金',
icon: 'none',
duration: 2000
});
return;
}
this.$u.post("appAgent/model/save", this.data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 1000
});
setTimeout(() => {
uni.navigateBack()
}, 1200)
}
});
},
btn() { btn() {
let _this = this let _this = this
let math = 'static/' + _this.$u.guid(20) let math = 'static/' + _this.$u.guid(20)
@ -202,7 +293,8 @@
}, },
subacc() { subacc() {
this.showpart = false
console.log(this.chooseIdxArr);
}, },
chooseAcc(itm, idx) { chooseAcc(itm, idx) {
const index = this.chooseIdxArr.indexOf(idx); const index = this.chooseIdxArr.indexOf(idx);
@ -213,11 +305,51 @@
// //
this.chooseIdxArr.push(idx); this.chooseIdxArr.push(idx);
} }
// accessoryId
const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
console.log(selectedAccessoryIds, 'selectedAccessoryIds');
// accessoryId
// const selectedAccessoryIdsStr = selectedAccessoryIds.join(',');
this.data.accessoryIds = selectedAccessoryIds
// console.log(selectedAccessoryIdsStr,'selectedAccessoryIdsStrselectedAccessoryIdsStr');''
//
// if (selectedAccessoryIdsStr === this.data.accessoryIds) {
// console.log('');
// } else {
// console.log('');
// }
},
getAccessoryNames(accessoryIds) {
// accessoryIds Accessorylist name
// accessoryIds id Accessorylist name
const accessoryNames = this.data.accessoryIds.map(id => {
const item = this.Accessorylist.find(accessory => accessory.accessoryId === id);
return item ? item.name : '';
});
// name
return accessoryNames.filter(name => name).join(', ');
}, },
getAccessorylist() { getAccessorylist() {
this.$u.get(`appAgent/getAccessorylist`).then((res) => { this.$u.get(`appAgent/getAccessorylist`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.Accessorylist = res.data this.Accessorylist = res.data
console.log( this.data.accessoryIds);
this.chooseIdxArr = this.data.accessoryIds.map(accessoryId => {
// Accessorylist accessoryId
const index = this.Accessorylist.findIndex(item => item.accessoryId ==
accessoryId);
return index > -1 ? index : null; // null
}).filter(idx => idx !== null); // null
// chooseIdxArr
console.log('选中的索引数组:', this.chooseIdxArr);
// getAccessoryNames
const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
const selectedAccessoryNames = this.getAccessoryNames(selectedAccessoryIds);
console.log('选中的配件名称:', selectedAccessoryNames);
} else { } else {
// //
} }
@ -403,6 +535,7 @@
width: 110rpx; width: 110rpx;
height: 110rpx; height: 110rpx;
} }
.close { .close {
background: #FFFFFF; background: #FFFFFF;
// border-radius: 50%; // border-radius: 50%;

View File

@ -181,7 +181,8 @@
</view> </view>
<view class="info"> <view class="info">
<view class="info_top"> <view class="info_top">
{{staReturn(item.statusChange)}}- {{item.amountChange}}
{{item.details}}
</view> </view>
<view class="info_bot"> <view class="info_bot">
2024-09-11 13:56:03 2024-09-11 13:56:03

View File

@ -6,7 +6,7 @@
<view class="tit"> <view class="tit">
运营概览 运营概览
</view> </view>
<view class="data_box"> <!-- <view class="data_box">
<view class="data1"> <view class="data1">
近7天 近7天
</view> </view>
@ -17,6 +17,20 @@
近30天 近30天
</view> </view>
</view> -->
<view class="top_box">
<view class="left_text">
时间范围
</view>
<view class="timebox">
<view class="left_time" @click="time1=true">
{{firsTime}}
</view>
-
<view class="right_time" @click="time2=true">
{{lasTime}}
</view>
</view>
</view> </view>
<view class="tit_box" > <view class="tit_box" >
<view class="tit_line"></view> <view class="tit_line"></view>
@ -63,14 +77,54 @@
</view> </view>
</view> </view>
</view> </view>
<view class="tits" v-if="AccountInfo.userType==02">
车辆统计
</view>
<view class="info_cont">
<view class="li">
<view class="top">
车辆总数
</view>
<view class="bot">
390
</view>
</view>
<view class="line"></view>
<view class="li">
<view class="top">
车辆总数
</view>
<view class="bot">
390
</view>
</view>
<view class="line"></view>
<view class="li">
<view class="top">
车辆总数
</view>
<view class="bot">
390
</view>
</view>
</view>
<view class="tits"> <view class="tits">
更多功能 更多功能
</view> </view>
<view class="feature"> <view class="feature" v-if="AccountInfo.userType==03">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topage(0)"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topage(0)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uahBs1ruuAha5PHiiTp9" mode="" @click="topage(1)"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uahBs1ruuAha5PHiiTp9" mode="" @click="topage(1)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topage(2)"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topage(2)"></image>
</view> </view>
<view class="feature" v-if="AccountInfo.userType==02">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topages(0)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufE1T9RDOm7OmhLgTzXi" mode="" @click="topages(1)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topages(2)"></image>
</view>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1"
:default-time='pickertime'></u-picker>
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
<tab-bar :indexs='0' style=""></tab-bar> <tab-bar :indexs='0' style=""></tab-bar>
</view> </view>
</template> </template>
@ -97,7 +151,20 @@
chartday: [], // chartday: [], //
chartData1: [], // chartData1: [], //
chartData2: [120, 90, 150, 80, 130, 110, 160], chartData2: [120, 90, 150, 80, 130, 110, 160],
info:{} info:{},
AccountInfo:{},
time1: false,
time2: false,
lasTime: '',
firsTime: '',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
} }
}, },
@ -110,11 +177,59 @@
onShow() { onShow() {
this.$refs.canvas1.init(this.initChart) this.$refs.canvas1.init(this.initChart)
this.getIndexInfo() this.getIndexInfo()
this.getAccountInfo()
}, },
watch: { watch: {
}, },
methods: { methods: {
topages(num ){
if(this.AccountInfo.userId){
if(num==0){
uni.navigateTo({
url:'/page_Operator/deviceMgmt'
})
}else if(num==1){
uni.navigateTo({
url:'/page_Operator/CarModel'
})
}else if(num==2){
uni.navigateTo({
url:'/page_Operator/order'
})
}
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
},
callPhone(phone) {
uni.makePhoneCall({
phoneNumber: phone
})
},
getAccountInfo(){
this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
if (res.code === 200) {
this.AccountInfo=res.data
if(this.AccountInfo.userType=='04'){
uni.redirectTo({
url:'/page_Delivery/orerList'
})
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
topage(num){ topage(num){
if(num==0){ if(num==0){
uni.navigateTo({ uni.navigateTo({
@ -129,11 +244,30 @@
url:'/page_Merchant/order' url:'/page_Merchant/order'
}) })
} }
},
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
if (this.firsTime != '' && this.lasTime != '') {
this.getIndexInfo()
}
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
// this.pageNum=1
if (this.firsTime != '' && this.lasTime != '') {
this.getIndexInfo()
}
}, },
getIndexInfo(){ getIndexInfo(){
this.$u.get(`appAdmin/index`).then((res) => { this.$u.get(`appAdmin/index`).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.info=res.data this.info=res.data
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -326,6 +460,42 @@
.page { .page {
width: 100%; width: 100%;
padding-bottom: 200rpx; padding-bottom: 200rpx;
.info_cont{
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-around;
margin: 0 auto;
margin-top: 18rpx;
width: 680rpx;
// height: 172rpx;
padding: 40rpx 0rpx;
background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42,130,228,0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.li{
width: 110rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.top{
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
.bot{
font-weight: 600;
font-size: 40rpx;
color: #3D3D3D;
}
}
.line{
width: 2rpx;
height: 74rpx;
background: #C7C7C7;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
}
.feature{ .feature{
margin: 0 auto; margin: 0 auto;
margin-top: 24rpx; margin-top: 24rpx;
@ -354,6 +524,69 @@
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1); box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
.top_box {
display: flex;
flex-wrap: nowrap;
align-items: center;
// padding: 28rpx 30rpx;
// padding: 20rpx 0;
margin: 0 auto;
// width: 672rpx;
height: 100rpx;
background: #FFFFFF;
// box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 10rpx 10rpx 10rpx 10rpx;
.left_text {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 25%;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
.icon-xiangxia1 {
font-size: 26rpx;
}
}
.timebox {
width: 75%;
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: 34rpx;
.left_time {
text-align: center;
margin-right: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
.right_time {
text-align: center;
margin-left: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
}
}
.info_boxs{ .info_boxs{
margin-top: 26rpx; margin-top: 26rpx;
width: 636rpx; width: 636rpx;

View File

@ -17,7 +17,7 @@
</button> </button>
</view> --> </view> -->
<view class="pages2" v-if="deptId==100&&pageindex==0"> <view class="pages2" v-if="pageindex==0">
<view class="imgbox"> <view class="imgbox">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uyfgcFQ5ATQTbTzCrzgn " mode="" style="height: 634rpx;"></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uyfgcFQ5ATQTbTzCrzgn " mode="" style="height: 634rpx;"></image>
</view> </view>
@ -641,15 +641,9 @@
async ceshi() { async ceshi() {
this.$u.get("/getInfo").then((res) => { this.$u.get("/getInfo").then((res) => {
console.log('进入跳转',res); console.log('进入跳转',res);
if(res.user.isAuthentication){
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/index' url: '/pages/index/index'
}) })
}else{
uni.navigateTo({
url:"/page_user/idcard_test"
})
}
}); });
}, },