This commit is contained in:
weipengfei 2023-09-05 12:07:20 +08:00
commit fe6c79ca90
5 changed files with 69 additions and 48 deletions

View File

@ -13,7 +13,6 @@ httpApiThree = 'https://worker-task.lihaink.cn' //正式
// #ifdef H5 // #ifdef H5
// httpApiThree = 'baseUrlTest' //生产 // httpApiThree = 'baseUrlTest' //生产
// #endif // #endif
// if (process.env.NODE_ENV === "development") { // if (process.env.NODE_ENV === "development") {
// httpApi = "http://192.168.0.222:8324" // httpApi = "http://192.168.0.222:8324"
// // #ifdef MP-WEIXIN // // #ifdef MP-WEIXIN

View File

@ -72,7 +72,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 合同 --> <!-- 合同 -->
<view class="card" v-if="dataList.type==2"> <view class="card" v-if="dataList.type==2">
<view class="contract"> <view class="contract">
@ -94,12 +93,14 @@
</view> </view>
</view> </view>
<!-- 车辆信息为空 -->
<u-empty v-if="flag1" text="你还没有车辆哦,快去向平台申请用车吧" icon="../../static/img/empty/data.png"> </u-empty>
<!-- 按钮 --> <!-- 按钮 -->
<view class="btns"> <view class="btns">
<!-- 生成合同 --> <!-- 生成合同 -->
<view class="" v-if="dataList.status==-1"> <view class="" v-if="dataList.status==-1">
<u-button :disabled="false" type="primary" @click="showPop=true" <u-button type="primary" @click="showPop=true" style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32"
style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" text="申请驳回"></u-button> text="申请驳回"></u-button>
<u-button :disabled="flag1" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button> <u-button :disabled="flag1" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
</view> </view>
<!-- 审核中 --> <!-- 审核中 -->
@ -131,15 +132,12 @@
</view> </view>
<u-button v-if="dataList.status==1" :disabled="false" type="primary" text="发送合同" @tap="sendFn" <u-button v-if="dataList.status==1" :disabled="false" type="primary" text="发送合同" @tap="sendFn"
color="#0122C7"></u-button> color="#0122C7"></u-button>
<!-- <u-button v-if="flag" :disabled="false" type="primary" text="发送合同" @tap="sendMsgFn"
color="#0122C7"></u-button> -->
<u-button v-else :disabled="times" type="primary" :text="`重新发送${times?times+'s':''}`" @tap="sendAgainFn" <u-button v-else :disabled="times" type="primary" :text="`重新发送${times?times+'s':''}`" @tap="sendAgainFn"
color="#0122C7"></u-button> color="#0122C7"></u-button>
</view> </view>
</view> </view>
<!--uview 组件 --> <!--uview 组件 -->
<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="请输入驳回理由">
@ -180,7 +178,6 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
getAgencyDetailApi({ getAgencyDetailApi({
id: options.id id: options.id
}).then(res => { }).then(res => {
@ -192,8 +189,8 @@
if (this.dataList.status == 3) { if (this.dataList.status == 3) {
uni.navigateBack() uni.navigateBack()
} }
if (this.carList.length > 0 || this.dataList.cars_info) {
console.log(this.dataList.cars_info) console.log(this.dataList.cars_info)
if (this.carList.length >= 0 || this.dataList.cars_info) {
this.flag1 = false this.flag1 = false
} }
// console.log(this.dataList) // console.log(this.dataList)

View File

@ -99,6 +99,7 @@
</view> </view>
<!-- 镇街公司 --> <!-- 镇街公司 -->
<view v-if='company_type==16'> <view v-if='company_type==16'>
<view class="info"> <view class="info">
<text>可监管车辆数量 {{datas.monitor_num}}</text> <text>可监管车辆数量 {{datas.monitor_num}}</text>
<view @click="showPop=true" class="not_leased"> <view @click="showPop=true" class="not_leased">
@ -201,6 +202,13 @@
<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 :show="showpopp" title="提示" @confirm="confirmFn" @close="showpopp=false"
:closeOnClickOverlay="true">
<view class="slot-content">
<rich-text nodes="你的申请已提交"></rich-text>
</view>
</u-modal>
</view> </view>
</view> </view>
<mytn text='合同列表' v-if="datas.rent_num" @click="navgo('/subpkg/property/contractList')"></mytn> <mytn text='合同列表' v-if="datas.rent_num" @click="navgo('/subpkg/property/contractList')"></mytn>
@ -231,6 +239,7 @@
name: "vehicle", name: "vehicle",
data() { data() {
return { return {
aaa: 0,
showLoading: true, showLoading: true,
company_type: "", company_type: "",
// 123 // 123
@ -243,7 +252,8 @@
dataList: [], dataList: [],
newCarNum: "", newCarNum: "",
newcarTit: "", newcarTit: "",
flag: false flag: false,
showpopp: false,
@ -309,6 +319,18 @@
methods: { methods: {
confirmFn() {
uni.reLaunch({
url: '/subpkg/property/index' //
});
},
test() {
this.aaa = 1;
this.showpopp = true;
// uni.reLaunch({
// url: '/subpkg/property/index' //
// });
},
// //
applycarFn() { applycarFn() {
upVehicleApi().then(res => { upVehicleApi().then(res => {
@ -337,13 +359,14 @@
}, },
confirm() { confirm() {
if (!this.newCarNum) return if (!this.newCarNum) return
this.showPop = false
leaseApi({ leaseApi({
num: Number(this.newCarNum) num: Number(this.newCarNum)
}).then(res => { }).then(res => {
this.newCarNum = "" this.newCarNum = ""
Toast(res.msg) // Toast(res.msg)
this.showpopp = true
}) })
this.showPop = false
}, },
navgo(url) { navgo(url) {

View File

@ -48,7 +48,7 @@
</view> </view>
<view class="li" v-if="datas.type"> <view class="li" v-if="datas.type">
<text>到期时间: </text> <text>到期时间: </text>
<text> {{datas.rent_time}} </text> <text> {{overDateFn(datas.rent_time) }} </text>
</view> </view>
</view> </view>
</view> </view>
@ -146,7 +146,10 @@
// car_id: this.$route.query.id // car_id: this.$route.query.id
car_id: options.id car_id: options.id
}).then(res => { }).then(res => {
this.datas = res.data this.datas = res.data
this.markers[0].latitude = res.data.position?.lat
this.markers[0].longitude = res.data.position?.lon
}) })
this.minDateFn() this.minDateFn()
@ -157,6 +160,12 @@
}, },
methods: { methods: {
//
overDateFn(date) {
var specifiedDate = new Date(date);
specifiedDate.setMonth(specifiedDate.getMonth() + 2);
return specifiedDate.toISOString().split('T')[0]
},
showContractFn(url) { showContractFn(url) {
console.log(url) console.log(url)
uni.navigateTo({ uni.navigateTo({
@ -188,15 +197,7 @@
this.showDate = false this.showDate = false
}, },
showPloyline() { showPloyline() {
let points = [{ let points = []
latitude: 28.916722,
longitude: 105.443274,
},
{
latitude: 28.936762,
longitude: 105.443132,
},
]
locusApi({ locusApi({
car_id: 7, car_id: 7,
end_time: `${this.queryData} 23:59:59`, end_time: `${this.queryData} 23:59:59`,

View File

@ -21,7 +21,8 @@ function baseRequestTwo(url, method, data, {
noAuth = false, noAuth = false,
noVerify = false noVerify = false
}) { }) {
let Url = "https://logistics.lihaink.cn", let Url = "https://logistics.lihaink.cn", //正式环境
// let Url = "https://ceshi-logistics.lihaink.cn", //测试环境
header = HEADER; header = HEADER;
if (!noAuth) { if (!noAuth) {
// 已经未登录了,禁止请求 // 已经未登录了,禁止请求