页面修改

This commit is contained in:
THK3121 2023-08-31 10:44:45 +08:00
parent d401ac77fc
commit eae3be3381
12 changed files with 2200 additions and 1818 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ node_modules
/dist /dist
.hbuilderx .hbuilderx
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local

View File

@ -1,28 +1,33 @@
import oahttp from "@/utils/oahttp.js";; import oahttp from "@/utils/oahttp.js";
import oahttp2 from "@/utils/logistics.js";
// http://logistics.lihaink.cn/api/getCarHistory
/** /**
* 车辆列表 * 车辆列表
*/ */
// https://worker-task.lihaink.cn/api/vehicle/addCar // /api/vehicle/townCompanyVehicleIndex
export const getvehicleListApi = (data) => oahttp.get('/vehicle/vehicleIndex', data) export const getvehicleListApi = (data) => oahttp.get('/vehicle/townCompanyVehicleIndex', data)
// 车辆详情 // 车辆详情
export const getvehicleDetailApi = (data) => oahttp.get('/courierLstData', data) export const getvehicleDetailApi = (data) => oahttp.get('/vehicle/vehicleInfo', data)
// 车辆上传 // 车辆上传
export const upVehicleApi = (data) => oahttp.post('/vehicle/addCar', data) export const upVehicleApi = (data) => oahttp.post('/vehicle/rentApply', data)
// 申请用车 // 申请用车
export const applycarApi = (data) => oahttp.post('/vehicle/addCar', data) export const applycarApi = (data) => oahttp.post('/vehicle/rentApply', data)
// 显示轨迹 // 显示轨迹
export const locusApi = (data) => oahttp.get('/courierLstData', data) export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
// 签约列表 // 签约列表
export const getAgencyListApi = (data) => oahttp.get('/courierLstData', data) export const getAgencyListApi = (data) => oahttp.get('/vehicle/rentApplyList', data)
// 签约公司详情 // 签约公司详情
export const getAgencyDetailApi = (data) => oahttp.get('/courierLstData', data) export const getAgencyDetailApi = (data) => oahttp.get('/vehicle/rentApplyInfo', data)
// 车辆租赁 // 车辆租赁
export const leaseApi = (data) => oahttp.post('/vehicle/setContractByTownCompany', data) export const leaseApi = (data) => oahttp.post('/vehicle/setContractByTownCompany', data)
// 生成合同 // 生成合同
export const contractApi = (data) => oahttp.get('/courierLstData', data) export const contractApi = (data) => oahttp.post('/vehicle/setContractByVillageCompany', data)
// 发送合同
export const sendcontractApi = (data) => oahttp.post('/vehicle/initiatingRentCarContract', data)
// 申请驳回 // 申请驳回
export const overruleApi = (data) => oahttp.get('/courierLstData', data) export const overruleApi = (data) => oahttp.post('/vehicle/rejectRentApply', data)
// 小组公司详情
export const villageCompanyApi = (data) => oahttp.get('/vehicle/villageCompanyIndex', data)
// 资产详情 // 资产详情
// export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data) // export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data)

View File

@ -110,7 +110,176 @@
} }
} }
}, },
"nativePlugins" : {} "nativePlugins" : {
"JG-JCore" : {
"JPUSH_APPKEY_ANDROID" : "5ced5ec5fa7bb86302944f0f",
"JPUSH_APPKEY_IOS" : "",
"JPUSH_CHANNEL_ANDROID" : "",
"JPUSH_CHANNEL_IOS" : "",
"__plugin_info__" : {
"name" : "极光推送 JCore 官方 SDK",
"description" : "极光推送 JCore 官方 SDK HBuilder 插件版本",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=4028",
"android_package_name" : "uni.UNIB5B1EDD",
"ios_bundle_id" : "uni.UNIB5B1EDD",
"isCloud" : true,
"bought" : 1,
"pid" : "4028",
"parameters" : {
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "JPUSH_APPKEY",
"value" : ""
},
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY",
"value" : ""
},
"JPUSH_CHANNEL_ANDROID" : {
"des" : "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JCore:CHANNEL",
"value" : ""
}
}
}
},
"JG-JPush" : {
"JPUSH_ADVERTISINGID_IOS" : "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "",
"JPUSH_GOOGLE_API_KEY" : "",
"JPUSH_GOOGLE_APP_ID" : "",
"JPUSH_GOOGLE_PROJECT_ID" : "",
"JPUSH_GOOGLE_PROJECT_NUMBER" : "",
"JPUSH_GOOGLE_STORAGE_BUCKET" : "",
"JPUSH_HONOR_APPID" : "",
"JPUSH_HUAWEI_APPID" : "",
"JPUSH_ISPRODUCTION_IOS" : "",
"JPUSH_MEIZU_APPID" : "",
"JPUSH_MEIZU_APPKEY" : "",
"JPUSH_OPPO_APPID" : "",
"JPUSH_OPPO_APPKEY" : "",
"JPUSH_OPPO_APPSECRET" : "",
"JPUSH_VIVO_APPID" : "",
"JPUSH_VIVO_APPKEY" : "",
"JPUSH_XIAOMI_APPID" : "",
"JPUSH_XIAOMI_APPKEY" : "",
"__plugin_info__" : {
"name" : "极光推送 JPush 官方 SDK",
"description" : "极光推送JPush官方SDK HBuilder插件版本",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=4035",
"android_package_name" : "uni.UNIB5B1EDD",
"ios_bundle_id" : "uni.UNIB5B1EDD",
"isCloud" : true,
"bought" : 1,
"pid" : "4035",
"parameters" : {
"JPUSH_ADVERTISINGID_IOS" : {
"des" : "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key" : "JPush:ADVERTISINGID",
"value" : ""
},
"JPUSH_DEFAULTINITJPUSH_IOS" : {
"des" : "[iOS]是否默认初始化是填true不是填false或者不填",
"key" : "JPush:DEFAULTINITJPUSH",
"value" : ""
},
"JPUSH_GOOGLE_API_KEY" : {
"des" : "厂商google api_key,示例:g-12346578",
"key" : "google_api_key",
"value" : ""
},
"JPUSH_GOOGLE_APP_ID" : {
"des" : "厂商google mobilesdk_app_id,示例g-12346578",
"key" : "google_app_id",
"value" : ""
},
"JPUSH_GOOGLE_PROJECT_ID" : {
"des" : "厂商google project_id ,示例g-12346578",
"key" : "project_id",
"value" : ""
},
"JPUSH_GOOGLE_PROJECT_NUMBER" : {
"des" : "厂商google project_number,示例g-12346578",
"key" : "gcm_defaultSenderId",
"value" : ""
},
"JPUSH_GOOGLE_STORAGE_BUCKET" : {
"des" : "厂商google storage_bucket,示例g-12346578",
"key" : "google_storage_bucket",
"value" : ""
},
"JPUSH_HONOR_APPID" : {
"des" : "厂商HONOR-appId,示例12346578",
"key" : "com.hihonor.push.app_id",
"value" : ""
},
"JPUSH_HUAWEI_APPID" : {
"des" : "厂商HUAWEI-appId,示例appid=12346578",
"key" : "com.huawei.hms.client.appid",
"value" : ""
},
"JPUSH_ISPRODUCTION_IOS" : {
"des" : "[iOS]是否是生产环境是填true不是填false或者不填",
"key" : "JPush:ISPRODUCTION",
"value" : ""
},
"JPUSH_MEIZU_APPID" : {
"des" : "厂商MEIZU-appId,示例MZ-12345678",
"key" : "MEIZU_APPID",
"value" : ""
},
"JPUSH_MEIZU_APPKEY" : {
"des" : "厂商MEIZU-appKey,示例MZ-12345678",
"key" : "MEIZU_APPKEY",
"value" : ""
},
"JPUSH_OPPO_APPID" : {
"des" : "厂商OPPO-appId,示例OP-12345678",
"key" : "OPPO_APPID",
"value" : ""
},
"JPUSH_OPPO_APPKEY" : {
"des" : "厂商OPPO-appkey,示例OP-12345678",
"key" : "OPPO_APPKEY",
"value" : ""
},
"JPUSH_OPPO_APPSECRET" : {
"des" : "厂商OPPO-appSecret,示例OP-12345678",
"key" : "OPPO_APPSECRET",
"value" : ""
},
"JPUSH_VIVO_APPID" : {
"des" : "厂商VIVO-appId,示例12345678",
"key" : "com.vivo.push.app_id",
"value" : ""
},
"JPUSH_VIVO_APPKEY" : {
"des" : "厂商VIVO-appkey,示例12345678",
"key" : "com.vivo.push.api_key",
"value" : ""
},
"JPUSH_XIAOMI_APPID" : {
"des" : "厂商XIAOMI-appId,示例MI-12345678",
"key" : "XIAOMI_APPID",
"value" : ""
},
"JPUSH_XIAOMI_APPKEY" : {
"des" : "厂商XIAOMI-appKey,示例MI-12345678",
"key" : "XIAOMI_APPKEY",
"value" : ""
}
}
}
}
}
}, },
/* */ /* */
"quickapp" : {}, "quickapp" : {},

View File

@ -553,6 +553,15 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, {
"path": "property/success",
"style": {
"navigationBarTitleText": "生成合同",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, { }, {
"path": "buyShare/buyShare", "path": "buyShare/buyShare",
"style": { "style": {

View File

@ -2,29 +2,20 @@
<view class="oa_home" style="oaColor"> <view class="oa_home" style="oaColor">
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> --> <!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
<view <view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
class="home_header" <view style="
:class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"
>
<view
style="
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
overflow: hidden; overflow: hidden;
border-radius: 0 0 30rpx 30rpx; border-radius: 0 0 30rpx 30rpx;
" ">
> <hx-lottie :options="options" ref="lottie" style="
<hx-lottie
:options="options"
ref="lottie"
style="
width: 100vw; width: 100vw;
height: 440rpx; height: 440rpx;
transform: scale(1.2); transform: scale(1.2);
background-color: #0122c7; background-color: #0122c7;
" " />
/>
</view> </view>
<!-- #ifdef APP-PLUS||H5 --> <!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height)"></view> <view style="height: var(--status-bar-height)"></view>
@ -39,46 +30,30 @@
</view> </view>
<view class="head_img"> <view class="head_img">
<view class="img_box"> <view class="img_box">
<u--image <u--image :showLoading="true" width="131.43rpx" height="131.43rpx" class="img_box_img"
:showLoading="true" :src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image>
width="131.43rpx"
height="131.43rpx"
class="img_box_img"
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
shape="circle"
></u--image>
</view> </view>
<text class="head_text">工作证: {{ myOaInfo.nickname }}</text> <text class="head_text">工作证: {{ myOaInfo.nickname }}</text>
<text class="head_text" style="flex-shrink: 0" <text class="head_text" style="flex-shrink: 0">身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text>
>身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text
>
</view> </view>
</view> </view>
<!-- 占位 --> <!-- 占位 -->
<view style="height: 150rpx"></view> <view style="height: 150rpx"></view>
<view <view class="backlog" :class="!ApproveList.length > 0 ? 'backlog_no_data' : ''">
class="backlog"
:class="!ApproveList.length > 0 ? 'backlog_no_data' : ''"
>
<view class="head_title flex_a_c_j_sb"> <view class="head_title flex_a_c_j_sb">
<view class="title">公告列表</view> <view class="title">公告列表</view>
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')" <view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多
>更多
<view class="iconfont icon-you"> <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons> <uni-icons type="forward"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
<block v-if="ApproveList.length > 0"> <block v-if="ApproveList.length > 0">
<view <view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
class="backlog_item flex_a_c_j_sb" :key="index" @click="clickNotice(item.id)">
v-for="(item, index) in ApproveList.slice(0, 2)"
:key="index"
@click="clickNotice(item.id)"
>
<view class="text"> <view class="text">
<text class="text_time">{{ <text class="text_time">{{
item.create_time.substring(0, 10).replace(/-/g, ".") item.create_time.substring(0, 10).replace(/-/g, ".")
@ -86,16 +61,12 @@
{{ item.title }} {{ item.title }}
</view> </view>
<i class="iconfont icon-you" <i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
><uni-icons type="forward"></uni-icons
></i>
</view> </view>
</block> </block>
<view v-else class="backlog_no flex_a_c_j_sb"> <view v-else class="backlog_no flex_a_c_j_sb">
<view class="text">暂无更多消息</view> <view class="text">暂无更多消息</view>
<i class="iconfont icon-you" <i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
><uni-icons type="forward"></uni-icons
></i>
</view> </view>
</view> </view>
</view> </view>
@ -114,13 +85,8 @@
<view class="fast_track"> <view class="fast_track">
<block v-for="(item, index) in oaHomeData" :key="item.id"> <block v-for="(item, index) in oaHomeData" :key="item.id">
<view class="track_item" @click="navTwo(item.paths, index)"> <view class="track_item" @click="navTwo(item.paths, index)">
<u--image <u--image :showLoading="true" :src="item.icon" mode="widthFix" width="77.19rpx"
:showLoading="true" height="77.19rpx"></u--image>
:src="item.icon"
mode="widthFix"
width="77.19rpx"
height="77.19rpx"
></u--image>
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
</view> </view>
</block> </block>
@ -129,8 +95,7 @@
<view class="my_task"> <view class="my_task">
<view class="task_title flex_a_c_j_sb"> <view class="task_title flex_a_c_j_sb">
<view class="title">配送信息</view> <view class="title">配送信息</view>
<view class="flex_a_c" @click="goOrderList" <view class="flex_a_c" @click="goOrderList">更多
>更多
<view class="iconfont icon-you"> <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons> <uni-icons type="forward"></uni-icons>
</view> </view>
@ -143,19 +108,13 @@
<!-- <button @click="test">按钮</button> --> <!-- <button @click="test">按钮</button> -->
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<globalPopup ref="globalPopup"></globalPopup> <globalPopup ref="globalPopup"></globalPopup>
<logistiBriefCard <logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
v-for="(item, index) in orderList"
:key="index"
:goodsInfo="item"
>
</logistiBriefCard> </logistiBriefCard>
</view> </view>
<view v-else class="no_task"> <view v-else class="no_task">
<view class="title">暂无配送信息</view> <view class="title">暂无配送信息</view>
<view class="tips" v-if="!$store.state.app.token" <view class="tips" v-if="!$store.state.app.token">登录后查看配送信息详情</view>
>登录后查看配送信息详情</view
>
</view> </view>
<!-- <view class="head_title flex_a_c_j_sb"> <!-- <view class="head_title flex_a_c_j_sb">
<view class="">我的任务</view> <view class="">我的任务</view>
@ -216,7 +175,9 @@ import {
getApproveListAPI, getApproveListAPI,
getUserIndexAPI, getUserIndexAPI,
} from "@/api/oaApi.js"; } from "@/api/oaApi.js";
import { mapState } from 'vuex'; import {
mapState
} from 'vuex';
import bj from "@/static/animation/home.json" import bj from "@/static/animation/home.json"
//#ifdef APP-PLUS //#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
@ -294,7 +255,9 @@ export default {
this.showToask(); this.showToask();
// this.initOaHomeDada(); // this.initOaHomeDada();
this.getOrderList(); this.getOrderList();
//#ifdef APP-PLUS
this.noticeFn(); this.noticeFn();
// #endif
// console.log(this.oaHomeData, this.oaHomeData.length==0); // console.log(this.oaHomeData, this.oaHomeData.length==0);
if (this.oaHomeData.length == 0) { if (this.oaHomeData.length == 0) {
this.$nextTick(() => { this.$nextTick(() => {
@ -313,7 +276,8 @@ export default {
}) })
if (arr.length >= 8) { if (arr.length >= 8) {
arr = arr.slice(0, 7); arr = arr.slice(0, 7);
let obj = this.$store.state.config?.config?.menu?.find(item => item.paths.includes('/pages/moreFun/moreFun')); let obj = this.$store.state.config?.config?.menu?.find(item => item.paths.includes(
'/pages/moreFun/moreFun'));
arr.push(obj); arr.push(obj);
} }
return arr; return arr;

View File

@ -1,15 +1,19 @@
<template> <template>
<view class="box"> <view class="box">
<view class="li" v-for="item,index in dataList" :key="index" @tap="navgo('/subpkg/property/chosseCompany')"> <view class="li" v-for="item,index in dataList" :key="index"
<view class="date"> @tap="navgo(`/subpkg/property/chosseCompany?id=${item.id}`)">
<!-- 2023.07.24 --> <view class="">
<!-- {{item.}} --> <view style="display: flex;justify-content: space-between;">
<view class="">
签约申请
</view> </view>
<view class="text"> <view class="">
<!-- {{item.}} --> 更多
</view>
</view>
<view class="" style="margin-top: 20rpx;">
{{item.village_company_name}}提出租赁车辆一辆
</view> </view>
<view class="detail">
<u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
</view> </view>
@ -17,12 +21,12 @@
<script> <script>
import { import {
getAgencyList, getAgencyListApi,
} from "@/api/property.js" } from "@/api/property.js"
export default { export default {
data() { data() {
return { return {
dataList: [1, 1, 1] dataList: []
} }
}, },
methods: { methods: {
@ -33,8 +37,8 @@
} }
}, },
onLoad() { onLoad() {
getAgencyList().then(res => { getAgencyListApi().then(res => {
// this.dataList=res this.dataList = res.data
}) })
} }
} }
@ -43,36 +47,12 @@
<style> <style>
.box { .box {
padding: 20rpx; padding: 20rpx;
}
.li {}
.li { .li {
background-color: #fff; padding: 10rpx;
background-color: white;
border-radius: 15rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
padding: 20rpx;
border-radius: 15rpx;
display: flex;
justify-content: space-between;
.date {
background-color: #FF7C32;
color: white;
padding: 0 10rpx;
border-radius: 15rpx;
// width: 170rpx;
}
.text {
// background-color: lightyellow;
max-width: 450rpx;
}
.detail {
// background-color: black;
// width: 50rpx;
} }
} }
</style> </style>

View File

@ -1,14 +1,15 @@
<template> <template>
<view class=""> <view class="">
<view class="date"> <view class="date">
2022年12月12日提出申请 <!-- 2022年12月12日提出申请 -->
{{dataList.create_time.slice(0,10)}} 提出申请
</view> </view>
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<view class="cards_head_top"> <view class="cards_head_top">
<text><u--image src="../../static/img/company/company.png" width="33.29rpx" height="33.29rpx" <text><u--image src="../../static/img/company/company.png" width="33.29rpx" height="33.29rpx"
style="margin-right:20rpx"></u--image></text> style="margin-right:20rpx"></u--image></text>
<text>{item.company_name}</text> <text>{{dataList.village_company_name}}</text>
</view> </view>
<text @click="navTo('/subpkg/companySign/companySign?id=')">详情 <uni-icons type="forward" <text @click="navTo('/subpkg/companySign/companySign?id=')">详情 <uni-icons type="forward"
style="margin-left: 10rpx;" color="white"></uni-icons></text> style="margin-left: 10rpx;" color="white"></uni-icons></text>
@ -18,28 +19,20 @@
<view class="is_contract"> <view class="is_contract">
<view> <view>
<text>法人姓名 :</text> <text>法人姓名 :</text>
<text>{item.master_name}</text> <text>{{dataList.village_company_user}}</text>
</view> </view>
<view> <view>
<text style="color: green;" v-if="true">已签约</text> <text style="color: green;" v-if="true">已签约</text>
<text style="color: red;" v-else>未签约</text> <!-- <text style="color: red;" v-else>未签约</text> -->
</view> </view>
</view> </view>
<view class="is_contract">
<view>
<text>担任职务 :</text>
<text>{item.master_position}</text>
</view>
</view>
<view class="" @click="copyPhone()"> <view class="" @click="copyPhone()">
<text>联系电话 :</text> <text>联系电话 :</text>
<text>{item.master_phone}</text> <text>{{dataList.village_company_phone}}</text>
</view>
<view class="">
<text>负责区域 :</text>
<text> {item.city_name+item.area_name}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -49,11 +42,11 @@
<text v-else>自有车辆</text> <text v-else>自有车辆</text>
</view> </view>
<view class="car_li" v-for="item,index in carList"> <view class="car_li" v-for="item,index in carList">
车牌号 川Y103D2 车牌号{{item.car_license}}
<view class="" style="float: right;display: flex;"> <view class="" style="float: right;display: flex;">
<text style="margin-right: 10rpx;">租赁车辆</text> <text style="margin-right: 10rpx;">租赁车辆</text>
<u-checkbox-group v-model="checked"> <u-checkbox-group v-model="checked">
<u-checkbox active-color="#0122C7" :label="item" :name="item" shape="square" <u-checkbox active-color="#0122C7" :label="id" :name="item" shape="square"
label=""></u-checkbox> label=""></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
@ -61,30 +54,58 @@
</view> </view>
<view class="btns"> <view class="btns">
<u-button type="primary" @click="showPop=true" style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" <!-- 生成合同 -->
text="申请驳回"></u-button> <view class="" v-if="1">
<u-button type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button> <u-button :disabled="false" type="primary" @click="showPop=true"
style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" text="申请驳回"></u-button>
<u-button :disabled="false" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
</view>
<!-- 审核中 -->
<view class="" v-if="0">
<u-button :disabled="true" type="primary" text="合同已上传,等待审核" @tap="contractFn" color="grey"></u-button>
</view>
<!-- 审核通过 -->
<view class="" v-if="0">
<view class="card">
<view class="contract">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">入股合同</view>
<view>
<text>{{'2023-03-03'}}</text>
</view>
</view>
</view>
<view class="right" @click="navToContract('fdsf')">
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
</view>
</view>
<u-button :disabled="false" type="primary" text="发送合同" @tap="sendcontractFn" color="#0122C7"></u-button>
</view>
</view> </view>
<view class=""> <view class="">
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true" <u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
title="请输入驳回理由"> title="请输入驳回理由">
<view class="slot-content"> <view class="slot-content">
<!-- <u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input> -->
<u--textarea v-model="overruleValue" placeholder="请输入内容" class="textarea_cls"></u--textarea> <u--textarea v-model="overruleValue" placeholder="请输入内容" class="textarea_cls"></u--textarea>
</view> </view>
</u-modal> </u-modal>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getAgencyDetail, getAgencyDetailApi,
contractApi, contractApi,
overruleApi overruleApi,
sendcontractApi
} from "@/api/property.js" } from "@/api/property.js"
import { import {
Toast Toast
@ -92,30 +113,49 @@
export default { export default {
data() { data() {
return { return {
dataList: [], dataList: {},
overruleValue: "", overruleValue: "",
showPop: false, showPop: false,
checked: [], checked: [],
carList: [1, 2] carList: [1, 2]
} }
}, },
onLaunch() { onLoad() {
getAgencyDetail().then(res => { console.log(this.$route.query)
this.dataList = res // console.log(6565)
getAgencyDetailApi({
id: this.$route.query.id
}).then(res => {
// 13043214321
this.dataList = res.data.apply
this.carList = res.data.cars
}) })
}, },
methods: { methods: {
confirm() { confirm() {
// console.log(this.overruleValue) // console.log(this.overruleValue)
overruleApi().then(res => { overruleApi({
apply_id: this.dataList.id,
content: this.overruleValue,
}).then(res => {
Toast("操作成功") Toast("操作成功")
this.showPop = false this.showPop = false
}) })
}, },
contractFn() { contractFn() {
contractApi().then(res => { console.log(this.checked)
Toast("操作成功") contractApi({
apply_id: this.dataList.id,
car_id: this.checked[0].car_id
}).then(res => {
this.navTo('/subpkg/property/success')
}) })
this.navTo('/subpkg/property/success')
},
sendcontractFn() {
// sendcontractApi({
// id:
// })
}, },
navTo(url) { navTo(url) {
uni.navigateTo({ uni.navigateTo({
@ -132,6 +172,79 @@
padding: 10rpx 28rpx 0; padding: 10rpx 28rpx 0;
} }
.card {
margin: 28rpx;
width: 694rpx;
background-color: #fff;
border-radius: 14rpx;
.c_title {
color: #0022C7;
font-size: 32rpx;
font-weight: 500;
padding: 28rpx;
}
.c_body {
margin: 28rpx;
padding-bottom: 28rpx;
display: flex;
border-bottom: 1px solid #F3F4F8;
&:last-child {
border-bottom: none;
}
.icon {
width: 77rpx;
height: 77rpx;
flex-shrink: 0;
margin-right: 12rpx;
}
.body_text {
flex: 1;
font-size: 25rpx;
.b_title {
font-size: 32rpx;
color: #333;
font-weight: 500;
}
.b_text {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 28rpx;
.b_avatar {
width: 52rpx;
height: 52rpx;
margin-right: 8rpx;
}
&_left {
display: flex;
align-items: center;
}
&_right {
color: #F02828;
display: flex;
align-items: center;
font-size: 35rpx;
}
}
.b_time {
color: #666666;
}
}
}
}
.cards { .cards {
margin: 28rpx; margin: 28rpx;
width: 694rpx; width: 694rpx;

View File

@ -1,9 +1,13 @@
<template> <template>
<view class=""> <view class="" style="position: relative;">
<!-- 没有测含量 --> <view v-if='true'>
<view class="noCar" v-if='dataList.length==0'> <u-loading-page :loading="showLoading"></u-loading-page>
</view>
<view class="" v-else>
<!-- 小组公司 -->
<view class="noCar" v-if='company_type==18'>
<!-- 申请 --> <!-- 申请 -->
<view class="" v-if="step==1"> <view class="" v-if="step==999">
<view class=""> <view class="">
你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统 你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统
</view> </view>
@ -17,37 +21,76 @@
class="btn"> class="btn">
上传自有车辆</u-button> 上传自有车辆</u-button>
</view> </view>
<u-modal :show="show" @close="show=false" @confirm="upCarFn" :closeOnClickOverlay="true" title="车辆上传"> <u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
:closeOnClickOverlay="true" @cancel="show=false" title="车辆上传">
<view class="slot-content"> <view class="slot-content">
<u--input placeholder="请输入您的车牌号" v-model="carLicense"></u--input> <u--input placeholder="请输入您的车牌号" v-model="carLicense"></u--input>
</view> </view>
</u-modal> </u-modal>
</view> </view>
<!-- 等待 --> <!-- 等待 -->
<view class="" v-if='step==2'> <view class="" v-if='step==-1'>
<view class=""> <!-- 上传自有车辆 -->
您已上传自用车辆,系统正在审核中,请耐心等待 <view v-if="0">
</view> <view class="loading">
<span>您已上传自用车辆,系统正在审核中,请耐心等待</span>
<span class="dots">...</span>
</view> </view>
</view> </view>
<!-- 申请用车 -->
<view v-else> <view v-else>
<!-- <view class="serch"> <view class="loading">
<u-search placeholder="输入车牌号进行搜索" :show-action="true" bg-color="white" v-model="keywords" @search="serchFn" <span>你已提交用车申请后台正在加快处理中请耐心等待哦</span>
@custom="serchFn"></u-search> <span class="dots">...</span>
</view> --> </view>
</view>
</view>
<!-- 审核结束 -->
<view class="" v-if="step==4">
<view class="">
你的申请于2022年12月12日被驳回
</view>
<view class="">
驳回理由:xxxxxxxxxx
</view>
<view class="">
请修改相应内容重新提交哦
</view>
<view class="">
<view class="" style="margin: 20rpx 0;">
<u-button @tap="applycarFn" type="primary" style="background-color: #0122C7;border: none;"
class="btn">
申请用车</u-button>
</view>
<view class="">
<u-button @tap="show=true" type="primary" style="background-color: #0122C7;border: none;"
class="btn">
上传自有车辆</u-button>
</view>
<u-modal :show="show" @close="show=false" @confirm="upCarFn" :closeOnClickOverlay="true"
title="车辆上传">
<view class="slot-content">
<u--input placeholder="请输入您的车牌号" v-model="carLicense"></u--input>
</view>
</u-modal>
</view>
</view>
</view>
<!-- 镇街公司 -->
<view v-if='company_type==16'>
<view class="info"> <view class="info">
<text>可监管车辆数量 10</text> <text>可监管车辆数量 {{datas.monitor_num}}</text>
<view @click="showPop=true" class="not_leased"> <view @click="showPop=true" class="not_leased">
<view class=""> <view class="">
租赁 10 租赁 {{datas.rent_num}}
</view> </view>
<view class="triangle-up" v-if="1"> <view class="triangle-up" v-if="datas.can_rent_num">
</view> </view>
<view class="message_bottom" v-if="1"> <view class="message_bottom" v-if="datas.can_rent_num">
可再租赁车辆:2 可再租赁车辆:{{datas.can_rent_num}}
</view> </view>
</view> </view>
<text>自有车辆 10</text> <text>自有车辆 {{datas.self_num}}</text>
</view> </view>
<!-- 公告栏 --> <!-- 公告栏 -->
<view class="application_tit"> <view class="application_tit">
@ -60,13 +103,13 @@
</view> </view>
<view class="content"> <view class="content">
<view class="li" @click="navgo('/subpkg/property/chosseCompany')" <view class="li" @click="navgo(`/subpkg/property/chosseCompany?id=${item.id}`)"
v-for="item,index in applicationList.slice(0, 2)"> v-for="item,index in applicationList">
<view class="date"> <view class="date">
<!-- {{item.}} --> {{item.create_time.slice(0, 10)}}
</view> </view>
<view class="text"> <view class="text">
<!-- {{item.}} --> {{item.village_company_name}}提出租赁车辆一台
</view> </view>
<view class="detail"> <view class="detail">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
@ -75,37 +118,36 @@
</view> </view>
</view> </view>
<view class="personnel_list">
<view v-if="true" class="personnel_list"> <view>
<view v-if="dataList.length">
<view class="cards" v-for="item,index in dataList" :key="index" <view class="cards" v-for="item,index in dataList" :key="index"
@click="navgo('/subpkg/property/vehicle_a')"> @click="navgo(`/subpkg/property/vehicle_a?id=${item.car_id}`)">
<view class="cards_head"> <view class="cards_head">
<text><!-- {{item.}} --></text> <text>{{item.car_license}}</text>
</view> </view>
<view class="cards_content"> <view class="cards_content">
<view class="right"> <view class="right">
<!-- 已出租 --> <!-- 已出租 -->
<view v-if="1"> <view v-if="item.status==1">
<view class="li"> <view class="li">
<text>使用人: </text> <text>使用人: </text>
<text> <!-- {{item.}} --></text> <text> {{item.rent_company.master_name}}</text>
<view style="float: right;"> <view style="float: right;">
<text style="color: green;" v-if="true">自有车辆</text> <text style="color: green;" v-if="item.type==1">自有车辆</text>
<text style="color: orange;" v-else>租赁车辆</text> <text style="color: orange;" v-else>租赁车辆</text>
</view> </view>
</view> </view>
<view class="li"> <view class="li">
<text>联系方式: </text> <text>联系方式: </text>
<text><!-- {{item.}} --></text> <text>{{item.rent_company.master_phone}}</text>
</view> </view>
<view class="li"> <view class="li">
<text>所属公司: </text> <text>所属公司: </text>
<text> <!-- {{item.}} --> </text> <text> {{item.rent_company.company_name}} </text>
</view> </view>
<view class="li"> <view class="li">
<text>签约时间: </text> <text>签约时间: </text>
<text> <!-- {{item.}} --> </text> <text> {{item.rent_time}} </text>
</view> </view>
@ -114,9 +156,9 @@
<view class="" v-else> <view class="" v-else>
<view class="li"> <view class="li">
<text>车牌号: </text> <text>车牌号: </text>
<text> <!-- {{item.}} --></text> <text> {{item.car_license}}</text>
<view style="float: right;"> <view style="float: right;">
<text style="color: green;" v-if="true">自有车辆</text> <text style="color: green;" v-if="item.type==1">自有车辆</text>
<text style="color: orange;" v-else>租赁车辆</text> <text style="color: orange;" v-else>租赁车辆</text>
</view> </view>
</view> </view>
@ -128,34 +170,17 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="dataList.length==0&&!isNewCheck">
<view class="empty">
<!-- <view>
当前没有可以签约的的车辆,快去签约新车吧!
</view> -->
<!-- <u-button @click="showPop=true" type="primary" style="background-color: #0122C7;border: none;"
class="btn">
签约新车</u-button> -->
</view> </view>
</view>
<!-- <view style="padding: 0 60rpx;" v-if="isNewCheck">
你已发起租赁{{newCarNum}}两新车的申请,后台正在为您加急处理中,请稍后~~
</view> -->
</view>
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true" <u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
:title="`请输入您需要租赁的车辆数量(上限为${dataList[0]})`"> :title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
<view class="slot-content"> <view class="slot-content">
<u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input> <u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input>
</view> </view>
</u-modal> </u-modal>
<!-- <u-modal @close="show=false" @cancel="show=false" @confirm="relieveFn" :show="show" :showCancelButton="true"
:showConfirmButton='true' :content='content'></u-modal> -->
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
@ -163,8 +188,12 @@
getvehicleListApi, getvehicleListApi,
getAgencyListApi, getAgencyListApi,
leaseApi, leaseApi,
upVehicleApi upVehicleApi,
getAgencyDetailApi,
getvehicleDetailApi,
villageCompanyApi
} from "@/api/property.js" } from "@/api/property.js"
import Cache from '@/utils/cache';
// import mybtn from "@/components/mybtn/mybtn.vue" // import mybtn from "@/components/mybtn/mybtn.vue"
import { import {
Toast Toast
@ -177,50 +206,99 @@
name: "vehicle", name: "vehicle",
data() { data() {
return { return {
showLoading: true,
company_type: "",
// 123
step: 1, step: 1,
applicationList: [1, 1], applicationList: [1],
// isNewCheck: true,
show: false, show: false,
carLicense: "", carLicense: "",
showPop: false, showPop: false,
datas: {},
dataList: [], dataList: [],
tabLists: [{
name: '未出租',
}, {
name: '已出租'
}, ],
curNow: 0,
keywords: "",
newCarNum: "", newCarNum: "",
newcarTit: "请输入您需要租赁的车辆数量(上限为2)" newcarTit: ""
}; };
}, },
onLoad() { onLoad() {
getvehicleListApi().then(res => { let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
console.log(res) this.company_type = type
// this.getvehicleList = res //
if (type == 18) {
// getvehicleDetailApi().then(res => {})
villageCompanyApi().then(res => {
this.showLoading = false
this.step = res.data.status || 999
console.log(res.data.cars_info.id)
switch (this.step) {
case 3:
uni.navigateTo({
url: `/subpkg/property/vehicle_a?type=2`
}) })
getAgencyListApi().then(res => { // this.step =
// this.applicationList=res break;
default:
break;
}
}) })
}
//
else {
getvehicleListApi().then(res => {
this.datas = res.data
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList = res
.data.apply.slice(0, 2)
this.applicationList = res.data.apply
this.dataList = res.data.car_list
this.showLoading = false
})
// getAgencyListApi().then(res => {
// this.applicationList = res.data
// })
}
// if (true) {
// uni.navigateTo({
// url: '/subpkg/property/vehicle_a'
// })
// }
// getvehicleListApi().then(res => {
// console.log(res)
// // this.getvehicleList = res
// })
// getAgencyListApi().then(res => {
// // this.applicationList=res
// })
}, },
methods: { methods: {
//
applycarFn() { applycarFn() {
upVehicleApi().then(res => {
Toast(res.msg)
})
this.step = 2 this.step = 2
}, },
//
upCarFn() { upCarFn() {
upVehicleApi({ upVehicleApi({
license: this.carLicense license: this.carLicense
}).then(res => { }).then(res => {
this.show = false this.show = false
this.step = 2
}) })
// upVehicleApi({
// license: this.carLicense
// }).then(res => {
// this.show = false
// })
console.log(this.carLicense) console.log(this.carLicense)
}, },
signFn() { signFn() {
@ -235,10 +313,6 @@
Toast(res.msg) Toast(res.msg)
}) })
this.showPop = false this.showPop = false
// this.isNewCheck = true
}, },
navgo(url) { navgo(url) {
@ -246,23 +320,50 @@
url url
}) })
}, },
sectionChange(index) {
this.curNow = index.index;
console.log(this.curNow)
// this.getOrderList()
},
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.serch { .dots {
margin: 28rpx 28rpx 0 28rpx; animation: loadingDots 1s infinite;
}
@keyframes loadingDots {
0% {
opacity: 0;
}
25% {
opacity: 0;
}
50% {
opacity: 1;
}
75% {
opacity: 1;
}
100% {
opacity: 0;
}
} }
.noCar { .noCar {
// background-color: red;
padding: 50rpx; padding: 50rpx;
margin-top: 30vh;
// position: absolute;
// width: 80vw;
// height: auto;
// position: absolute;
// top: 40vh;
// left: 50vw;
// transform: translate(-50%, -50%);
} }
.info { .info {
@ -316,13 +417,12 @@
background-color: #FF7C32; background-color: #FF7C32;
color: white; color: white;
padding: 0 10rpx; padding: 0 10rpx;
border-radius: 15rpx; border-radius: 15rpx // width: 170rpx;
// width: 170rpx;
} }
.text { .text {
// background-color: lightyellow; // background-color: lightyellow;
max-width: 450rpx; max-width: 400rpx;
white-space: nowrap; white-space: nowrap;
/* 让文本不换行 */ /* 让文本不换行 */

View File

@ -0,0 +1,69 @@
<template>
<view class="">
<view class="box">
<view class="">
<u--image :showLoading="true" src="/static/img/contract/ok_b.png" width="150rpx" height="150rpx"
mode="aspectFill">
</u--image>
</view>
<view class="info">
生成合同成功,等待风控部审核 <text class="dots">...</text>
</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.box {
// background-color: red;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
margin-top: 30vh;
}
.info {
margin-top: 50rpx;
// font-size: 52.63rpx;
font-weight: bold;
}
.dots {
animation: loadingDots 1s infinite;
opacity: 0;
animation-delay: 0.2s;
}
@keyframes loadingDots {
0% {
opacity: 0;
}
25% {
opacity: 0;
}
50% {
opacity: 1;
}
75% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>

View File

@ -1,7 +1,5 @@
<template> <template>
<view> <view>
<!-- 有车辆 -->
<view v-if="1">
<view class="content"> <view class="content">
<view :class="allMap?'map1':'map2'" style="position: relative;"> <view :class="allMap?'map1':'map2'" style="position: relative;">
<map :class="mapClass" id="map" :enable-zoom="true" :polyline="polyline" :markers='markers' <map :class="mapClass" id="map" :enable-zoom="true" :polyline="polyline" :markers='markers'
@ -11,8 +9,6 @@
</view> </view>
<view v-if="!allMap"> <view v-if="!allMap">
<view class="query"> <view class="query">
<!-- <u--input placeholder="请选择日期" suffixIcon="clock" class="ipt" border="surround"
v-model="queryData" @focus='fousFn'></u--input> -->
<view class="ipt" @click="showDate=true"> <view class="ipt" @click="showDate=true">
<text>{{queryData}}</text> <text>{{queryData}}</text>
<u-icon name="clock" size="24"></u-icon> <u-icon name="clock" size="24"></u-icon>
@ -22,154 +18,122 @@
<view class="personnel_list" @click="toDetail('/subpkg/property/vehicle')"> <view class="personnel_list" @click="toDetail('/subpkg/property/vehicle')">
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<text><!-- <!-- {{datas.}} --></text> <text>{{datas.car_license}}</text>
</view> </view>
<view class="cards_content"> <view class="cards_content">
<view class="right"> <view class="right">
<view class="li"> <view class="li">
<text>行驶总里程: </text> <text>行驶总里程: {{datas.mileage}}</text>
<text> <!-- {{datas.}} --></text>
</view>
<view class="li">
<text>本公司签约时间: </text>
<text><!-- {{datas.}} --></text>
</view> </view>
<view class="li"> <view class="li">
<text>承租公司: </text> <text>承租公司: </text>
<text><!-- {{datas.}} --> </text> <text>{{datas.company.company_name}} </text>
</view> </view>
<view class="li"> <view class="li">
<text>负责人: </text> <text>负责人: </text>
<text><!-- {{datas.}} --> </text> <text>{{datas.company.master_name}} </text>
</view> </view>
<view class="li"> <view class="li">
<text>联系方式: </text> <text>联系方式: </text>
<text> <!-- {{datas.}} --> </text> <text> {{datas.company.master_phone}} </text>
</view> </view>
<view class="li"> <view class="li">
<text>所属区域: </text> <text>所属区域: </text>
<text> <!-- {{datas.}} --></text> <text> {{datas.company.area_name}}</text>
</view> </view>
<view class="li"> <view class="li">
<text>签约时间: </text> <text>签约时间: </text>
<text><!-- {{datas.}} --> </text> <text>{{datas.rent_time}} </text>
</view> </view>
<view class="li"> <view class="li">
<text>到期时间: </text> <text>到期时间: </text>
<text> <!-- {{datas.}} --> </text> <text> {{datas.rent_time}} </text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-calendar @close='showDate=false' color="#0122C7" :show="showDate" @confirm="dateFn"></u-calendar> <u-calendar @close='showDate=false' :minDate="minDate" :maxDate="maxDate" color="#0122C7" :show="showDate"
@confirm="dateFn"></u-calendar>
</view> </view>
<!-- 没有车辆 -->
<!-- <view class="" v-else>
<view class="" v-if="!isMycar">
<view class="empty_car">
<view>
您还没有所属车辆哦,请等待镇公司发放车辆或使用自有车辆并绑定系统
</view>
<u-button @click="showPop=true" type="primary" class="btn_cls">
上传自有车辆</u-button>
</view>
<view class="">
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
title="请输入车牌号">
<view class="slot-content">
<u--input placeholder="请输入内容" v-model="myCarnum"></u--input>
</view>
</u-modal>
</view>
</view>
<view style="text-align: center;margin-top: 100rpx;" v-if="isMycar">
您上传自有车两,系统正在审核中,请耐心等待
</view>
</view>
-->
</view>
</template> </template>
<script> <script>
import mybtn from "@/components/mybtn/mybtn.vue" import mybtn from "@/components/mybtn/mybtn.vue"
import { import {
getvehicleDetail, getvehicleDetailApi,
locusApi locusApi,
villageCompanyApi
} from "@/api/property.js" } from "@/api/property.js"
import { import {
Toast Toast
} from "../../libs/uniApi"; } from "../../libs/uniApi";
const d = new Date()
const year = d.getFullYear()
let month = d.getMonth() + 1
month = month < 10 ? `0${month}` : month
const date = d.getDate()
export default { export default {
components: { components: {
mybtn mybtn
}, },
data() { data() {
return { return {
minDate: `${year}-${month}-${date -30}`,
maxDate: `${year}-${month}-${date }`,
allMap: false, allMap: false,
showDate: false, showDate: false,
// isMycar: false,
showPop: false, showPop: false,
datas: {}, datas: {},
queryData: "请选择时间", queryData: "请选择时间",
// myCarnum: "",
mapClass: 'custom-map', mapClass: 'custom-map',
scale: 17, scale: 17,
markers: [ markers: [{
//
{
id: 1,
latitude: 28.8733,
longitude: 105.445717,
iconPath: '../../static/img/logistics/WZ.png', //
},
//
{
id: 2, id: 2,
latitude: 28.8733, latitude: 28.8733,
longitude: 105.444828, longitude: 105.444828,
iconPath: '../../static/img/logistics/QS.png', // iconPath: '../../static/img/logistics/QS.png', //
} }],
],
polyline: [], polyline: [],
} }
}, },
onLoad(options) { onLoad(options) {
// getvehicleDetail().then(res => { if (this.$route.query.type) {
// this.datas = res villageCompanyApi().then(res => {
// }) this.datas = res.data
})
return
}
// console.log(this.$route.query.id)
getvehicleDetailApi({
car_id: this.$route.query.id
}).then(res => {
this.datas = res.data
console.log()
})
}, },
methods: { methods: {
dateFn(e) { dateFn(e) {
// console.log(e) // console.log(e)
this.queryData = e[0] this.queryData = e[0]
this.showDate = false this.showDate = false
}, },
// confirm() {
// if (this.myCarnum) {
// console.log(this.myCarnum)
// this.showPop = false
// this.isMycar = true
// }
// },
showPloyline() { showPloyline() {
// console.log(this.queryData) console.log(this.queryData)
return
// this.queryData // this.queryData
locusApi({
// car_id: 7,
// start_time: `${this.queryData} 00:00:00`,
// end_time: `${this.queryData} 23:59:59`,
car_id: 7,
end_time: '2023-08-29 23:59:59',
start_time: '2023-08-29 00:00:00',
}).then(res => {
console.log(res)
})
let points = [{ let points = [{
latitude: 28.916722, latitude: 28.916722,
longitude: 105.443274, longitude: 105.443274,
@ -192,8 +156,6 @@
}, },
}, },
onPullDownRefresh() { onPullDownRefresh() {
// this.getOrderList();
// this.getIndexList()
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },

View File

@ -21,7 +21,7 @@ function baseRequestTwo(url, method, data, {
noAuth = false, noAuth = false,
noVerify = false noVerify = false
}) { }) {
let Url = "http://logistics.lihaink.cn", let Url = "https://logistics.lihaink.cn",
header = HEADER; header = HEADER;
if (!noAuth) { if (!noAuth) {
// 已经未登录了,禁止请求 // 已经未登录了,禁止请求
@ -49,7 +49,12 @@ function baseRequestTwo(url, method, data, {
// url: Url + '/api/v1' + url, // url: Url + '/api/v1' + url,
url: Url + '/api' + url, url: Url + '/api' + url,
method: method || 'GET', method: method || 'GET',
header: header, header: {
...header,
...{
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}
},
data: method != 'GET' ? data || {} : {}, data: method != 'GET' ? data || {} : {},
params: method == 'GET' ? data : {}, params: method == 'GET' ? data : {},
success: (res) => { success: (res) => {

View File

@ -3,7 +3,9 @@ import {
HEADER, HEADER,
TOKENNAME, TOKENNAME,
} from '@/config/app'; } from '@/config/app';
import { Toast } from '../libs/uniApi'; import {
Toast
} from '../libs/uniApi';
// import { checkLogin } from '../libs/login'; // import { checkLogin } from '../libs/login';
import store from '../store'; import store from '../store';
@ -48,7 +50,12 @@ function baseRequestTwo(url, method, data, {
// url: Url + '/api/v1' + url, // url: Url + '/api/v1' + url,
url: Url + '/api' + url, url: Url + '/api' + url,
method: method || 'GET', method: method || 'GET',
header: header, header: {
...header,
...{
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}
},
data: method != 'GET' ? data || {} : {}, data: method != 'GET' ? data || {} : {},
params: method == 'GET' ? data : {}, params: method == 'GET' ? data : {},
success: (res) => { success: (res) => {
@ -70,12 +77,10 @@ function baseRequestTwo(url, method, data, {
} else if (res.data.code == 1) { } else if (res.data.code == 1) {
store.commit("SET_REQUEST"); store.commit("SET_REQUEST");
reslove(res.data); reslove(res.data);
} } else if (res.data.code == 200) {
else if (res.data.code == 200){
store.commit("SET_REQUEST"); store.commit("SET_REQUEST");
reslove(res.data.data); reslove(res.data.data);
} } else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
toLogin(); toLogin();
reject(res.data); reject(res.data);
} else if (res.data.code == 501) { } else if (res.data.code == 501) {