This commit is contained in:
tx 2024-10-23 18:02:47 +08:00
parent 1b6c3f250c
commit 9e91716712
7 changed files with 98 additions and 18 deletions

View File

@ -11,9 +11,9 @@ const install = (Vue, vm) => {
// 俞山岛
// baseUrl: 'https://zc.chuangtewl.com/prod-api',
// baseUrl: 'https://testzc.chuangtewl.com/prod-api',
// baseUrl: 'https://zc.chuangtewl.com/prod-api',
baseUrl: 'https://zc.chuangtewl.com/prod-api',
// baseUrl: 'http://47.120.68.19:8090',
baseUrl: 'http://192.168.2.21:8090',
// baseUrl: 'http://192.168.2.21:8090',
// 创特
loadingText: '努力加载中~',
loadingTime: 10000,

View File

@ -245,7 +245,12 @@
if (res.code == 200) {
this.list = res.data
uni.showToast({
title: '添加成功',
icon: 'none',
duration: 2000
});
uni.navigateBack()
} else {
@ -260,7 +265,7 @@
btn() {
let _this = this
let math = 'static/' + _this.$u.guid(20)
uni.chooseMessageFile({
uni.chooseImage({
count: 1,
type: 'all',
success(res) {

View File

@ -31,7 +31,11 @@
</view> -->
</view>
<view class="btn" @click="btn(3)">
<view class="btn" @click="btn(4)" v-if="deviceInfos.status==0">
上架
</view>
<view class="btn" @click="btn(3)" v-else>
下架
</view>
</view>
@ -456,7 +460,22 @@
}
})
} else if (num == 4) {
uni.showLoading({
title: '加载中...'
})
this.$u.post('/appAdmin/device/online?sn=' + this.sn).then((res) => {
if (res.code == 200) {
this.deviceInfo()
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
} else {
// uni.hideLoading()
// this.bulebtn(4)
}
})
} else if (num == 5) {

View File

@ -35,7 +35,7 @@
</view>
</view>
<view class="order_cont">
<view class="order_card" v-for="(item,index) in orderList" :key="index" @click="todetal(item)">
<view class="order_card" v-for="(item,index) in orderList" :key="index" @click.stop="todetal(item)">
<view class="order_li">
<view class="txt">
{{item.model}}
@ -98,7 +98,7 @@
<view class="price">
{{item.payFee}}
</view>
<view class="btn" v-if="item.status==7">
<view class="btn" v-if="item.status==7" @click.stop="backcar(item)">
确认还车
</view>
</view>
@ -183,6 +183,24 @@
},
methods: {
backcar(item){
this.$u.post(`appVerify/merchantReturn?orderNo=` + item.orderNo).then((res) => {
if (res.code === 200) {
this.getList()
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
todetal(item){
uni.navigateTo({
url:'/page_Merchant/order_Detail?orderNo='+item.orderNo
@ -208,6 +226,7 @@
})
},
getList() {
let data = {
@ -219,7 +238,19 @@
this.$u.get("appAdmin/orderList?", data).then((res) => {
if (res.code == 200) {
// res.data.forEach((newItem) => {
// // id
// const existingIndex = this.orderList.findIndex(item => item.orderId == newItem
// .orderId);
// if (existingIndex !== -1) {
// // id
// this.$set(this.orderList, existingIndex, newItem);
// } else {
// //
// this.orderList.push(newItem);
// }
// });
this.orderList = res.data
} else {

View File

@ -382,7 +382,7 @@
</view>
</view>
</view>
<view class="bot_btn" v-if="orderInfo.deliveryOrder.status!=3">
<view class="bot_btn" v-if="orderInfo.deliveryOrder.status!=3&&orderInfo.deliveryOrder">
<view class="btn" @click="getOrder()" v-if="orderInfo.deliveryOrder.status==0">
立即接单
</view>
@ -393,7 +393,12 @@
配送完成
</view>
</view>
<view class="bot_btn" v-if="orderInfo.status==7">
<view class="btn" @click="backcar()">
确认还车
</view>
</view>
</view>
</template>
@ -428,6 +433,24 @@
},
methods: {
backcar(){
this.$u.post(`appVerify/merchantReturn?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
});
}
});
},
typeReturns(num) {
console.log(num,'aaaaaaaaaaaa');
let result = {
@ -668,7 +691,7 @@
}
},
timetype(time) {
if (time == 'hour') {
if (time == 'hours') {
return '小时'
} else if (time == 'day') {
return '天'
@ -718,6 +741,8 @@
return '超时取消'
} else if (num == 6) {
return '已取消'
}else if (num == 7) {
return '待审核'
} else if (num == 8) {
return '订单已结束'
}

View File

@ -233,7 +233,7 @@
topage(num){
if(num==0){
uni.navigateTo({
url:'/page_Merchant/order'
url:'/page_Merchant/deviceMgmt'
})
}else if(num==1){
uni.navigateTo({

View File

@ -344,7 +344,7 @@
});
return;
}
this.$u.put("/app/forgetAppPwd?phone="+this.phone2+'&newPassword='+this.password2+'&phoneCode='+this.phoneCode2+'&uuid='+this.uuid).then((res) => {
this.$u.put("/appAdmin/forgetAppPwd?phone="+this.phone2+'&newPassword='+this.password2+'&phoneCode='+this.phoneCode2+'&uuid='+this.uuid).then((res) => {
if (res.code == 200) {
//
this.pageindex=2
@ -389,7 +389,7 @@
}
this.$u.post("/appCodeLogin", data).then((res) => {
this.$u.post("/appAdmin/appCodeLogin", data).then((res) => {
if (res.code == 200) {
//
wx.setStorageSync('token', res.token);
@ -448,7 +448,7 @@
return;
}
this.isCodeButtonDisabled = true;
this.$u.get("/appCaptcha?type=1&phone=" + this.phone).then((res) => {
this.$u.get("/appAdmin/appCaptcha?type=1&phone=" + this.phone).then((res) => {
if (res.code == 200) {
this.uuid = res.uuid
this.startCountdown();
@ -481,7 +481,7 @@
return;
}
this.isCodeButtonDisabled2 = true;
this.$u.get("/appCaptcha?type=1&phone=" + this.phone2).then((res) => {
this.$u.get("appAdmin/appCaptcha?type=1&phone=" + this.phone2).then((res) => {
if (res.code == 200) {
this.uuid = res.uuid
this.startCountdown2();
@ -550,7 +550,7 @@
uuid: this.uuid,
openid:this.openCode
}
this.$u.post("/appCodeLogin", data).then((res) => {
this.$u.post("appAdmin/appCodeLogin", data).then((res) => {
if (res.code == 200) {
//
wx.setStorageSync('token', res.token);