diff --git a/api/property.js b/api/property.js
index 2acb91e..c3621f1 100644
--- a/api/property.js
+++ b/api/property.js
@@ -14,6 +14,9 @@ export const upVehicleApi = (data) => oahttp.post('/vehicle/rentApply', data)
export const applycarApi = (data) => oahttp.post('/vehicle/rentApply', data)
// 显示轨迹
export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
+// 当前车辆位置信息
+// export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
+// api / getCarLocal
// 签约列表
export const getAgencyListApi = (data) => oahttp.get('/vehicle/rentApplyList', data)
// 签约公司详情
@@ -28,6 +31,13 @@ export const sendcontractApi = (data) => oahttp.post('/vehicle/initiatingRentCar
export const overruleApi = (data) => oahttp.post('/vehicle/rejectRentApply', data)
// 小组公司详情
export const villageCompanyApi = (data) => oahttp.get('/vehicle/villageCompanyIndex', data)
+
+// 重新发送短信
+export const sendMsgApi = (data) => oahttp.post('/vehicle/sendSmsAgain', data)
+// 解约
+export const cancelContractApi = (data) => oahttp.post('/vehicle/cancelContract', data)
+// 镇街公司合同列表
+export const ContractListApi = (data) => oahttp.get('/vehicle/townCompanyContractList', data)
// 资产详情
// export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data)
diff --git a/pages.json b/pages.json
index 98be749..9e6bf10 100644
--- a/pages.json
+++ b/pages.json
@@ -562,6 +562,15 @@
"navigationBarTextStyle": "white"
}
+ }, {
+ "path": "property/contractList",
+ "style": {
+ "navigationBarTitleText": "合同列表",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#0122C7",
+ "navigationBarTextStyle": "white"
+ }
+
}, {
"path": "buyShare/buyShare",
"style": {
diff --git a/subpkg/contract/contract.vue b/subpkg/contract/contract.vue
index 340c46d..31d7158 100644
--- a/subpkg/contract/contract.vue
+++ b/subpkg/contract/contract.vue
@@ -12,7 +12,8 @@
-
+
电子合同
@@ -149,30 +150,30 @@
},
methods: {
navTo(url) {
- if(url){
- uni.showLoading({
- title: '加载中',
- mask: true
- });
- uni.navigateTo({
- url: url,
- success() {
- uni.hideLoading()
- }
- })
- }else Toast('暂未开放')
+ if (url) {
+ uni.showLoading({
+ title: '加载中',
+ mask: true
+ });
+ uni.navigateTo({
+ url: url,
+ success() {
+ uni.hideLoading()
+ }
+ })
+ } else Toast('暂未开放')
},
- navToContract (contract_no) {
- download_file({
- applyNo: contract_no
- }).then(res => {
- if (res.code != 1) {
- Toast(res.msg||'合同未签订')
- }
- uni.navigateTo({
- url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
- })
- })
+ navToContract(contract_no) {
+ download_file({
+ applyNo: contract_no
+ }).then(res => {
+ if (res.code != 1) {
+ Toast(res.msg || '合同未签订')
+ }
+ uni.navigateTo({
+ url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
+ })
+ })
},
initLoadConfig() {
this.loadConfig.page = 1;
diff --git a/subpkg/property/agencyList.vue b/subpkg/property/agencyList.vue
index e449f60..e452c38 100644
--- a/subpkg/property/agencyList.vue
+++ b/subpkg/property/agencyList.vue
@@ -12,7 +12,7 @@
- {{item.village_company_name}}提出租赁车辆一辆
+ {{item.company_b_name}}提出租赁车辆一辆
diff --git a/subpkg/property/chosseCompany.vue b/subpkg/property/chosseCompany.vue
index 6b2a47e..1641602 100644
--- a/subpkg/property/chosseCompany.vue
+++ b/subpkg/property/chosseCompany.vue
@@ -1,42 +1,62 @@
-
+
{{dataList.create_time.slice(0,10)}} 提出申请
+
+
+
+ {{dataList.create_time.slice(0,10)}} 提出解除申请
+
+
+
- {{dataList.village_company_name}}
+ {{dataList.company_b_name}}
- 详情
+ 详情
法人姓名 :
- {{dataList.village_company_user}}
+ {{dataList.company_b_user}}
已签约
-
-
-
联系电话 :
- {{dataList.village_company_phone}}
+ {{dataList.company_b_phone}}
-
+
+
+
+
+ 自有车辆
+
+
+ 车牌号:{{dataList.cars_info}}
+
+ 自有车辆
+
+
+
+
+
+
+
空闲车辆
自有车辆
@@ -53,42 +73,75 @@
+
+
+
+
+
+
+ 《租赁合同》
+
+ {{'2023-03-03'}}
+
+
+
+
+
+
+ 查看
+
+
+
+
+ {{dataList.status}}
+
-
+
-
+
-
+
-
-
+
+
-
+
- 《入股合同》
+ {{ dataList.type!=2? "《租赁合同》":"解除合同" }}
{{'2023-03-03'}}
-
+
+
- 查看
+ 查看
-
-
+
+
+
-
+
+
+
+
@@ -105,57 +158,108 @@
getAgencyDetailApi,
contractApi,
overruleApi,
- sendcontractApi
+ sendcontractApi,
+ sendMsgApi
} from "@/api/property.js"
+ import {
+ download_file
+ } from "@/api/junziqian.js"
import {
Toast
} from "../../libs/uniApi"
export default {
data() {
return {
+ times: 5,
dataList: {},
overruleValue: "",
showPop: false,
checked: [],
- carList: [1, 2]
+ carList: [],
+ flag: true,
+ lg: false,
}
},
- onLoad() {
- console.log(this.$route.query)
+ onLoad(options) {
+ // console.log(this.$route.query)
// console.log(6565)
getAgencyDetailApi({
- id: this.$route.query.id
+ id: options.id
}).then(res => {
// 13043214321
- this.dataList = res.data.apply
- this.carList = res.data.cars
+ this.dataList = res.data.vehicleContract
+ this.carList = res.data.vehicleRentCars
+ this.dataList.cars_info = JSON.parse(this.dataList.cars_info).license
+ if (this.dataList.status == 3) {
+ uni.navigateBack()
+ }
})
},
methods: {
+ sendAgainFn() {
+ sendMsgApi({
+ id: this.dataList.id
+ })
+ },
+ sendFn() {
+ sendcontractApi({
+ id: this.dataList.id
+ })
+ },
+
confirm() {
// console.log(this.overruleValue)
overruleApi({
- apply_id: this.dataList.id,
+ id: this.dataList.id,
content: this.overruleValue,
}).then(res => {
- Toast("操作成功")
this.showPop = false
+ Toast("操作成功")
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 2000)
+ })
+ },
+ timer() {
+ let that = this
+ let timers = setInterval(() => {
+ that.times--
+ if (that.times <= 0) {
+ this.flag = true
+ clearInterval(timers)
+ }
+ }, 1000)
+
+ },
+ navToContract(contract_no) {
+ download_file({
+ applyNo: contract_no
+ }).then(res => {
+ if (res.code != 1) {
+ Toast(res.msg || '合同未签订')
+ }
+ uni.navigateTo({
+ url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
+ })
})
},
contractFn() {
console.log(this.checked)
contractApi({
- apply_id: this.dataList.id,
- car_id: this.checked[0].car_id
+ id: this.dataList.id,
+ car_id: this.checked[0]?.car_id ? this.checked[0].car_id : ""
}).then(res => {
this.navTo('/subpkg/property/success')
})
this.navTo('/subpkg/property/success')
},
sendcontractFn() {
- // sendcontractApi({
- // id:
- // })
+ this.lg ? this.sendAgainFn() : this.sendFn()
+ Toast("操作成功")
+ this.flag = false
+ this.times = 10
+ this.timer()
+ this.lg = true
},
navTo(url) {
uni.navigateTo({
@@ -173,78 +277,39 @@
}
.card {
- margin: 28rpx;
- width: 694rpx;
- background-color: #fff;
+ background-color: white;
border-radius: 14rpx;
+ padding: 20rpx;
- .c_title {
- color: #0022C7;
- font-size: 32rpx;
- font-weight: 500;
- padding: 28rpx;
- }
-
- .c_body {
- margin: 28rpx;
- padding-bottom: 28rpx;
+ .contract {
display: flex;
- border-bottom: 1px solid #F3F4F8;
+ justify-content: space-between;
- &:last-child {
- border-bottom: none;
- }
+ .left {
+ display: flex;
+ align-items: center;
- .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 {
+ .text {
+ // background-color: red;
+ height: 80px;
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;
- }
+ flex-direction: column;
+ justify-content: space-around;
+ margin-left: 15rpx;
}
+ }
- .b_time {
- color: #666666;
- }
+ .right {
+ display: flex;
+ align-items: center;
}
}
+
}
+
+
.cards {
margin: 28rpx;
width: 694rpx;
diff --git a/subpkg/property/contractList.vue b/subpkg/property/contractList.vue
new file mode 100644
index 0000000..29ee3a7
--- /dev/null
+++ b/subpkg/property/contractList.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+ 《租赁合同》
+
+ {{item.create_time}}
+
+
+
+
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpkg/property/index.vue b/subpkg/property/index.vue
index ffa33ee..5be847d 100644
--- a/subpkg/property/index.vue
+++ b/subpkg/property/index.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -28,8 +28,9 @@
+
-
+
@@ -39,19 +40,23 @@
-
+
你已提交用车申请,后台正在加快处理中,请耐心等待哦
...
+
+ 你已提交解除申请
+ ...
+
- 你的申请于2022年12月12日被驳回
+ 你的申请于{{datas.update_time}}被驳回
- 驳回理由:xxxxxxxxxx
+ 驳回理由: {{datas.reject_message}}
请修改相应内容重新提交哦
@@ -75,6 +80,20 @@
+
+
+
+
+
+ 你的车辆已到期,请重新签约
+
+
+
+ 申请用车
+
+
+
@@ -82,7 +101,7 @@
可监管车辆数量 {{datas.monitor_num}}
- 租赁 {{datas.rent_num}}
+ 租赁 {{datas.rent_num}}(待审核:{{datas.apply_num}})
@@ -90,17 +109,17 @@
可再租赁车辆:{{datas.can_rent_num}}辆
- 自有车辆 {{datas.self_num}}
+ 自有车辆 {{datas.self_num}}
-
+
+
签约申请
-
+
更多
-
- {{item.village_company_name}}提出租赁车辆一台
+ {{item.company_b_name}}提出租赁车辆一台
@@ -120,18 +139,18 @@
-
+
{{item.car_license}}
-
+
使用人:
- {{item.rent_company.master_name}}
+ {{item.rent_user.user_name}}
自有车辆
租赁车辆
@@ -139,18 +158,16 @@
联系方式:
- {{item.rent_company.master_phone}}
+ {{item.rent_user.user_phone}}
所属公司:
- {{item.rent_company.company_name}}
+ {{item.rent_user.company_name}}
签约时间:
{{item.rent_time}}
-
-
@@ -162,15 +179,20 @@
租赁车辆
-
- 暂未出租,快去选择承租对象吧!
-
+
+
+
+
+
+
+
+
@@ -178,8 +200,9 @@
-
+
+
@@ -198,10 +221,11 @@
import {
Toast
} from "../../libs/uniApi";
+ import mytn from "@/components/mybtn/mybtn.vue"
// Toast("请至少选择一辆车")
export default {
components: {
- // mybtn
+ mytn
},
name: "vehicle",
data() {
@@ -217,11 +241,13 @@
datas: {},
dataList: [],
newCarNum: "",
- newcarTit: ""
+ newcarTit: "",
+
};
},
+
onLoad() {
let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
this.company_type = type
@@ -229,13 +255,21 @@
if (type == 18) {
// getvehicleDetailApi().then(res => {})
villageCompanyApi().then(res => {
+ if (!res.data?.id) {
+
+ this.showLoading = false
+ this.step = 999
+ return
+ }
+
this.showLoading = false
- this.step = res.data.status || 999
- console.log(res.data.cars_info.id)
+ this.datas = res.data
+ this.step = res.data.status
+
switch (this.step) {
case 3:
- uni.navigateTo({
- url: `/subpkg/property/vehicle_a?type=2`
+ uni.redirectTo({
+ url: `/subpkg/property/vehicle_a?id=${res.data.cars_info.id}`
})
// this.step =
break;
@@ -250,9 +284,10 @@
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.applicationList = res.data.apply
this.dataList = res.data.car_list
this.showLoading = false
})
@@ -282,15 +317,15 @@
applycarFn() {
upVehicleApi().then(res => {
Toast(res.msg)
+ this.step = 2
})
- this.step = 2
},
// 自有车辆
upCarFn() {
upVehicleApi({
license: this.carLicense
}).then(res => {
- this.show = false
+ // this.show = false
this.step = 2
})
// upVehicleApi({
@@ -299,7 +334,8 @@
// }).then(res => {
// this.show = false
// })
- console.log(this.carLicense)
+ this.show = false
+
},
signFn() {
this.toDetail("/subpkg/property/chosseCompany")
@@ -353,8 +389,10 @@
}
.noCar {
- padding: 50rpx;
+ padding: 100rpx;
margin-top: 30vh;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
// position: absolute;
// width: 80vw;
// height: auto;
diff --git a/subpkg/property/success.vue b/subpkg/property/success.vue
index 83df54b..8a7ab60 100644
--- a/subpkg/property/success.vue
+++ b/subpkg/property/success.vue
@@ -12,13 +12,16 @@
-
-
-
-
\ No newline at end of file
diff --git a/utils/oahttp.js b/utils/oahttp.js
index b61542c..97c06bb 100644
--- a/utils/oahttp.js
+++ b/utils/oahttp.js
@@ -51,10 +51,8 @@ function baseRequestTwo(url, method, data, {
url: Url + '/api' + url,
method: method || 'GET',
header: {
- ...header,
- ...{
- 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
- }
+ ...header
+
},
data: method != 'GET' ? data || {} : {},
params: method == 'GET' ? data : {},