From 40a7d8db73f81ad10de03684dc9f6720e18cc315 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 08 八月 2023 16:11:14 +0800
Subject: [PATCH] 称重异常修改
---
pages/public-page/forward/forward.vue | 1174 ++++++++++++++------------
pages/loadUnload-page/loadUnload-page.vue | 4
pages/login/login.vue | 50 +
pages/register/register.vue | 809 ++++++++++--------
pages.json | 11
pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue | 164 ++-
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue | 2
pages/login/PrivacyAgreementText/PrivacyAgreementText.vue | 117 ++
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 203 +++-
api/globalApi.js | 10
manifest.json | 8
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 2
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 2
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue | 2
14 files changed, 1,479 insertions(+), 1,079 deletions(-)
diff --git a/api/globalApi.js b/api/globalApi.js
index 6265212..c747764 100644
--- a/api/globalApi.js
+++ b/api/globalApi.js
@@ -379,7 +379,7 @@
/**
* @description 瑁呭嵏鍛樻煡鐪嬫墍鏈夌叅绉嶇被鍨� */
getCoalNameAll: {
- url: '/wrzs/tmtaskcoal/getCoalNameAll',
+ url: '/wrzs/jccoalbunker/getCoalNameAll',
method: 'GET'
},
/**
@@ -405,5 +405,11 @@
tmAbnormalTextAdd: {
url: '/wrzs/tmtaskcoal/tmAbnormalTextAdd',
method: 'POST'
- }
+ },
+ /**
+ * @description 鑾峰彇appid鍜宻ecret */
+ getAppidAndSercet: {
+ url: '/wrzs/wx/getAppidAndSercet',
+ method: 'GET'
+ },
}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index ddeea72..b1f92f8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -50,7 +50,7 @@
"quickapp": {},
/* 灏忕▼搴忕壒鏈夌浉鍏� */
"mp-weixin": {
- "appid": "wx4a62fc1684c429a9",
+ "appid": "wxa48d51c9d0e23458",
"permission": {
"scope.userFuzzyLocation": {
"desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭瀹氫綅"
@@ -62,9 +62,7 @@
"optimization": {
"subPackages": true
},
- "requiredPrivateInfos": [
- "getFuzzyLocation"
- ],
+ "requiredPrivateInfos": ["getFuzzyLocation"],
"setting": {
"urlCheck": false,
"es6": true,
@@ -86,4 +84,4 @@
"enable": false
},
"vueVersion": "2"
-}
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index e7bbd4e..212cf31 100644
--- a/pages.json
+++ b/pages.json
@@ -233,7 +233,16 @@
}
}
- ],
+ ,{
+ "path" : "pages/login/PrivacyAgreementText/PrivacyAgreementText",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
"subPackages": [{
"root": "pages/register",
"pages": [{
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
index e88638e..076a5f9 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
@@ -123,7 +123,7 @@
orderCode: null,
orderPlanDetail: {},
coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
- '杩涘叆鍦洪櫌'
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
],
yyDailyList: [],
// 棰嗗彇鏁伴噺
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
index 837d437..05c1ce7 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
@@ -102,7 +102,7 @@
yyDailyList: {},
orderPlanDetail: {},
coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
- '杩涘叆鍦洪櫌'
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
],
index: ''
};
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 5bacd28..1434f5f 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -330,7 +330,7 @@
faYunDetailobj: {},
modalShow: false,
coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
- '杩涘叆鍦洪櫌'
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
]
};
},
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index 6831ae7..d324bf8 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -175,7 +175,7 @@
openName: ''
},
coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
- '杩涘叆鍦洪櫌'
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
], // 鐘舵��
weighHouseCode: '',
// 鏀剧┖寮圭獥鎺у埗鍙橀噺
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index 7a5cade..8a414af 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -101,6 +101,47 @@
</view>
<view v-else
style="width: 100%;height: 40rpx;"></view>
+ <view class="history-utils">
+ <view class="history-utils_item">
+ 骞冲潎鐨噸:{{avgSkin}}
+ </view>
+ <view class="history-utils_item btn">
+ <u-button plain
+ type="primary"
+ :text="historyShow?'闅愯棌鍘嗗彶绉伴噸':'鏄剧ず鍘嗗彶绉伴噸'"
+ @click="historyShow=!historyShow"></u-button>
+ </view>
+ </view>
+ <Transition name="slide-fade">
+ <view class="history-skin"
+ v-show="historyShow">
+ <view class="table-title">
+ <view class="table-title_item time">
+ 绉伴噸鏃堕棿
+ </view>
+ <view class="table-title_item coal-name">
+ 鐓ょ鍚嶇О
+ </view>
+ <view class="table-title_item skin">
+ 鐨噸閲嶉噺
+ </view>
+ </view>
+ <view class="history-skin_item"
+ v-for="item in tmTaskCoalList">
+ <view class="item createTime">
+ {{item.createTime}}
+ </view>
+ <view class="item">
+ {{item.coalName}}
+ </view>
+ <view class="item skin">
+ <view class="">
+ {{item.skin}}
+ </view>
+ </view>
+ </view>
+ </view>
+ </Transition>
<view class="bottom-block">
<view class="block-main">
<view class="main-information"
@@ -175,8 +216,7 @@
:disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin"
:loading="isConfirmWeighLoading"
loadingText="纭"
- @click="confirmWeigh"
- v-if="!historyBtn"></u-button>
+ @click="confirmWeigh"></u-button>
<u-button type="primary"
text="杩斿洖鍔犲噺鍚�"
:disabled="addAndSubtractCoalDisabled"
@@ -184,29 +224,6 @@
class="jiajian"
v-if="outBuy"></u-button>
</view>
- <view style="width: 200rpx;margin: auto;position: relative;"
- v-if="historyBtn"><u-button type="primary"
- text="鏄剧ず鍘嗗彶鐨噸"
- @click.stop="displayHistory"></u-button></view>
- <Transition name="slide-fade">
- <view class="history-skin"
- v-if="historyShow">
- <view class="history-skin_item"
- v-for="item in tmTaskCoalList">
- <view class="createTime">
- 鏃ユ湡:{{item.createTime.slice(0,10)}}
- </view>
- <view class="skin">
- <view class="">
- 鐨噸:
- </view>
- <view class="">
- {{item.skin}}
- </view>
- </view>
- </view>
- </view>
- </Transition>
<!-- 鏀剧┖寮圭獥 -->
<view class="evacuationModal">
<u-modal :show="evacuationModalShow"
@@ -263,6 +280,9 @@
this.weighData.overTmWaixiao = 1
}
this.changeweighHouseCode(params.weighHouseCode);
+ this.init();
+ this.changeWeigh('')
+ this.realTimeWeigh = 0
},
components: {
combinedTitle
@@ -321,11 +341,13 @@
outBuy: true,
// 鐨噸寮傚父鐩稿叧
abnormalContent: '',
- avgSkin: null, // 骞冲潎鐨噸
+ avgSkin: '', // 骞冲潎鐨噸
tmTaskCoalList: [],
abnormalModalShow: false,
historyBtn: false,
- historyShow: false
+ historyShow: true,
+ // 鏄惁鍦ㄧО鐨噸锛岀偣鍑荤‘瀹氱О閲嶅垽鏂槸鍚﹀紓甯�
+ isSkinWeigh: false
};
},
watch: {
@@ -341,9 +363,10 @@
.orderType ==
'杞嚭') {
if (this.weighList.skin == 0) {
+ this.isSkinWeigh = true
this.temporaryWeighObj.skin = newV;
- this.getAverageSkin(newV)
} else {
+ this.isSkinWeigh = false;
this.temporaryWeighObj.hair = newV;
this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(
2);
@@ -354,10 +377,11 @@
} else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList
.orderType == '杞叆') {
if (this.weighList.hair == 0) {
+ this.isSkinWeigh = false;
this.temporaryWeighObj.hair = newV;
} else {
+ this.isSkinWeigh = true;
this.temporaryWeighObj.skin = newV;
- this.getAverageSkin(newV)
this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
2);
this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
@@ -367,14 +391,6 @@
}
}
}
- },
- onShow() {
- this.init();
- this.changeisLogin(true)
- this.realTimeWeigh = 0
- },
- onHide() {
-
},
computed: {
...mapState(['globalweigh', 'globalinfraredStatus']),
@@ -406,7 +422,7 @@
}
},
methods: {
- ...mapMutations(['changeweighHouseCode', 'changeisLogin']),
+ ...mapMutations(['changeweighHouseCode', 'changeisLogin', 'changeWeigh']),
init() {
uni.showLoading({
title: "鍔犺浇涓�"
@@ -440,7 +456,9 @@
uni.hideLoading()
this.$u.toast('鍔犺浇澶辫触')
}
- });
+ }).then(() => {
+ this.getAverageSkin()
+ })
},
/**
* @纭绉伴噸绛夊緟鍚庣鎻愪緵瀹炴椂绉伴噸鎺ュ彛锛岃幏鍙栫毊閲嶏紝姣涢噸
@@ -449,16 +467,28 @@
if (this.isConfirmWeighLoading == false) {
this.isConfirmWeighLoading = true;
if (this.weighData.weigh != 0) {
- if (this.weighList.orderType == '澶栭攢') {
- if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
- this.saveWeigh();
+ if (this.isSkinWeigh) {
+ let xx = new BigNumber(this.avgSkin)
+ let yy = new BigNumber(this.globalweigh)
+ if (xx.minus(yy).toNumber() > 0.2) {
+ this.abnormalModalShow = true
} else {
- this.$u.toast('姣涢噸涓嶈兘灏忎簬鐨噸');
- this.isConfirmWeighLoading = false;
+ this.abnormalModalShow = false
+ this.saveWeigh();
}
} else {
this.saveWeigh();
}
+ // if (this.weighList.orderType == '澶栭攢') {
+ // if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
+ // this.saveWeigh();
+ // } else {
+ // this.$u.toast('姣涢噸涓嶈兘灏忎簬鐨噸');
+ // this.isConfirmWeighLoading = false;
+ // }
+ // } else {
+ // this.saveWeigh();
+ // }
} else {
this.$u.toast('鏈兘鑾峰彇鍦扮閲嶉噺');
this.isConfirmWeighLoading = false;
@@ -548,7 +578,7 @@
this.isInputOrigin = true;
}
},
- getAverageSkin(weigh) {
+ getAverageSkin() {
uni.showLoading({
title: "鍔犺浇涓�"
})
@@ -557,13 +587,13 @@
uni.hideLoading()
this.avgSkin = res.data.avgSkin
this.tmTaskCoalList = res.data.tmTaskCoalList
- let xx = new BigNumber(this.avgSkin)
- let yy = new BigNumber(weigh)
- console.log(weigh, this.avgSkin, yy.minus(xx).toNumber());
- if (xx.minus(yy).toNumber() <= 0.2) {
- this.abnormalModalShow = true
- this.historyBtn = true
- }
+ // let xx = new BigNumber(this.avgSkin)
+ // let yy = new BigNumber(weigh)
+ // console.log(weigh, this.avgSkin, yy.minus(xx).toNumber());
+ // if (xx.minus(yy).toNumber() <= 0.2) {
+ // this.abnormalModalShow = true
+ // this.historyBtn = true
+ // }
} else {
uni.hideLoading()
this.$u.toast('鍔犺浇澶辫触')
@@ -572,6 +602,7 @@
},
abnormalCancel() {
this.abnormalModalShow = false
+ this.isConfirmWeighLoading = false;
},
// 鎻愪氦寮傚父鍘熷洜
abnormalConfirm() {
@@ -585,17 +616,21 @@
uni.hideLoading()
this.$u.toast('鎻愪氦鎴愬姛')
this.abnormalModalShow = false
+ this.isConfirmWeighLoading = false
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ }, 1000);
+
} else {
uni.hideLoading()
this.$u.toast('鎻愪氦澶辫触')
this.abnormalModalShow = true
+ this.isConfirmWeighLoading = false
}
})
},
- displayHistory() {
- this.historyShow = true
-
- }
}
};
</script>
@@ -617,6 +652,31 @@
.slot-content {
width: 96%;
border: 1rpx solid rgb(220, 223, 230);
+ }
+
+ .table-title {
+ width: 96%;
+ @include flex;
+ position: absolute;
+ top: 8rpx;
+ color: #9e9399;
+
+ &_item {
+ width: 33.3%;
+ text-align: center;
+ }
+
+ .time {
+ padding-left: 20rpx;
+ }
+
+ .coal-name {
+ padding-left: 70rpx;
+ }
+
+ .skin {
+ padding-left: 10rpx;
+ }
}
.one {
@@ -817,7 +877,7 @@
}
.three {
- margin: 0 auto vww(20);
+ margin: 0 auto vww(30);
flex: 0.7;
display: flex;
color: #939393;
@@ -843,23 +903,43 @@
transition: all 0.3s ease-out;
}
+ .history-utils {
+ width: 96%;
+ margin: vww(10) auto;
+ @include flex;
+ justify-content: space-around;
+
+ &_item {
+ width: 50%;
+ }
+
+ .btn {
+ width: 180rpx;
+ }
+ }
+
.history-skin {
width: 96%;
height: vww(300);
- margin: vww(50) auto;
+ margin: auto;
margin-top: vww(10);
background: #ffffff;
box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
border-radius: 20rpx;
overflow: scroll;
color: #000;
-
+ position: relative;
.history-skin_item {
- width: 80%;
+ width: 96%;
height: vww(30);
@include flex;
- margin: vww(10) auto;
+ margin: vww(40) auto;
+
+ .item {
+ width: 33.3%;
+ text-align: center;
+ }
.createTime {
color: rgb(60, 156, 255);
@@ -867,7 +947,6 @@
.skin {
color: #f81414;
- @include flex;
width: 180rpx;
height: vww(30);
}
diff --git a/pages/loadUnload-page/loadUnload-page.vue b/pages/loadUnload-page/loadUnload-page.vue
index b161ba3..bdf7c6a 100644
--- a/pages/loadUnload-page/loadUnload-page.vue
+++ b/pages/loadUnload-page/loadUnload-page.vue
@@ -18,13 +18,13 @@
:key="index">
<view class="first-line">
<view class="dispatch-receive">
- <view class="dispatch">鐓ょ鍚嶇О:{{ item.coalName }}</view>
+ <view class="dispatch">鐓ょ鍚嶇О:{{ item }}</view>
</view>
<view class="">
<u-button type="primary"
plain
text="閫夋嫨"
- @click.stop="loadUnloadHandle(item.coalName)"></u-button>
+ @click.stop="loadUnloadHandle(item)"></u-button>
</view>
</view>
</view>
diff --git a/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue b/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue
new file mode 100644
index 0000000..3256993
--- /dev/null
+++ b/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue
@@ -0,0 +1,117 @@
+<template>
+ <view class="main">
+ <view class="title">
+ 闅愮鍗忚
+ </view>
+ <view class="illustrate">
+ 娆㈣繋浣跨敤鏃犱汉鍊煎畧灏忕▼搴忋�傛垜浠潪甯搁噸瑙嗘偍鐨勯殣绉侊紝鍥犳鍒跺畾浜嗕互涓嬮殣绉佹斂绛栵紝浠ユ槑纭鏄庢垜
+ 浠浣曟敹闆嗐�佷娇鐢ㄥ拰淇濇姢鎮ㄧ殑涓汉淇℃伅銆傝鎮ㄥ湪浣跨敤鎴戜滑鐨勫簲鐢ㄧ▼搴忓墠浠旂粏闃呰鍜岀悊瑙d互涓�
+ 闅愮鏀跨瓥锛�
+ </view>
+ <view class="">
+ <h2 class="section">1.涓汉淇℃伅鐨勬敹闆嗗拰浣跨敤</h2>
+ <p class="section-detail">
+ 褰撴偍浣跨敤鎴戜滑鐨勫簲鐢ㄧ▼搴忔椂锛屾垜浠渶瑕佹敹闆嗘偍鐨勪竴浜涗釜浜轰俊鎭紝鍖呮嫭浣嗕笉闄愪簬浠ヤ笅鍐呭</p>
+ <ul class="section-detail">
+ <li style="color: rgb(84, 84, 84);font-weight: bold;">
+ 1.1 鐢ㄦ埛璐︽埛淇℃伅锛氱敤浜庣敤鎴锋敞鍐屻�佺櫥褰曞拰涓汉淇℃伅绠$悊锛屽寘鎷敤鎴峰悕銆佸瘑鐮併�佸拰鐢佃瘽鍙风爜绛夈��</li>
+ <li>1.2 鐢ㄦ埛鐨勪釜浜轰俊鎭細鍖呮嫭浣嗕笉闄愪簬鐢ㄦ埛鐨�<text
+ style="color: rgb(84, 84, 84);font-weight: bold;">濮撳悕銆佸湴鍧�銆佸嚭鐢熸棩鏈熴�佹�у埆銆佽韩浠借瘉鍙风爜
+ </text>绛夛紝杩欎簺淇℃伅鍙互甯姪鎴戜滑鏇村ソ鍦版彁渚涘晢鍝佸拰鏈嶅姟</li>
+ <li>1.3 璁惧淇℃伅锛氭垜浠渶瑕佽闂偍鐨勮澶囦俊鎭紝鍖呮嫭璁惧鍨嬪彿銆佹搷浣滅郴缁熺増鏈�佸敮涓�璁惧
+ 鏍囪瘑绗︾瓑锛屼互渚挎垜浠洿濂藉湴涓烘偍鎻愪緵鏈嶅姟銆�</li>
+ <li>1.4 浣嶇疆淇℃伅锛氭垜浠渶瑕佽幏鍙栨偍鐨勪綅缃俊鎭紝浠ヤ究鎴戜滑鍙互鏇村ソ鍦颁负鎮ㄦ彁渚涙湇鍔�</li>
+ <li>1.5 缃戠粶淇℃伅锛氭垜浠渶瑕佹敹闆嗕竴浜涗笌鎮ㄧ殑浜掕仈缃戣繛鎺ユ湁鍏崇殑淇℃伅锛�<text
+ style="color: rgb(84, 84, 84);font-weight: bold;">鍖呮嫭浣嗕笉闄愪簬鎮ㄧ殑IP
+ 鍦板潃銆佹祻瑙堝櫒绫诲瀷銆両SP绛�</text></li>
+ <li>1.6 鐩告満鍜岀浉鍐屾潈闄愶細鎴戜滑闇�瑕佽闂偍鐨勭浉鏈哄拰鐩稿唽鏉冮檺锛屼互渚挎偍鍙互鎷嶇収銆佷笂浼犵収鐗�
+ 绛夛紝浠ヤ究鎴戜滑鏇村ソ鍦颁负鎮ㄦ彁渚涙湇鍔°��</li>
+ </ul>
+ </view>
+ <view class="">
+ <h2 class="section">2.涓汉淇℃伅鐨勪娇鐢ㄥ拰鍒嗕韩</h2>
+ <p class="section-detail">
+ 2.1 鎴戜滑鏀堕泦鎮ㄧ殑涓汉淇℃伅涓昏鏄负浜嗗悜鎮ㄦ彁渚涙洿濂界殑鏈嶅姟鍜屼紭鍖栨偍鐨勪娇鐢ㄤ綋楠屻�傛垜浠細涓ユ牸淇濇姢鎮ㄧ殑涓汉淇℃伅锛屽苟涓嶄細灏嗘偍鐨勪釜浜轰俊鎭嚭鍞粰绗笁鏂广�傛垜浠彲鑳戒細灏嗘偍鐨勪釜浜轰俊鎭垎浜粰鎴戜滑鐨勫叧鑱斿叕鍙告垨鏈嶅姟鎻愪緵鍟嗭紝浠ヤ究涓烘偍鎻愪緵鏇村ソ鐨勬湇鍔°�傞櫎闈炴硶寰嬫硶瑙勫彟鏈夎瀹氾紝鍚﹀垯鎴戜滑涓嶄細灏嗘偍鐨勪釜浜轰俊鎭敤浜庝换浣曞叾浠栫敤閫旓紝涔熶笉浼氬皢鎮ㄧ殑涓汉淇℃伅閫忛湶缁欎换浣曠涓夋柟銆�
+ </p>
+ </view>
+ <view class="">
+ <h2 class="section">3.涓汉淇℃伅鐨勫畨鍏ㄤ繚鎶�</h2>
+ <view class="section-detail">
+ <p>3.1 鎴戜滑浼氶噰鍙栦竴瀹氱殑瀹夊叏鎺柦鏉ヤ繚鎶ゆ偍鐨勪釜浜轰俊鎭笉琚湭缁忔巿鏉冪殑璁块棶銆佷娇鐢ㄦ垨娉勯湶銆傛垜浠皢
+ 浣跨敤鎶�鏈帾鏂藉拰绠$悊鎺柦鏉ョ‘淇濇偍鐨勪釜浜轰俊鎭殑瀹夊叏鎬с��</p>
+ <p>3.2 鎴戜滑浼氶噰鍙栦互涓嬪畨鍏ㄦ帾鏂芥潵淇濇姢鎮ㄧ殑涓汉淇℃伅锛�</p>
+ <p>3.3 鎴戜滑浼氬鎮ㄧ殑涓汉淇℃伅杩涜鍔犲瘑澶勭悊锛屼互淇濋殰淇℃伅鐨勫畨鍏ㄦ��</p>
+ <p>3.4 鎴戜滑浼氬畾鏈熸鏌ユ垜浠殑绯荤粺锛屼互纭繚鎮ㄧ殑涓汉淇℃伅涓嶄細閬埌鏈粡鎺堟潈鐨勮闂�佷娇鐢ㄦ垨娉勯湶銆�</p>
+ <p>3.5 鎴戜滑浼氶檺鍒惰闂偍涓汉淇℃伅鐨勪汉鍛樿寖鍥达紝骞惰姹傝繖浜涗汉鍛橀伒瀹堜繚瀵嗕箟鍔�</p>
+ <p>鎴戜滑浼氶噰鐢ㄩ槻鐏銆佸弽鐥呮瘨杞欢鍜屽叾浠栧畨鍏ㄦ帾鏂斤紝浠ヤ繚鎶ゆ垜浠殑绯荤粺鍜屾偍鐨勪釜浜轰俊鎭笉鍙楀埌
+ 鎭舵剰鏀诲嚮鍜岀梾姣掓劅鏌撱��</p>
+ <p>3.6 灏界鎴戜滑宸茬粡閲囧彇浜嗙浉搴旂殑瀹夊叏鎺柦鏉ヤ繚鎶ゆ偍鐨勪釜浜轰俊鎭紝浣嗙敱浜庢妧鏈檺鍒跺拰椋庨櫓锛屾垜浠笉鑳戒繚璇佹偍鐨勪釜浜轰俊鎭笉浼氳鏈粡鎺堟潈鐨勮闂�佷娇鐢ㄦ垨娉勯湶銆傚湪鍙戠敓姝ょ被浜嬩欢鏃讹紝鎴戜滑灏嗛噰鍙栭�傚綋鐨勬帾鏂芥潵鍑忓皯鎹熷け銆�
+ </p>
+ </view>
+ </view>
+ <view class="">
+ <h2 class="section">4.骞撮緞闄愬埗</h2>
+ <p class="section-detail">
+ 4.1 鎴戜滑鐨勫簲鐢ㄧ▼搴忓彧閫傜敤浜庡勾婊�18宀佺殑鐢ㄦ埛銆傚鏋滄偍鏈弧18宀侊紝璇蜂笉瑕佷娇鐢ㄦ垜浠殑搴旂敤绋嬪簭銆�
+ 濡傛灉鎴戜滑鍙戠幇鎮ㄦ槸鏈弧18宀佺殑鐢ㄦ埛锛屾垜浠皢绔嬪嵆鍒犻櫎鎮ㄧ殑涓汉淇℃伅銆�
+ </p>
+ </view>
+ <view class="">
+ <h2 class="section">5.闅愮鏀跨瓥鐨勪慨鏀�</h2>
+ <p class="section-detail">
+ 5.1 鎴戜滑鍙兘浼氭牴鎹渶瑕佹洿鏂版垨淇敼鏈殣绉佹斂绛栥�傚鏋滄垜浠鏈殣绉佹斂绛栬繘琛屼簡閲嶅ぇ鏇存敼锛屾垜浠皢鍦ㄥ簲鐢ㄧ▼搴忎腑鍙戝竷閫氱煡鎴栦互鍏朵粬鏂瑰紡閫氱煡鎮ㄣ�傚湪鎴戜滑鍙戝竷淇敼閫氱煡鍚庯紝鎮ㄧ户缁娇鐢ㄦ垜浠殑搴旂敤绋嬪簭锛屽嵆琛ㄧず鎮ㄥ悓鎰忔帴鍙椾慨鏀瑰悗鐨勯殣绉佹斂绛�
+ </p>
+ </view>
+ <view class="">
+ <h2 class="section">6.鑱旂郴鎴戜滑</h2>
+ <p class="section-detail">
+ 6.1 濡傛灉鎮ㄥ鏈殣绉佹斂绛栨湁浠讳綍鐤戦棶鎴栨剰瑙侊紝璇烽�氳繃搴旂敤绋嬪簭鍐呯殑鑱旂郴鏂瑰紡涓庢垜浠仈绯汇�傛垜浠皢灏藉揩鍥炲鎮ㄥ苟瑙e喅鎮ㄧ殑闂銆�
+ </p>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+
+ }
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style lang="scss"
+ scoped>
+ .main {
+ margin: 18rpx;
+ padding-bottom: 30rpx;
+ letter-spacing: 4rpx;
+
+ .title {
+ width: 100%;
+ text-align: center;
+ margin: 0 auto;
+ font-size: 56rpx;
+ font-weight: bold;
+ color: rgb(84, 84, 84);
+ }
+
+ .illustrate {
+ margin-bottom: 20rpx;
+ }
+
+ .section {
+ font-size: 40rpx;
+ color: rgb(84, 84, 84);
+ font-weight: bold;
+ }
+
+ .section-detail {
+ color: rgb(83, 83, 83);
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 5d31eb0..62d395b 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -57,6 +57,21 @@
@confirm="bindWxConfirm"
@cancel="bindWxCancel"></u-modal>
</view>
+ <!-- 娉ㄥ唽鍚屾剰鑾峰彇闅愮淇℃伅 -->
+ <view class="privacy">
+ <u-modal :show="privacyShow"
+ :title="privacyTitle"
+ showCancelButton
+ @confirm="privacyConfirm"
+ @cancel="privacyCancel"
+ confirmText="鍚屾剰"
+ cancelText="涓嶅悓鎰�">
+ <view class="slot-content"
+ @click="PrivacyAgreementHandle">
+ <rich-text :nodes="PrivacyAgreement"></rich-text>
+ </view>
+ </u-modal>
+ </view>
</view>
</template>
@@ -73,7 +88,12 @@
// 缁戝畾寰俊妯℃�佹
bindWxModelShow: false,
bindWxModelTitle: '鎻愮ず',
- bindWxContent: '濡傛灉宸叉嫢鏈夌郴缁熻处鍙凤紝鍙互鐩存帴璺宠浆缁戝畾寰俊椤甸潰'
+ bindWxContent: '濡傛灉宸叉嫢鏈夌郴缁熻处鍙凤紝鍙互鐩存帴璺宠浆缁戝畾寰俊椤甸潰',
+ appid: "",
+ secret: "",
+ privacyShow: false,
+ privacyTitle: "娉ㄦ剰",
+ PrivacyAgreement: `<p>娉ㄥ唽鍗充唬琛ㄦ偍鍚屾剰鎴戜滑鐢ㄦ埛闅愮鍗忚</p><p class='PrivacyAgreement'>鐐瑰嚮鏌ョ湅鐢ㄦ埛闅愮鍗忚</p>`
};
},
components: {
@@ -81,9 +101,16 @@
},
methods: {
...mapMutations(['setUserTabbar', 'changeisLogin']),
+ getAppidAndSercet() {
+ this.$reqGet('getAppidAndSercet').then(res => {
+ this.appid = res.data.appid;
+ this.secret = res.data.secret
+ })
+ },
// 璁块棶wx.login,鑾峰彇code
beforeLoginEvent() {
this.loginPopupShow = true;
+ this.getAppidAndSercet();
},
wxLogin() {
// 鑾峰彇鐧诲綍鐢ㄦ埛code
@@ -108,7 +135,7 @@
title: '鍔犺浇涓�...'
});
wx.request({
- url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
+ url: `https://api.weixin.qq.com/sns/jscode2session?appid=${this.appid}&secret=${this.secret}&js_code=${code}&grant_type=authorization_code`,
success(res) {
uni.setStorageSync('openid', res.data.openid);
// uni.showToast({
@@ -161,12 +188,23 @@
openPopup() {
console.log('鎵撳紑浜�');
},
- registerClick() {
+ privacyConfirm() {
uni.navigateTo({
url: '/pages/register/register'
});
},
- // 姝ゆ柟娉曞彧杩涜缁戝畾娴嬭瘯锛屽悗鏈熼�氳繃鎵爜瑙e喅
+ privacyCancel() {
+ this.privacyShow = false
+ },
+ registerClick() {
+ this.privacyShow = true
+ },
+ PrivacyAgreementHandle() {
+ uni.navigateTo({
+ url: '/pages/login/PrivacyAgreementText/PrivacyAgreementText'
+ })
+ },
+ // 姝ゆ柟娉曞彧杩涜缁戝畾娴嬭瘯锛屽悗鏈熷凡閫氳繃鎵爜瑙e喅
jumpBindBack() {
uni.navigateTo({
url: '/pages/bindBackground/bindBackground'
@@ -179,6 +217,10 @@
<style lang="scss">
@import 'index.scss';
+ .PrivacyAgreement {
+ color: rgb(60, 156, 255)
+ }
+
.login {
// height: 100vh;
// display: flex;
diff --git a/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue b/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue
index 2f19646..8577da2 100644
--- a/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue
+++ b/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue
@@ -57,7 +57,8 @@
</view>
</view>
</view>
- <view class="origin-info" v-if="faYunDetailobj.orderType == '澶栬喘' || faYunDetailobj.orderType == '鍐呰喘' || faYunDetailobj.orderType == '杞嚭'">
+ <view class="origin-info"
+ v-if="faYunDetailobj.orderType == '澶栬喘' || faYunDetailobj.orderType == '鍐呰喘' || faYunDetailobj.orderType == '杞嚭'">
<combined-title title="鍘熷彂淇℃伅"></combined-title>
<view class="body-container">
<view class="container-block">
@@ -83,92 +84,103 @@
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- components: {
- combinedTitle
- },
- data() {
- return {
- id: '',
- faYunDetailobj: {},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌']
- };
- },
- methods: {},
- onLoad(params) {
- this.id = params.id;
- },
- onShow() {
- this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => {
- if (res.code == 0) {
- this.faYunDetailobj = res.data;
- } else {
- this.$u.toast('鑾峰彇鏁版嵁澶辫触');
- }
- });
- }
-};
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ export default {
+ components: {
+ combinedTitle
+ },
+ data() {
+ return {
+ id: '',
+ faYunDetailobj: {},
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
+ ]
+ };
+ },
+ methods: {},
+ onLoad(params) {
+ this.id = params.id;
+ },
+ onShow() {
+ this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => {
+ if (res.code == 0) {
+ this.faYunDetailobj = res.data;
+ } else {
+ this.$u.toast('鑾峰彇鏁版嵁澶辫触');
+ }
+ });
+ }
+ };
</script>
-<style scoped lang="scss">
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.main {
- width: 100%;
- margin-top: vww(10);
- @include flex;
- flex-direction: column;
- .main-body {
- width: 690rpx;
- height: 1062rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
+<style scoped
+ lang="scss">
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .main {
+ width: 100%;
+ margin-top: vww(10);
@include flex;
flex-direction: column;
- align-items: flex-start;
- .body-container {
- width: 100%;
- height: vww(56);
- border-bottom: vww(1) solid #d6d6d6;
+
+ .main-body {
+ width: 690rpx;
+ height: 1062rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
@include flex;
- justify-content: center;
- .container-block {
- width: 96%;
+ flex-direction: column;
+ align-items: flex-start;
+
+ .body-container {
+ width: 100%;
height: vww(56);
+ border-bottom: vww(1) solid #d6d6d6;
@include flex;
+ justify-content: center;
+
+ .container-block {
+ width: 96%;
+ height: vww(56);
+ @include flex;
+ }
+ }
+
+ .last {
+ border-bottom: none;
}
}
- .last {
- border-bottom: none;
- }
- }
- .origin-info {
- width: 690rpx;
- min-height: 300rpx;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex;
- flex-direction: column;
- align-items: flex-start;
- .body-container {
- width: 100%;
- height: vww(56);
- border-bottom: vww(1) solid #d6d6d6;
+
+ .origin-info {
+ width: 690rpx;
+ min-height: 300rpx;
+ margin-top: 20rpx;
+ margin-bottom: 20rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
@include flex;
- justify-content: center;
- .container-block {
- width: 94%;
+ flex-direction: column;
+ align-items: flex-start;
+
+ .body-container {
+ width: 100%;
+ height: vww(56);
+ border-bottom: vww(1) solid #d6d6d6;
@include flex;
+ justify-content: center;
+
+ .container-block {
+ width: 94%;
+ @include flex;
+ }
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 0c8c3aa..235afb2 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -3,49 +3,67 @@
<view class="forward">
<view class="forward-banner">
<view class="banner-block">
- <view class="arrow-left" @click="back"><u-icon name="arrow-left" size="40" color="#ffffff"></u-icon></view>
+ <view class="arrow-left"
+ @click="back"><u-icon name="arrow-left"
+ size="40"
+ color="#ffffff"></u-icon></view>
<view class="forward-text">杞彂</view>
</view>
</view>
- <view v-if="roleType == 1" class="notice-bar">
- <u-notice-bar :text="text" :fontSize="30"></u-notice-bar>
- <view
- class="notice-icon"
- style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/notice.png') no-repeat;background-size: cover; width: 42rpx;height: 42rpx;"
- ></view>
+ <view v-if="roleType == 1"
+ class="notice-bar">
+ <u-notice-bar :text="text"
+ :fontSize="30"></u-notice-bar>
+ <view class="notice-icon"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/notice.png') no-repeat;background-size: cover; width: 42rpx;height: 42rpx;">
+ </view>
</view>
- <view v-else-if="roleType == 2" class="notice-bar"><u-notice-bar :text="text1" :fontSize="30"></u-notice-bar></view>
+ <view v-else-if="roleType == 2"
+ class="notice-bar"><u-notice-bar :text="text1"
+ :fontSize="30"></u-notice-bar></view>
<view class="card-main">
<view class="card-block">
<u-swipe-action>
- <u-swipe-action-item :options="options1" v-for="(val, index) in jhOrderPlanForwardList" :key="val.vid" :name="val.vid" @click="deleteGroup(index, val)">
+ <u-swipe-action-item :options="options1"
+ v-for="(val, index) in jhOrderPlanForwardList"
+ :key="val.vid"
+ :name="val.vid"
+ @click="deleteGroup(index, val)">
<view class="forward-card">
<view class="card-content">
- <u--form labelPosition="left" :model="forwardForm" ref="form1">
- <u-form-item label="杞彂瀵硅薄" labelWidth="21%" ref="item1" @click="forwardObjectClick(index)">
- <u--input v-model="val.name" placeholder="鐐瑰嚮閫夋嫨杞彂瀵硅薄" :readonly="true" border="bottom"></u--input>
+ <u--form labelPosition="left"
+ :model="forwardForm"
+ ref="form1">
+ <u-form-item label="杞彂瀵硅薄"
+ labelWidth="21%"
+ ref="item1"
+ @click="forwardObjectClick(index)">
+ <u--input v-model="val.name"
+ placeholder="鐐瑰嚮閫夋嫨杞彂瀵硅薄"
+ :readonly="true"
+ border="bottom"></u--input>
</u-form-item>
- <u-form-item label="杈撳叆鏁伴噺" ref="item2" labelWidth="21%">
+ <u-form-item label="杈撳叆鏁伴噺"
+ ref="item2"
+ labelWidth="21%">
<view class="forward-card-amount">
<view class="forward-card-amount-input">
- <u--input
- v-model="val.carNum"
+ <u--input v-model="val.carNum"
placeholder="璇疯緭鍏ヨ浆鍙戞暟閲�"
@input="debouncecarNumInput(index, val.carNum)"
@blur="blurInput(index, val.carNum)"
- border="bottom"
- ></u--input>
+ border="bottom"></u--input>
</view>
- <u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index, val)">
- <u-checkbox
- size="30"
+ <u-checkbox-group v-model="val.checkboxValue1"
+ placement="column"
+ @change="v => checkboxChange(v, index, val)">
+ <u-checkbox size="30"
shape="circle"
labelSize="30"
label="鍏ㄩ儴杞彂"
name="鍏ㄩ儴杞彂"
:disabled="val.ischecked"
- :checked="val.isSelected"
- ></u-checkbox>
+ :checked="val.isSelected"></u-checkbox>
</u-checkbox-group>
</view>
</u-form-item>
@@ -59,31 +77,56 @@
<view class="utils-buttonGroup">
<!-- 娣诲姞鎸夐挳 -->
- <view class="AdddBtn"><u-button text="娣诲姞" :hairline="false" @click.stop="addForm" :disabled="whetherClick"></u-button></view>
+ <view class="AdddBtn"><u-button text="娣诲姞"
+ :hairline="false"
+ @click.stop="addForm"
+ :disabled="whetherClick"></u-button></view>
<!-- 鎻愪氦鎸夐挳 -->
- <view class="forwardBtn"><u-button text="鎻愪氦" :hairline="false" type="warning" @click.stop="submitForm" :disabled="whetherClick1"></u-button></view>
+ <view class="forwardBtn"><u-button text="鎻愪氦"
+ :hairline="false"
+ type="warning"
+ @click.stop="submitForm"
+ :disabled="whetherClick1"></u-button></view>
</view>
<!-- 澧炲姞鎸夐挳 -->
<!-- 閫夋嫨璐т唬鎴栬溅闃熷脊鍑烘 -->
<view class="selectHuoDaiOrFleet-container">
- <u-popup :show="selectPopupShow" mode="bottom" @close="selectPopupClose" @open="selectPopupOpen">
+ <u-popup :show="selectPopupShow"
+ mode="bottom"
+ @close="selectPopupClose"
+ @open="selectPopupOpen">
<view class="selectHuoDaiOrFleet-container-box">
- <u-tabs :list="list1" @click="tabClick"></u-tabs>
- <view class="" v-if="!tabHuoDai">
+ <u-tabs :list="list1"
+ @click="tabClick"></u-tabs>
+ <view class=""
+ v-if="!tabHuoDai">
<u-cell-group>
- <u-cell v-for="(item, index) in fleetData" :key="index" :title="item.name">
- <view class="cell-util" slot="value">
- <u-button @click="forwardFleetObjectSelect(item, index)" text="閫夋嫨" type="primary" size="mini"></u-button>
+ <u-cell v-for="(item, index) in fleetData"
+ :key="index"
+ :title="item.name">
+ <view class="cell-util"
+ slot="value">
+ <u-button @click="forwardFleetObjectSelect(item, index)"
+ text="閫夋嫨"
+ type="primary"
+ size="mini"></u-button>
</view>
</u-cell>
</u-cell-group>
</view>
- <view class="" v-else-if="tabHuoDai">
+ <view class=""
+ v-else-if="tabHuoDai">
<u-cell-group>
- <u-cell v-for="(item, index) in huoDaiData" :key="index" :title="item.name">
- <view class="cell-util" slot="value">
- <u-button @click="forwardHuoDaiObjectSelect(item, index)" text="閫夋嫨" type="primary" size="mini"></u-button>
+ <u-cell v-for="(item, index) in huoDaiData"
+ :key="index"
+ :title="item.name">
+ <view class="cell-util"
+ slot="value">
+ <u-button @click="forwardHuoDaiObjectSelect(item, index)"
+ text="閫夋嫨"
+ type="primary"
+ size="mini"></u-button>
</view>
</u-cell>
</u-cell-group>
@@ -95,69 +138,68 @@
</template>
<script>
-import { customerId } from '@/utils/status';
-import toast from '../../../uni_modules/uview-ui/libs/config/props/toast';
+ import { customerId } from '@/utils/status';
+ import toast from '../../../uni_modules/uview-ui/libs/config/props/toast';
-export default {
- onLoad(params) {
- console.log(params, '杞彂椤甸潰鐨勫弬鏁�');
- // 瀹㈡埛
- this.cars2 = Number(params.cars2);
- this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1);
- // 璐т唬
- this.carNum = Number(params.carNum);
- this.carNumSurplusHuodai = this.forwardSurplus = Number(params.carNumSurplusHuodai);
- this.orderPlanId = params.orderPlanId;
- this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => {
- if (res.data.length !== 0 && this.roleType == 1) {
- this.jhOrderPlanForwardList = res.data.map((item, index) => {
- return {
- id: item.id,
- orderPlanId: item.orderPlanId,
- name: item.xsUserName === null ? item.fleetName : item.xsUserName,
- carNum: item.carNum,
- xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
- fleetId: item.fleetId === null ? 0 : item.fleetId,
- checkboxValue1: '',
- vid: `${new Date().getTime()}${index}${item.id}`
- };
- });
- } else if (res.data.length !== 0 && this.roleType == 2) {
- this.jhOrderPlanForwardList = res.data.map((item, index) => {
- return {
- id: item.id,
- orderPlanId: item.orderPlanId,
- name: item.fleetName,
- carNum: item.carNum,
- xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
- fleetId: item.fleetId === null ? 0 : item.fleetId,
- checkboxValue1: '',
- vid: `${new Date().getTime()}${index}${item.id}`
- };
- });
- } else {
- this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((item, index) => {
- if (!item.orderPlanId) {
+ export default {
+ onLoad(params) {
+ console.log(params, '杞彂椤甸潰鐨勫弬鏁�');
+ // 瀹㈡埛
+ this.cars2 = Number(params.cars2);
+ this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1);
+ // 璐т唬
+ this.carNum = Number(params.carNum);
+ this.carNumSurplusHuodai = this.forwardSurplus = Number(params.carNumSurplusHuodai);
+ this.orderPlanId = params.orderPlanId;
+ this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => {
+ if (res.data.length !== 0 && this.roleType == 1) {
+ this.jhOrderPlanForwardList = res.data.map((item, index) => {
return {
- ...item,
- orderPlanId: params.orderPlanId,
+ id: item.id,
+ orderPlanId: item.orderPlanId,
+ name: item.xsUserName === '' ? item.fleetName : item.xsUserName,
+ carNum: item.carNum,
+ xsUserId: item.xsUserId === '' ? 0 : item.xsUserId,
+ fleetId: item.fleetId === '' ? 0 : item.fleetId,
+ checkboxValue1: '',
vid: `${new Date().getTime()}${index}${item.id}`
};
- }
- });
- }
- });
- },
- data() {
- return {
- forwardSurplus: 0,
- paramsName: {},
- huoDaiData: [],
- fleetData: [],
- // 鏃ヨ鍒抜d
- orderPlanId: '',
- jhOrderPlanForwardList: [
- {
+ });
+ } else if (res.data.length !== 0 && this.roleType == 2) {
+ this.jhOrderPlanForwardList = res.data.map((item, index) => {
+ return {
+ id: item.id,
+ orderPlanId: item.orderPlanId,
+ name: item.fleetName,
+ carNum: item.carNum,
+ xsUserId: item.xsUserId === '' ? 0 : item.xsUserId,
+ fleetId: item.fleetId === '' ? 0 : item.fleetId,
+ checkboxValue1: '',
+ vid: `${new Date().getTime()}${index}${item.id}`
+ };
+ });
+ } else {
+ this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((item, index) => {
+ if (!item.orderPlanId) {
+ return {
+ ...item,
+ orderPlanId: params.orderPlanId,
+ vid: `${new Date().getTime()}${index}${item.id}`
+ };
+ }
+ });
+ }
+ });
+ },
+ data() {
+ return {
+ forwardSurplus: 0,
+ paramsName: {},
+ huoDaiData: [],
+ fleetData: [],
+ // 鏃ヨ鍒抜d
+ orderPlanId: '',
+ jhOrderPlanForwardList: [{
orderPlanId: '',
name: '',
carNum: null,
@@ -165,447 +207,468 @@
fleetId: 0,
checkboxValue1: '',
isSelected: false
- }
- ],
- // 绱㈠紩锛屽埄鐢ㄧ储寮曟纭樉绀�
- index: '',
- checkboxValue1: '',
- selectPopupShow: false,
- list1: [{ name: '杞﹂槦' }, { name: '璐т唬' }],
- tabHuoDai: false,
- carNumSurplus1: '',
- tempcarNumSurplus1: '',
- cars2: '',
- carNum: '',
- carNumSurplusHuodai: '',
- formNum: 1,
- // 涓汉杞彂鏁版嵁
- personalForward: {},
- whetherClick: false,
- whetherClick1: false,
- // 婊戝姩鍗曞厓鏍奸厤缃�
- options1: [
- {
+ }],
+ // 绱㈠紩锛屽埄鐢ㄧ储寮曟纭樉绀�
+ index: '',
+ checkboxValue1: '',
+ selectPopupShow: false,
+ list1: [{ name: '杞﹂槦' }, { name: '璐т唬' }],
+ tabHuoDai: false,
+ carNumSurplus1: '',
+ tempcarNumSurplus1: '',
+ cars2: '',
+ carNum: '',
+ carNumSurplusHuodai: '',
+ formNum: 1,
+ // 涓汉杞彂鏁版嵁
+ personalForward: {},
+ whetherClick: false,
+ whetherClick1: false,
+ // 婊戝姩鍗曞厓鏍奸厤缃�
+ options1: [{
text: '鍒犻櫎',
style: {
backgroundColor: '#FB0101'
}
- }
- ]
- };
- },
- onShow() {
- this.init();
- if (this.roleType == 2) {
- this.list1.splice(1, 1);
- this.tabHuoDai = false;
- }
- },
- computed: {
- roleType() {
- return uni.getStorageSync('roleType');
+ }]
+ };
},
- text() {
- return `宸查鍙�${this.cars2}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplus1}寮犳彁鐓ゅ崟`;
- },
- text1() {
- return `宸叉嫢鏈�${this.carNum}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplusHuodai}寮犳彁鐓ゅ崟`;
- }
- },
- methods: {
- // 杩斿洖涓婁竴椤�
- back() {
- uni.navigateBack({
- delta: 1
- });
- },
- init() {
- switch (this.roleType) {
- case 1:
- this.getAllHuoDaiByCustomerId();
- this.getFleet();
- break;
- case 2:
- this.getFleet();
- break;
- default:
- break;
- }
- },
- allrelay(x, y) {
- let a = 0;
- if (y != 0) {
- a = Number(x) + Number(y);
- return a;
- } else {
- return Number(x);
- }
- },
- allrelayto(x, y) {
- let a = 0;
- if (y != 0) {
- a = Number(x) - Number(y);
- return a;
- } else {
- return Number(x);
- }
- },
- checkboxChange(value, index, v) {
- this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map(v => {
- return {
- ...v,
- ischecked: false
- };
- });
- if (value.length != 0) {
- if (this.roleType == 1) {
- this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplus1, this.jhOrderPlanForwardList[index].carNum);
- this.calculate(this.jhOrderPlanForwardList);
- }
- if (this.roleType == 2) {
- this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplusHuodai, this.jhOrderPlanForwardList[index].carNum);
- this.calculate(this.jhOrderPlanForwardList);
- }
- // 閫夋嫨涓�涓悗鍏朵綑绂佹澶嶉��
- this.jhOrderPlanForwardList.forEach((v, i) => {
- if (i !== index) {
- v.ischecked = true;
- }
- });
- this.whetherClick = true;
- } else {
- this.jhOrderPlanForwardList[index].carNum = null;
- this.calculate(this.jhOrderPlanForwardList);
- }
- },
- // 鑾峰彇璐т唬鍒楄〃
- getAllHuoDaiByCustomerId() {
- this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
- this.huoDaiData = res.data;
- });
- },
- // 鑾峰彇杞﹂槦鍒楄〃
- getFleet() {
- this.$reqGet('getFleet').then(res => {
- this.fleetData = res.data;
- });
- },
- // 杞彂
- forwardObjectClick(index) {
- this.selectPopupShow = true;
- this.index = index;
- },
- selectPopupClose() {
- this.selectPopupShow = false;
- },
- selectPopupOpen() {},
- // 杞彂閫夋嫨璐т唬
- forwardHuoDaiObjectSelect(item, index) {
- this.$nextTick(() => {
- let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
- if (isableAdd.length > 0) {
- this.$u.toast('瀛樺湪閲嶅娣诲姞');
- this.selectPopupShow = true;
- } else {
- this.selectPopupShow = false;
- this.jhOrderPlanForwardList[this.index].xsUserId = item.userId;
- this.jhOrderPlanForwardList[this.index].name = item.name;
- this.jhOrderPlanForwardList[this.index].fleetId = 0;
- }
- });
- },
- // 杞彂閫夋嫨杞﹂槦
- forwardFleetObjectSelect(item, index) {
- this.$nextTick(() => {
- let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
- if (isableAdd.length > 0) {
- this.$u.toast('瀛樺湪閲嶅娣诲姞');
- this.selectPopupShow = true;
- } else {
- this.selectPopupShow = false;
- this.jhOrderPlanForwardList[this.index].fleetId = item.id;
- this.jhOrderPlanForwardList[this.index].name = item.name;
- this.jhOrderPlanForwardList[this.index].xsUserId = 0;
- }
- });
- },
- // 璁$畻鎻愮叅鍗曟暟閲忥紝娣诲姞鎴栧垹闄ゆ椂璋冪敤
- calculate(arr) {
- let total = arr.reduce((prev, cur) => {
- return cur.carNum + prev;
- }, 0);
- console.log(total, '鎻愮叅鍗曚竴鍏辩殑鏁版嵁');
- if (this.roleType == 1) {
- if (Number(this.cars2) >= total) {
- this.carNumSurplus1 = Number(this.cars2) - total;
- this.whetherClick = false;
- this.whetherClick1 = false;
- } else {
- this.carNumSurplus1 = 0;
- this.$u.toast('鍓╀綑鎻愮叅鍗曟暟閲忎笉瓒�');
- this.whetherClick = true;
- this.whetherClick1 = true;
- }
- }
+ onShow() {
+ this.init();
if (this.roleType == 2) {
- if (Number(this.carNum) >= total) {
- this.carNumSurplusHuodai = Number(this.carNum) - total;
- this.whetherClick = false;
- this.whetherClick1 = false;
- } else {
- this.carNumSurplusHuodai = 0;
- this.$u.toast('鍓╀綑鎻愮叅鍗曟暟閲忎笉瓒�');
- this.whetherClick = true;
- this.whetherClick1 = true;
- }
- }
- },
- debouncecarNumInput(index, value) {
- let time;
- let that = this;
- that.$set(that.jhOrderPlanForwardList[index], 'carNum', Number(value));
- return (function() {
- if (!time) {
- time = setTimeout(() => {
- that.calculate(that.jhOrderPlanForwardList);
- if (that.roleType == 1) {
- if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplus1)) {
- that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
- that.jhOrderPlanForwardList.forEach((v, i) => {
- if (index != i) {
- v.ischecked = false;
- }
- });
- }
- }
-
- if (that.roleType == 2) {
- if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplusHuodai)) {
- that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
- that.jhOrderPlanForwardList.forEach((v, i) => {
- if (index != i) {
- v.ischecked = false;
- }
- });
- }
- }
- time = null;
- }, 800);
- }
- })();
- },
- blurInput(index, value) {
- this.$set(this.jhOrderPlanForwardList[index], 'carNum', Number(value));
- this.calculate(this.jhOrderPlanForwardList);
- },
- // 娣诲姞涓�缁勮〃鍗�
- addForm() {
- // 鍒ゆ柇鏄惁鏈変竴涓閫夛紝濡傛灉鏈夊垯绂佹鏂板姞鐨勫閫夛紝娌℃湁鍒欎笉绂佹
- let ischeck = this.jhOrderPlanForwardList.some(v => v.ischecked == true);
- if (!ischeck) {
- this.jhOrderPlanForwardList.push({
- orderPlanId: this.orderPlanId,
- name: '',
- carNum: null,
- xsUserId: 0,
- fleetId: 0,
- checkboxValue1: '',
- ischecked: false,
- vid: new Date().getTime(),
- isSelected: false
- });
- } else {
- this.jhOrderPlanForwardList.push({
- orderPlanId: this.orderPlanId,
- name: '',
- carNum: null,
- xsUserId: 0,
- fleetId: 0,
- checkboxValue1: '',
- ischecked: true,
- vid: new Date().getTime(),
- isSelected: false
- });
- }
- this.calculate(this.jhOrderPlanForwardList);
- },
- // 鍒犻櫎涓�缁勮〃鍗�
- deleteGroup(index, v) {
- let tempcarNum = v.carNum;
- if (v.id) {
- this.$reqPost('deleteForward', { id: v.id }, 'params').then(res => {
- if (res.code === 0) {
- this.jhOrderPlanForwardList.splice(index, 1);
- this.calculate(this.jhOrderPlanForwardList);
- this.$u.toast('鍒犻櫎鎴愬姛');
- } else if (res.code === 1) {
- this.$u.toast(res.msg);
- }
- });
- } else {
- this.jhOrderPlanForwardList.splice(index, 1);
- this.calculate(this.jhOrderPlanForwardList);
- this.$u.toast('鍒犻櫎鎴愬姛');
- }
- },
- // 鎻愪氦
- submitForm() {
- let isPass = false;
- if (this.jhOrderPlanForwardList.length === 0) {
- this.$u.toast('璇疯嚦灏戦�夋嫨涓�缁勮浆鍙戝璞�');
- }
- let reg = /^[1-9]\d*$/;
- this.jhOrderPlanForwardList.forEach(v => {
- if (!reg.test(v.carNum) || Number(v.carNum) <= 0) {
- this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
- isPass = false;
- return isPass;
- } else {
- isPass = true;
- return isPass;
- }
- });
- if (isPass) {
- this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => {
- console.log(res, 'zh');
- if (res.code == 0) {
- this.$u.toast('鎻愪氦鎴愬姛');
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 1000);
- } else {
- this.$u.toast(res.msg);
- }
- });
- }
- },
- tabClick(item) {
- if (item.name == '璐т唬') {
- this.tabHuoDai = true;
- } else {
+ this.list1.splice(1, 1);
this.tabHuoDai = false;
}
+ },
+ computed: {
+ roleType() {
+ return uni.getStorageSync('roleType');
+ },
+ text() {
+ return `宸查鍙�${this.cars2}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplus1}寮犳彁鐓ゅ崟`;
+ },
+ text1() {
+ return `宸叉嫢鏈�${this.carNum}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplusHuodai}寮犳彁鐓ゅ崟`;
+ }
+ },
+ methods: {
+ // 杩斿洖涓婁竴椤�
+ back() {
+ uni.navigateBack({
+ delta: 1
+ });
+ },
+ init() {
+ switch (this.roleType) {
+ case 1:
+ this.getAllHuoDaiByCustomerId();
+ this.getFleet();
+ break;
+ case 2:
+ this.getFleet();
+ break;
+ default:
+ break;
+ }
+ },
+ allrelay(x, y) {
+ let a = 0;
+ if (y != 0) {
+ a = Number(x) + Number(y);
+ return a;
+ } else {
+ return Number(x);
+ }
+ },
+ allrelayto(x, y) {
+ let a = 0;
+ if (y != 0) {
+ a = Number(x) - Number(y);
+ return a;
+ } else {
+ return Number(x);
+ }
+ },
+ checkboxChange(value, index, v) {
+ this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map(v => {
+ return {
+ ...v,
+ ischecked: false
+ };
+ });
+ if (value.length != 0) {
+ if (this.roleType == 1) {
+ this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplus1, this
+ .jhOrderPlanForwardList[index].carNum);
+ this.calculate(this.jhOrderPlanForwardList);
+ }
+ if (this.roleType == 2) {
+ this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplusHuodai, this
+ .jhOrderPlanForwardList[index].carNum);
+ this.calculate(this.jhOrderPlanForwardList);
+ }
+ // 閫夋嫨涓�涓悗鍏朵綑绂佹澶嶉��
+ this.jhOrderPlanForwardList.forEach((v, i) => {
+ if (i !== index) {
+ v.ischecked = true;
+ }
+ });
+ this.whetherClick = true;
+ } else {
+ this.jhOrderPlanForwardList[index].carNum = null;
+ this.calculate(this.jhOrderPlanForwardList);
+ }
+ },
+ // 鑾峰彇璐т唬鍒楄〃
+ getAllHuoDaiByCustomerId() {
+ this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
+ this.huoDaiData = res.data;
+ });
+ },
+ // 鑾峰彇杞﹂槦鍒楄〃
+ getFleet() {
+ this.$reqGet('getFleet').then(res => {
+ this.fleetData = res.data;
+ });
+ },
+ // 杞彂
+ forwardObjectClick(index) {
+ this.selectPopupShow = true;
+ this.index = index;
+ },
+ selectPopupClose() {
+ this.selectPopupShow = false;
+ },
+ selectPopupOpen() {},
+ // 杞彂閫夋嫨璐т唬
+ forwardHuoDaiObjectSelect(item, index) {
+ this.$nextTick(() => {
+ let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
+ if (isableAdd.length > 0) {
+ this.$u.toast('瀛樺湪閲嶅娣诲姞');
+ this.selectPopupShow = true;
+ } else {
+ this.selectPopupShow = false;
+ this.jhOrderPlanForwardList[this.index].xsUserId = item.userId;
+ this.jhOrderPlanForwardList[this.index].name = item.name;
+ this.jhOrderPlanForwardList[this.index].fleetId = 0;
+ }
+ });
+ },
+ // 杞彂閫夋嫨杞﹂槦
+ forwardFleetObjectSelect(item, index) {
+ this.$nextTick(() => {
+ let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
+ if (isableAdd.length > 0) {
+ this.$u.toast('瀛樺湪閲嶅娣诲姞');
+ this.selectPopupShow = true;
+ } else {
+ this.selectPopupShow = false;
+ this.jhOrderPlanForwardList[this.index].fleetId = item.id;
+ this.jhOrderPlanForwardList[this.index].name = item.name;
+ this.jhOrderPlanForwardList[this.index].xsUserId = 0;
+ }
+ });
+ },
+ // 璁$畻鎻愮叅鍗曟暟閲忥紝娣诲姞鎴栧垹闄ゆ椂璋冪敤
+ calculate(arr) {
+ let total = arr.reduce((prev, cur) => {
+ return cur.carNum + prev;
+ }, 0);
+ console.log(total, '鎻愮叅鍗曚竴鍏辩殑鏁版嵁');
+ if (this.roleType == 1) {
+ if (Number(this.cars2) >= total) {
+ this.carNumSurplus1 = Number(this.cars2) - total;
+ this.whetherClick = false;
+ this.whetherClick1 = false;
+ } else {
+ this.carNumSurplus1 = 0;
+ this.$u.toast('鍓╀綑鎻愮叅鍗曟暟閲忎笉瓒�');
+ this.whetherClick = true;
+ this.whetherClick1 = true;
+ }
+ }
+ if (this.roleType == 2) {
+ if (Number(this.carNum) >= total) {
+ this.carNumSurplusHuodai = Number(this.carNum) - total;
+ this.whetherClick = false;
+ this.whetherClick1 = false;
+ } else {
+ this.carNumSurplusHuodai = 0;
+ this.$u.toast('鍓╀綑鎻愮叅鍗曟暟閲忎笉瓒�');
+ this.whetherClick = true;
+ this.whetherClick1 = true;
+ }
+ }
+ },
+ debouncecarNumInput(index, value) {
+ let time;
+ let that = this;
+ that.$set(that.jhOrderPlanForwardList[index], 'carNum', Number(value));
+ return (function() {
+ if (!time) {
+ time = setTimeout(() => {
+ that.calculate(that.jhOrderPlanForwardList);
+ if (that.roleType == 1) {
+ if (that.jhOrderPlanForwardList[index].carNum < Number(that
+ .carNumSurplus1)) {
+ that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
+ that.jhOrderPlanForwardList.forEach((v, i) => {
+ if (index != i) {
+ v.ischecked = false;
+ }
+ });
+ }
+ }
+
+ if (that.roleType == 2) {
+ if (that.jhOrderPlanForwardList[index].carNum < Number(that
+ .carNumSurplusHuodai)) {
+ that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
+ that.jhOrderPlanForwardList.forEach((v, i) => {
+ if (index != i) {
+ v.ischecked = false;
+ }
+ });
+ }
+ }
+ time = null;
+ }, 800);
+ }
+ })();
+ },
+ blurInput(index, value) {
+ this.$set(this.jhOrderPlanForwardList[index], 'carNum', Number(value));
+ this.calculate(this.jhOrderPlanForwardList);
+ },
+ // 娣诲姞涓�缁勮〃鍗�
+ addForm() {
+ // 鍒ゆ柇鏄惁鏈変竴涓閫夛紝濡傛灉鏈夊垯绂佹鏂板姞鐨勫閫夛紝娌℃湁鍒欎笉绂佹
+ let ischeck = this.jhOrderPlanForwardList.some(v => v.ischecked == true);
+ if (!ischeck) {
+ this.jhOrderPlanForwardList.push({
+ orderPlanId: this.orderPlanId,
+ name: '',
+ carNum: null,
+ xsUserId: 0,
+ fleetId: 0,
+ checkboxValue1: '',
+ ischecked: false,
+ vid: new Date().getTime(),
+ isSelected: false
+ });
+ } else {
+ this.jhOrderPlanForwardList.push({
+ orderPlanId: this.orderPlanId,
+ name: '',
+ carNum: null,
+ xsUserId: 0,
+ fleetId: 0,
+ checkboxValue1: '',
+ ischecked: true,
+ vid: new Date().getTime(),
+ isSelected: false
+ });
+ }
+ this.calculate(this.jhOrderPlanForwardList);
+ },
+ // 鍒犻櫎涓�缁勮〃鍗�
+ deleteGroup(index, v) {
+ let tempcarNum = v.carNum;
+ if (v.id) {
+ this.$reqPost('deleteForward', { id: v.id }, 'params').then(res => {
+ if (res.code === 0) {
+ this.jhOrderPlanForwardList.splice(index, 1);
+ this.calculate(this.jhOrderPlanForwardList);
+ this.$u.toast('鍒犻櫎鎴愬姛');
+ } else if (res.code === 1) {
+ this.$u.toast(res.msg);
+ }
+ });
+ } else {
+ this.jhOrderPlanForwardList.splice(index, 1);
+ this.calculate(this.jhOrderPlanForwardList);
+ this.$u.toast('鍒犻櫎鎴愬姛');
+ }
+ },
+ // 鎻愪氦
+ submitForm() {
+ let isPass = false;
+ if (this.jhOrderPlanForwardList.length === 0) {
+ this.$u.toast('璇疯嚦灏戦�夋嫨涓�缁勮浆鍙戝璞�');
+ }
+ let reg = /^[1-9]\d*$/;
+ this.jhOrderPlanForwardList.forEach(v => {
+ if (!reg.test(v.carNum) || Number(v.carNum) <= 0) {
+ this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
+ isPass = false;
+ return isPass;
+ } else {
+ isPass = true;
+ return isPass;
+ }
+ });
+ if (isPass) {
+ this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => {
+ console.log(res, 'zh');
+ if (res.code == 0) {
+ this.$u.toast('鎻愪氦鎴愬姛');
+ setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ }, 1000);
+ } else {
+ this.$u.toast(res.msg);
+ }
+ });
+ }
+ },
+ tabClick(item) {
+ if (item.name == '璐т唬') {
+ this.tabHuoDai = true;
+ } else {
+ this.tabHuoDai = false;
+ }
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-/deep/ .u-notice-bar {
- background: rgba(255, 255, 255, 0.3) !important;
- box-shadow: 0rpx 0rpx 5rpx 0rpx rgba(27, 103, 255, 0);
- border-radius: 28rpx;
- .u-notice__content {
- text {
- text-shadow: 3rpx 3rpx 8rpx #4784fe;
- font-size: 24rpx;
- color: #fd1446 !important;
- font-weight: 400;
- }
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
-}
-/deep/ .u-input {
- border-bottom: 1px solid #c4c4c4;
- width: 458rpx;
-}
-::v-deep.forward {
- width: 100%;
- margin: 0 auto;
- .forward-banner {
- width: 100%;
- height: 430rpx;
- background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
- @include flex;
- justify-content: flex-start;
- overflow: hidden;
- .banner-block {
- width: 50%;
- @include flex;
- position: relative;
- top: -75rpx;
- left: 32rpx;
- .forward-text {
- width: 80rpx;
- font-size: 40rpx;
+
+ /deep/ .u-notice-bar {
+ background: rgba(255, 255, 255, 0.3) !important;
+ box-shadow: 0rpx 0rpx 5rpx 0rpx rgba(27, 103, 255, 0);
+ border-radius: 28rpx;
+
+ .u-notice__content {
+ text {
+ text-shadow: 3rpx 3rpx 8rpx #4784fe;
+ font-size: 24rpx;
+ color: #fd1446 !important;
font-weight: 400;
- color: #ffffff;
- line-height: 69rpx;
}
}
}
- .notice-bar {
- width: 688rpx;
- height: 56rpx;
- margin: 0 auto;
- position: relative;
- top: -200rpx;
- background: transparent;
- .notice-icon {
- position: absolute;
- top: 21rpx;
- left: 7rpx;
- }
+
+ /deep/ .u-input {
+ border-bottom: 1px solid #c4c4c4;
+ width: 458rpx;
}
- .card-main {
+
+ ::v-deep.forward {
width: 100%;
- @include flex;
- justify-content: center;
- position: relative;
- top: -100rpx;
- z-index: 1;
- margin-bottom: vww(40);
- .card-block {
- width: 690rpx;
+ margin: 0 auto;
+
+ .forward-banner {
+ width: 100%;
+ height: 430rpx;
+ background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
@include flex;
- flex-direction: column;
- .forward-card {
- margin-top: vww(10);
+ justify-content: flex-start;
+ overflow: hidden;
+
+ .banner-block {
+ width: 50%;
+ @include flex;
+ position: relative;
+ top: -75rpx;
+ left: 32rpx;
+
+ .forward-text {
+ width: 80rpx;
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #ffffff;
+ line-height: 69rpx;
+ }
+ }
+ }
+
+ .notice-bar {
+ width: 688rpx;
+ height: 56rpx;
+ margin: 0 auto;
+ position: relative;
+ top: -200rpx;
+ background: transparent;
+
+ .notice-icon {
+ position: absolute;
+ top: 21rpx;
+ left: 7rpx;
+ }
+ }
+
+ .card-main {
+ width: 100%;
+ @include flex;
+ justify-content: center;
+ position: relative;
+ top: -100rpx;
+ z-index: 1;
+ margin-bottom: vww(40);
+
+ .card-block {
width: 690rpx;
- height: 275rpx;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
- border-radius: 20rpx;
- .card-content {
- width: 612rpx;
- margin-left: 48rpx;
- margin-top: 24rpx;
- // margin: 56rpx 30rpx 70rpx 48rpx;
- .u-form {
- .u-form-item {
- .u-form-item__body {
- .u-form-item__body__left {
- .u-form-item__body__left__content {
- .u-form-item__body__left__content__label {
- font-weight: 400 !important;
- color: #898989 !important;
- font-size: 30rpx !important;
+ @include flex;
+ flex-direction: column;
+
+ .forward-card {
+ margin-top: vww(10);
+ width: 690rpx;
+ height: 275rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+ border-radius: 20rpx;
+
+ .card-content {
+ width: 612rpx;
+ margin-left: 48rpx;
+ margin-top: 24rpx;
+
+ // margin: 56rpx 30rpx 70rpx 48rpx;
+ .u-form {
+ .u-form-item {
+ .u-form-item__body {
+ .u-form-item__body__left {
+ .u-form-item__body__left__content {
+ .u-form-item__body__left__content__label {
+ font-weight: 400 !important;
+ color: #898989 !important;
+ font-size: 30rpx !important;
+ }
}
}
- }
- .u-form-item__body__right {
- .u-form-item__body__right__content {
- .u-form-item__body__right__content__slot {
- .forward-card-amount {
- display: flex;
- justify-content: space-between;
- align-items: flex-end;
- .forward-card-amount-input {
- .u-input {
- width: 263rpx;
+
+ .u-form-item__body__right {
+ .u-form-item__body__right__content {
+ .u-form-item__body__right__content__slot {
+ .forward-card-amount {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-end;
+
+ .forward-card-amount-input {
+ .u-input {
+ width: 263rpx;
+ }
}
- }
- .u-checkbox-group {
- position: relative;
- top: vww(8);
- left: vww(4);
- .u-checkbox {
- .u-checkbox__icon-wrap {
- border-color: rgba(42, 97, 255, 1) !important;
+
+ .u-checkbox-group {
+ position: relative;
+ top: vww(8);
+ left: vww(4);
+
+ .u-checkbox {
+ .u-checkbox__icon-wrap {
+ border-color: rgba(42, 97, 255, 1) !important;
+ }
}
}
}
@@ -619,51 +682,56 @@
}
}
}
- }
- .utils-buttonGroup {
- width: 610rpx;
- @include flex;
- position: fixed;
- bottom: vww(30);
- left: vww(30);
- z-index: 3;
- .AdddBtn,
- .forwardBtn {
- width: 290rpx;
- }
- .AdddBtn {
- .u-button {
- height: 74rpx;
- border: 1px solid #3b56eb;
- border-radius: 37rpx 37rpx 37rpx 37rpx;
- background: transparent;
- color: #3b56eb;
- }
- }
- .forwardBtn {
- .u-button {
- height: 74rpx;
- color: #ffffff;
- background: rgba(73, 123, 251, 1);
- border: 0;
- border-radius: 37rpx 37rpx 37rpx 37rpx;
- }
- }
- }
- .selectHuoDaiOrFleet-container {
- .u-popup {
- .u-transition {
- height: 80%;
- .u-popup__content {
- overflow: scroll !important;
- .selectHuoDaiOrFleet-container-box {
- width: 90%;
- margin: 0 auto;
+ .utils-buttonGroup {
+ width: 610rpx;
+ @include flex;
+ position: fixed;
+ bottom: vww(30);
+ left: vww(30);
+ z-index: 3;
+
+ .AdddBtn,
+ .forwardBtn {
+ width: 290rpx;
+ }
+
+ .AdddBtn {
+ .u-button {
+ height: 74rpx;
+ border: 1px solid #3b56eb;
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ background: transparent;
+ color: #3b56eb;
+ }
+ }
+
+ .forwardBtn {
+ .u-button {
+ height: 74rpx;
+ color: #ffffff;
+ background: rgba(73, 123, 251, 1);
+ border: 0;
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ }
+ }
+ }
+
+ .selectHuoDaiOrFleet-container {
+ .u-popup {
+ .u-transition {
+ height: 80%;
+
+ .u-popup__content {
+ overflow: scroll !important;
+
+ .selectHuoDaiOrFleet-container-box {
+ width: 90%;
+ margin: 0 auto;
+ }
}
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/register/register.vue b/pages/register/register.vue
index c901a7b..3be71e8 100644
--- a/pages/register/register.vue
+++ b/pages/register/register.vue
@@ -1,42 +1,96 @@
<template>
<view class="register">
<view class="registerForm">
- <u--form :rules="rules" :model="registerFormModel" ref="regesterFormRef">
- <u-form-item labelWidth="20%" label="閫夋嫨韬唤" borderBottom ref="roleRef" required>
- <u-radio-group v-model="radiovalue1" placement="row" @change="groupChange" size="30" shape="circle" iconSize="20">
- <u-radio
- labelSize="14px"
+ <u--form :rules="rules"
+ :model="registerFormModel"
+ ref="regesterFormRef">
+ <u-form-item labelWidth="20%"
+ label="閫夋嫨韬唤"
+ borderBottom
+ ref="roleRef"
+ required>
+ <u-radio-group v-model="radiovalue1"
+ placement="row"
+ @change="groupChange"
+ size="30"
+ shape="circle"
+ iconSize="20">
+ <u-radio labelSize="14px"
size="20px"
:customStyle="{ marginBottom: '8px' }"
v-for="(item, index) in radiolist1"
:key="index"
:label="item.name"
:name="item.name"
- @change="radioChange"
- ></u-radio>
+ @change="radioChange"></u-radio>
</u-radio-group>
</u-form-item>
- <u-form-item prop="name" label="濮撳悕" labelWidth="20%" borderBottom required>
- <u--input v-model="registerFormModel.name" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input>
+ <u-form-item prop="name"
+ label="濮撳悕"
+ labelWidth="20%"
+ borderBottom
+ required>
+ <u--input v-model="registerFormModel.name"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ clearable></u--input>
</u-form-item>
- <u-form-item prop="idCard" label="韬唤璇�" labelWidth="20%" borderBottom required>
- <u--input v-model="registerFormModel.idCard" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input>
+ <u-form-item prop="idCard"
+ label="韬唤璇�"
+ labelWidth="20%"
+ borderBottom
+ required>
+ <u--input v-model="registerFormModel.idCard"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ clearable></u--input>
</u-form-item>
- <u-form-item prop="phone" label="鎵嬫満鍙�" labelWidth="20%" borderBottom required>
- <u--input v-model="registerFormModel.phone" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input>
+ <u-form-item prop="phone"
+ label="鎵嬫満鍙�"
+ labelWidth="20%"
+ borderBottom
+ required>
+ <u--input v-model="registerFormModel.phone"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ clearable></u--input>
</u-form-item>
- <u-form-item prop="password" label="瀵嗙爜" labelWidth="20%" borderBottom required>
- <u--input v-model="registerFormModel.password" placeholder="璇疯緭鍏ュ唴瀹�" password clearable></u--input>
+ <u-form-item prop="password"
+ label="瀵嗙爜"
+ labelWidth="20%"
+ borderBottom
+ required>
+ <u--input v-model="registerFormModel.password"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ password
+ clearable></u--input>
</u-form-item>
- <u-form-item prop="confirmPassword" label="纭瀵嗙爜" labelWidth="20%" borderBottom required>
- <u--input v-model="registerFormModel.confirmPassword" placeholder="璇疯緭鍏ュ唴瀹�" password clearable @blur="jiaoYanPassword"></u--input>
+ <u-form-item prop="confirmPassword"
+ label="纭瀵嗙爜"
+ labelWidth="20%"
+ borderBottom
+ required>
+ <u--input v-model="registerFormModel.confirmPassword"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ password
+ clearable
+ @blur="jiaoYanPassword"></u--input>
</u-form-item>
- <u-form-item prop="carNo" label="杞︾墝鍙�" labelWidth="20%" borderBottom v-if="radiovalue1 == '鍙告満'" required>
- <u--input v-model="registerFormModel.carNo" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input>
+ <u-form-item prop="carNo"
+ label="杞︾墝鍙�"
+ labelWidth="20%"
+ borderBottom
+ v-if="radiovalue1 == '鍙告満'"
+ required>
+ <u--input v-model="registerFormModel.carNo"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ clearable></u--input>
</u-form-item>
- <u-form-item prop="carImg" label="杞﹁締鐓х墖" labelWidth="20%" borderBottom v-if="radiovalue1 == '鍙告満'" required @click="beforeRead">
- <u-upload
- :fileList="fileList1"
+ <u-form-item prop="carImg"
+ label="杞﹁締鐓х墖"
+ labelWidth="20%"
+ borderBottom
+ v-if="radiovalue1 == '鍙告満'"
+ required
+ @click="beforeRead">
+ <u-upload :fileList="fileList1"
deletable
@afterRead="afterRead"
@delete="deletePic"
@@ -45,15 +99,19 @@
:maxCount="1"
width="250"
height="150"
- :previewFullImage="true"
- >
+ :previewFullImage="true">
<!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
mode="widthFix" style="width: 250px;height: 150px;"></image> -->
</u-upload>
</u-form-item>
- <u-form-item prop="drivingImg" label="琛岄┒璇�" labelWidth="20%" borderBottom v-if="radiovalue1 == '鍙告満'" required @click="beforeRead">
- <u-upload
- :fileList="fileList2"
+ <u-form-item prop="drivingImg"
+ label="琛岄┒璇�"
+ labelWidth="20%"
+ borderBottom
+ v-if="radiovalue1 == '鍙告満'"
+ required
+ @click="beforeRead">
+ <u-upload :fileList="fileList2"
deletable
@afterRead="afterRead"
@delete="deletePic"
@@ -62,21 +120,31 @@
:maxCount="1"
width="250"
height="150"
- :previewFullImage="true"
- >
+ :previewFullImage="true">
<!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
mode="widthFix" style="width: 250px;height: 150px;"></image> -->
</u-upload>
</u-form-item>
- <u-form-item label="鎺ㄨ崘浜鸿处鍙�" labelWidth="25%" borderBottom>
- <u--input v-model="registerFormModel.tuiJianMa" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input>
+ <u-form-item label="鎺ㄨ崘浜鸿处鍙�"
+ labelWidth="25%"
+ borderBottom>
+ <u--input v-model="registerFormModel.tuiJianMa"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ clearable></u--input>
</u-form-item>
</u--form>
</view>
<view class="roleModel">
- <u-modal :show="editRoleModelShow" :title="title" :content="content" :showCancelButton="true" @confirm="roleConfirm" @cancel="roleCancel"></u-modal>
+ <u-modal :show="editRoleModelShow"
+ :title="title"
+ :content="content"
+ :showCancelButton="true"
+ @confirm="roleConfirm"
+ @cancel="roleCancel"></u-modal>
</view>
- <view class="registerBtn"><u-button text="娉ㄥ唽" type="primary" @click="registerClick"></u-button></view>
+ <view class="registerBtn"><u-button text="娉ㄥ唽"
+ type="primary"
+ @click="registerClick"></u-button></view>
<!-- 鍥剧墖棰勮寮瑰嚭妗� -->
<!-- <view class="previewImage-container">
<u-popup :show="previewImageShow" mode="center" @close="previewImageClose" @open="previewImageOpen">
@@ -87,358 +155,359 @@
</template>
<script>
-import { apiRegister } from '@/api/publicInterface.js';
-import { BaseUrl } from '@/api/publicInterface.js';
-import { mapMutations } from 'vuex';
-export default {
- // onLoad: function() {
- // // 鏌ョ湅鏄惁鎺堟潈
- // wx.getSetting({
- // success (res){
- // if (res.authSetting['scope.userInfo']) {
- // // 宸茬粡鎺堟潈锛屽彲浠ョ洿鎺ヨ皟鐢� getUserInfo 鑾峰彇澶村儚鏄电О
- // wx.getUserInfo({
- // success: function(res) {
- // console.log('res.userInfo',res.userInfo)
- // }
- // })
- // }
- // }
- // })
- // },
- // 鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚銆傛敞鎰忓鏋滄覆鏌撻�熷害蹇紝浼氬湪椤甸潰杩涘叆鍔ㄧ敾瀹屾垚鍓嶈Е鍙�
- onReady() {
- this.$refs.regesterFormRef.setRules(this.rules);
- // this.$refs.regesterFormRef.validate().then(res => {}).catch(err => {
- // console.log(err);
- // })
- },
- onLoad(params) {
- if (params) {
- this.registerFormModel.openId = params.code;
- console.log('椤甸潰鍔犺浇', this.registerFormModel.openId);
- }
- },
- data() {
- return {
- // 杞︾墝鍙烽敭鐩樻帶鍒�
- carNumShow: false,
- keyValue: '',
- registerFormModel: {
- phone: '',
- password: '',
- name: '',
- username: '',
- openId: '',
- type: 2,
- idCard: '',
- carNo: '',
- carImg: '',
- drivingImg: '',
- tuiJianMa: '',
- confirmPassword: ''
- },
- fileList1: [],
- fileList2: [],
- rules: {
- name: {
- type: 'string',
- required: true,
- message: '璇峰~鍐欏鍚�',
- trigger: ['blur', 'change']
+ import { apiRegister } from '@/api/publicInterface.js';
+ import { BaseUrl } from '@/api/publicInterface.js';
+ import { mapMutations } from 'vuex';
+ export default {
+ // onLoad: function() {
+ // // 鏌ョ湅鏄惁鎺堟潈
+ // wx.getSetting({
+ // success (res){
+ // if (res.authSetting['scope.userInfo']) {
+ // // 宸茬粡鎺堟潈锛屽彲浠ョ洿鎺ヨ皟鐢� getUserInfo 鑾峰彇澶村儚鏄电О
+ // wx.getUserInfo({
+ // success: function(res) {
+ // console.log('res.userInfo',res.userInfo)
+ // }
+ // })
+ // }
+ // }
+ // })
+ // },
+ // 鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚銆傛敞鎰忓鏋滄覆鏌撻�熷害蹇紝浼氬湪椤甸潰杩涘叆鍔ㄧ敾瀹屾垚鍓嶈Е鍙�
+ onReady() {
+ this.$refs.regesterFormRef.setRules(this.rules);
+ // this.$refs.regesterFormRef.validate().then(res => {}).catch(err => {
+ // console.log(err);
+ // })
+ },
+ onLoad(params) {
+ if (params) {
+ this.registerFormModel.openId = params.code;
+ console.log('椤甸潰鍔犺浇', this.registerFormModel.openId);
+ }
+ },
+ data() {
+ return {
+ // 杞︾墝鍙烽敭鐩樻帶鍒�
+ carNumShow: false,
+ keyValue: '',
+ registerFormModel: {
+ phone: '',
+ password: '',
+ name: '',
+ username: '',
+ openId: '',
+ type: 2,
+ idCard: '',
+ carNo: '',
+ carImg: '',
+ drivingImg: '',
+ tuiJianMa: '',
+ confirmPassword: ''
},
- idCard: [
- {
+ fileList1: [],
+ fileList2: [],
+ rules: {
+ name: {
type: 'string',
required: true,
- message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+ message: '璇峰~鍐欏鍚�',
trigger: ['blur', 'change']
},
- {
- pattern: /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
- message: '韬唤璇佸彿鏍煎紡涓嶆纭�'
- }
- ],
- phone: [
- {
- required: true,
- message: '姝ら」涓哄繀濉」',
- // blur鍜宑hange浜嬩欢瑙﹀彂妫�楠�
- trigger: ['blur', 'change']
- },
- {
- min: 11,
- max: 11,
- message: '璇疯緭鍏ュ悎娉曟墜鏈哄彿'
- },
- {
- validator: (rule, value, callback) => {
- return uni.$u.test.mobile(value);
+ idCard: [{
+ type: 'string',
+ required: true,
+ message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+ trigger: ['blur', 'change']
},
- message: '鎵嬫満鍙风爜涓嶆纭�',
- trigger: ['change', 'blur']
- }
- ],
- password: [
- {
- required: true,
- message: '璇疯缃垵濮嬪瘑鐮�',
- trigger: ['blur', 'change']
- },
- {
- min: 6,
- max: 12,
- message: '闀垮害鍦�6-12涓瓧绗︿箣闂�'
- }
- ],
- confirmPassword: [
- {
- required: true,
- message: '璇疯缃垵濮嬪瘑鐮�',
- trigger: ['blur', 'change']
- },
- {
- min: 6,
- max: 12,
- message: '闀垮害鍦�6-12涓瓧绗︿箣闂�'
- }
- ],
- carNo: [
- {
- type: 'string',
- required: true,
- message: '璇疯緭鍏ヨ溅鐗屽彿',
- trigger: ['blur', 'change']
- },
- {
- transform(value) {
- return String(value);
- },
- validator: (rule, value, callback) => {
- return uni.$u.test.carNo(value);
- },
- message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
- trigger: ['change', 'blur']
- }
- ],
- carImg: {
- type: 'string',
- required: true,
- message: '璇蜂笂浼犺溅杈嗗浘鐗�',
- trigger: ['blur', 'change']
- },
- drivingImg: {
- type: 'string',
- required: true,
- message: '璇蜂笂浼犺椹惰瘉鐓х墖',
- trigger: ['blur', 'change']
- }
- },
- // 鍩烘湰妗堝垪鏁版嵁
- radiolist1: [
- {
- name: '璐т唬',
- disabled: false
- },
- {
- name: '鍙告満',
- disabled: false
- }
- ],
- // u-radio-group鐨剉-model缁戝畾鐨勫�煎鏋滆缃负鏌愪釜radio鐨刵ame锛屽氨浼氳榛樿閫変腑
- radiovalue1: '璐т唬',
- beforeChangeValue: '',
- // 鏇存崲瑙掕壊寮规
- editRoleModelShow: false,
- title: '鎻愮ず',
- content: '褰撳墠濉叆淇℃伅锛屽垏鎹㈣鑹插悗锛屽嵆娓呴櫎锛屾槸鍚﹀垏鎹紵',
- wxcode: '',
- openid: ''
- };
- },
- watch: {
- radiovalue1(newV) {
- if (this.registerFormModel.name || this.registerFormModel.idCard || this.registerFormModel.phone || this.registerFormModel.carNo || this.registerFormModel.password) {
- if (this.editRoleModelShow == true) {
- this.editRoleModelShow = false;
- } else {
- this.editRoleModelShow = true;
- }
- }
- switch (newV) {
- case '璐т唬':
- this.registerFormModel.type = 2;
- break;
- case '鍙告満':
- this.registerFormModel.type = 3;
- break;
- default:
- break;
- }
- return;
- }
- },
- methods: {
- ...mapMutations(['changeisUploadimg']),
- registerClick() {
- if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
- this.$refs.regesterFormRef
- .validate()
- .then(res => {
- console.log(this.registerFormModel);
- this.registerFormModel.username = this.registerFormModel.phone;
- apiRegister(this.registerFormModel)
- .then(res => {
- if (res.data.code == 0) {
- uni.showToast({
- title: '娉ㄥ唽鎴愬姛,鍗冲皢杩斿洖鐧诲綍椤�',
- icon: 'none',
- duration: 1000
- });
- setTimeout(() => {
- uni.redirectTo({ url: '/pages/login/login' });
- }, 1000);
- } else {
- this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触');
- }
- })
- .catch(err => {
- console.log('閿欒', err);
- });
- })
- .catch(err => {
- console.log('err', err);
- this.$u.toast('璇疯鑼冭緭鍏ュ唴瀹�');
- });
- } else {
- this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
- }
- },
- // 鍗曢�夋浜嬩欢
- groupChange(e) {},
- radioChange(e) {
- if (
- this.registerFormModel.name == '' &&
- this.registerFormModel.idCard == '' &&
- this.registerFormModel.phone == '' &&
- this.registerFormModel.carNo == '' &&
- this.registerFormModel.password == ''
- ) {
- this.$refs.regesterFormRef.clearValidate();
- this.beforeChangeValue = e;
- }
- },
- jiaoYanPassword() {
- if (this.registerFormModel.password != this.registerFormModel.confirmPassword) {
- this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
- }
- },
- // 涓婁紶鍥剧墖鏂规硶
- beforeRead() {
- this.changeisUploadimg(true);
- },
- // 鍒犻櫎鍥剧墖
- deletePic(event) {
- this.changeisUploadimg(true);
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- // 鏂板鍥剧墖
- async afterRead(event) {
- // 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map(item => {
- this[`fileList${event.name}`].push({
- ...item,
- status: 'uploading',
- message: '涓婁紶涓�'
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url, event.name);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(
- fileListLen,
- 1,
- Object.assign(item, {
- status: 'success',
- message: '涓婁紶鎴愬姛',
- url: result
- })
- );
- fileListLen++;
- }
- },
- uploadFilePromise(url, num) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: BaseUrl + '/admin/sys-file/uploadUnToken',
- filePath: url,
- name: 'file',
- formData: {
- // user: ''
- },
- success: res => {
- if (num == 1) {
- this.registerFormModel.carImg = JSON.parse(res.data).data.url;
- resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
- } else if (num == 2) {
- this.registerFormModel.drivingImg = JSON.parse(res.data).data.url;
- resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+ {
+ pattern: /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
+ message: '韬唤璇佸彿鏍煎紡涓嶆纭�'
}
+ ],
+ phone: [{
+ required: true,
+ message: '姝ら」涓哄繀濉」',
+ // blur鍜宑hange浜嬩欢瑙﹀彂妫�楠�
+ trigger: ['blur', 'change']
+ },
+ {
+ min: 11,
+ max: 11,
+ message: '璇疯緭鍏ュ悎娉曟墜鏈哄彿'
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '鎵嬫満鍙风爜涓嶆纭�',
+ trigger: ['change', 'blur']
+ }
+ ],
+ password: [{
+ required: true,
+ message: '璇疯缃垵濮嬪瘑鐮�',
+ trigger: ['blur', 'change']
+ },
+ {
+ min: 6,
+ max: 12,
+ message: '闀垮害鍦�6-12涓瓧绗︿箣闂�'
+ }
+ ],
+ confirmPassword: [{
+ required: true,
+ message: '璇疯缃垵濮嬪瘑鐮�',
+ trigger: ['blur', 'change']
+ },
+ {
+ min: 6,
+ max: 12,
+ message: '闀垮害鍦�6-12涓瓧绗︿箣闂�'
+ }
+ ],
+ carNo: [{
+ type: 'string',
+ required: true,
+ message: '璇疯緭鍏ヨ溅鐗屽彿',
+ trigger: ['blur', 'change']
+ },
+ {
+ transform(value) {
+ return String(value);
+ },
+ validator: (rule, value, callback) => {
+ return uni.$u.test.carNo(value);
+ },
+ message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
+ trigger: ['change', 'blur']
+ }
+ ],
+ carImg: {
+ type: 'string',
+ required: true,
+ message: '璇蜂笂浼犺溅杈嗗浘鐗�',
+ trigger: ['blur', 'change']
+ },
+ drivingImg: {
+ type: 'string',
+ required: true,
+ message: '璇蜂笂浼犺椹惰瘉鐓х墖',
+ trigger: ['blur', 'change']
+ }
+ },
+ // 鍩烘湰妗堝垪鏁版嵁
+ radiolist1: [{
+ name: '璐т唬',
+ disabled: false
+ },
+ {
+ name: '鍙告満',
+ disabled: false
+ }
+ ],
+ // u-radio-group鐨剉-model缁戝畾鐨勫�煎鏋滆缃负鏌愪釜radio鐨刵ame锛屽氨浼氳榛樿閫変腑
+ radiovalue1: '璐т唬',
+ beforeChangeValue: '',
+ // 鏇存崲瑙掕壊寮规
+ editRoleModelShow: false,
+ title: '鎻愮ず',
+ content: '褰撳墠濉叆淇℃伅锛屽垏鎹㈣鑹插悗锛屽嵆娓呴櫎锛屾槸鍚﹀垏鎹紵',
+ wxcode: '',
+ openid: ''
+ };
+ },
+ watch: {
+ radiovalue1(newV) {
+ if (this.registerFormModel.name || this.registerFormModel.idCard || this.registerFormModel.phone || this
+ .registerFormModel.carNo || this.registerFormModel.password) {
+ if (this.editRoleModelShow == true) {
+ this.editRoleModelShow = false;
+ } else {
+ this.editRoleModelShow = true;
+ }
+ }
+ switch (newV) {
+ case '璐т唬':
+ this.registerFormModel.type = 2;
+ break;
+ case '鍙告満':
+ this.registerFormModel.type = 3;
+ break;
+ default:
+ break;
+ }
+ return;
+ }
+ },
+ methods: {
+ ...mapMutations(['changeisUploadimg']),
+ registerClick() {
+ if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
+ this.$refs.regesterFormRef
+ .validate()
+ .then(res => {
+ console.log(this.registerFormModel);
+ this.registerFormModel.username = this.registerFormModel.phone;
+ apiRegister(this.registerFormModel)
+ .then(res => {
+ if (res.data.code == 0) {
+ uni.showToast({
+ title: '娉ㄥ唽鎴愬姛,鍗冲皢杩斿洖鐧诲綍椤�',
+ icon: 'none',
+ duration: 1000
+ });
+ setTimeout(() => {
+ uni.redirectTo({ url: '/pages/login/login' });
+ }, 1000);
+ } else {
+ this.$u.toast(res.data.msg ? res.data.msg : '娣诲姞澶辫触');
+ }
+ })
+ .catch(err => {
+ console.log('閿欒', err);
+ });
+ })
+ .catch(err => {
+ console.log('err', err);
+ this.$u.toast('璇疯鑼冭緭鍏ュ唴瀹�');
+ });
+ } else {
+ this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
+ }
+ },
+ // 鍗曢�夋浜嬩欢
+ groupChange(e) {},
+ radioChange(e) {
+ if (
+ this.registerFormModel.name == '' &&
+ this.registerFormModel.idCard == '' &&
+ this.registerFormModel.phone == '' &&
+ this.registerFormModel.carNo == '' &&
+ this.registerFormModel.password == ''
+ ) {
+ this.$refs.regesterFormRef.clearValidate();
+ this.beforeChangeValue = e;
+ }
+ },
+ jiaoYanPassword() {
+ if (this.registerFormModel.password != this.registerFormModel.confirmPassword) {
+ this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
+ }
+ },
+ // 涓婁紶鍥剧墖鏂规硶
+ beforeRead() {
+ this.changeisUploadimg(true);
+ },
+ // 鍒犻櫎鍥剧墖
+ deletePic(event) {
+ this.changeisUploadimg(true);
+ this[`fileList${event.name}`].splice(event.index, 1);
+ },
+ // 鏂板鍥剧墖
+ async afterRead(event) {
+ // 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
+ let lists = [].concat(event.file);
+ let fileListLen = this[`fileList${event.name}`].length;
+ lists.map(item => {
+ this[`fileList${event.name}`].push({
+ ...item,
+ status: 'uploading',
+ message: '涓婁紶涓�'
+ });
+ });
+ for (let i = 0; i < lists.length; i++) {
+ const result = await this.uploadFilePromise(lists[i].url, event.name);
+ let item = this[`fileList${event.name}`][fileListLen];
+ this[`fileList${event.name}`].splice(
+ fileListLen,
+ 1,
+ Object.assign(item, {
+ status: 'success',
+ message: '涓婁紶鎴愬姛',
+ url: result
+ })
+ );
+ fileListLen++;
+ }
+ },
+ uploadFilePromise(url, num) {
+ return new Promise((resolve, reject) => {
+ let a = uni.uploadFile({
+ url: BaseUrl + '/admin/sys-file/uploadUnToken',
+ filePath: url,
+ name: 'file',
+ formData: {
+ // user: ''
+ },
+ success: res => {
+ if (num == 1) {
+ this.registerFormModel.carImg = JSON.parse(res.data).data.url;
+ resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+ } else if (num == 2) {
+ this.registerFormModel.drivingImg = JSON.parse(res.data).data.url;
+ resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+ }
+ }
+ });
+ });
+ },
+ // 鏇存崲瑙掕壊寮瑰嚭妗�
+ roleConfirm() {
+ console.log('閬嶅巻瀵硅薄', Object.keys(this.registerFormModel));
+ Object.keys(this.registerFormModel).forEach(item => {
+ if (item !== 'type') {
+ if (this.registerFormModel[item]) this.registerFormModel[item] = '';
}
});
- });
- },
- // 鏇存崲瑙掕壊寮瑰嚭妗�
- roleConfirm() {
- console.log('閬嶅巻瀵硅薄', Object.keys(this.registerFormModel));
- Object.keys(this.registerFormModel).forEach(item => {
- if (item !== 'type') {
- if (this.registerFormModel[item]) this.registerFormModel[item] = '';
- }
- });
- /**
- * @resetFields 涓嶇鐢ㄦ椂鍊欑敤涓婅竟鐨勪唬鏇�
- */
- this.$refs.regesterFormRef.resetFields();
- this.editRoleModelShow = false;
- },
- roleCancel() {
- this.radiovalue1 = this.beforeChangeValue;
- this.$nextTick(() => {
+ /**
+ * @resetFields 涓嶇鐢ㄦ椂鍊欑敤涓婅竟鐨勪唬鏇�
+ */
+ this.$refs.regesterFormRef.resetFields();
this.editRoleModelShow = false;
- });
+ },
+ roleCancel() {
+ this.radiovalue1 = this.beforeChangeValue;
+ this.$nextTick(() => {
+ this.editRoleModelShow = false;
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-::v-deep.register {
- width: 94%;
- padding: 0 0 vww(20) 0;
- margin: 0 auto;
- .registerForm {
+<style lang="scss"
+ scoped>
+ ::v-deep.register {
width: 94%;
+ padding: 0 0 vww(20) 0;
margin: 0 auto;
- font-size: 16px !important;
- .u-form {
- .u-radio {
- width: 33%;
+
+ .registerForm {
+ width: 94%;
+ margin: 0 auto;
+ font-size: 16px !important;
+
+ .u-form {
+ .u-radio {
+ width: 33%;
+ }
+ }
+ }
+
+ .registerBtn {
+ width: 94%;
+ margin: vww(50) auto 0;
+ }
+
+ .utils {
+ line-height: vww(30);
+ text-align: center;
+
+ text:nth-of-type(1) {
+ margin-right: vww(10);
}
}
}
- .registerBtn {
- width: 94%;
- margin: vww(50) auto 0;
- }
- .utils {
- line-height: vww(30);
- text-align: center;
- text:nth-of-type(1) {
- margin-right: vww(10);
- }
- }
-}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.1