From 6be28040e74e1ff7764478174a9b5d706fe4fc39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 11:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/staff/memberSel copy.vue | 232 +
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 32
h5/pages/staff/vehicle/shiwai.vue | 541 ++-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/CarUseBookService.java | 4
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java | 14
h5/main.js | 1
h5/pages/changePassword/changePassword.vue | 48
h5/pages/staff/vehicle/sendACar.vue | 252 ++
h5/pages/staffLogin/forgetPsd.vue | 235 ++
h5/pages/staff/vehicle/shinei.vue | 435 ++-
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/VisitsCloudController.java | 1
h5/static/ic_captcha.png | 0
h5/pages/applicationRecord/applicationRecord.vue | 1
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/MemberVO.java | 5
h5/store/index.js | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java | 117
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java | 312 ++
h5/api/visitor.js | 8
server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java | 10
h5/api/staff.js | 130 +
h5/pages/staff/memberSel.vue | 460 ++-
h5/pages/staff/snapshotResult.vue | 65
h5/pages/staff/vehicle/apply.vue | 498 ++-
h5/pages.json | 45
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/CarUseBookCloudController.java | 4
h5/api/index.js | 8
h5/pages/staff/visitorReport.vue | 1285 +++++-----
h5/pages/staffLogin/login.vue | 74
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Approve.java | 3
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java | 8
h5/pages/staff/index.vue | 15
h5/utils/service.js | 9
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java | 99
/dev/null | 167 -
h5/pages/staff/task/index.vue | 888 +++---
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/CarUseBookController.java | 2
h5/pages/staff/snapshot.vue | 591 +++-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java | 14
h5/pages/staff/vehicle/applePeo.vue | 305 ++
h5/pages/answer/answer.vue | 45
40 files changed, 4,514 insertions(+), 2,451 deletions(-)
diff --git a/h5/api/index.js b/h5/api/index.js
index 2a49856..a398f63 100644
--- a/h5/api/index.js
+++ b/h5/api/index.js
@@ -25,4 +25,12 @@
method: 'get',
data
})
+}
+// 鍙戦�佺煭淇¢獙璇佺爜
+export const sendSms = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/smsEmail/sendSms',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/h5/api/staff.js b/h5/api/staff.js
index 0340e62..69a4543 100644
--- a/h5/api/staff.js
+++ b/h5/api/staff.js
@@ -3,7 +3,135 @@
// login
export const loginPost = (data) => {
return http({
- url: 'visitsAdmin/cloudService/web/member/accountLogin',
+ url: '/loginH5',
+ method: 'post',
+ data
+ })
+}
+export const loginCaptcha = () => {
+ return http({
+ url: '/captcha',
+ method: 'get'
+ })
+}
+export const getUserInfo = () => {
+ return http({
+ url: '/getUserInfo',
+ method: 'get'
+ })
+}
+// 鏌ヨ浜哄憳鐩稿叧淇℃伅0鍔冲姟璁垮 1鏅�氳瀹� 2鍐呴儴浜哄憳,绀轰緥鍊�(1)
+export const findTypeMemberInfo = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/member/findTypeMemberInfo',
+ method: 'post',
+ data
+ })
+}
+// 閲嶇疆瀵嗙爜
+export const resetPassword = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/visits/resetPassword',
+ method: 'post',
+ data
+ })
+}
+// 淇敼瀵嗙爜
+export const uploadPassword = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/member/updatePwd',
+ method: 'post',
+ data
+ })
+}
+// loginout
+export const logoutPost = (data) => {
+ return http({
+ url: '/logout',
+ method: 'post',
+ data
+ })
+}
+
+// 闅愭偅闅忔墜鎷� 鍒涘缓
+export const DangerCreate = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/hiddenDanger/create',
+ method: 'post',
+ data
+ })
+}
+// 闅愭偅鍖哄煙
+export const DangerArea = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/hiddenDanger/create',
+ method: 'post',
+ data
+ })
+}
+// 闅愭偅 绫诲瀷
+export const DangerConfigType = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/hiddenDangerParam/list',
+ method: 'post',
+ data
+ })
+}
+// 闅愭偅 鏌ヨ鍖哄煙鍐呭畨鍏ㄥ憳
+export const findHiddenAreaMemberList = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/hiddenDangerParam/findHiddenAreaMemberList',
+ method: 'post',
+ data
+ })
+}
+
+// 杞﹁締 鍒楄〃
+export const getCarsList = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/cars/list',
+ method: 'post',
+ data
+ })
+}
+// 鏌ヨ杞﹁締鍙绾︽椂娈�
+export const carCanReservationDate = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/carUseBook/carCanReservationDate',
+ method: 'get',
+ data
+ })
+}
+// 鏌ヨ杞﹁締 棰勭害璁板綍
+export const carUseBookList = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/carUseBook/carUseBookList',
+ method: 'post',
+ data
+ })
+}
+
+// 鐢ㄨ溅鐢宠鎻愪氦
+export const carUseBookCraete = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/carUseBook/create',
+ method: 'post',
+ data
+ })
+}
+
+// 浠诲姟涓績
+export const taskCenter = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/web/member/taskCenter',
+ method: 'post',
+ data
+ })
+}
+// 鏌ヨ杞﹁締 娲捐溅璁板綍
+export const carUseBookPaiche = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/carUseBook/page',
method: 'post',
data
})
diff --git a/h5/api/visitor.js b/h5/api/visitor.js
index cf7dd8f..a684fe0 100644
--- a/h5/api/visitor.js
+++ b/h5/api/visitor.js
@@ -16,6 +16,14 @@
data
})
}
+// 璁垮鎶ュ
+export const createVisit = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/business/visits/createVisit',
+ method: 'post',
+ data
+ })
+}
// 鏌ヨ琚浜哄垪琛�
export const getVisitedMember = (data) => {
return http({
diff --git a/h5/main.js b/h5/main.js
index c60a816..e9b21e4 100644
--- a/h5/main.js
+++ b/h5/main.js
@@ -24,6 +24,7 @@
})
}
Vue.prototype.$goBack = () => { uni.navigateBack() }
+Vue.prototype.$eventBus = new Vue()
Vue.prototype.$onWait = new Promise((resolve) => {
Vue.prototype.$reslove = resolve
})
diff --git a/h5/pages.json b/h5/pages.json
index 31d6062..0c91e34 100644
--- a/h5/pages.json
+++ b/h5/pages.json
@@ -2,14 +2,14 @@
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
- "pages": [
- {
- "path": "pages/index/index",
- "style": {
- "navigationBarTitleText": "璁垮涓績",
- "enablePullDownRefresh": false
- }
- },
+ "pages": [
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "璁垮涓績",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/notice/notice",
"style": {
@@ -256,7 +256,7 @@
}
}, {
- "path": "pages/staff/sendACar",
+ "path": "pages/staff/vehicle/sendACar",
"style": {
"navigationBarTitleText": "娲捐溅璁板綍",
"enablePullDownRefresh": false
@@ -364,6 +364,33 @@
}
}
+ ,{
+ "path" : "pages/staffLogin/forgetPsd",
+ "style" :
+ {
+ "navigationBarTitleText": "鎵惧洖瀵嗙爜",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "pages/staff/snapshotResult",
+ "style" :
+ {
+ "navigationBarTitleText": "闅愭偅闅忔墜鎷�",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "pages/staff/vehicle/applePeo",
+ "style" :
+ {
+ "navigationBarTitleText": "閫夋嫨浜哄憳",
+ "enablePullDownRefresh": false
+ }
+
+ }
],
"subPackages": [{
"root": "n_pages",
diff --git a/h5/pages/answer/answer.vue b/h5/pages/answer/answer.vue
index 318242c..68aa17e 100644
--- a/h5/pages/answer/answer.vue
+++ b/h5/pages/answer/answer.vue
@@ -29,7 +29,9 @@
(item.selAnswer &&
item.answer === item.selAnswer &&
item.selAnswer == line.code) ||
- item.selAnswer == line.code
+ (item.selAnswer == line.code && status != '2') ||
+ (item.answer === item.selAnswer &&
+ item.selAnswer == line.code)
"
/>
<image
@@ -50,7 +52,9 @@
(item.selAnswer &&
item.answer === item.selAnswer &&
item.selAnswer == line.code) ||
- item.selAnswer == line.code
+ (item.selAnswer == line.code && status != '2') ||
+ (item.answer === item.selAnswer &&
+ item.selAnswer == line.code)
"
style="color: rgba(2, 94, 239, 1)"
><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{
@@ -61,6 +65,7 @@
<text
v-if="
item.selAnswer &&
+ item.selAnswer == line.code &&
item.answer !== item.selAnswer &&
status == '2'
"
@@ -91,7 +96,7 @@
"
>
<image src="@/static/meeting/icon/ic_choose_sel@2x.png" />
- <text>鍥炵瓟姝g‘</text>
+ <text class="success">鍥炵瓟姝g‘</text>
</view>
</template>
<template v-if="item.type == 2">
@@ -104,7 +109,12 @@
<image src="@/static/checkbox@2x.png" v-if="!line.checked" />
<image
src="@/static/checkbo1x_sel@2x.png"
- v-if="line.checked || (item.selAnswer === item.answer && line.checked)"
+ v-if="
+ (line.checked && status != '2') ||
+ (item.selAnswer === item.answer &&
+ line.checked &&
+ status != '2')
+ "
/>
<image
src="@/static/checkbox_wrong@2x.png"
@@ -114,16 +124,16 @@
status == '2'
"
/>
- <text v-if="!item.selAnswer || item.selAnswer !== line.code"
+ <text v-if="!line.checked"
><text class="mr24">{{ line.code }}</text>
{{ line.value }}</text
>
<text
v-if="
- (item.selAnswer &&
- item.answer === item.selAnswer &&
- item.selAnswer == line.code) ||
- item.selAnswer == line.code
+ (line.checked && status != '2') ||
+ (item.selAnswer === item.answer &&
+ line.checked &&
+ status != '2')
"
style="color: rgba(2, 94, 239, 1)"
><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{
@@ -133,8 +143,8 @@
>
<text
v-if="
- item.selAnswer &&
- item.answer !== item.selAnswer &&
+ line.checked &&
+ item.selAnswer !== item.answer &&
status == '2'
"
style="color: rgba(237, 69, 69, 1)"
@@ -164,7 +174,7 @@
"
>
<image src="@/static/meeting/icon/ic_choose_sel@2x.png" />
- <text>鍥炵瓟姝g‘</text>
+ <text class="success">鍥炵瓟姝g‘</text>
</view>
</template>
</view>
@@ -182,7 +192,7 @@
v-if="status == '2'"
style="background-color: #db534c"
class="box_list_answer_btn"
- @click="status = '0'"
+ @click="handleAgain"
>绛旈澶辫触锛屽啀鏉ヤ竴娆�</view
>
<!-- 澶氶�� -->
@@ -293,7 +303,7 @@
this.list.forEach((item, i) => {
if (index === i) {
item.options.forEach((item2, j) => {
- if(j === jeck){
+ if (j === jeck) {
item2.checked = !item2.checked
}
})
@@ -359,6 +369,10 @@
} else {
this.status = '1'
}
+ },
+ handleAgain() {
+ this.status = '0'
+ this.getProblems()
},
next() {
uni.navigateTo({
@@ -438,6 +452,9 @@
color: #e42d2d;
margin-left: 16rpx;
}
+ .success {
+ color: #275de6;
+ }
}
}
.list_item {
diff --git a/h5/pages/applicationRecord/applicationRecord.vue b/h5/pages/applicationRecord/applicationRecord.vue
index c10e776..7a93ddb 100644
--- a/h5/pages/applicationRecord/applicationRecord.vue
+++ b/h5/pages/applicationRecord/applicationRecord.vue
@@ -99,7 +99,6 @@
if (this.total > 10) {
this.getList()
}
-
},
methods: {
handleDetail(id) {
diff --git a/h5/pages/changePassword/changePassword.vue b/h5/pages/changePassword/changePassword.vue
index af61ae5..0533847 100644
--- a/h5/pages/changePassword/changePassword.vue
+++ b/h5/pages/changePassword/changePassword.vue
@@ -7,7 +7,7 @@
<text>*</text>
</view>
<view class="list_item_content">
- <input type="number" maxlength="11" placeholder="璇疯緭鍏ユ棫瀵嗙爜" placeholder-style="color: #999999;" />
+ <input type="password" v-model="param.oldPwd" :maxlength="32" placeholder="璇疯緭鍏ユ棫瀵嗙爜" placeholder-style="color: #999999;" />
</view>
</view>
<view class="list_item">
@@ -16,7 +16,7 @@
<text>*</text>
</view>
<view class="list_item_content">
- <input type="number" maxlength="11" placeholder="璇疯緭鍏�6-18浣嶆暟瀛椼�佸瓧姣嶇粍鍚�" placeholder-style="color: #999999;" />
+ <input type="password" v-model="param.newPwd" :maxlength="32" placeholder="璇疯緭鍏�6-18浣嶆暟瀛椼�佸瓧姣嶇粍鍚�" placeholder-style="color: #999999;" />
</view>
</view>
<view class="list_item">
@@ -25,7 +25,7 @@
<text>*</text>
</view>
<view class="list_item_content">
- <input type="number" maxlength="11" placeholder="璇峰啀杈撲竴娆℃柊瀵嗙爜" placeholder-style="color: #999999;" />
+ <input type="password" v-model="param.newPwdTemp" :maxlength="32" placeholder="璇峰啀杈撲竴娆℃柊瀵嗙爜" placeholder-style="color: #999999;" />
</view>
</view>
</view>
@@ -34,17 +34,55 @@
<text>濡傚瘑鐮侀仐蹇橈紝璇疯仈绯诲洯鍖虹郴缁熺鐞嗗憳閲嶇疆</text>
</view>
<view class="footer-box">
- <view class="submit-button">鎻愪氦</view>
+ <view class="submit-button" @click="onSubmit">鎻愪氦</view>
</view>
</view>
</template>
<script>
+import { uploadPassword } from '@/api'
export default {
data() {
return {
-
+ param: {}
};
+ },
+ methods: {
+ onSubmit() {
+ const { param } = this
+ if (!param.oldPwd) return uni.showToast({
+ title: '鏃у瘑鐮佷笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!param.newPwd) return uni.showToast({
+ title: '鏂板瘑鐮佷笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!param.newPwdTemp) return uni.showToast({
+ title: '纭瀵嗙爜涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (param.newPwdTemp != param.newPwd) return uni.showToast({
+ title: '涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�',
+ icon: 'none'
+ })
+ uploadPassword({
+ ...param
+ }).then(res => {
+ if (res && res.code == 200) {
+ setTimeout(() => {
+ uni.showToast({
+ title: '瀵嗙爜淇敼鎴愬姛,璇烽噸鏂扮櫥褰�',
+ icon: 'success',
+ duration: 2000
+ })
+ })
+ uni.redirectTo({
+ url: "/pages/staffLogin/login"
+ })
+ }
+ })
+ }
}
}
</script>
diff --git a/h5/pages/staff/index.vue b/h5/pages/staff/index.vue
index 39665bd..e92bb5a 100644
--- a/h5/pages/staff/index.vue
+++ b/h5/pages/staff/index.vue
@@ -1,7 +1,7 @@
<template>
<view class="main_app">
<view class="title_wrap">
- <view class="name">鏌愭煇鏌愶紝娆㈣繋鐧诲綍锝�</view>
+ <view class="name">{{ userInfo.realname || '' }}锛屾杩庣櫥褰曪綖</view>
<view class="btn" @click="loginOut">閫�鍑虹櫥褰�</view>
</view>
<view class="banner_wrap">
@@ -55,7 +55,7 @@
<view class="h1">鎴戠殑浼氳鏃ュ巻</view>
<view class="h2">MY MEETING CALENDAR</view>
</view>
- <view class="img_wrap" @click="jump('/pages/staff/sendACar')">
+ <view class="img_wrap" @click="jump('/pages/staff/vehicle/sendACar')">
<image class="img" src="@/static/staff/ic_paichejilu.png"></image>
<view class="h1">娲捐溅璁板綍</view>
<view class="h2">VEHICLE DISPATCH</view>
@@ -74,9 +74,15 @@
</template>
<script>
+import { logoutPost } from '@/api'
export default {
data() {
- return {};
+ return {
+ userInfo: uni.getStorageSync('userInfo')
+ };
+ },
+ onLoad(){
+ console.log('userInfo', this.userInfo);
},
methods: {
jump(path){
@@ -85,7 +91,8 @@
});
},
loginOut() {
- uni.clearStorageSync()
+ this.$store.commit('empty')
+ logoutPost()
uni.redirectTo({
url: '/pages/staffLogin/login'
})
diff --git a/h5/pages/staff/memberSel copy.vue b/h5/pages/staff/memberSel copy.vue
new file mode 100644
index 0000000..b468860
--- /dev/null
+++ b/h5/pages/staff/memberSel copy.vue
@@ -0,0 +1,232 @@
+<template>
+ <view class="main_app">
+ <view class="search_inp df_ac">
+ <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image>
+ <input v-model="param.name" @blur="initData()" type="text" placeholder="鎼滅储" placeholder-style="color: #999999;" />
+ </view>
+ <view class="member_list">
+ <view v-for="item in memberList" :key="item.id" class="line">
+ <image :src="item.faceImgFull ? item.faceImgFull : require('@/static/logo@2x.png')" class="avatar" mode=""></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">{{ item.name }}</text>
+ <!-- <text class="tag">tag</text> -->
+ </view>
+ <view class="depart">{{ item.companyName }}</view>
+ </view>
+ <checkbox class="checkbox" />
+ <text></text>
+ </view>
+ <view class="empty"></view>
+ </view>
+ <!-- -->
+ <view class="sub_wrap">
+ <view class="sel_mem">
+ <text>宸查�夋嫨锛�</text>
+ <view class="members">
+ <text v-for="(item, i) in 100" :key="i">{{ item }}</text>
+ </view>
+ <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image>
+ </view>
+ <view class="btn" @click="onSubmit">纭(00/20)</view>
+ </view>
+ <!-- -->
+ <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false">
+ <view class="modal">
+ <view class="modal_header">
+ <text class="status">宸查�夋嫨锛歺x浜�</text>
+ <text class="btn" @click="isShowSelMem = false">纭</text>
+ </view>
+ <view class="modal_mem_list">
+ <view class="line">
+ <image src="../../static/logo@2x.png" class="avatar" mode=""></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">name</text>
+ </view>
+ <view class="depart">xx绉戝</view>
+ </view>
+ <view class="btn">绉婚櫎</view>
+ </view>
+ </view>
+ </view>
+ </u-popup>
+
+ </view>
+</template>
+
+<script>
+import { findHiddenAreaMemberList } from '@/api'
+export default {
+ data() {
+ return {
+ memberList: [],
+ selList: [],
+ param: {},
+
+ isShowSelMem: false
+ }
+ },
+ onLoad() {
+ this.initData()
+ },
+ methods: {
+ onSubmit() {
+ uni.navigateBack()
+ },
+ initData() {
+ const { param } = this
+ findHiddenAreaMemberList({
+ name: param.name
+ }).then(res => {
+ this.memberList = res.data || []
+ })
+ }
+ }
+};
+</script>
+
+<style lang="scss">
+.modal {
+ padding: 40rpx 30rpx;
+ .modal_header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .status {
+ font-weight: 600;
+ }
+ .btn {
+ color: #279baa;
+ }
+ }
+ .modal_mem_list {
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ }
+ }
+ .btn{
+ width: 80rpx;
+ height: 48rpx;
+ line-height: 48rpx;
+ text-align: center;
+ font-size: 24rpx;
+ color: #333333;
+ border-radius: 4rpx;
+ border: 1rpx solid #999999;
+ }
+ }
+ }
+}
+.sub_wrap {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2;
+ padding: 30rpx 30rpx 64rpx;
+ .sel_mem {
+ display: flex;
+ align-items: center;
+ .members {
+ width: 500rpx;
+ color: #4d98a7;
+ white-space: nowrap;
+ overflow: hidden; //鏂囨湰瓒呭嚭闅愯棌
+ text-overflow: ellipsis;
+ margin-right: 20rpx;
+ }
+ .open_icon {
+ width: 44rpx;
+ height: 44rpx;
+ }
+ }
+ .btn {
+ width: 690rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ background: #279baa;
+ border-radius: 44rpx;
+ color: #fff;
+ text-align: center;
+ margin-top: 22rpx;
+ }
+}
+.member_list {
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ .tag {
+ font-size: 24rpx;
+ border-radius: 4rpx;
+ border: 1rpx solid #f62710;
+ color: #f62710;
+ padding: 0rpx 6rpx;
+ margin-left: 8rpx;
+ }
+ }
+ }
+ }
+ .empty {
+ width: 100%;
+ height: 280rpx;
+ }
+}
+.search_inp {
+ height: 72rpx;
+ background: #f7f7f7;
+ border-radius: 4rpx;
+ padding-left: 16rpx;
+ .search{
+ width: 28rpx;
+ }
+ input {
+ flex: 1;
+ font-size: 28rpx;
+ color: #333333;
+ }
+}
+</style>
diff --git a/h5/pages/staff/memberSel.vue b/h5/pages/staff/memberSel.vue
index c6bf356..8a51c0a 100644
--- a/h5/pages/staff/memberSel.vue
+++ b/h5/pages/staff/memberSel.vue
@@ -1,219 +1,279 @@
<template>
- <view class="main_app">
- <view class="search_inp df_ac">
- <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储" placeholder-style="color: #999999;" />
- </view>
- <view class="member_list">
- <view class="line">
- <image src="../../static/logo@2x.png" class="avatar" mode=""></image>
- <view class="content">
- <view class="info">
- <text class="name">name</text>
- <text class="tag">tag</text>
- </view>
- <view class="depart">xx绉戝</view>
- </view>
- <checkbox class="checkbox" />
- <text></text>
- </view>
- <view class="empty"></view>
- </view>
- <!-- -->
- <view class="sub_wrap">
- <view class="sel_mem">
- <text>宸查�夋嫨锛�</text>
- <view class="members">
- <text v-for="(item, i) in 100" :key="i">{{ item }}</text>
- </view>
- <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image>
- </view>
- <view class="btn" @click="onSubmit">纭(00/20)</view>
- </view>
- <!-- -->
- <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false">
- <view class="modal">
- <view class="modal_header">
- <text class="status">宸查�夋嫨锛歺x浜�</text>
- <text class="btn" @click="isShowSelMem = false">纭</text>
- </view>
- <view class="modal_mem_list">
- <view class="line">
- <image src="../../static/logo@2x.png" class="avatar" mode=""></image>
- <view class="content">
- <view class="info">
- <text class="name">name</text>
- </view>
- <view class="depart">xx绉戝</view>
- </view>
- <view class="btn">绉婚櫎</view>
- </view>
- </view>
- </view>
- </u-popup>
-
- </view>
+ <view class="main_app">
+ <view class="search_inp df_ac">
+ <image
+ class="mr12 search"
+ src="../../static/ic_search@2x.png"
+ mode="widthFix"
+ ></image>
+ <input
+ v-model="param.name"
+ @blur="initData()"
+ type="text"
+ placeholder="鎼滅储"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ <view class="member_list">
+ <checkbox-group @change="changeMem">
+ <view v-for="item in memberList" :key="item.id" class="line">
+ <image
+ :src="
+ item.faceImgFull
+ ? item.faceImgFull
+ : require('@/static/logo@2x.png')
+ "
+ class="avatar"
+ mode=""
+ ></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">{{ item.name }}</text>
+ <!-- <text class="tag">tag</text> -->
+ </view>
+ <view class="depart">{{ item.companyName }}</view>
+ </view>
+ <label>
+ <checkbox
+ :value="String(item.id)"
+ class="checkbox"
+ />
+ </label>
+ <text></text>
+ </view>
+ </checkbox-group>
+ <view class="empty"></view>
+ </view>
+ <!-- -->
+ <!-- <view class="sub_wrap">
+ <view class="sel_mem">
+ <text>宸查�夋嫨锛�</text>
+ <view class="members">
+ <text v-for="(item, i) in 100" :key="i">{{ item }}</text>
+ </view>
+ <image
+ @click="isShowSelMem = true"
+ class="open_icon"
+ src="../../static/staff/renyuan_ic_open.png"
+ mode=""
+ ></image>
+ </view>
+ <view class="btn" @click="onSubmit">纭(00/20)</view>
+ </view> -->
+ <!-- -->
+ <u-popup
+ :show="isShowSelMem"
+ :round="12"
+ mode="bottom"
+ @close="isShowSelMem = false"
+ >
+ <view class="modal">
+ <view class="modal_header">
+ <text class="status">宸查�夋嫨锛歺x浜�</text>
+ <text class="btn" @click="isShowSelMem = false">纭</text>
+ </view>
+ <view class="modal_mem_list">
+ <view class="line">
+ <image
+ src="../../static/logo@2x.png"
+ class="avatar"
+ mode=""
+ ></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">name</text>
+ </view>
+ <view class="depart">xx绉戝</view>
+ </view>
+ <view class="btn">绉婚櫎</view>
+ </view>
+ </view>
+ </view>
+ </u-popup>
+ </view>
</template>
<script>
+import { findHiddenAreaMemberList } from '@/api'
export default {
- data() {
- return {
- memberList: [],
- selList: [],
+ data() {
+ return {
+ memberList: [],
+ selList: [],
+ param: {},
- isShowSelMem: false
- }
- },
- methods: {
- onSubmit() {
- uni.navigateBack()
- }
- }
+ isShowSelMem: false
+ }
+ },
+ onLoad() {
+ this.initData()
+ },
+ methods: {
+ onSubmit() {
+ uni.navigateBack()
+ },
+ changeMem(e) {
+ console.log( e.detail.value[0]);
+ const id = Number(e.detail.value[0])
+ const item = this.memberList.find(i => i.id === id)
+ console.log('item', item);
+ uni.navigateTo({
+ url: `/pages/staff/snapshot?id=${item.id}&name=${item.name}`
+ })
+ },
+ initData() {
+ const { param } = this
+ findHiddenAreaMemberList({
+ name: param.name
+ }).then(res => {
+ this.memberList = res.data || []
+ })
+ }
+ }
};
</script>
<style lang="scss">
.modal {
- padding: 40rpx 30rpx;
- .modal_header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .status {
- font-weight: 600;
- }
- .btn {
- color: #279baa;
- }
- }
- .modal_mem_list {
- .line {
- display: flex;
- align-items: center;
- border-bottom: 1rpx solid #e5e5e5;
- padding: 30rpx 0;
- .avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- overflow: hidden;
- margin-right: 20rpx;
- }
- .content {
- flex: 1;
- .depart {
- font-size: 24rpx;
- color: #666666;
- }
- .info {
- display: flex;
- margin-bottom: 16rpx;
- .name {
- font-size: 30rpx;
- }
- }
- }
- .btn{
- width: 80rpx;
- height: 48rpx;
- line-height: 48rpx;
- text-align: center;
- font-size: 24rpx;
- color: #333333;
- border-radius: 4rpx;
- border: 1rpx solid #999999;
- }
- }
- }
+ padding: 40rpx 30rpx;
+ .modal_header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .status {
+ font-weight: 600;
+ }
+ .btn {
+ color: #279baa;
+ }
+ }
+ .modal_mem_list {
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ }
+ }
+ .btn {
+ width: 80rpx;
+ height: 48rpx;
+ line-height: 48rpx;
+ text-align: center;
+ font-size: 24rpx;
+ color: #333333;
+ border-radius: 4rpx;
+ border: 1rpx solid #999999;
+ }
+ }
+ }
}
.sub_wrap {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2;
- padding: 30rpx 30rpx 64rpx;
- .sel_mem {
- display: flex;
- align-items: center;
- .members {
- width: 500rpx;
- color: #4d98a7;
- white-space: nowrap;
- overflow: hidden; //鏂囨湰瓒呭嚭闅愯棌
- text-overflow: ellipsis;
- margin-right: 20rpx;
- }
- .open_icon {
- width: 44rpx;
- height: 44rpx;
- }
- }
- .btn {
- width: 690rpx;
- height: 88rpx;
- line-height: 88rpx;
- background: #279baa;
- border-radius: 44rpx;
- color: #fff;
- text-align: center;
- margin-top: 22rpx;
- }
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2;
+ padding: 30rpx 30rpx 64rpx;
+ .sel_mem {
+ display: flex;
+ align-items: center;
+ .members {
+ width: 500rpx;
+ color: #4d98a7;
+ white-space: nowrap;
+ overflow: hidden; //鏂囨湰瓒呭嚭闅愯棌
+ text-overflow: ellipsis;
+ margin-right: 20rpx;
+ }
+ .open_icon {
+ width: 44rpx;
+ height: 44rpx;
+ }
+ }
+ .btn {
+ width: 690rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ background: #279baa;
+ border-radius: 44rpx;
+ color: #fff;
+ text-align: center;
+ margin-top: 22rpx;
+ }
}
.member_list {
- .line {
- display: flex;
- align-items: center;
- border-bottom: 1rpx solid #e5e5e5;
- padding: 30rpx 0;
- .avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- overflow: hidden;
- margin-right: 20rpx;
- }
- .content {
- flex: 1;
- .depart {
- font-size: 24rpx;
- color: #666666;
- }
- .info {
- display: flex;
- margin-bottom: 16rpx;
- .name {
- font-size: 30rpx;
- }
- .tag {
- font-size: 24rpx;
- border-radius: 4rpx;
- border: 1rpx solid #f62710;
- color: #f62710;
- padding: 0rpx 6rpx;
- margin-left: 8rpx;
- }
- }
- }
- }
- .empty {
- width: 100%;
- height: 280rpx;
- }
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ .tag {
+ font-size: 24rpx;
+ border-radius: 4rpx;
+ border: 1rpx solid #f62710;
+ color: #f62710;
+ padding: 0rpx 6rpx;
+ margin-left: 8rpx;
+ }
+ }
+ }
+ }
+ .empty {
+ width: 100%;
+ height: 280rpx;
+ }
}
.search_inp {
- height: 72rpx;
- background: #f7f7f7;
- border-radius: 4rpx;
- padding-left: 16rpx;
- .search{
- width: 28rpx;
- }
- input {
- flex: 1;
- font-size: 28rpx;
- color: #333333;
- }
+ height: 72rpx;
+ background: #f7f7f7;
+ border-radius: 4rpx;
+ padding-left: 16rpx;
+ .search {
+ width: 28rpx;
+ }
+ input {
+ flex: 1;
+ font-size: 28rpx;
+ color: #333333;
+ }
}
</style>
diff --git a/h5/pages/staff/sendACar.vue b/h5/pages/staff/sendACar.vue
deleted file mode 100644
index 7a5e5db..0000000
--- a/h5/pages/staff/sendACar.vue
+++ /dev/null
@@ -1,167 +0,0 @@
-<template>
- <view class="main_app">
- <view class="app_header">
- <view class="item" @click="isShowDate = true">
- <text v-if="param.aa">{{ param.aa }}</text>
- <text v-else class="placeholder9">閫夋嫨鏃ユ湡</text>
- <u-icon class="ml12" name="arrow-down" color="#999999" />
- </view>
- <view class="item" @click="isShowCar = true">
- <text v-if="false">xx</text>
- <text v-else class="placeholder9">閫夋嫨杞﹁締</text>
- <u-icon class="ml12" name="arrow-down" color="#999999" />
- </view>
- </view>
- <!-- -->
- <view class="box_list">
- <view class="box_list_item" v-for="(item, index) in 3" :key="index">
- <view class="box_list_item_head">
- <text>涓佹仼鍑殑鍔冲姟鍏ュ巶鐢宠</text>
- <text class="loading">寰呭鏍�</text>
- </view>
- <view class="box_list_item_nr">
- <view class="box_list_item_nr_item">
- <text>琚闂汉锛�</text>
- <text>浜轰簨閮�-鐜嬩簹钃�</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>杩涘巶鏃堕棿锛�</text>
- <text>12-12 09:00</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>绂诲巶鏃堕棿锛�</text>
- <text>12-12 12:00</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>鏉ヨ浜嬬敱锛�</text>
- <text>涓氬姟鏉ュ線</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>闅忚杞﹁締锛�</text>
- <text>鐨朅88888</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 閫夋嫨杞﹁締 -->
- <u-picker keyName="name" closeOnClickOverlay @close="isShowCar = false" :show="isShowCar" :columns="carList" @confirm="seletedCar" @cancel="isShowCar = false"></u-picker>
- <!-- 鏃ユ湡 -->
- <u-datetime-picker :show="isShowDate" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDate = false" mode="date"></u-datetime-picker>
- </view>
-</template>
-
-<script>
-export default {
- data() {
- return {
- isShowCar: false,
- isShowDate: false,
- param: {},
- carList: [[{ name: 'aa', value: '11' }]],
- timeList: [{ time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }]
- };
- },
- methods: {
- confirmDate(e) {
- console.log(e.value);
- this.param.aa = dayjs(e.value).format('YYYY-MM-DD');
- this.isShowDate = false;
- },
- seletedCar(e) {
- console.log(e.value);
- this.param.aa = dayjs(e.value).format('YYYY-MM-DD');
- this.isShowDate = false;
- }
- }
-};
-</script>
-
-<style lang="scss">
- .main_app{
- background: #F7F7F7;
- padding: 0;
- }
-.app_header {
- display: flex;
- align-items: center;
- margin: 0 -15rpx;
- background-color: #fff;
- .item {
- width: 360rpx;
- height: 72rpx;
- margin: 15rpx;
- padding: 0 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- align-items: center;
- }
-}
-.box_list {
- width: 100%;
- padding: 30rpx;
- box-sizing: border-box;
- .box_list_item {
- width: 100%;
- margin-bottom: 20rpx;
- &:last-child {
- margin: 0 !important;
- }
- .box_list_item_head {
- width: 100%;
- height: 100rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
- border-radius: 8rpx 8rpx 0rpx 0rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .loading {
- color: #4c99a8;
- }
- .success {
- color: #03c68f;
- }
- .error {
- color: #e0312a;
- }
- text {
- &:nth-child(1) {
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- }
- &:nth-child(2) {
- font-size: 26rpx;
- font-weight: 400;
- }
- }
- }
- .box_list_item_nr {
- padding: 30rpx;
- width: 100%;
- box-sizing: border-box;
- background-color: #ffffff;
- .box_list_item_nr_item {
- width: 100%;
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- text {
- &:nth-child(1) {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- }
- &:nth-child(2) {
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- }
- }
- }
- }
- }
-}
-</style>
diff --git a/h5/pages/staff/snapshot.vue b/h5/pages/staff/snapshot.vue
index 7ba1551..a6096ef 100644
--- a/h5/pages/staff/snapshot.vue
+++ b/h5/pages/staff/snapshot.vue
@@ -1,198 +1,427 @@
<template>
- <view class="main_app">
- <view class="main_wrap">
- <!-- -->
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>闅愭偅鍖哄煙</text>
- </view>
- <view class="value" @click="isShowArea = true">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>鎺ュ彈浜�</text>
- </view>
- <view class="value" @click="selMember">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="empty"></view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>闅愭偅绫诲瀷</text>
- </view>
- <view class="value">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="upload_line">
- <view class="name">鐜板満鎯呭喌</view>
- <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-if="!param.imgurlUrl"><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon></view>
- <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-else><image :src="param.imgurlUrl" mode="widthFix"></image></view>
- </view>
+ <view class="main_app">
+ <view class="main_wrap">
+ <!-- -->
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>闅愭偅鍖哄煙</text>
+ </view>
+ <view class="value" @click="isShowArea = true">
+ <text
+ class="mr6"
+ :style="{ color: param.areaName ? '#000000' : '#999999' }"
+ >{{ param.areaName ? param.areaName : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>鎺ュ彈浜�</text>
+ </view>
+ <view class="value" @click="selMember">
+ <text
+ class="mr6"
+ :style="{ color: param.checkorName ? '#000000' : '#999999' }"
+ >{{ param.checkorName ? param.checkorName : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="empty"></view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>闅愭偅绫诲瀷</text>
+ </view>
+ <view class="value" @click="isShowType = true">
+ <text
+ class="mr6"
+ :style="{ color: param.categoryName ? '#000000' : '#999999' }"
+ >{{ param.categoryName ? param.categoryName : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="upload_line">
+ <view class="name">鐜板満鎯呭喌</view>
+ <view class="wrap">
+ <view class="adduser_list_item_ipt1_upload" @click="showUpload = true"
+ ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon
+ ></view>
+ <view
+ class="adduser_list_item_ipt1_upload"
+ v-for="(item, i) in submitFileList"
+ :key="i"
+ ><image :src="item.fileurlFull" mode="widthFix"></image
+ ></view>
+ </view>
+ </view>
+ <view class="empty"></view>
+ <view class="upload_line" style="padding: 15px 0 0;">
+ <view class="name" style="margin-bottom: 10rpx;">
+ <text style="color: #e42d2d;">*</text>
+ <text>鎯呭喌璇存槑</text>
+ </view>
+ <view class="value"
+ ><textarea
+ placeholder="璇疯缁嗘弿杩扮幇鍦烘儏鍐碉紝涓嶅皯浜�10涓瓧"
+ minlength="10"
+ v-model="param.content"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="empty"></view>
+ <view class="line">
+ <view class="label">
+ <text></text>
+ <text>鎻愭姤浜�</text>
+ </view>
+ <view class="value"
+ ><input
+ type="text"
+ disabled
+ placeholder="璇疯緭鍏ユ彁鎶ヤ汉"
+ v-model="param.memberName"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text></text>
+ <text>鑱旂郴鐢佃瘽</text>
+ </view>
+ <view class="value"
+ ><input
+ type="text"
+ disabled
+ placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+ v-model="param.memberPhone"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text></text>
+ <text>鎻愭姤鏃堕棿</text>
+ </view>
+ <view class="value" @click="isShowTime = true">
+ <text
+ class="mr6"
+ :style="{ color: param.submitTime ? '#000000' : '#999999' }"
+ >{{ param.submitTime ? param.submitTime : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
- <view class="line">
- <view class="label">
- <text></text>
- <text>鎻愭姤浜�</text>
- </view>
- <view class="value"><input type="text" placeholder="璇疯緭鍏ユ彁鎶ヤ汉" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="line">
- <view class="label">
- <text></text>
- <text>鑱旂郴鐢佃瘽</text>
- </view>
- <view class="value"><input type="text" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="line">
- <view class="label">
- <text></text>
- <text>鎻愭姤鏃堕棿</text>
- </view>
- <view class="value">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- </view>
- <!-- -->
- <!-- 鍖哄煙 -->
- <u-picker keyName="name" :show="isShowArea" :columns="areaOptions" @confirm="seletedArea" @cancel="isShowArea = false"></u-picker>
- </view>
+ <view class="footer"
+ ><view class="footer_btn" @click="onSubmit">鎻愪氦</view></view
+ >
+ </view>
+ <!-- -->
+ <!-- 鍖哄煙 -->
+ <u-picker
+ keyName="name"
+ :show="isShowArea"
+ closeOnClickOverlay
+ :columns="areaOptions"
+ @confirm="seletedArea"
+ @close="isShowArea = false"
+ @cancel="isShowArea = false"
+ ></u-picker>
+ <u-picker
+ keyName="name"
+ :show="isShowType"
+ closeOnClickOverlay
+ :columns="areaType"
+ @confirm="seletedType"
+ @close="isShowType = false"
+ @cancel="isShowType = false"
+ ></u-picker>
+ <!-- -->
+ <u-datetime-picker
+ :show="isShowTime"
+ :minDate="new Date().getTime()"
+ mode="datetime"
+ closeOnClickOverlay
+ @cancel="isShowTime = false"
+ @close="isShowTime = false"
+ @confirm="seletedDate"
+ ></u-datetime-picker>
+ <!-- -->
+ <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
+ <view class="upload_wrap">
+ <view class="btn" @click="uploadImage">閫夋嫨鍥剧墖</view>
+ <view class="btn" @click="uploadVideo">閫夋嫨瑙嗛</view>
+ </view>
+ </u-popup>
+ </view>
</template>
<script>
- import { uploadUrl } from '@/api'
+import {
+ uploadUrl,
+ DangerCreate,
+ DangerConfigType
+} from '@/api'
+import dayjs from 'dayjs'
export default {
- data() {
- return {
- param: {},
- isShowArea: false,
- areaOptions: [[{ name: '111', id: 11 }, { name: '111', id: 11 }]]
- };
- },
- methods: {
- seletedArea(e) {
- const item = e.value[0];
- console.log(item);
- this.isShowArea = false;
- },
- selMember() {
- uni.navigateTo({
- url: '/pages/staff/memberSel'
- });
- },
- upload() {
- uni.chooseImage({
- success: (chooseImageRes) => {
- uni.showLoading({ title: '涓婁紶涓�', mask: true });
- for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
- uni.uploadFile({
- url: `${uploadUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
- filePath: chooseImageRes.tempFilePaths[i],
- name: 'file',
- formData: {
- folderCode: 'MEMBER_IMG'
- },
- success: (uploadFileRes) => {
- console.log('uploadFileRes', uploadFileRes);
- let res = JSON.parse(uploadFileRes.data)
- if (type === 'faceImg') {
- this.param.faceImg = res.data.halfPath
- this.param.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath
- } else {
- this.param.imgurl = res.data.halfPath
- this.param.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath
- }
- },
- complete() {
- if (i === chooseImageRes.tempFilePaths.length - 1) {
- uni.hideLoading();
- }
- }
- });
- }
- }
- });
- },
- getUser() {}
- }
+ data() {
+ return {
+ param: {},
+ submitFileList: [],
+
+ isShowArea: false,
+ isShowType: false,
+ isShowTime: false,
+ showUpload: false,
+
+ areaOptions: [],
+ areaType: [],
+ }
+ },
+ onLoad(option) {
+ if (option && option.id) {
+ this.$set(this.param, 'checkUserId', option.id)
+ this.$set(this.param, 'applyCheckUserId', option.id)
+ this.$set(this.param, 'checkorName', option.name)
+ }
+ this.initConfig()
+ const userInfo = uni.getStorageSync('userInfo') || {}
+ this.$set(this.param, 'memberName', userInfo.realname)
+ this.$set(this.param, 'memberPhone', userInfo.mobile)
+ this.$set(this.param, 'memberId', userInfo.id)
+ this.$set(this.param, 'submitTime', dayjs().format('YYYY-MM-DD HH:mm:ss'))
+ },
+ methods: {
+ onSubmit() {
+ const { param, submitFileList } = this
+ if (!param.areaName) return uni.showToast({
+ title: '璇烽�夋嫨闅愭偅鍖哄煙',
+ icon: 'none'
+ })
+ if (!param.applyCheckUserId) return uni.showToast({
+ title: '璇烽�夋嫨鎺ュ彈浜�',
+ icon: 'none'
+ })
+ if (!param.categoryName) return uni.showToast({
+ title: '璇烽�夋嫨闅愭偅绫诲瀷',
+ icon: 'none'
+ })
+
+ DangerCreate({
+ ...param,
+ submitFileList
+ }).then(res => {
+ if (res.code === 200) {
+ this.$jump('/pages/staff/snapshotResult')
+ }
+ })
+ },
+ seletedArea(e) {
+ const item = e.value[0]
+ this.$set(this.param, 'areaId', item.id)
+ this.$set(this.param, 'areaName', item.name)
+ console.log(item)
+ this.isShowArea = false
+ },
+ seletedType(e) {
+ const item = e.value[0]
+ this.$set(this.param, 'cateId', item.id)
+ this.$set(this.param, 'categoryName', item.name)
+ console.log(item)
+ this.isShowType = false
+ },
+ seletedSafety(e) {
+
+ },
+ seletedDate(e) {
+ this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'))
+ this.isShowTime = false
+ },
+ initConfig() {
+ DangerConfigType({ type: '1' }).then(res => {
+ this.areaType = [res.data]
+ })
+ DangerConfigType({ type: '0' }).then(res => {
+ this.areaOptions = [res.data]
+ })
+ },
+ selMember() {
+ uni.navigateTo({
+ url: '/pages/staff/memberSel'
+ })
+ },
+ uploadImage() {
+ this.showUpload = false
+ uni.chooseImage({
+ count: 6,
+ success: (chooseImageRes) => {
+ console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths)
+ uni.showLoading({ title: '涓婁紶涓�', mask: true })
+ for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
+ uni.uploadFile({
+ url: `${uploadUrl}`,
+ filePath: chooseImageRes.tempFilePaths[i],
+ name: 'file',
+ formData: {
+ folderCode: 'HIDDEN_DANGER_FILE'
+ },
+ success: (uploadFileRes) => {
+ let res = JSON.parse(uploadFileRes.data)
+ console.log('res', res)
+ let obj = {
+ type: '0'
+ }
+ obj.fileurl = res.data.halfPath
+ obj.fileurlFull = res.data.addr
+ this.submitFileList.push(obj)
+ },
+ complete() {
+ if (i === chooseImageRes.tempFilePaths.length - 1) {
+ uni.hideLoading()
+ }
+ }
+ })
+ }
+ }
+ })
+ },
+ uploadVideo() {
+ this.showUpload = false
+ let that = this
+ uni.chooseVideo({
+ success: (chooseImageRes) => {
+ uni.showLoading({ title: '涓婁紶涓�', mask: true })
+ for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
+ uni.uploadFile({
+ url: `${uploadUrl}`,
+ filePath: chooseImageRes.tempFilePaths[i],
+ name: 'file',
+ formData: {
+ folderCode: 'HIDDEN_DANGER_FILE'
+ },
+ success: (uploadFileRes) => {
+ let res = JSON.parse(uploadFileRes.data)
+ console.log('uploadFileRes', res)
+ let obj = { type: '1' }
+ obj.fileurl = res.data.halfPath
+ obj.fileurlFull = res.data.addr
+ that.submitFileList.push(obj)
+ console.log(that.submitFileList)
+ },
+ complete() {
+ if (i === chooseImageRes.tempFilePaths.length - 1) {
+ uni.hideLoading()
+ }
+ }
+ })
+ }
+ }
+ })
+ },
+
+ getUser() { }
+ }
};
</script>
<style lang="scss">
.main_wrap {
- .line {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #e5e5e5;
- padding: 30rpx 0;
- .label {
- font-size: 30rpx;
- font-weight: 400;
- text {
- &:nth-child(1) {
- color: #e42d2d;
- margin-right: 4rpx;
- }
- }
- }
- .value {
- flex: 1;
- height: 100%;
- margin-left: 30rpx;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- input {
- width: 100%;
- height: 100%;
- text-align: right;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
- .upload_line {
- padding: 30rpx 0;
- .adduser_list_item_ipt1_upload {
- margin-top: 24rpx;
- width: 120rpx;
- height: 120rpx;
- border: 2rpx solid #E5E5E5;
- background: #f7f7f7;
- color: #666666;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
+ .line {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .label {
+ font-size: 30rpx;
+ font-weight: 400;
+ text {
+ &:nth-child(1) {
+ color: #e42d2d;
+ margin-right: 4rpx;
+ }
+ }
+ }
+ .value {
+ flex: 1;
+ height: 100%;
+ margin-left: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ input {
+ width: 100%;
+ height: 100%;
+ text-align: right;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ .upload_line {
+ padding: 30rpx 0;
+ .wrap{
+ display: flex;
+ flex-wrap: wrap;
+ }
+ .adduser_list_item_ipt1_upload {
+ margin-top: 24rpx;
+ width: 120rpx;
+ height: 120rpx;
+ margin-right: 24rpx;
+ border: 2rpx solid #e5e5e5;
+ background: #f7f7f7;
+ color: #666666;
+ font-size: 22rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
}
-.main_app {
- // padding-top: 10rpx;
+.upload_wrap {
+ width: 100%;
+ .btn {
+ height: 90rpx;
+ line-height: 90rpx;
+ text-align: center;
+ }
}
+.footer {
+ width: 100%;
+ padding: 0 30rpx;
+ padding-bottom: env(safe-area-inset-bottom);
+ box-sizing: border-box;
+ position: fixed;
+ left: 0;
+ bottom: 68rpx;
+ .footer_btn {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #4e99a9;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ color: #ffffff;
+ }
+}
.empty {
- width: 750rpx;
- height: 20rpx;
- background-color: #f7f7f7;
- margin: 0 -30rpx;
+ width: 750rpx;
+ height: 20rpx;
+ background-color: #f7f7f7;
+ margin: 0 -30rpx;
}
</style>
diff --git a/h5/pages/staff/snapshotResult.vue b/h5/pages/staff/snapshotResult.vue
new file mode 100644
index 0000000..73301bc
--- /dev/null
+++ b/h5/pages/staff/snapshotResult.vue
@@ -0,0 +1,65 @@
+<template>
+ <view class="main_app">
+ <view class="ima_wrap">
+ <image src="@/static/driver/btn_qiandao@2x.png" mode="widthFix"></image>
+ <u-icon class="txt" color="#fff" size="72" name="checkbox-mark"></u-icon>
+ </view>
+ <view class="h1">鎻愪氦鎴愬姛</view>
+ <view class="placeholder9">鎰熻阿浣犵殑鍙嶉锛屾垜浠皢灏藉揩鏍稿疄澶勭悊</view>
+ <view class="btn" @click="$jump('/pages/staff/index')">杩斿洖棣栭〉</view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+
+ };
+ }
+ }
+</script>
+
+<style lang="scss">
+.main_app{
+ text-align: center;
+ .btn{
+ margin-top: 60rpx;
+ padding-bottom: env(safe-area-inset-bottom);
+ box-sizing: border-box;
+ width: 300rpx;
+ margin: 60rpx auto;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #fff;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ border: 1rpx solid #4e99a9;
+ border-radius: 50rpx;
+ color: #4e99a9;
+ }
+ .h1{
+ font-size: 44rpx;
+ font-weight: 600;
+ margin-bottom: 30rpx;
+ }
+ .ima_wrap{
+ width: 300rpx;
+ height: 300rpx;
+ margin: 300rpx auto 40rpx;
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ image{
+ width: 100%;
+ position: absolute;
+ }
+ .txt{
+ font-size: 50rpx;
+ color: #fff;
+ }
+ }
+}
+</style>
diff --git a/h5/pages/staff/task/index.vue b/h5/pages/staff/task/index.vue
index d313c44..037f396 100644
--- a/h5/pages/staff/task/index.vue
+++ b/h5/pages/staff/task/index.vue
@@ -1,432 +1,474 @@
<template>
- <view class="box">
- <scroll-view scroll-x class="box_head">
- <view class="box_head_search">
- <view class="box_head_search_ipt">
- <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储浠诲姟鍚嶇О" />
- </view>
- <view class="box_head_search_sha" @click="show = true">
- <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image>
- <text>绛涢��</text>
- </view>
- </view>
- <view class="box_head_list">
- <view class="box_head_item active">寰呭鐞� 12</view>
- <view class="box_head_item">宸插鐞�</view>
- <view class="box_head_item">鎴戝彂璧风殑</view>
- </view>
- </scroll-view>
- <view class="box_list">
- <view class="box_list_item" v-for="(item, index) in 3" :key="index">
- <view class="box_list_item_head">
- <text>涓佹仼鍑殑鍔冲姟鍏ュ巶鐢宠</text>
- <text class="loading">寰呭鏍�</text>
- </view>
- <view class="box_list_item_nr">
- <view class="box_list_item_nr_item">
- <text>琚闂汉锛�</text>
- <text>浜轰簨閮�-鐜嬩簹钃�</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>杩涘巶鏃堕棿锛�</text>
- <text>12-12 09:00</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>绂诲巶鏃堕棿锛�</text>
- <text>12-12 12:00</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>鏉ヨ浜嬬敱锛�</text>
- <text>涓氬姟鏉ュ線</text>
- </view>
- <view class="box_list_item_nr_item">
- <text>闅忚杞﹁締锛�</text>
- <text>鐨朅88888</text>
- </view>
- <view class="box_list_item_nr_x"></view>
- <view class="box_list_item_nr_text">
- <text class="time">2023-12-12 09:00鎻愪氦</text>
- <text class="btn" @click="handleAppr()">鍘诲鐞�</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 绛涢�� -->
- <u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="show = false">
- <view class="search">
- <view class="search_head">浠诲姟绛涢��</view>
- <view class="search_list">
- <view class="search_list_item">
- <view class="search_list_item_label">鍒涘缓鏃ユ湡</view>
- <view class="search_list_item_val">
- <view class="search_list_item_val_row" @click="tiemShow = true" :style="{ color: search.startTime ? '#000' : '' }">{{search.startTime ? search.startTime : '寮�濮嬫棩鏈�'}}</view>
- <view class="search_list_item_val_z">-</view>
- <view class="search_list_item_val_row" @click="tiemShow1 = true" :style="{ color: search.endTime ? '#000' : '' }">{{search.endTime ? search.endTime : '缁撴潫鏃ユ湡'}}</view>
- </view>
- </view>
- <view class="search_list_item">
- <view class="search_list_item_label">璁㈠崟鏉ユ簮</view>
- <view class="search_list_item_cates">
- <view :class="index === i ? 'search_list_item_cates_row active' : 'search_list_item_cates_row'"
- v-for="(item, index) in cate"
- :key="index"
- @click="clickItem(index)">
- {{item.name}}
- </view>
- </view>
- </view>
- </view>
- <view class="search_footer">
- <view class="search_footer_item" @click="show = false">鍙栨秷</view>
- <view class="search_footer_item t">鎻愪氦</view>
- </view>
- </view>
- </u-popup>
- <u-datetime-picker
- :show="tiemShow"
- v-model="time"
- mode="datetime"
- @confirm="confirmLeft"
- @cancel="tiemShow = false"
- ></u-datetime-picker>
- <u-datetime-picker
- :show="tiemShow1"
- v-model="time1"
- mode="datetime"
- @confirm="confirmRight"
- @cancel="tiemShow1 = false"
- ></u-datetime-picker>
- </view>
+ <view class="box">
+ <scroll-view scroll-x class="box_head">
+ <view class="box_head_search">
+ <view class="box_head_search_ipt">
+ <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image>
+ <input type="text" placeholder="鎼滅储浠诲姟鍚嶇О" />
+ </view>
+ <view class="box_head_search_sha" @click="show = true">
+ <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image>
+ <text>绛涢��</text>
+ </view>
+ </view>
+ <view class="box_head_list">
+ <view class="box_head_item active">寰呭鐞� 12</view>
+ <view class="box_head_item">宸插鐞�</view>
+ <view class="box_head_item">鎴戝彂璧风殑</view>
+ <view class="box_head_item">鎶勯�佹垜鐨�</view>
+ </view>
+ </scroll-view>
+ <view class="box_list">
+ <view class="box_list_item" v-for="(item, index) in 3" :key="index">
+ <view class="box_list_item_head">
+ <text>涓佹仼鍑殑鍔冲姟鍏ュ巶鐢宠</text>
+ <text class="loading">寰呭鏍�</text>
+ </view>
+ <view class="box_list_item_nr">
+ <view class="box_list_item_nr_item">
+ <text>琚闂汉锛�</text>
+ <text>浜轰簨閮�-鐜嬩簹钃�</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>杩涘巶鏃堕棿锛�</text>
+ <text>12-12 09:00</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>绂诲巶鏃堕棿锛�</text>
+ <text>12-12 12:00</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>鏉ヨ浜嬬敱锛�</text>
+ <text>涓氬姟鏉ュ線</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>闅忚杞﹁締锛�</text>
+ <text>鐨朅88888</text>
+ </view>
+ <view class="box_list_item_nr_x"></view>
+ <view class="box_list_item_nr_text">
+ <text class="time">2023-12-12 09:00鎻愪氦</text>
+ <text class="btn" @click="handleAppr()">鍘诲鐞�</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ <!-- 绛涢�� -->
+ <u-popup
+ :show="show"
+ mode="bottom"
+ :round="10"
+ :closeable="true"
+ @close="show = false"
+ >
+ <view class="search">
+ <view class="search_head">浠诲姟绛涢��</view>
+ <view class="search_list">
+ <view class="search_list_item">
+ <view class="search_list_item_label">鍒涘缓鏃ユ湡</view>
+ <view class="search_list_item_val">
+ <view
+ class="search_list_item_val_row"
+ @click="tiemShow = true"
+ :style="{ color: search.startTime ? '#000' : '' }"
+ >{{ search.startTime ? search.startTime : "寮�濮嬫棩鏈�" }}</view
+ >
+ <view class="search_list_item_val_z">-</view>
+ <view
+ class="search_list_item_val_row"
+ @click="tiemShow1 = true"
+ :style="{ color: search.endTime ? '#000' : '' }"
+ >{{ search.endTime ? search.endTime : "缁撴潫鏃ユ湡" }}</view
+ >
+ </view>
+ </view>
+ <view class="search_list_item">
+ <view class="search_list_item_label">璁㈠崟鏉ユ簮</view>
+ <view class="search_list_item_cates">
+ <view
+ :class="
+ index === i
+ ? 'search_list_item_cates_row active'
+ : 'search_list_item_cates_row'
+ "
+ v-for="(item, index) in cate"
+ :key="index"
+ @click="clickItem(index)"
+ >
+ {{ item.name }}
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="search_footer">
+ <view class="search_footer_item" @click="show = false">鍙栨秷</view>
+ <view class="search_footer_item t">鎻愪氦</view>
+ </view>
+ </view>
+ </u-popup>
+ <u-datetime-picker
+ :show="tiemShow"
+ v-model="time"
+ mode="datetime"
+ @confirm="confirmLeft"
+ @cancel="tiemShow = false"
+ ></u-datetime-picker>
+ <u-datetime-picker
+ :show="tiemShow1"
+ v-model="time1"
+ mode="datetime"
+ @confirm="confirmRight"
+ @cancel="tiemShow1 = false"
+ ></u-datetime-picker>
+ </view>
</template>
<script>
- export default {
- data() {
- return {
- show: false,
- tiemShow: false,
- tiemShow1: false,
- time: '',
- i: null,
- time: '',
- time1: '',
- search: {
- startTime: '',
- endTime: ''
- },
- cate: [
- { name: '璁垮鐢宠', id: 1 },
- { name: '鍔冲姟鐢宠', id: 2 },
- { name: '鐢ㄨ溅鐢宠', id: 3 }
- ]
- };
- },
- methods: {
- handleAppr(item) {
- uni.navigateTo({
- url: '/pages/staff/task/visitorApprove'
- })
- },
- clickItem(index) {
- this.i = index
- },
- confirmLeft(e) {
- console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'))
- this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
- this.tiemShow = false
- },
- confirmRight(e) {
- this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
- this.tiemShow1 = false
- }
- }
- }
+import { taskCenter } from '@/api'
+export default {
+ data() {
+ return {
+ show: false,
+ tiemShow: false,
+ tiemShow1: false,
+ time: '',
+ i: null,
+ time: '',
+ time1: '',
+ search: {
+ startTime: '',
+ endTime: ''
+ },
+ pagination: {},
+ dataList: [],
+ cate: [
+ { name: '璁垮鐢宠', id: 1 },
+ { name: '鍔冲姟鐢宠', id: 2 },
+ { name: '鐢ㄨ溅鐢宠', id: 3 }
+ ]
+ }
+ },
+ onLoad() {
+ this.getList()
+ },
+ methods: {
+ getList() {
+ const { pagination } = this
+ taskCenter({
+ model: {}
+ }).then(res => {
+ this.dataList = res.data.records
+ })
+ },
+ handleAppr(item) {
+ uni.navigateTo({
+ url: '/pages/staff/task/visitorApprove'
+ })
+ },
+ clickItem(index) {
+ this.i = index
+ },
+ confirmLeft(e) {
+ console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'))
+ this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
+ this.tiemShow = false
+ },
+ confirmRight(e) {
+ this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
+ this.tiemShow1 = false
+ }
+ }
+}
</script>
<style>
- page {
- background-color: #F7F7F7 !important;
- }
+page {
+ background-color: #f7f7f7 !important;
+}
</style>
<style lang="scss" scoped>
- .box {
- width: 100%;
- .box_head {
- width: 100%;
- height: 190rpx;
- padding: 12rpx 30rpx;
- box-sizing: border-box;
- background: #FFFFFF;
- position: sticky;
- top: 0;
- left: 0;
- .box_head_search {
- width: 100%;
- height: 76rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 24rpx;
- .box_head_search_ipt {
- flex: 1;
- height: 100%;
- padding: 0 30rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- background: #F7F7F7;
- border-radius: 50rpx;
- margin-right: 30rpx;
- image {
- flex-shrink: 0;
- width: 28rpx;
- height: 28rpx;
- margin-right: 16rpx;
- }
- input {
- flex: 1;
- height: 100%;
- font-size: 26rpx;
- font-weight: 400;
- color: #B2B2B2;
- }
- }
- .box_head_search_sha {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- image {
- width: 28rpx;
- height: 28rpx;
- margin-right: 8rpx;
- }
- text {
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- }
- }
- }
- .box_head_list {
- width: 100%;
- display: flex;
- align-items: center;
- .active {
- border: 1rpx solid #4c99a8 !important;
- color: #4c99a8 !important;
- }
- .box_head_item {
- padding: 0 30rpx;
- height: 60rpx;
- line-height: 60rpx;
- box-sizing: border-box;
- border-radius: 30rpx;
- border: 1rpx solid #999999;
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- margin-right: 20rpx;
- }
- }
- }
- .box_list {
- width: 100%;
- padding: 30rpx;
- box-sizing: border-box;
- .box_list_item {
- width: 100%;
- margin-bottom: 20rpx;
- &:last-child {
- margin: 0 !important;
- }
- .box_list_item_head {
- width: 100%;
- height: 100rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%);
- border-radius: 8rpx 8rpx 0rpx 0rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .loading {
- color: #4c99a8;
- }
- .success {
- color: #03C68F;
- }
- .error {
- color: #E0312A;
- }
- text {
- &:nth-child(1) {
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- }
- &:nth-child(2) {
- font-size: 26rpx;
- font-weight: 400;
- }
- }
- }
- .box_list_item_nr {
- padding: 30rpx;
- width: 100%;
- box-sizing: border-box;
- background-color: #FFFFFF;
- .box_list_item_nr_x {
- width: 100%;
- height: 1rpx;
- background-color: #E5E5E5;
- }
- .box_list_item_nr_text {
- .time{
- font-size: 26rpx;
- font-weight: 400;
- color: #999999;
- }
- .btn{
- padding: 0 32rpx;
- height: 60rpx;
- line-height: 60rpx;
- background: #279BAA;
- color: #fff;
- font-size: 26rpx;
- font-weight: 300;
- text-align: center;
- border-radius: 30rpx;
- }
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- margin-top: 20rpx;
- }
- .box_list_item_nr_item {
- width: 100%;
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- text {
- &:nth-child(1) {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- }
- &:nth-child(2) {
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- }
- }
- }
- }
- }
- }
- .search {
- width: 100%;
- padding: 30rpx;
- box-sizing: border-box;
- .search_head {
- width: 100%;
- text-align: center;
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- }
- .search_list {
- width: 100%;
- margin-top: 34rpx;
- .search_list_item {
- width: 100%;
- display: flex;
- flex-direction: column;
- margin-bottom: 48rpx;
- .search_list_item_label {
- font-size: 30rpx;
- font-weight: 400;
- color: #222222;
- margin-bottom: 24rpx;
- }
- .search_list_item_cates {
- width: 100%;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- .active {
- background: #4c99a8 !important;
- color: #ffffff !important;
- }
- .search_list_item_cates_row {
- padding: 0 26rpx;
- height: 64rpx;
- line-height: 64rpx;
- background: #F7F7F7;
- border-radius: 36rpx;
- margin-right: 20rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- &:last-child {
- margin: 0;
- }
- }
- }
- .search_list_item_val {
- width: 100%;
- height: 64rpx;
- background: #F7F7F7;
- border-radius: 36rpx;
- border: 1rpx solid #E5E5E5;
- display: flex;
- align-items: center;
- .search_list_item_val_row {
- flex: 1;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 26rpx;
- font-weight: 400;
- color: #999999;
- }
- .search_list_item_val_z {
- flex-shrink: 0;
- font-size: 26rpx;
- font-weight: 400;
- color: #999999;
- margin: 0 30rpx;
- }
- }
- }
- }
- .search_footer {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .t {
- background: #4c99a8 !important;
- color: #ffffff !important;
- }
- .search_footer_item {
- flex: 1;
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32rpx;
- font-weight: 400;
- color: #4c99a8;
- margin-right: 18rpx;
- border: 1rpx solid #4c99a8;
- border-radius: 44rpx;
- &:last-child {
- margin: 0 !important;
- }
- }
- }
- }
- }
+.box {
+ width: 100%;
+ .box_head {
+ width: 100%;
+ height: 190rpx;
+ padding: 12rpx 30rpx;
+ box-sizing: border-box;
+ background: #ffffff;
+ position: sticky;
+ top: 0;
+ left: 0;
+ .box_head_search {
+ width: 100%;
+ height: 76rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 24rpx;
+ .box_head_search_ipt {
+ flex: 1;
+ height: 100%;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ background: #f7f7f7;
+ border-radius: 50rpx;
+ margin-right: 30rpx;
+ image {
+ flex-shrink: 0;
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 16rpx;
+ }
+ input {
+ flex: 1;
+ height: 100%;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #b2b2b2;
+ }
+ }
+ .box_head_search_sha {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ image {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 8rpx;
+ }
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
+ }
+ .box_head_list {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .active {
+ border: 1rpx solid #4c99a8 !important;
+ color: #4c99a8 !important;
+ }
+ .box_head_item {
+ text-align: center;
+ flex: 1;
+ height: 60rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border-radius: 30rpx;
+ border: 1rpx solid #999999;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ margin-right: 10rpx;
+ &:nth-last-child(1) {
+ margin-right: 0;
+ }
+ }
+ }
+ }
+ .box_list {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ .box_list_item {
+ width: 100%;
+ margin-bottom: 20rpx;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .box_list_item_head {
+ width: 100%;
+ height: 100rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
+ border-radius: 8rpx 8rpx 0rpx 0rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .loading {
+ color: #4c99a8;
+ }
+ .success {
+ color: #03c68f;
+ }
+ .error {
+ color: #e0312a;
+ }
+ text {
+ &:nth-child(1) {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ &:nth-child(2) {
+ font-size: 26rpx;
+ font-weight: 400;
+ }
+ }
+ }
+ .box_list_item_nr {
+ padding: 30rpx;
+ width: 100%;
+ box-sizing: border-box;
+ background-color: #ffffff;
+ .box_list_item_nr_x {
+ width: 100%;
+ height: 1rpx;
+ background-color: #e5e5e5;
+ }
+ .box_list_item_nr_text {
+ .time {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #999999;
+ }
+ .btn {
+ padding: 0 32rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ background: #279baa;
+ color: #fff;
+ font-size: 26rpx;
+ font-weight: 300;
+ text-align: center;
+ border-radius: 30rpx;
+ }
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+ margin-top: 20rpx;
+ }
+ .box_list_item_nr_item {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20rpx;
+ text {
+ &:nth-child(1) {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ &:nth-child(2) {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
+ }
+ }
+ }
+ }
+ .search {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ .search_head {
+ width: 100%;
+ text-align: center;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ .search_list {
+ width: 100%;
+ margin-top: 34rpx;
+ .search_list_item {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 48rpx;
+ .search_list_item_label {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #222222;
+ margin-bottom: 24rpx;
+ }
+ .search_list_item_cates {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ .active {
+ background: #4c99a8 !important;
+ color: #ffffff !important;
+ }
+ .search_list_item_cates_row {
+ padding: 0 26rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ background: #f7f7f7;
+ border-radius: 36rpx;
+ margin-right: 20rpx;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ &:last-child {
+ margin: 0;
+ }
+ }
+ }
+ .search_list_item_val {
+ width: 100%;
+ height: 64rpx;
+ background: #f7f7f7;
+ border-radius: 36rpx;
+ border: 1rpx solid #e5e5e5;
+ display: flex;
+ align-items: center;
+ .search_list_item_val_row {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #999999;
+ }
+ .search_list_item_val_z {
+ flex-shrink: 0;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #999999;
+ margin: 0 30rpx;
+ }
+ }
+ }
+ }
+ .search_footer {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .t {
+ background: #4c99a8 !important;
+ color: #ffffff !important;
+ }
+ .search_footer_item {
+ flex: 1;
+ height: 88rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 32rpx;
+ font-weight: 400;
+ color: #4c99a8;
+ margin-right: 18rpx;
+ border: 1rpx solid #4c99a8;
+ border-radius: 44rpx;
+ &:last-child {
+ margin: 0 !important;
+ }
+ }
+ }
+ }
+}
</style>
diff --git a/h5/pages/staff/vehicle/applePeo.vue b/h5/pages/staff/vehicle/applePeo.vue
new file mode 100644
index 0000000..2f62cce
--- /dev/null
+++ b/h5/pages/staff/vehicle/applePeo.vue
@@ -0,0 +1,305 @@
+<template>
+ <view class="main_app">
+ <view class="search_inp df_ac">
+ <image
+ class="mr12 search"
+ src="@/static/ic_search@2x.png"
+ mode="widthFix"
+ ></image>
+ <input
+ v-model="param.name"
+ @blur="initData()"
+ type="text"
+ placeholder="鎼滅储"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ <view class="member_list">
+ <checkbox-group v-model="selList" @change="changeMem">
+ <view v-for="item in memberList" :key="item.id" class="line">
+ <image
+ :src="
+ item.faceImgFull
+ ? item.faceImgFull
+ : require('@/static/logo@2x.png')
+ "
+ class="avatar"
+ mode=""
+ ></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">{{ item.name }}</text>
+ <!-- <text class="tag">tag</text> -->
+ </view>
+ <view class="depart">{{ item.companyName }}</view>
+ </view>
+ <label>
+ <checkbox :checked="item.checked" :value="String(item.id)" class="checkbox" />
+ </label>
+ <text></text>
+ </view>
+ </checkbox-group>
+ <view class="empty"></view>
+ </view>
+ <!-- -->
+ <view class="sub_wrap">
+ <view class="sel_mem">
+ <text>宸查�夋嫨锛�</text>
+ <view class="members">
+ <text v-for="(item, i) in selList" :key="i">{{ item.name }}锛�</text>
+ </view>
+ <image
+ @click="isShowSelMem = true"
+ class="open_icon"
+ src="@/static/staff/renyuan_ic_open.png"
+ mode=""
+ ></image>
+ </view>
+ <view class="btn" @click="onSubmit">纭({{selList.length}}/20)</view>
+ </view>
+ <!-- -->
+ <u-popup
+ :show="isShowSelMem"
+ :round="12"
+ mode="bottom"
+ @close="isShowSelMem = false"
+ >
+ <view class="modal">
+ <view class="modal_header">
+ <text class="status">宸查�夋嫨锛歿{ selList.length }}浜�</text>
+ <text class="btn" @click="isShowSelMem = false">纭</text>
+ </view>
+ <view class="modal_mem_list">
+ <view class="line" v-for="(item, i) in selList" :key="i">
+ <image
+ :src="
+ item.faceImgFull
+ ? item.faceImgFull
+ : require('@/static/logo@2x.png')
+ "
+ class="avatar"
+ mode=""
+ ></image>
+ <view class="content">
+ <view class="info">
+ <text class="name">{{ item.name }}</text>
+ </view>
+ <view class="depart">{{ item.componey }}</view>
+ </view>
+ <view class="btn" @click="handleRemove(item)">绉婚櫎</view>
+ </view>
+ </view>
+ </view>
+ </u-popup>
+ </view>
+</template>
+
+<script>
+import { findTypeMemberInfo } from '@/api'
+export default {
+ data() {
+ return {
+ memberList: [],
+ selList: [],
+ param: {},
+
+ isShowSelMem: false
+ }
+ },
+ onLoad() {
+ this.initData()
+ },
+ methods: {
+ onSubmit() {
+ this.$eventBus.$emit('applePeo', this.selList)
+ uni.navigateBack()
+ },
+ changeMem(e) {
+ const arr = e.detail.value
+ let arrTemp = arr.map(item => {
+ let obj = {}
+ this.memberList.forEach(ite => {
+ if (item == ite.id) {
+ obj.name = ite.name.split('-')[0]
+ obj.componey = ite.name.split('-')[1] || ''
+ obj.id = ite.id
+ }
+ })
+ return obj
+ })
+ this.selList = arrTemp
+ // this.$forceUpdate()
+ },
+ handleRemove(item) {
+ const selIndex = this.selList.findIndex(i => i.id === item.id)
+ this.selList.splice(selIndex, 1)
+ this.memberList.forEach(ite => {
+ if(item.id === ite.id){
+ ite.checked = false
+ }
+ })
+ // console.log(this.memberList);
+ this.$forceUpdate()
+ },
+ initData() {
+ const { param } = this
+ findTypeMemberInfo({
+ name: param.name,
+ type: '2'
+ }).then(res => {
+ this.memberList = res.data || []
+ this.memberList.forEach(i => {
+ i.checked = false
+ })
+ })
+ }
+ }
+};
+</script>
+
+<style lang="scss">
+.modal {
+ padding: 40rpx 30rpx;
+ .modal_header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .status {
+ font-weight: 600;
+ }
+ .btn {
+ color: #279baa;
+ }
+ }
+ .modal_mem_list {
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ }
+ }
+ .btn {
+ width: 80rpx;
+ height: 48rpx;
+ line-height: 48rpx;
+ text-align: center;
+ font-size: 24rpx;
+ color: #333333;
+ border-radius: 4rpx;
+ border: 1rpx solid #999999;
+ }
+ }
+ }
+}
+.sub_wrap {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+ box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2;
+ padding: 30rpx 30rpx 64rpx;
+ .sel_mem {
+ display: flex;
+ align-items: center;
+ .members {
+ width: 500rpx;
+ color: #4d98a7;
+ white-space: nowrap;
+ overflow: hidden; //鏂囨湰瓒呭嚭闅愯棌
+ text-overflow: ellipsis;
+ margin-right: 20rpx;
+ }
+ .open_icon {
+ width: 44rpx;
+ height: 44rpx;
+ }
+ }
+ .btn {
+ width: 690rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ background: #279baa;
+ border-radius: 44rpx;
+ color: #fff;
+ text-align: center;
+ margin-top: 22rpx;
+ }
+}
+.member_list {
+ .line {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .avatar {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+ .content {
+ flex: 1;
+ .depart {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .info {
+ display: flex;
+ margin-bottom: 16rpx;
+ .name {
+ font-size: 30rpx;
+ }
+ .tag {
+ font-size: 24rpx;
+ border-radius: 4rpx;
+ border: 1rpx solid #f62710;
+ color: #f62710;
+ padding: 0rpx 6rpx;
+ margin-left: 8rpx;
+ }
+ }
+ }
+ }
+ .empty {
+ width: 100%;
+ height: 280rpx;
+ }
+}
+.search_inp {
+ height: 72rpx;
+ background: #f7f7f7;
+ border-radius: 4rpx;
+ padding-left: 16rpx;
+ .search {
+ width: 28rpx;
+ }
+ input {
+ flex: 1;
+ font-size: 28rpx;
+ color: #333333;
+ }
+}
+</style>
diff --git a/h5/pages/staff/vehicle/apply.vue b/h5/pages/staff/vehicle/apply.vue
index 10f880f..174c512 100644
--- a/h5/pages/staff/vehicle/apply.vue
+++ b/h5/pages/staff/vehicle/apply.vue
@@ -1,215 +1,315 @@
<template>
- <view class="main_app">
- <view class="main_wrap">
- <!-- -->
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>棰勮鐢ㄨ溅鏃舵</text>
- </view>
- <view class="value" @click="$goBack()">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>鐢宠杞﹁締</text>
- </view>
- <view class="value">
- <input type="text" placeholder="璇疯緭鍏ョ敵璇疯溅杈�" v-model="param.receptMemberName" placeholder-style="color: #999999;" />
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>棰勮鍑哄彂鏃堕棿</text>
- </view>
- <view class="value" @click="isShowDatetime = true">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="empty"></view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>鐩殑鍦扮被鍒�</text>
- </view>
- <view class="value">
- <text>{{ 111 }}</text>
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>鐩殑鍦�</text>
- </view>
- <view class="value">
- <input type="text" placeholder="璇疯緭鍏�" v-model="param.address" placeholder-style="color: #999999;" />
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>涔樿溅浜哄憳</text>
- </view>
- <view class="value" @click="$jump('/pages/staff/memberSel')">
- <text class="mr6" :style="{ color: param.peo ? '#000000' : '#999999' }">{{ param.peo ? param.peo : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="upload_line">
- <view class="label">
- <text style="color: #e42d2d;">*</text>
- <text>鐢ㄨ溅浜嬬敱</text>
- </view>
- <view class="value">
- <textarea type="text" placeholder="璇疯緭鍏�" :maxlength="-1" v-model="param.reson" placeholder-style="color: #999999;" />
- </view>
- </view>
- </view>
- <view class="tip">
- <view class="title">娉ㄦ剰浜嬮」锛�</view>
- <view class="line">1銆佸叕鍙歌溅杈嗗鍑洪渶鍔炵悊鐢ㄨ溅鐢宠琛紝缁忔壒鍑嗗悗鏂瑰彲澶栧嚭锛堝�熷嚭锛夈��</view>
- <view class="line">2銆佸競澶栫敤杞﹂渶鎬荤粡鍔炲鎵广��</view>
- <view class="line">3銆佸�熷嚭杞﹁締蹇呴』閬靛畧浜ら�氳鍒欙紝瀹夊叏琛岄┒銆傚浜庤溅杈嗗彂鐢熶氦閫氭剰澶栵紝瀵瑰綋浜嬩汉鍙婄涓夋柟閫犳垚浜鸿韩浼ゅ鍙婃崯澶憋紝鍏徃鍙互鍗忓姪澶勭悊淇濋櫓鍏徃璧斿伩鐩稿叧浜嬪疁锛屼絾涓嶆壙鎷呬换浣曡矗浠诲拰璐圭敤銆�</view>
- <view class="line">4銆佸叕鍙稿�熺粰鐢宠浜虹敤杞︼紝鐢宠鍊熻溅浜轰负绗竴璐d换浜猴紝涓嶅厑璁歌浆鍊熺粰鍏朵粬浜轰娇鐢紝鑻ヨ鍊熺粰浠栦汉浣跨敤銆傝矗浠讳汉瑕佹壙鎷呭叏閮ㄨ矗浠汇��</view>
- </view>
- <view class="sub_btn" @click="handleSub">鎻愪氦</view>
- <!-- -->
- <u-datetime-picker :show="isShowDatetime" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDatetime = false" mode="date"></u-datetime-picker>
- </view>
+ <view class="main_app">
+ <view class="main_wrap">
+ <!-- -->
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>棰勮鐢ㄨ溅鏃舵</text>
+ </view>
+ <view class="value" @click="$goBack()">
+ <text
+ class="mr6"
+ :style="{ color: param.startTime ? '#000000' : '#999999' }"
+ >
+ <text v-if="param.startTime">
+ {{ param.startTime.slice(5, 16) }}鑷硔{
+ param.endTime.slice(11, 16)
+ }}
+ </text>
+ <text v-else>璇烽�夋嫨</text>
+ </text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>鐢宠杞﹁締</text>
+ </view>
+ <view class="value" @click="$goBack()">
+ <input
+ type="text"
+ disabled
+ placeholder="璇疯緭鍏ョ敵璇疯溅杈�"
+ v-model="param.carCode"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>棰勮鍑哄彂鏃堕棿</text>
+ </view>
+ <view class="value" @click="isShowDatetime = true">
+ <text
+ class="mr6"
+ :style="{ color: param.planUseDate ? '#000000' : '#999999' }"
+ >{{ param.planUseDate ? param.planUseDate : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="empty"></view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>鐩殑鍦扮被鍒�</text>
+ </view>
+ <view class="value">
+ <text>{{ param.type == "1" ? "甯傚" : "甯傚唴" }}</text>
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>鐩殑鍦�</text>
+ </view>
+ <view class="value">
+ <input
+ type="text"
+ placeholder="璇疯緭鍏�"
+ v-model="param.addr"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>涔樿溅浜哄憳</text>
+ </view>
+ <view class="value" @click="$jump('/pages/staff/vehicle/applePeo')">
+ <text
+ class="mr6"
+ :style="{
+ color:
+ param.memberList && param.memberList.length > 0
+ ? '#000000'
+ : '#999999',
+ }"
+ >
+ <text v-if="param.memberNames">
+ {{ param.memberNames }}
+ </text>
+ <text v-else>璇烽�夋嫨</text>
+ </text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="upload_line">
+ <view class="label">
+ <text style="color: #e42d2d">*</text>
+ <text>鐢ㄨ溅浜嬬敱</text>
+ </view>
+ <view class="value">
+ <textarea
+ type="text"
+ placeholder="璇疯緭鍏�"
+ :maxlength="-1"
+ v-model="param.content"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ </view>
+ </view>
+ <view class="tip">
+ <view class="title">娉ㄦ剰浜嬮」锛�</view>
+ <view class="line"
+ >1銆佸叕鍙歌溅杈嗗鍑洪渶鍔炵悊鐢ㄨ溅鐢宠琛紝缁忔壒鍑嗗悗鏂瑰彲澶栧嚭锛堝�熷嚭锛夈��</view
+ >
+ <view class="line">2銆佸競澶栫敤杞﹂渶鎬荤粡鍔炲鎵广��</view>
+ <view class="line"
+ >3銆佸�熷嚭杞﹁締蹇呴』閬靛畧浜ら�氳鍒欙紝瀹夊叏琛岄┒銆傚浜庤溅杈嗗彂鐢熶氦閫氭剰澶栵紝瀵瑰綋浜嬩汉鍙婄涓夋柟閫犳垚浜鸿韩浼ゅ鍙婃崯澶憋紝鍏徃鍙互鍗忓姪澶勭悊淇濋櫓鍏徃璧斿伩鐩稿叧浜嬪疁锛屼絾涓嶆壙鎷呬换浣曡矗浠诲拰璐圭敤銆�</view
+ >
+ <view class="line"
+ >4銆佸叕鍙稿�熺粰鐢宠浜虹敤杞︼紝鐢宠鍊熻溅浜轰负绗竴璐d换浜猴紝涓嶅厑璁歌浆鍊熺粰鍏朵粬浜轰娇鐢紝鑻ヨ鍊熺粰浠栦汉浣跨敤銆傝矗浠讳汉瑕佹壙鎷呭叏閮ㄨ矗浠汇��</view
+ >
+ </view>
+ <view class="sub_btn" @click="handleSub">鎻愪氦</view>
+ <!-- -->
+ <u-datetime-picker
+ :show="isShowDatetime"
+ :minDate="new Date(param.startTime).getTime()"
+ :maxDate="new Date(param.endTime).getTime()"
+ @confirm="confirmDate"
+ @cancel="isShowDatetime = false"
+ mode="datetime"
+ ></u-datetime-picker>
+ </view>
</template>
<script>
- import dayjs from 'dayjs'
- export default {
- data() {
- return {
- param: {},
- minDate: '',
- isShowDatetime: false,
- };
- },
- created(){
- this.minDate = new Date().getTime()
- },
- methods: {
- handleSub() {
- console.log('---');
- },
- confirmDate(e) {
- console.log(e.value);
- this.param.aa = dayjs(e.value).format('YYYY-MM-DD')
- this.isShowDate = false
- }
- }
- }
+import dayjs from 'dayjs'
+import { carUseBookCraete } from '@/api'
+export default {
+ data() {
+ return {
+ param: {},
+ minDate: '',
+ isShowDatetime: false,
+ }
+ },
+ mounted() {
+ this.$eventBus.$on('applePeo', (res) => {
+ this.$set(this.param, 'memberList', res)
+ this.$set(this.param, 'memberIds', res.map(i => i.id).join(','))
+ this.$set(this.param, 'memberNames', res.map(i => i.name).join(','))
+ })
+ },
+ onLoad(option) {
+ console.log(option)
+ this.param = { ...option }
+ this.minDate = new Date().getTime()
+
+ },
+ methods: {
+ handleSub() {
+ const { param } = this
+ console.log('---', param)
+ if (!param.planUseDate) return uni.showToast({
+ title: '璇烽�夋嫨棰勮鐢ㄨ溅鏃堕棿',
+ icon: 'none'
+ })
+ if (!param.addr) return uni.showToast({
+ title: '璇疯緭鍏ョ洰鐨勫湴',
+ icon: 'none'
+ })
+ if (!param.memberList || param.memberList.length === 0) return uni.showToast({
+ title: '璇烽�夋嫨涔樿溅浜哄憳',
+ icon: 'none'
+ })
+ if (!param.content) return uni.showToast({
+ title: '璇疯緭鍏ョ敤杞︿簨鐢�',
+ icon: 'none'
+ })
+ carUseBookCraete({
+ ...param,
+ }).then(res => {
+ if (res.code === 200) {
+ setTimeout(() => {
+ uni.showToast({
+ title: '鎻愪氦鎴愬姛',
+ icon: 'success'
+ })
+ })
+ uni.redirectTo({
+ url: '/pages/staff/index'
+ })
+ }
+ })
+ },
+ confirmDate(e) {
+
+ this.param.planUseDate = dayjs(e.value).format('YYYY-MM-DD HH:mm')
+ this.isShowDatetime = false
+ }
+ }
+}
</script>
<style lang="scss">
.main_wrap {
- .line {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #e5e5e5;
- padding: 30rpx 0;
- .label {
- font-size: 30rpx;
- font-weight: 400;
- text {
- &:nth-child(1) {
- color: #e42d2d;
- margin-right: 4rpx;
- }
- }
- }
- .value {
- flex: 1;
- height: 100%;
- margin-left: 30rpx;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- input {
- width: 100%;
- height: 100%;
- text-align: right;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
- .upload_line {
- padding: 30rpx 0;
- textarea {
- margin-top: 12rpx;
- width: 100%;
- height: 180rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- .adduser_list_item_ipt1_upload {
- margin-top: 24rpx;
- width: 120rpx;
- height: 120rpx;
- border: 2rpx solid #E5E5E5;
- background: #f7f7f7;
- color: #666666;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
+ .line {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .label {
+ font-size: 30rpx;
+ font-weight: 400;
+ text {
+ &:nth-child(1) {
+ color: #e42d2d;
+ margin-right: 4rpx;
+ }
+ }
+ }
+ .value {
+ flex: 1;
+ height: 100%;
+ margin-left: 0rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ input {
+ width: 100%;
+ height: 100%;
+ text-align: right;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ .upload_line {
+ padding: 30rpx 0;
+ textarea {
+ margin-top: 12rpx;
+ width: 100%;
+ height: 180rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ .adduser_list_item_ipt1_upload {
+ margin-top: 24rpx;
+ width: 120rpx;
+ height: 120rpx;
+ border: 2rpx solid #e5e5e5;
+ background: #f7f7f7;
+ color: #666666;
+ font-size: 22rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
}
-.sub_btn{
- position: fixed;
- bottom: 84rpx;
- left: 30rpx;
- width: 690rpx;
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- background: #279BAA;
- box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE;
- border-radius: 44rpx;
- font-size: 30rpx;
- color: #FFFFFF;
+.sub_btn {
+ position: fixed;
+ bottom: 84rpx;
+ left: 30rpx;
+ width: 690rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #279baa;
+ box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
+ border-radius: 44rpx;
+ font-size: 30rpx;
+ color: #ffffff;
}
-.tip{
- background: #F7F7F7;
- padding: 30rpx 30rpx 180rpx;
- margin: 0 -30rpx;
- .title{
- line-height: 40rpx;
- margin-bottom: 22rpx;
- }
- .line{
- font-size: 26rpx;
- color: #666666;
- line-height: 36rpx;
- }
- }
+.tip {
+ background: #f7f7f7;
+ padding: 30rpx 30rpx 180rpx;
+ margin: 0 -30rpx;
+ .title {
+ line-height: 40rpx;
+ margin-bottom: 22rpx;
+ }
+ .line {
+ font-size: 26rpx;
+ color: #666666;
+ line-height: 36rpx;
+ }
+}
.main_app {
- padding-bottom: 0;
- // padding-top: 10rpx;
+ padding-bottom: 0;
+ // padding-top: 10rpx;
}
.empty {
- width: 750rpx;
- height: 20rpx;
- background-color: #f7f7f7;
- margin: 0 -30rpx;
+ width: 750rpx;
+ height: 20rpx;
+ background-color: #f7f7f7;
+ margin: 0 -30rpx;
}
</style>
diff --git a/h5/pages/staff/vehicle/sendACar.vue b/h5/pages/staff/vehicle/sendACar.vue
new file mode 100644
index 0000000..96c407a
--- /dev/null
+++ b/h5/pages/staff/vehicle/sendACar.vue
@@ -0,0 +1,252 @@
+<template>
+ <view class="main_app">
+ <view class="app_header">
+ <view class="item" @click="isShowDate = true">
+ <text v-if="param.queryDate">{{ param.queryDate }}</text>
+ <text v-else class="placeholder9">閫夋嫨鏃ユ湡</text>
+ <u-icon class="ml12" name="arrow-down" color="#999999" />
+ </view>
+ <view class="item" @click="isShowCar = true">
+ <text v-if="param.carCode">{{ param.carCode }}</text>
+ <text v-else class="placeholder9">閫夋嫨杞﹁締</text>
+ <u-icon class="ml12" name="arrow-down" color="#999999" />
+ </view>
+ </view>
+ <!-- -->
+ <view class="box_list">
+ <view
+ class="box_list_item"
+ v-for="(item, index) in dataList"
+ :key="index"
+ >
+ <view class="box_list_item_head">
+ <text>{{ item.carCode }}</text>
+ <text class="loading" v-if="item.status == '0'">鐢宠涓�</text>
+ <text class="grr" v-if="item.status == '1'">瀹℃壒涓�</text>
+ <text class="grr" v-if="item.status == '2'">瀹℃壒閫氳繃</text>
+ <text class="error" v-if="item.status == '3'">瀹℃壒涓嶉�氳繃</text>
+ <text class="grr" v-if="item.status == '4'">宸插彇娑�</text>
+ </view>
+ <view class="box_list_item_nr">
+ <view class="box_list_item_nr_item">
+ <text>寮�濮嬫椂闂达細</text>
+ <text>{{ item.startTime.slice(5, 16) }}</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>缁撴潫鏃堕棿锛�</text>
+ <text>{{ item.endTime.slice(5, 16) }}</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>棰勭害浜猴細</text>
+ <text>{{ item.memberName }}</text>
+ </view>
+ <view class="box_list_item_nr_item">
+ <text>鐩殑鍦帮細</text>
+ <text>{{ item.addr }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ <!-- 閫夋嫨杞﹁締 -->
+ <u-picker
+ keyName="code"
+ :show="isShowCar"
+ @close="isShowCar = false"
+ :closeOnClickOverlay="true"
+ :columns="carsList"
+ @confirm="seletedCar"
+ @cancel="isShowCar = false"
+ ></u-picker>
+ <!-- 鏃ユ湡 -->
+ <u-datetime-picker
+ mode="date"
+ :show="isShowDate"
+ :minDate="minDate"
+ @close="isShowDate = false"
+ :closeOnClickOverlay="true"
+ @confirm="seletedDate"
+ @cancel="isShowDate = false"
+ />
+ </view>
+</template>
+
+<script>
+import { carUseBookPaiche, getCarsList } from '@/api'
+import dayjs from 'dayjs'
+export default {
+ data() {
+ return {
+ isShowCar: false,
+ isShowDate: false,
+ carsList: [],
+ param: {
+ memberId: uni.getStorageSync('userInfo').memberId
+ },
+ minDate: '',
+ pagination: {
+ page: 0,
+ capacity: 10
+ },
+ total: 0,
+ dataList: []
+ }
+ },
+ onLoad() {
+ this.minDate = new Date(dayjs().format('YYYY') + '-01-01').getTime()
+ // this.param.queryDate = dayjs().format('YYYY-MM-DD')
+ this.getList()
+ this.initData()
+ },
+ onReachBottom() {
+ if (this.total > 10) {
+ this.getList()
+ }
+ },
+ methods: {
+ getList() {
+ const { param, pagination } = this
+ pagination.page = pagination.page + 1
+ carUseBookPaiche({
+ ...pagination,
+ model: { ...param }
+ }).then(res => {
+ if (pagination.page === 1) {
+ this.dataList = res.data.records
+ } else {
+ this.dataList = [...list, ...res.data.records]
+ }
+ this.total = res.data.total
+ })
+ },
+ seletedCar(e) {
+ const item = e.value[0]
+ this.$set(this.param, 'carCode', item.code)
+ this.$set(this.param, 'carId', item.id)
+ this.isShowCar = false
+ if (this.param.carId && this.param.queryDate) {
+ this.pagination.page = 0
+ this.getList()
+ }
+ },
+ seletedDate(e) {
+ this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
+ this.isShowDate = false
+ if (this.param.carId && this.param.queryDate) {
+ this.pagination.page = 0
+ this.getList()
+ }
+ },
+ endtimeClose() {
+ this.param.endTime = ''
+ this.param.startTime = ''
+ this.isShowEndDate = false
+ },
+ timeFilter(mode, options) {
+ if (mode === 'minute') {
+ return options.filter(option => option === '00' || option === '30' || option === '60')
+ }
+ return options
+ },
+ initData() {
+ getCarsList({
+ type: 1
+ }).then(res => {
+ this.carsList = [res.data]
+ })
+ },
+ }
+};
+</script>
+
+<style lang="scss">
+.main_app {
+ background: #f7f7f7;
+ padding: 0;
+}
+.app_header {
+ display: flex;
+ align-items: center;
+ margin: 0 -15rpx;
+ background-color: #fff;
+ .item {
+ width: 360rpx;
+ height: 72rpx;
+ margin: 15rpx;
+ padding: 0 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ align-items: center;
+ }
+}
+.box_list {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ .box_list_item {
+ width: 100%;
+ margin-bottom: 20rpx;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .box_list_item_head {
+ width: 100%;
+ height: 100rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
+ border-radius: 8rpx 8rpx 0rpx 0rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .loading {
+ color: #4c99a8;
+ }
+ .success {
+ color: #03c68f;
+ }
+ .error {
+ color: #e0312a;
+ }
+ .grr{
+ color: #999999;
+ }
+ text {
+ &:nth-child(1) {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ &:nth-child(2) {
+ font-size: 26rpx;
+ font-weight: 400;
+ }
+ }
+ }
+ .box_list_item_nr {
+ padding: 30rpx;
+ width: 100%;
+ box-sizing: border-box;
+ background-color: #ffffff;
+ .box_list_item_nr_item {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20rpx;
+ text {
+ &:nth-child(1) {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ &:nth-child(2) {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
+ }
+ }
+ }
+}
+</style>
diff --git a/h5/pages/staff/vehicle/shinei.vue b/h5/pages/staff/vehicle/shinei.vue
index de4c175..63ea472 100644
--- a/h5/pages/staff/vehicle/shinei.vue
+++ b/h5/pages/staff/vehicle/shinei.vue
@@ -1,172 +1,289 @@
<template>
- <view class="main_app">
- <view class="app_header">
- <view class="item" @click="isShowCar = true">
- <text v-if="false">xx</text>
- <text v-else class="placeholder9">閫夋嫨杞﹁締</text>
- <u-icon name="arrow-down" color="#999999" />
- </view>
- <view class="item" @click="isShowDate = true">
- <text v-if="param.aa">{{ param.aa }}</text>
- <text v-else class="placeholder9">閫夋嫨鏃ユ湡</text>
- <u-icon name="arrow-down" color="#999999" />
- </view>
- </view>
- <!-- -->
- <view class="time_list">
- <view class="item" v-for="item,i in timeList" :key="i">{{ item.time }}</view>
- </view>
- <!-- -->
- <view class="main_footer">
- <view class="df_ac">
- <view>宸查�夋嫨锛�</view>
- <view class="sel_time">xxxxxx</view>
- </view>
- <view class="btns">
- <view class="left">
- <view class="item" v-for="item in colorOptions" :key="item.name">
- <view class="box" :style="{ background: item.color }"></view>
- <view class="">{{ item.name }}</view>
- </view>
- </view>
- <view class="sub" @click="$jump('/pages/staff/vehicle/apply')">纭棰勭害</view>
- </view>
- </view>
- <!-- -->
- <!-- 閫夋嫨杞﹁締 -->
- <u-picker keyName="name" :show="isShowCar" :columns="carList" @confirm="seletedCar" @cancel="isShowCar = false"></u-picker>
- <!-- 鏃ユ湡 -->
- <u-datetime-picker :show="isShowDate" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDate = false" mode="date"></u-datetime-picker>
- </view>
+ <view class="main_app">
+ <view class="app_header">
+ <view class="item" @click="isShowCar = true">
+ <text v-if="param.carCode">{{ param.carCode }}</text>
+ <text v-else class="placeholder9">閫夋嫨杞﹁締</text>
+ <u-icon name="arrow-down" color="#999999" />
+ </view>
+ <view class="item" @click="isShowDate = true">
+ <text v-if="param.queryDate">{{ param.queryDate }}</text>
+ <text v-else class="placeholder9">閫夋嫨鏃ユ湡</text>
+ <u-icon name="arrow-down" color="#999999" />
+ </view>
+ </view>
+ <!-- -->
+ <view class="time_list">
+ <view
+ class="item"
+ :class="{ disable: item.isUse == 1, active: item.checked == '1' }"
+ @click="datetimeClick(item, i)"
+ v-for="(item, i) in timeList"
+ :key="i"
+ >{{ item.startHours }}-{{ item.endHours }}</view
+ >
+ </view>
+ <!-- -->
+ <view class="main_footer">
+ <view class="df_ac">
+ <view>宸查�夋嫨锛�</view>
+ <view class="sel_time">{{ selDatetime }}</view>
+ </view>
+ <view class="btns">
+ <view class="left">
+ <view class="item" v-for="item in colorOptions" :key="item.name">
+ <view class="box" :style="{ background: item.color }"></view>
+ <view class="">{{ item.name }}</view>
+ </view>
+ </view>
+ <view class="sub" @click="onSubmit">纭棰勭害</view>
+ </view>
+ </view>
+ <!-- -->
+ <!-- 閫夋嫨杞﹁締 -->
+ <u-picker
+ keyName="code"
+ :show="isShowCar"
+ :columns="carsList"
+ @confirm="seletedCar"
+ @cancel="isShowCar = false"
+ ></u-picker>
+ <!-- 鏃ユ湡 -->
+ <u-datetime-picker
+ :show="isShowDate"
+ :minDate="minDate"
+ @confirm="confirmDate"
+ @cancel="isShowDate = false"
+ mode="date"
+ ></u-datetime-picker>
+ </view>
</template>
<script>
import dayjs from 'dayjs'
+import { getCarsList, carCanReservationDate } from '@/api'
export default {
- data() {
- return {
- isShowCar: false,
- isShowDate: false,
- param: {},
-
- minDate: '',
- carList: [[{ name: 'aa', value: '11' }]],
- timeList: [
- { time: '08:30-09:00' },
- { time: '08:30-09:00' },
- { time: '08:30-09:00' },
- { time: '08:30-09:00' },
- ],
-
- colorOptions: [
- { color: '#279BAA', name: '宸查�夋嫨' },
- { color: '#F7F7F7', name: '鍙绾�' },
- { color: '#cccccc', name: '涓嶅彲棰勭害' },
- ]
- };
- },
- created(){
- this.minDate = new Date().getTime()
- },
- methods: {
- confirmDate(e) {
- console.log(e.value);
- this.param.aa = dayjs(e.value).format('YYYY-MM-DD')
- this.isShowDate = false
- },
- seletedCar(e) {
- console.log(e.value);
- this.param.aa = dayjs(e.value).format('YYYY-MM-DD')
- this.isShowDate = false
- }
- }
+ data() {
+ return {
+ isShowCar: false,
+ isShowDate: false,
+ param: {},
+
+ minDate: '',
+ carsList: [[{ name: 'aa', value: '11' }]],
+ timeList: [],
+ selDatetime: '',
+
+ colorOptions: [
+ { color: '#279BAA', name: '宸查�夋嫨' },
+ { color: '#F7F7F7', name: '鍙绾�' },
+ { color: '#cccccc', name: '涓嶅彲棰勭害' },
+ ]
+ }
+ },
+ onLoad() {
+ this.minDate = new Date().getTime()
+ this.initData()
+ },
+ methods: {
+ onSubmit() {
+ const { param } = this
+ const selTimeList = this.timeList.filter(i => i.checked == '1')
+ if (selTimeList.length == -1) {
+ return uni.showToast({
+ title: '璇峰厛閫夋嫨鐢ㄨ溅鏃堕棿娈�',
+ icon: 'none'
+ })
+ }
+ const obj = {
+ carCode: param.carCode,
+ carId: param.carId ,
+ startTime: selTimeList[0].startTime,
+ endTime: selTimeList[selTimeList.length - 1].endTime,
+ dateDay: param.queryDate,
+ type: '0'
+ }
+ uni.navigateTo({
+ url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&dateDay=${obj.dateDay}&type=${obj.type}`
+ })
+ // this.$jump('/pages/staff/vehicle/apply')
+ },
+ datetimeClick(item, index) {
+ if(item.isUse == '1') return
+ const { timeList } = this
+ const selTimeList = timeList.filter(i => i.checked == '1')
+ if (selTimeList.length === 0) {
+ this.timeList.forEach((ite, i) => {
+ if (i === index) {
+ ite.checked = '1'
+ this.$forceUpdate()
+ }
+ })
+ } else {
+ const findIndex = selTimeList.findIndex(i => i.index === index)
+ console.log('findIndex', findIndex)
+ if (findIndex === -1) {
+ const startNum = index - selTimeList[0].index
+ const endNum = index - selTimeList[selTimeList.length - 1].index
+ if (startNum == 1 || startNum == -1 || endNum == 1 || endNum == -1) {
+ console.log('鐩搁偦')
+ item.checked = true
+ this.$forceUpdate()
+ } else {
+ return uni.showToast({
+ title: '璇烽�夋嫨鐩搁偦鐨勬椂闂存',
+ icon: 'none'
+ })
+ }
+ } else {
+ if (index === selTimeList[0].index || index === selTimeList[selTimeList.length - 1].index) {
+ item.checked = false
+ this.$forceUpdate()
+ } else {
+ return uni.showToast({
+ title: '璇峰厛鍙栨秷鏈�澶栧眰鐨勬椂闂存',
+ icon: 'none'
+ })
+ }
+
+ }
+ }
+ const selTimeLists = this.timeList.filter(i => i.checked == '1')
+ // console.log('selTimeList', selTimeList);
+ if (selTimeLists.length === 0) {
+ this.selDatetime = ''
+ } else {
+ this.selDatetime = this.param.queryDate.slice(5) + ' ' + selTimeLists[0].startHours + '-' + selTimeLists[selTimeLists.length - 1].endHours
+ }
+ // if(true){
+ // this.selDatetime.push(item)
+ // }
+ },
+ confirmDate(e) {
+ this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
+ this.isShowDate = false
+ if(this.param.carId && this.param.queryDate){
+ this.gettimes()
+ }
+ },
+ initData() {
+ getCarsList({
+ type: 1
+ }).then(res => {
+ this.carsList = [res.data]
+ })
+ },
+ gettimes() {
+ const { param } = this
+ carCanReservationDate({
+ dateDay: param.queryDate,
+ carId: param.carId
+ }).then(res => {
+ if (res.code === 200) {
+ this.timeList = res.data || []
+ this.timeList.forEach((i, j) => {
+ i.checked = '0',
+ i.index = j
+ })
+ }
+ })
+ },
+ seletedCar(e) {
+ const item = e.value[0]
+ this.$set(this.param, 'carCode', item.code)
+ this.$set(this.param, 'carId', item.id)
+ if(this.param.carId && this.param.queryDate){
+ this.gettimes()
+ }
+ this.isShowCar = false
+ }
+ }
};
</script>
<style lang="scss">
.main_app {
- .app_header {
- display: flex;
- align-items: center;
- margin: 0 -15rpx;
- .item {
- width: 330rpx;
- height: 72rpx;
- margin: 15rpx;
- padding: 0 30rpx;
- border-radius: 36rpx;
- border: 1rpx solid #e5e5e5;
- display: flex;
- align-items: center;
- justify-content: space-between;
- align-items: center;
- }
- }
- .main_footer{
- position: absolute;
- width: 100%;
- left: 0;
- bottom: 0;
- padding: 20rpx 30rpx 84rpx;
- box-shadow: 0rpx -3rpx 6rpx 0rpx #EEEEEE;
- .sel_time{
- color: #279BAA;
- }
- .btns{
- margin-top: 10rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .left{
- display: flex;
- .item{
- display: flex;
- align-items: center;
- margin-right: 20rpx;
- .box{
- margin-right: 10rpx;
- width: 32rpx;
- height: 32rpx;
- }
- }
- }
- .sub{
- width: 184rpx;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- background: #279BAA;
- box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE;
- border-radius: 36rpx;
- font-size: 30rpx;
- color: #FFFFFF;
- }
- }
- }
- .time_list{
- display: flex;
- justify-content: space-between;
- padding: 30rpx 0;
- flex-wrap: wrap;
- .item{
- width: 220rpx;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- background: #F7F7F7;
- border-radius: 4rpx;
- margin-bottom: 24rpx;
- font-size: 30rpx;
- }
- .active{
- background-color: #279BAA;
- color: #fff;
- }
- .disable{
- background-color: #cccccc;
- color: #999999;
- }
- }
-
+ .app_header {
+ display: flex;
+ align-items: center;
+ margin: 0 -15rpx;
+ .item {
+ width: 330rpx;
+ height: 72rpx;
+ margin: 15rpx;
+ padding: 0 30rpx;
+ border-radius: 36rpx;
+ border: 1rpx solid #e5e5e5;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ align-items: center;
+ }
+ }
+ .main_footer {
+ position: absolute;
+ width: 100%;
+ left: 0;
+ bottom: 0;
+ padding: 20rpx 30rpx 84rpx;
+ box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
+ .sel_time {
+ color: #279baa;
+ }
+ .btns {
+ margin-top: 10rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .left {
+ display: flex;
+ .item {
+ display: flex;
+ align-items: center;
+ margin-right: 20rpx;
+ .box {
+ margin-right: 10rpx;
+ width: 32rpx;
+ height: 32rpx;
+ }
+ }
+ }
+ .sub {
+ width: 184rpx;
+ height: 72rpx;
+ line-height: 72rpx;
+ text-align: center;
+ background: #279baa;
+ box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
+ border-radius: 36rpx;
+ font-size: 30rpx;
+ color: #ffffff;
+ }
+ }
+ }
+ .time_list {
+ display: flex;
+ justify-content: space-between;
+ padding: 30rpx 0;
+ flex-wrap: wrap;
+ .item {
+ width: 220rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ background: #f7f7f7;
+ border-radius: 4rpx;
+ margin-bottom: 24rpx;
+ font-size: 30rpx;
+ }
+ .active {
+ background-color: #279baa;
+ color: #fff;
+ }
+ .disable {
+ background-color: #cccccc;
+ color: #999999;
+ }
+ }
}
</style>
diff --git a/h5/pages/staff/vehicle/shiwai.vue b/h5/pages/staff/vehicle/shiwai.vue
index 197c5e1..b8742bc 100644
--- a/h5/pages/staff/vehicle/shiwai.vue
+++ b/h5/pages/staff/vehicle/shiwai.vue
@@ -1,230 +1,343 @@
<template>
- <view class="main_app">
- <view class="main_wrap">
- <!-- -->
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>閫夋嫨杞﹁締</text>
- </view>
- <view class="value" @click="isShowCar = true">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="line">
- <view class="label">
- <text>*</text>
- <text>棰勮鐢ㄨ溅鏃舵</text>
- </view>
- <view class="value" @click="isShowDate = true">
- <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- </view>
- <view class="have_info">
- <view class="tit">鎮ㄧ敵璇风殑鐢ㄨ溅鏃舵宸叉湁杞﹁締棰勭害</view>
- <view class="content">
- <view class="card">鐨朅1212</view>
- <view class="line">
- <text>鐢ㄨ溅鏃舵</text>
- <text>111111</text>
- </view>
- <view class="line">
- <text>鐩殑鍦�</text>
- <text>111111</text>
- </view>
- <view class="line">
- <text>涔樿溅浜烘暟</text>
- <text>111111</text>
- </view>
- <view class="line">
- <text>鐢ㄨ溅浜嬬敱</text>
- <text>111111</text>
- </view>
- <view class="line">
- <text>鐢宠浜�</text>
- <text>111111</text>
- </view>
- </view>
- </view>
- <view class="main_footer">
- <text>宸查�夋嫨锛�</text>
- <text class="sel">132123</text>
- <text class="btn" @click="$jump('/pages/staff/vehicle/apply')">纭棰勭害</text>
- </view>
- <!-- -->
- <!-- 閫夋嫨杞﹁締 -->
- <u-picker
- keyName="name"
- :show="isShowCar"
- @close="isShowCar = false"
- :closeOnClickOverlay="true"
- :columns="carList"
- @confirm="seletedCar"
- @cancel="isShowCar = false"
- ></u-picker>
- <u-datetime-picker
- mode="datetime"
- keyName="name"
- :show="isShowDate"
- :filter="timeFilter"
- @close="isShowDate = false"
- :closeOnClickOverlay="true"
- @confirm="seletedDate"
- @cancel="isShowDate = false"
- />
-
- </view>
+ <view class="main_app">
+ <view class="main_wrap">
+ <!-- -->
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>閫夋嫨杞﹁締</text>
+ </view>
+ <view class="value" @click="isShowCar = true">
+ <text
+ class="mr6"
+ :style="{ color: param.carCode ? '#000000' : '#999999' }"
+ >{{ param.carCode ? param.carCode : "璇烽�夋嫨" }}</text
+ >
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="line">
+ <view class="label">
+ <text>*</text>
+ <text>棰勮鐢ㄨ溅鏃舵</text>
+ </view>
+ <view class="value" @click="isShowDate = true">
+ <text
+ class="mr6"
+ :style="{ color: param.startTime ? '#999999' : '#999999' }"
+ >
+ <template v-if="param.startTime">
+ {{ param.startHours }}鑷硔{ param.endHours }}
+ </template>
+ <template v-else> 璇烽�夋嫨 </template>
+ </text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ </view>
+ <view class="have_info" v-if="info && info.length > 0">
+ <view class="tit">鎮ㄧ敵璇风殑鐢ㄨ溅鏃舵宸叉湁杞﹁締棰勭害</view>
+ <view class="content" v-for="item,i in info" :key="i">
+ <view class="card">{{ item.carCode }}</view>
+ <view class="line">
+ <text>鐢ㄨ溅鏃舵</text>
+ <text>
+ {{ item.startTime.slice(5, 16) }}鑷硔{
+ item.endTime.slice(5, 16)
+ }}</text
+ >
+ </view>
+ <view class="line">
+ <text>鐩殑鍦�</text>
+ <text>{{ item.addr }}</text>
+ </view>
+ <view class="line">
+ <text>涔樿溅浜烘暟</text>
+ <text>{{ item.memberIds.split(",").length }}浜�</text>
+ </view>
+ <view class="line">
+ <text>鐢ㄨ溅浜嬬敱</text>
+ <text>{{ item.content }}</text>
+ </view>
+ <view class="line">
+ <text>鐢宠浜�</text>
+ <text>{{ item.memberName }} {{ item.memberMobile}}</text>
+ </view>
+ </view>
+ </view>
+ <view class="main_footer">
+ <text>宸查�夋嫨锛�</text>
+ <text class="sel" v-if="param.startTime"
+ >{{ param.startHours }}鑷硔{ param.endHours }}</text
+ >
+ <text class="btn" @click="onSubmit">纭棰勭害</text>
+ </view>
+ <!-- -->
+ <!-- 閫夋嫨杞﹁締 -->
+ <u-picker
+ keyName="code"
+ :show="isShowCar"
+ @close="isShowCar = false"
+ :closeOnClickOverlay="true"
+ :columns="carsList"
+ @confirm="seletedCar"
+ @cancel="isShowCar = false"
+ ></u-picker>
+ <u-datetime-picker
+ mode="datetime"
+ :show="isShowDate"
+ :filter="timeFilter"
+ title="寮�濮嬫椂闂�"
+ :minDate="minDate"
+ @close="isShowDate = false"
+ :closeOnClickOverlay="true"
+ @confirm="seletedDate"
+ @cancel="isShowDate = false"
+ />
+ <u-datetime-picker
+ mode="datetime"
+ :show="isShowEndDate"
+ :filter="timeFilter"
+ title="缁撴潫鏃堕棿"
+ :minDate="new Date(param.startTime || null).getTime()"
+ @close="endtimeClose"
+ :closeOnClickOverlay="true"
+ @confirm="seletedEndDate"
+ @cancel="endtimeClose"
+ />
+ </view>
</template>
<script>
+import { getCarsList, carUseBookList } from '@/api'
+import dayjs from 'dayjs'
export default {
- data() {
- return {
- param: {},
- isShowCar: false,
- isShowDate: false,
- carList: [],
- datetimeOp: []
- };
- },
- methods: {
- seletedCar() {},
- seletedDate() {
- this.isShowDate = false;
- },
- timeFilter(mode, options) {
- if (mode === 'minute') {
- return options.filter(option => option === '00' || option === '30');
- }
- return options;
- }
- }
+ data() {
+ return {
+ param: {},
+ isShowCar: false,
+ isShowDate: false,
+ isShowEndDate: false,
+ carsList: [],
+ info: [],
+
+ minDate: ''
+ }
+ },
+ onLoad() {
+ this.minDate = new Date(dayjs().format('YYYY-MM-DD HH:') + '00:00').getTime()
+ this.initData()
+ },
+ methods: {
+ onSubmit() {
+ const { param, info } = this
+ if (info.length > 0) return uni.showToast({
+ title: '璇烽噸鏂伴�夋嫨鏃堕棿娈�',
+ icon: 'none'
+ })
+ if (!param.startTime) return uni.showToast({
+ title: '璇峰厛閫夋嫨鐢ㄨ溅鏃堕棿娈�',
+ icon: 'none'
+ })
+ if (!param.carId) return uni.showToast({
+ title: '璇烽�夋嫨杞﹁締',
+ icon: 'none'
+ })
+ const obj = {
+ carCode: param.carCode,
+ carId: param.carId,
+ startTime: param.startTime,
+ endTime: param.endTime,
+ type: '1'
+ }
+ uni.navigateTo({
+ url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&type=${obj.type}`
+ })
+ // this.$jump('/pages/staff/vehicle/apply')
+ },
+ getInfo() {
+ const { param } = this
+ carUseBookList({
+ carId: param.carId,
+ startTime: param.startTime,
+ endTime: param.endTime,
+ }).then(res => {
+ if (res.code == 200) {
+ this.info = res.data
+ }
+ })
+ },
+ seletedCar(e) {
+ const item = e.value[0]
+ this.$set(this.param, 'carCode', item.code)
+ this.$set(this.param, 'carId', item.id)
+ this.isShowCar = false
+ if (this.param.carId && this.param.startTime) {
+ this.getInfo()
+ }
+ },
+ seletedDate(e) {
+ this.param.startTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
+ this.param.startHours = dayjs(e.value).format('MM-DD HH:mm')
+ console.log(this.param.startTime)
+ this.isShowDate = false
+ this.isShowEndDate = true
+ },
+ seletedEndDate(e) {
+ this.param.endTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
+ this.param.endHours = dayjs(e.value).format('MM-DD HH:mm')
+ console.log(this.param.endTime)
+ this.isShowEndDate = false
+ if (this.param.carId && this.param.startTime) {
+ this.getInfo()
+ }
+ this.$forceUpdate()
+ },
+ endtimeClose() {
+ this.param.endTime = ''
+ this.param.startTime = ''
+ this.isShowEndDate = false
+ },
+ timeFilter(mode, options) {
+ if (mode === 'minute') {
+ return options.filter(option => option === '00' || option === '30' || option === '60')
+ }
+ return options
+ },
+ initData() {
+ getCarsList({
+ type: 1
+ }).then(res => {
+ this.carsList = [res.data]
+ })
+ },
+ }
};
</script>
<style lang="scss">
.have_info {
- .tit {
- color: #ed4545;
- margin: 40rpx 0 24rpx;
- }
- .content {
- background: #f7f7f7;
- border-radius: 16rpx;
- padding: 30rpx 30rpx 10rpx;
- .card {
- margin-bottom: 30rpx;
- font-weight: 500;
- font-size: 32rpx;
- color: #222222;
- background: #f7f7f7;
- padding: 0;
- }
- .line {
- display: flex;
- margin-bottom: 20rpx;
- text {
- &:nth-of-type(1) {
- width: 150rpx;
- color: #888888;
- }
- &:nth-of-type(2) {
- flex: 1;
- }
- }
- }
- }
+ padding: 0 0 200rpx;
+ .tit {
+ color: #ed4545;
+ margin: 40rpx 0 24rpx;
+ }
+ .content {
+ background: #f7f7f7;
+ border-radius: 16rpx;
+ padding: 30rpx 30rpx 10rpx;
+ margin-bottom: 20rpx;
+ .card {
+ margin-bottom: 30rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ background: #f7f7f7;
+ padding: 0;
+ }
+ .line {
+ display: flex;
+ margin-bottom: 20rpx;
+ text {
+ &:nth-of-type(1) {
+ width: 150rpx;
+ color: #888888;
+ }
+ &:nth-of-type(2) {
+ flex: 1;
+ }
+ }
+ }
+ }
}
.main_wrap {
- .line {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #e5e5e5;
- padding: 30rpx 0;
- .label {
- font-size: 30rpx;
- font-weight: 400;
- text {
- &:nth-child(1) {
- color: #e42d2d;
- margin-right: 4rpx;
- }
- }
- }
- .value {
- flex: 1;
- height: 100%;
- margin-left: 30rpx;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- input {
- width: 100%;
- height: 100%;
- text-align: right;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
- .upload_line {
- padding: 30rpx 0;
- textarea {
- margin-top: 12rpx;
- width: 100%;
- height: 180rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- .adduser_list_item_ipt1_upload {
- margin-top: 24rpx;
- width: 120rpx;
- height: 120rpx;
- border: 2rpx solid #e5e5e5;
- background: #f7f7f7;
- color: #666666;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
+ .line {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0;
+ .label {
+ font-size: 30rpx;
+ font-weight: 400;
+ text {
+ &:nth-child(1) {
+ color: #e42d2d;
+ margin-right: 4rpx;
+ }
+ }
+ }
+ .value {
+ flex: 1;
+ height: 100%;
+ margin-left: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ input {
+ width: 100%;
+ height: 100%;
+ text-align: right;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ .upload_line {
+ padding: 30rpx 0;
+ textarea {
+ margin-top: 12rpx;
+ width: 100%;
+ height: 180rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ .adduser_list_item_ipt1_upload {
+ margin-top: 24rpx;
+ width: 120rpx;
+ height: 120rpx;
+ border: 2rpx solid #e5e5e5;
+ background: #f7f7f7;
+ color: #666666;
+ font-size: 22rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
}
.main_footer {
- position: absolute;
- width: 100%;
- left: 0;
- bottom: 0;
- padding: 20rpx 30rpx 84rpx;
- box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .btn {
- width: 184rpx;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- background: #279baa;
- box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
- border-radius: 36rpx;
- font-size: 30rpx;
- color: #ffffff;
- }
- .sel {
- color: #279baa;
- flex: 1;
- }
+ position: fixed;
+ width: 100%;
+ left: 0;
+ background-color: #fff;
+ bottom: 0;
+ padding: 20rpx 30rpx 84rpx;
+ box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .btn {
+ width: 184rpx;
+ height: 72rpx;
+ line-height: 72rpx;
+ text-align: center;
+ background: #279baa;
+ box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
+ border-radius: 36rpx;
+ font-size: 30rpx;
+ color: #ffffff;
+ }
+ .sel {
+ color: #279baa;
+ flex: 1;
+ }
}
</style>
diff --git a/h5/pages/staff/visitorReport.vue b/h5/pages/staff/visitorReport.vue
index f13cb68..75023e8 100644
--- a/h5/pages/staff/visitorReport.vue
+++ b/h5/pages/staff/visitorReport.vue
@@ -1,674 +1,665 @@
<template>
- <view class="visit">
- <view class="list">
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>琚浜哄鍚�</text>
- </view>
- <view class="list_item_content"><input type="text" placeholder="璇疯緭鍏ュ鍚�" v-model="form1.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鍏ュ巶鏃堕棿</text>
- </view>
- <view class="list_item_content" @click="show4 = true">
- <text :style="{ color: form1.starttime ? '#000000' : '' }">{{ form1.starttime ? form1.starttime : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>绂诲巶鏃堕棿</text>
- </view>
- <view class="list_item_content" @click="openLC">
- <text :style="{ color: form1.endtime ? '#000000' : '' }">{{ form1.endtime ? form1.endtime : '璇烽�夋嫨' }}</text>
- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
- </view>
- </view>
- <div class="empty"></div>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鑱旂郴浜�</text>
- </view>
- <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ヨ仈绯讳汉濮撳悕" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鎵嬫満鍙�</text>
- </view>
- <view class="list_item_content">
- <input
- type="number"
- maxlength="11"
- v-model="form1.phone1"
- :placeholder="'璇疯緭鍏ヨ仈绯讳汉鎵嬫満鍙�'"
- placeholder-style="color: #999999;"
- />
- </view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鏉ヨ鍗曚綅</text>
- </view>
- <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ユ潵璁垮崟浣嶇殑鍏ㄧО" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鍏ュ洯杞﹁締</text>
- </view>
- <view class="list_item_content" @click="openInput(1)">
- <text :style="{ color: form1.carNos ? '#000000' : '' }">{{ form1.carNos ? form1.carNos : '璇疯緭鍏ヨ溅鐗屽彿鐮�' }}</text>
- <!-- <input type="text" placeholder="璇疯緭鍏ヨ溅鐗屽彿" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> -->
- </view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>闅忚溅浜烘暟</text>
- </view>
- <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ラ殢杞︿汉鍛樻�绘暟" placeholder-style="color: #999999;" /></view>
- </view>
- <view class="list_item">
- <view class="list_item_label">
- <text>*</text>
- <text>鏉ヨ浜嬬敱</text>
- </view>
- <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ユ潵璁夸簨鐢�" placeholder-style="color: #999999;" /></view>
- </view>
- </view>
- <view class="zw"></view>
- <view class="footer"><view class="footer_btn" @click="submit">鎻愪氦</view></view>
- <!-- 鍏ュ満鏃堕棿 -->
- <u-datetime-picker :show="show4" :minDate="new Date().getTime()" mode="datetime" @cancel="show4 = false" @confirm="setinDate"></u-datetime-picker>
- <!-- 绂诲満鏃堕棿 -->
- <u-datetime-picker
- v-if="form1.starttime"
- :show="show5"
- :minDate="formatTimeStamp(form1.starttime)"
- :maxDate="formatTimeStamp(maxTime)"
- mode="datetime"
- @cancel="show5 = false"
- @confirm="setoutDate"
- ></u-datetime-picker>
- <!-- 杞﹁締 -->
- <u-popup :show="show2" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="show2 = false">
- <view class="addcar">
- <view class="addcar_head">娣诲姞杞﹁締</view>
- <view class="addcar_ipt"><input type="text" v-model="carName" placeholder="璇疯緭鍏ヨ溅鐗屽彿" /></view>
- <view class="addcar_footer">
- <view class="addcar_footer_item" @click="show2 = false">鍙栨秷</view>
- <view class="addcar_footer_item t" @click="submitCart">鎻愪氦</view>
- </view>
- </view>
- </u-popup>
- <u-picker keyName="name" :show="show6" :columns="columns1" @confirm="seleIdcard" @cancel="show6 = false"></u-picker>
- <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> -->
- <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" />
- <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="30" @crop="uploadImg"></qf-image-cropper>
- </view>
+ <view class="visit">
+ <view class="list">
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>琚浜哄鍚�</text>
+ </view>
+ <view class="list_item_content" @click="showName = true">
+ <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{
+ form1.receptMemberName
+ ? form1.receptMemberName + " " + form1.receptCompanyName
+ : "璇烽�夋嫨"
+ }}</text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鍏ュ巶鏃堕棿</text>
+ </view>
+ <view class="list_item_content" @click="show4 = true">
+ <text :style="{ color: form1.starttime ? '#000000' : '' }">{{
+ form1.starttime ? form1.starttime : "璇烽�夋嫨"
+ }}</text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>绂诲巶鏃堕棿</text>
+ </view>
+ <view class="list_item_content" @click="openLC">
+ <text :style="{ color: form1.endtime ? '#000000' : '' }">{{
+ form1.endtime ? form1.endtime : "璇烽�夋嫨"
+ }}</text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </view>
+ </view>
+ <div class="empty"></div>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鑱旂郴浜�</text>
+ </view>
+ <view class="list_item_content"
+ ><input
+ type="text"
+ v-model="form1.name"
+ placeholder="璇疯緭鍏ヨ仈绯讳汉濮撳悕"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鎵嬫満鍙�</text>
+ </view>
+ <view class="list_item_content">
+ <input
+ type="number"
+ maxlength="13"
+ v-model="form1.phone"
+ :placeholder="'璇疯緭鍏ヨ仈绯讳汉鎵嬫満鍙�'"
+ placeholder-style="color: #999999;"
+ />
+ </view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鏉ヨ鍗曚綅</text>
+ </view>
+ <view class="list_item_content"
+ ><input
+ type="text"
+ v-model="form1.companyName"
+ placeholder="璇疯緭鍏ユ潵璁垮崟浣嶇殑鍏ㄧО"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鍏ュ洯杞﹁締</text>
+ </view>
+ <view class="list_item_content" @click="openInput(1)">
+ <text :style="{ color: form1.carNos ? '#000000' : '' }">{{
+ form1.carNos ? form1.carNos : "璇疯緭鍏ヨ溅鐗屽彿鐮�"
+ }}</text>
+ <!-- <input type="text" placeholder="璇疯緭鍏ヨ溅鐗屽彿" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> -->
+ </view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>闅忚溅浜烘暟</text>
+ </view>
+ <view class="list_item_content"
+ ><input
+ type="number"
+ v-model="form1.memberNum"
+ placeholder="璇疯緭鍏ラ殢杞︿汉鍛樻�绘暟"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ <view class="list_item">
+ <view class="list_item_label">
+ <text>*</text>
+ <text>鏉ヨ浜嬬敱</text>
+ </view>
+ <view class="list_item_content"
+ ><input
+ type="text"
+ v-model="form1.reason"
+ placeholder="璇疯緭鍏ユ潵璁夸簨鐢�"
+ placeholder-style="color: #999999;"
+ /></view>
+ </view>
+ </view>
+ <view class="zw"></view>
+ <view class="footer"
+ ><view class="footer_btn" @click="submit">鎻愪氦</view></view
+ >
+ <!-- 鍏ュ満鏃堕棿 -->
+ <u-datetime-picker
+ :show="show4"
+ :minDate="new Date().getTime()"
+ mode="datetime"
+ @cancel="show4 = false"
+ @confirm="setinDate"
+ ></u-datetime-picker>
+ <!-- 绂诲満鏃堕棿 -->
+ <u-datetime-picker
+ v-if="form1.starttime"
+ :show="show5"
+ :minDate="formatTimeStamp(form1.starttime)"
+ :maxDate="formatTimeStamp(maxTime)"
+ mode="datetime"
+ @cancel="show5 = false"
+ @confirm="setoutDate"
+ ></u-datetime-picker>
+ <!-- 杞﹁締 -->
+ <u-popup
+ :show="show2"
+ :round="10"
+ :safeAreaInsetBottom="true"
+ :closeable="true"
+ mode="bottom"
+ @close="show2 = false"
+ >
+ <view class="addcar">
+ <view class="addcar_head">娣诲姞杞﹁締</view>
+ <view class="addcar_ipt"
+ ><input type="text" v-model="carName" placeholder="璇疯緭鍏ヨ溅鐗屽彿"
+ /></view>
+ <view class="addcar_footer">
+ <view class="addcar_footer_item" @click="show2 = false">鍙栨秷</view>
+ <view class="addcar_footer_item t" @click="submitCart">鎻愪氦</view>
+ </view>
+ </view>
+ </u-popup>
+ <u-picker
+ keyName="name"
+ :show="showName"
+ closeOnClickOverlay
+ :columns="memberList"
+ @confirm="seleteName"
+ @cancel="showName = false"
+ @close="showName = false"
+ ></u-picker>
+ <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> -->
+ <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" />
+ <qf-image-cropper
+ ref="cropper"
+ :width="280"
+ :height="280"
+ :radius="30"
+ @crop="uploadImg"
+ ></qf-image-cropper>
+ </view>
</template>
<script>
-import tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue';
-import keyboardInput from '@/components/keyboard-input/keyboard-input.vue';
-import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
-import { getDaysAfterDate } from '@/utils/utils.js';
+import tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue'
+import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'
+import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue'
+import { getDaysAfterDate } from '@/utils/utils.js'
+import { createVisit, getVisitedMember } from '@/api'
export default {
- data() {
- return {
- photoSrc: '',
- type: '',
- inputType: '',
- show1: false,
- show2: false,
- show4: false,
- show5: false,
- show6: false,
- show7: false,
- fileList: [],
- columns1: [[{ name: '韬唤璇�', id: 0 }, { name: '娓境璇佷欢', id: 1 }, { name: '鎶ょ収', id: 2 }]],
- columnsNames: [[{ name: '寮犱笁', id: 0 }, { name: '寮犱笁', id: 1 }, { name: '寮犱笁', id: 2 }]],
- columns: [],
- cars: [],
- day: null,
- maxTime: '',
- carName: '',
- personnel: [],
- userAnswerId: '',
- form1: {
- phone1: '',
- receptMemberId: '',
- receptMemberName: '',
- starttime: '',
- endtime: '',
- doors: '',
- doorSelectName: '',
- reason: '',
- carNos: ''
- },
- withUserList: {
- name: '',
- phone: '',
- idcardType: '',
- idcardTypeName: '',
- companyName: '',
- idcardNo: '',
- faceImg: '',
- faceImgUrl: '',
- imgurl: '',
- imgurlUrl: ''
- },
- visit: '',
- form: {},
- accessControl: '',
- verify: ''
- };
- },
- components: { tlyPictureCut, keyboardInput, QfImageCropper },
- onLoad(options) {
- if (options.data) {
- this.form = JSON.parse(options.data);
- }
- // this.getvisit()
- // this.getVisit1()
- // this.getUserValid()
- },
- methods: {
- openInput(type) {
- this.inputType = type;
- this.$refs.keyboard.open();
- },
- setPlate(e) {
- if (this.inputType === 1) {
- this.form1.carNos = e;
- } else if (this.inputType === 2) {
- this.withUserList.carNos = e;
- }
- this.$forceUpdate();
- this.closeInput();
- },
- closeInput() {
- this.$refs.keyboard.close();
- },
- uploadImg(file) {
- this.$refs.cropper.close();
- uni.showLoading({ title: '涓婁紶涓�', mask: true });
- uni.uploadFile({
- url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
- filePath: file.tempFilePath,
- name: 'file',
- formData: {
- folderCode: 'MEMBER_IMG'
- },
- success: uploadFileRes => {
- let res = JSON.parse(uploadFileRes.data);
- this.withUserList.faceImg = res.data.halfPath;
- this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath;
- },
- complete() {
- uni.hideLoading();
- }
- });
- },
- submit() {
- if (!this.form1.receptMemberId)
- return uni.showToast({
- title: '璇峰~鍐欐湁鏁堢殑璁块棶浜�',
- icon: 'none'
- });
- if (!this.form1.starttime)
- return uni.showToast({
- title: '鍏ュ満鏃堕棿涓嶈兘涓虹┖',
- icon: 'none'
- });
- if (!this.form1.endtime)
- return uni.showToast({
- title: '绂诲満鏃堕棿涓嶈兘涓虹┖',
- icon: 'none'
- });
- if (!this.form1.doorSelectName && this.accessControl == 1)
- return uni.showToast({
- title: '璁块棶闂ㄧ涓嶈兘涓虹┖',
- icon: 'none'
- });
- if (!this.form1.reason)
- return uni.showToast({
- title: '鎷滆浜嬬敱涓嶈兘涓虹┖',
- icon: 'none'
- });
- // this.form1.starttime = this.form1.starttime + ':00'
- // this.form1.endtime = this.form1.endtime + ':00'
- let data = JSON.parse(JSON.stringify(this.form1));
- data.starttime = data.starttime + ':00';
- data.endtime = data.endtime + ':00';
- this.$u.api
- .createFk({
- ...this.form,
- ...data,
- openid: this.$store.state.openId,
- withUserList: this.personnel
- })
- .then(res => {
- if (res.code === 200) {
- uni.reLaunch({
- url: `/pages/appointmentDetails/appointmentDetails?id=${res.data}`
- });
- }
- });
- },
- deleUser(i) {
- this.personnel.splice(i, 1);
- },
- getVisit1() {
- // 鏄惁闇�瑕佺瓟棰�
- this.$u.api
- .getSystemDictData({
- dictCode: 'SYSTEM',
- label: 'HEALTH_CARD'
- })
- .then(res => {
- if (res.code === 200) {
- this.visit = res.data.code;
- }
- });
- // 璧峰鏃堕棿鏃堕暱
- this.$u.api
- .getSystemDictData({
- dictCode: 'VISIT_CONFIG',
- label: 'VALIDATE_VISIT'
- })
- .then(res => {
- if (res.code === 200) {
- this.day = Number(res.data.code);
- // console.log(nextDay('after', true, this.day))
- }
- });
- },
- upload(type) {
- this.type = type;
- if (type === 'faceImg') {
- this.$refs.cropper.open();
- return;
- }
- uni.chooseImage({
- success: chooseImageRes => {
- // if (type === 'faceImg') {
- // this.photoSrc = chooseImageRes.tempFilePaths[0];
- // this.$refs.tlyPictureCut.showPop();
- // return
- // }
- uni.showLoading({ title: '涓婁紶涓�', mask: true });
- for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
- uni.uploadFile({
- url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
- filePath: chooseImageRes.tempFilePaths[i],
- name: 'file',
- formData: {
- folderCode: 'MEMBER_IMG'
- },
- success: uploadFileRes => {
- let res = JSON.parse(uploadFileRes.data);
- if (type === 'faceImg') {
- this.withUserList.faceImg = res.data.halfPath;
- this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath;
- } else {
- this.withUserList.imgurl = res.data.halfPath;
- this.withUserList.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath;
- }
- },
- complete() {
- if (i === chooseImageRes.tempFilePaths.length - 1) {
- uni.hideLoading();
- }
- }
- });
- }
- }
- });
- },
- seleIdcard(e) {
- this.withUserList.idcardType = e.value[0].id;
- this.withUserList.idcardTypeName = e.value[0].name;
- this.show6 = false;
- },
- submitCart() {
- if (!this.carName)
- return uni.showToast({
- title: '璇疯緭鍏ヨ溅鐗屽彿鐮�',
- icon: 'none'
- });
- this.cars.push(this.carName);
- this.form1.carNos = this.cars.join(',');
- this.carName = '';
- this.show2 = false;
- },
- deleCars(i) {
- this.cars.splice(i, 1);
- this.form1.carNos = this.cars.join(',');
- },
- seleMJ(i) {
- this.columns.forEach((item, index) => {
- if (index === i) {
- item.active = !item.active;
- }
- });
- },
- openLC() {
- if (!this.form1.starttime)
- return uni.showToast({
- title: '璇峰厛閫夋嫨鍏ュ巶鏃堕棿',
- icon: 'none'
- });
- this.show5 = true;
- },
- setinDate(e) {
- this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
- // this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'), this.day)
- this.maxTime = this.form1.starttime.slice(0, 11) + '23:59'
- this.form1.endtime = ''
- this.show4 = false;
- },
- setoutDate(e) {
- this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
- this.show5 = false;
- },
- formatTimeStamp(date) {
- return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g, '/')}`));
- },
- // 鏌ヨ鐢ㄦ埛
- getUser() {
- if (this.verify === '0') {
- if (this.form1.phone1) {
- this.$u.api
- .getVisitedMember({
- mobile: this.form1.phone1
- })
- .then(res => {
- if (res.code === 200) {
- this.form1.receptMemberId = res.data.id;
- this.form1.receptMemberName = res.data.name;
- }
- });
- }
- } else {
- if (this.form1.phone1 && this.form1.receptMemberName) {
- this.$u.api
- .getVisitedMember({
- mobile: this.form1.phone1,
- name: this.form1.receptMemberName
- })
- .then(res => {
- if (res.code === 200) {
- this.form1.receptMemberId = res.data.id;
- this.form1.receptMemberName = res.data.name;
- }
- });
- }
- }
- },
- // 琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛�
- getUserValid() {
- this.$u.api
- .getSystemDictData({
- dictCode: 'SYSTEM',
- label: 'BEVISITED_USER_VALID'
- })
- .then(res => {
- if (res.code === 200) {
- this.verify = res.data.code;
- }
- });
- },
- // 鑾峰彇鏄惁闇�瑕侀�夋嫨闂ㄧ/闂ㄧ鍒楄〃
- getvisit() {
- this.$u.api
- .getSystemDictData({
- dictCode: 'SYSTEM',
- label: 'SELECT_DOORS_VISIT_REQUIRED'
- })
- .then(res => {
- if (res.code === 200) {
- this.accessControl = res.data.code;
- if (res.data.code === '1') {
- this.$u.api.deviceRoleList({ type: 1 }).then(device => {
- if (device.code === 200) {
- if (device.data.length > 0) {
- device.data.forEach(item => {
- item.active = false;
- });
- this.columns = device.data;
- }
- }
- });
- }
- }
- });
- }
- }
+ data() {
+ return {
+ photoSrc: '',
+ type: '',
+ inputType: '',
+ show1: false,
+ show2: false,
+ show4: false,
+ show5: false,
+ show7: false,
+ showName: false,
+ fileList: [],
+ memberList: [[{ name: '韬唤璇�', id: 0 }, { name: '娓境璇佷欢', id: 1 }, { name: '鎶ょ収', id: 2 }]],
+ columnsNames: [[{ name: '寮犱笁', id: 0 }, { name: '寮犱笁', id: 1 }, { name: '寮犱笁', id: 2 }]],
+ columns: [],
+ cars: [],
+ day: null,
+ maxTime: '',
+ carName: '',
+ personnel: [],
+ userAnswerId: '',
+ form1: {
+ receptMemberId: '',
+ receptMemberName: '',
+ starttime: '',
+ endtime: '',
+ reason: '',
+ carNos: ''
+ },
+ visit: '',
+ form: {},
+ accessControl: '',
+ verify: ''
+ }
+ },
+ components: { tlyPictureCut, keyboardInput, QfImageCropper },
+ onLoad(options) {
+ if (options.data) {
+ this.form = JSON.parse(options.data)
+ }
+ this.getUser()
+ const userInfo = uni.getStorageSync('userInfo') || {}
+ this.$set(this.form1, 'receptMemberName', userInfo.realname)
+ this.$set(this.form1, 'receptMemberId', userInfo.id || '')
+ this.$set(this.form1, 'receptCompanyName', userInfo.company.companyName || '')
+ // this.getvisit()
+ // this.getVisit1()
+ // this.getUserValid()
+ },
+ methods: {
+ openInput(type) {
+ this.inputType = type
+ this.$refs.keyboard.open()
+ },
+ setPlate(e) {
+ if (this.inputType === 1) {
+ this.form1.carNos = e
+ } else if (this.inputType === 2) {
+ this.withUserList.carNos = e
+ }
+ this.$forceUpdate()
+ this.closeInput()
+ },
+ seleteName(e) {
+ this.$set(this.form1, 'receptMemberName', e.value[0].name)
+ this.$set(this.form1, 'receptMemberId', e.value[0].id)
+ this.$set(this.form1, 'receptCompanyName', e.value[0].companyName)
+ this.showName = false
+ },
+ getUser() {
+ getVisitedMember().then(res => {
+ this.memberList = [res.data || []]
+ })
+ },
+ closeInput() {
+ this.$refs.keyboard.close()
+ },
+ submit() {
+ const { form1 } = this
+ if (!this.form1.receptMemberId)
+ return uni.showToast({
+ title: '璇烽�夋嫨鏈夋晥鐨勮璁夸汉',
+ icon: 'none'
+ })
+ if (!this.form1.starttime)
+ return uni.showToast({
+ title: '鍏ュ満鏃堕棿涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (!this.form1.endtime)
+ return uni.showToast({
+ title: '绂诲満鏃堕棿涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (!this.form1.name) return uni.showToast({
+ title: '鑱旂郴浜轰笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!this.form1.phone) return uni.showToast({
+ title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!this.form1.companyName) return uni.showToast({
+ title: '鏉ヨ鍗曚綅涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (!this.form1.carNos) return uni.showToast({
+ title: '鍏ュ洯杞﹁締涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (!this.form1.memberNum) return uni.showToast({
+ title: '闅忚溅浜烘暟涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (!this.form1.reason) return uni.showToast({
+ title: '鎷滆浜嬬敱涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ // this.form1.starttime = this.form1.starttime + ':00'
+ // this.form1.endtime = this.form1.endtime + ':00'
+ let data = JSON.parse(JSON.stringify(this.form1))
+ data.starttime = data.starttime + ':00'
+ data.endtime = data.endtime + ':00'
+ createVisit({
+ ...data,
+ type: '2',
+ openid: this.$store.state.openId
+ })
+ .then(res => {
+ if (res.code === 200) {
+ setTimeout(() => {
+ uni.showToast({
+ title: '鎻愪氦鎴愬姛',
+ icon: 'success'
+ })
+ })
+ uni.reLaunch({
+ url: `/pages/staff/index`
+ })
+ }
+ })
+ },
+ deleUser(i) {
+ this.personnel.splice(i, 1)
+ },
+ getVisit1() {
+ // 鏄惁闇�瑕佺瓟棰�
+ this.$u.api
+ .getSystemDictData({
+ dictCode: 'SYSTEM',
+ label: 'HEALTH_CARD'
+ })
+ .then(res => {
+ if (res.code === 200) {
+ this.visit = res.data.code
+ }
+ })
+ // 璧峰鏃堕棿鏃堕暱
+ this.$u.api
+ .getSystemDictData({
+ dictCode: 'VISIT_CONFIG',
+ label: 'VALIDATE_VISIT'
+ })
+ .then(res => {
+ if (res.code === 200) {
+ this.day = Number(res.data.code)
+ // console.log(nextDay('after', true, this.day))
+ }
+ })
+ },
+ submitCart() {
+ if (!this.carName)
+ return uni.showToast({
+ title: '璇疯緭鍏ヨ溅鐗屽彿鐮�',
+ icon: 'none'
+ })
+ this.cars.push(this.carName)
+ this.form1.carNos = this.cars.join(',')
+ this.carName = ''
+ this.show2 = false
+ },
+ deleCars(i) {
+ this.cars.splice(i, 1)
+ this.form1.carNos = this.cars.join(',')
+ },
+ seleMJ(i) {
+ this.columns.forEach((item, index) => {
+ if (index === i) {
+ item.active = !item.active
+ }
+ })
+ },
+ openLC() {
+ if (!this.form1.starttime)
+ return uni.showToast({
+ title: '璇峰厛閫夋嫨鍏ュ巶鏃堕棿',
+ icon: 'none'
+ })
+ this.show5 = true
+ },
+ setinDate(e) {
+ this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
+ // this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'), this.day)
+ this.maxTime = this.form1.starttime.slice(0, 11) + '23:59'
+ this.form1.endtime = ''
+ this.show4 = false
+ },
+ setoutDate(e) {
+ this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
+ this.show5 = false
+ },
+ formatTimeStamp(date) {
+ return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g, '/')}`))
+ },
+ // 琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛�
+ getUserValid() {
+ this.$u.api
+ .getSystemDictData({
+ dictCode: 'SYSTEM',
+ label: 'BEVISITED_USER_VALID'
+ })
+ .then(res => {
+ if (res.code === 200) {
+ this.verify = res.data.code
+ }
+ })
+ },
+ // 鑾峰彇鏄惁闇�瑕侀�夋嫨闂ㄧ/闂ㄧ鍒楄〃
+ getvisit() {
+ this.$u.api
+ .getSystemDictData({
+ dictCode: 'SYSTEM',
+ label: 'SELECT_DOORS_VISIT_REQUIRED'
+ })
+ .then(res => {
+ if (res.code === 200) {
+ this.accessControl = res.data.code
+ if (res.data.code === '1') {
+ this.$u.api.deviceRoleList({ type: 1 }).then(device => {
+ if (device.code === 200) {
+ if (device.data.length > 0) {
+ device.data.forEach(item => {
+ item.active = false
+ })
+ this.columns = device.data
+ }
+ }
+ })
+ }
+ }
+ })
+ }
+ }
};
</script>
<style>
page {
- background-color: #f7f7f7 !important;
+ background-color: #f7f7f7 !important;
}
.u-upload__button {
- margin: 0 !important;
+ margin: 0 !important;
}
</style>
<style lang="scss" scoped>
.visit {
- width: 100%;
- padding-top: 10rpx 0;
- .menjin {
- width: 100%;
- .respondent-title {
- width: 100%;
- height: 100rpx;
- line-height: 100rpx;
- text-align: center;
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- }
- .list {
- width: 100%;
- height: 400rpx;
- display: flex;
- flex-direction: column;
- .list_item {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- text {
- font-size: 28rpx;
- color: #000000;
- }
- image {
- width: 30rpx;
- height: 30rpx;
- }
- }
- }
- .menjin_footer {
- width: 100%;
- padding: 30rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .menjin_footer_item {
- flex: 1;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 10rpx;
- background-color: #025eef;
- color: #ffffff;
- font-size: 26rpx;
- margin-left: 30rpx;
- &:first-child {
- margin-left: 0 !important;
- }
- }
- }
- }
+ width: 100%;
+ padding-top: 10rpx 0;
+ .menjin {
+ width: 100%;
+ .respondent-title {
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ text-align: center;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ .list {
+ width: 100%;
+ height: 400rpx;
+ display: flex;
+ flex-direction: column;
+ .list_item {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ text {
+ font-size: 28rpx;
+ color: #000000;
+ }
+ image {
+ width: 30rpx;
+ height: 30rpx;
+ }
+ }
+ }
+ .menjin_footer {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .menjin_footer_item {
+ flex: 1;
+ height: 80rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10rpx;
+ background-color: #025eef;
+ color: #ffffff;
+ font-size: 26rpx;
+ margin-left: 30rpx;
+ &:first-child {
+ margin-left: 0 !important;
+ }
+ }
+ }
+ }
- .addcar {
- padding: 30rpx;
- width: 100%;
- box-sizing: border-box;
- .addcar_head {
- text-align: center;
- font-size: 32rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 500;
- color: #222222;
- }
- .addcar_ipt {
- width: 100%;
- height: 100rpx;
- line-height: 100rpx;
- text-align: center;
- background: #f7f7f7;
- border-radius: 50rpx;
- margin-top: 60rpx;
- input {
- width: 100%;
- height: 100%;
- font-size: 28rpx;
- font-weight: 400;
- color: #000000;
- text-align: center;
- }
- }
- .addcar_footer {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 60rpx;
- .t {
- background: #025eef !important;
- color: #ffffff !important;
- }
- .addcar_footer_item {
- flex: 1;
- height: 88rpx;
- line-height: 88rpx;
- font-size: 32rpx;
- font-weight: 400;
- color: #025eef;
- text-align: center;
- border-radius: 44rpx;
- border: 1rpx solid #025eef;
- margin-right: 18rpx;
- &:last-child {
- margin-right: 0 !important;
- }
- }
- }
- }
- .list {
- width: 100%;
- padding: 0 30rpx;
- box-sizing: border-box;
- background-color: #ffffff;
- .empty {
- width: 750rpx;
- height: 20rpx;
- background-color: #f7f7f7;
- margin: 0 -30rpx;
- }
- .list_item {
- width: 100%;
- // min-height: 98rpx;
- padding: 30rpx 0;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1rpx solid #e5e5e5;
+ .addcar {
+ padding: 30rpx;
+ width: 100%;
+ box-sizing: border-box;
+ .addcar_head {
+ text-align: center;
+ font-size: 32rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ }
+ .addcar_ipt {
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ text-align: center;
+ background: #f7f7f7;
+ border-radius: 50rpx;
+ margin-top: 60rpx;
+ input {
+ width: 100%;
+ height: 100%;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #000000;
+ text-align: center;
+ }
+ }
+ .addcar_footer {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 60rpx;
+ .t {
+ background: #025eef !important;
+ color: #ffffff !important;
+ }
+ .addcar_footer_item {
+ flex: 1;
+ height: 88rpx;
+ line-height: 88rpx;
+ font-size: 32rpx;
+ font-weight: 400;
+ color: #025eef;
+ text-align: center;
+ border-radius: 44rpx;
+ border: 1rpx solid #025eef;
+ margin-right: 18rpx;
+ &:last-child {
+ margin-right: 0 !important;
+ }
+ }
+ }
+ }
+ .list {
+ width: 100%;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ background-color: #ffffff;
+ .empty {
+ width: 750rpx;
+ height: 20rpx;
+ background-color: #f7f7f7;
+ margin: 0 -30rpx;
+ }
+ .list_item {
+ width: 100%;
+ // min-height: 98rpx;
+ padding: 30rpx 0;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #e5e5e5;
- .list_item_label {
- flex-shrink: 0;
- display: flex;
- align-items: center;
+ .list_item_label {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
- text {
- &:nth-child(2) {
- font-size: 30rpx;
- font-weight: 400;
- color: #222222;
- }
+ text {
+ &:nth-child(2) {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #222222;
+ }
- &:nth-child(1) {
- font-size: 30rpx;
- font-weight: 400;
- color: #e42d2d;
- }
- }
- }
+ &:nth-child(1) {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #e42d2d;
+ }
+ }
+ }
- .list_item_content {
- flex: 1;
- height: 100%;
- margin-left: 30rpx;
- display: flex;
- align-items: center;
- justify-content: flex-end;
+ .list_item_content {
+ flex: 1;
+ height: 100%;
+ margin-left: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
- text {
- font-size: 28rpx;
- font-weight: 400;
- color: #999999;
- margin-right: 6rpx;
- }
+ text {
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #999999;
+ margin-right: 6rpx;
+ }
- input {
- width: 100%;
- height: 100%;
- text-align: right;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
- }
+ input {
+ width: 100%;
+ height: 100%;
+ text-align: right;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
- .zw {
- width: 100%;
- height: calc(env(safe-area-inset-bottom) + 118rpx);
- }
+ .zw {
+ width: 100%;
+ height: calc(env(safe-area-inset-bottom) + 118rpx);
+ }
- .footer {
- width: 100%;
- padding: 0 30rpx;
- padding-bottom: env(safe-area-inset-bottom);
- box-sizing: border-box;
- position: fixed;
- left: 0;
- bottom: 68rpx;
+ .footer {
+ width: 100%;
+ padding: 0 30rpx;
+ padding-bottom: env(safe-area-inset-bottom);
+ box-sizing: border-box;
+ position: fixed;
+ left: 0;
+ bottom: 68rpx;
- .footer_btn {
- width: 100%;
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- background: #4e99a9;
- border-radius: 44rpx;
- font-size: 32rpx;
- color: #ffffff;
- }
- }
+ .footer_btn {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #4e99a9;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ color: #ffffff;
+ }
+ }
}
</style>
diff --git a/h5/pages/staffLogin/forgetPsd.vue b/h5/pages/staffLogin/forgetPsd.vue
new file mode 100644
index 0000000..f36e4e3
--- /dev/null
+++ b/h5/pages/staffLogin/forgetPsd.vue
@@ -0,0 +1,235 @@
+<template>
+ <view class="login">
+ <image class="login_bg" src="@/static/login_bg@2x.png" />
+ <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
+ <view class="login_title">瀹夋嘲鐗╂祦鏅烘収鍥尯</view>
+ <view class="login_list">
+ <view class="login_list_item">
+ <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
+ <input v-model="form.phone" maxlength="18" placeholder="璇疯緭鍏ユ墜鏈哄彿" />
+ </view>
+ <view class="login_list_item">
+ <image src="@/static/ic_captcha.png" mode="widthFix"></image>
+ <input
+ v-model="form.validCode"
+ placeholder="璇疯緭鍏ラ獙璇佺爜"
+ type="text"
+ />
+ <text class="captcha" v-if="countDown == 0" @click="initCaptcha"
+ >鑾峰彇楠岃瘉鐮�</text
+ >
+ <text class="placeholder9" v-else>{{ countDown }}</text>
+ </view>
+ <view class="login_list_item">
+ <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
+ <input
+ v-model="form.password"
+ type="password"
+ placeholder="璇疯緭鍏ユ柊瀵嗙爜"
+ />
+ </view>
+ <view class="login_list_item">
+ <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
+ <input
+ v-model="form.newPassword"
+ type="password"
+ placeholder="璇峰啀娆¤緭鍏ユ柊瀵嗙爜"
+ />
+ </view>
+ </view>
+ <view class="login_btn">
+ <view class="login_btn_n" @click="onLogin">纭淇敼</view>
+ </view>
+ <!-- -->
+ <u-popup
+ :show="isShowProtocol"
+ @close="isShowProtocol = false"
+ mode="center"
+ >
+ <view class="modal">111</view>
+ </u-popup>
+ </view>
+</template>
+
+<script>
+import { resetPassword, sendSms } from '@/api'
+export default {
+ data() {
+ return {
+ form: {
+ },
+ isShowProtocol: false,
+ countDown: 0
+ }
+ },
+
+ onLoad() {
+ },
+
+ methods: {
+ dealChange(e) {
+ console.log(e)
+ },
+ initCaptcha() {
+ if (!this.form.phone) return uni.showToast({
+ title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+ icon: 'none'
+ })
+ sendSms({ phone: this.form.phone }).then(res => {
+ this.countDown = 60
+ setInterval(() => {
+ if (this.countDown == 0) return
+ this.countDown--
+ }, 1000)
+ })
+ },
+
+ onLogin() {
+ const { form } = this
+ if (!form.phone) return uni.showToast({
+ title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!form.validCode) return uni.showToast({
+ title: '楠岃瘉鐮佷笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!form.password) return uni.showToast({
+ title: '鏂板瘑鐮佷笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!form.newPassword) return uni.showToast({
+ title: '纭瀵嗙爜涓嶈兘涓虹┖',
+ icon: 'none'
+ })
+ if (form.password != form.newPassword) return uni.showToast({
+ title: '涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�',
+ icon: 'none'
+ })
+ resetPassword({
+ ...form
+ }).then(res => {
+ if (res && res.code == 200) {
+ setTimeout(() => {
+ uni.showToast({
+ title: '瀵嗙爜淇敼鎴愬姛,璇烽噸鏂扮櫥褰�',
+ icon: 'success',
+ duration: 2000
+ })
+ })
+ uni.redirectTo({
+ url: "/pages/staffLogin/login"
+ })
+ }
+ })
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.login {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ padding-top: 160rpx;
+ box-sizing: border-box;
+ align-items: center;
+ flex-direction: column;
+ background: linear-gradient(
+ 180deg,
+ rgba(39, 155, 170, 0.2) 0%,
+ rgba(39, 155, 170, 0) 100%
+ );
+ .login_logo {
+ width: 180rpx;
+ height: 180rpx;
+ }
+ .login_bg {
+ position: absolute;
+ top: 0;
+ width: 750rpx;
+ }
+ .login_title {
+ font-size: 44rpx;
+ font-weight: 600;
+ color: #333333;
+ margin-top: 40rpx;
+ margin-bottom: 120rpx;
+ }
+ .login_list {
+ width: 100%;
+ padding: 0 60rpx;
+ box-sizing: border-box;
+ .login_list_item {
+ width: 100%;
+ border-radius: 50rpx;
+ height: 98rpx;
+ padding: 0 40rpx;
+ box-sizing: border-box;
+ background: #ffffff;
+ margin-bottom: 40rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ &:last-child {
+ margin-bottom: 0 !important;
+ }
+ image {
+ flex-shrink: 0;
+ width: 40rpx;
+ height: 40rpx;
+ }
+ .captcha {
+ color: #279baa;
+ }
+ input {
+ flex: 1;
+ height: 100%;
+ color: #666666;
+ margin-left: 24rpx;
+ border: none;
+ }
+ }
+ }
+ .login_btn {
+ width: 100%;
+ padding: 0 60rpx;
+ box-sizing: border-box;
+ margin-top: 80rpx;
+ .for_psd {
+ color: #279baa;
+ margin-top: 40rpx;
+ width: 140rpx;
+ text-align: center;
+ margin: 40rpx auto;
+ }
+ .login_btn_n {
+ width: 100%;
+ height: 98rpx;
+ background: #279baa;
+ box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #ffffff;
+ border-radius: 50rpx;
+ }
+ }
+ .deal_wrap {
+ position: absolute;
+ width: 100%;
+ left: 0;
+ text-align: center;
+ bottom: 108rpx;
+ .deal {
+ color: #279baa;
+ }
+ }
+}
+.modal {
+ padding: 32rpx;
+}
+</style>
diff --git a/h5/pages/staffLogin/login.vue b/h5/pages/staffLogin/login.vue
index bbdbe35..0e1a4bc 100644
--- a/h5/pages/staffLogin/login.vue
+++ b/h5/pages/staffLogin/login.vue
@@ -6,32 +6,51 @@
<view class="login_list">
<view class="login_list_item">
<image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
- <input
- v-model="form.account"
- maxlength="18"
- placeholder="璐﹀彿"
- />
+ <input v-model="form.username" maxlength="18" placeholder="璐﹀彿" />
</view>
<view class="login_list_item">
<image src="@/static/login_ic_password@2x.png" mode="widthFix" />
<input v-model="form.password" type="password" placeholder="瀵嗙爜" />
</view>
+ <view class="login_list_item">
+ <image src="@/static/ic_captcha.png" mode="widthFix"></image>
+ <input v-model="form.code" placeholder="楠岃瘉鐮�" type="text" />
+ <image
+ @click="initCaptcha"
+ :src="captcha.image"
+ class="captcha"
+ mode="widthFix"
+ />
+ </view>
</view>
<view class="login_btn">
<view class="login_btn_n" @click="onLogin">绔嬪嵆鐧诲綍</view>
- <view class="for_psd">蹇樿瀵嗙爜</view>
+ <view @click="$jump('/pages/staffLogin/forgetPsd')" class="for_psd"
+ >蹇樿瀵嗙爜</view
+ >
</view>
<view class="deal_wrap">
<checkbox @change="dealChange" />
<text>鐧诲綍鍗冲悓鎰�</text>
- <text class="deal">銆婂畨娉扮墿娴佺敤鎴峰崗璁��</text>
+ <text class="deal" @click="isShowProtocol = true"
+ >銆婂畨娉扮墿娴佺敤鎴峰崗璁��</text
+ >
</view>
+ <!-- -->
+ <u-popup
+ :show="isShowProtocol"
+ @close="isShowProtocol = false"
+ mode="center"
+ >
+ <view class="modal">111</view>
+ </u-popup>
</view>
</template>
<script>
-import { loginPost } from '@/api'
+import { loginPost, loginCaptcha, getUserInfo } from '@/api'
+import { mapState, mapMutations } from 'vuex'
export default {
name: 'login',
@@ -40,32 +59,55 @@
form: {
account: '',
password: '',
- }
+ },
+ isShowProtocol: false,
+ captcha: {}
}
},
- created() {
+ onLoad() {
+ this.initCaptcha()
},
methods: {
+ ...mapMutations(["setToken", "setUserInfo"]),
dealChange(e) {
console.log(e)
},
+ initCaptcha() {
+ loginCaptcha().then(res => {
+ this.captcha = res.data
+ })
+ },
+
onLogin() {
const { form } = this
- if (!form.account) return uni.showToast({
- title: '璐﹀彿鍚庝笉鑳戒负绌�',
+ if (!form.username) return uni.showToast({
+ title: '璐﹀彿涓嶈兘涓虹┖',
icon: 'none'
})
if (!form.password) return uni.showToast({
title: '瀵嗙爜涓嶈兘涓虹┖',
icon: 'none'
})
+ if (!form.code) return uni.showToast({
+ title: '楠岃瘉鐮佷笉鑳戒负绌�',
+ icon: 'none'
+ })
loginPost({
...form,
+ uuid: this.captcha.uuid,
openId: this.$store.state.openId
}).then(res => {
- console.log('res', res);
+ if (res.code === 200) {
+ this.setToken(res.data)
+ getUserInfo().then(ress => {
+ this.setUserInfo(ress.data)
+ uni.redirectTo({
+ url: "/pages/staff/index"
+ })
+ })
+ }
})
}
}
@@ -125,6 +167,9 @@
width: 40rpx;
height: 40rpx;
}
+ .captcha {
+ width: 200rpx;
+ }
input {
flex: 1;
height: 100%;
@@ -171,4 +216,7 @@
}
}
}
+.modal {
+ padding: 32rpx;
+}
</style>
diff --git a/h5/static/ic_captcha.png b/h5/static/ic_captcha.png
new file mode 100644
index 0000000..1b79b33
--- /dev/null
+++ b/h5/static/ic_captcha.png
Binary files differ
diff --git a/h5/store/index.js b/h5/store/index.js
index bd9028ab..14e586d 100644
--- a/h5/store/index.js
+++ b/h5/store/index.js
@@ -72,7 +72,7 @@
// 娓呯┖鎵�鏈夌紦瀛�
empty(state) {
state.token = ''
- state.userInfo = ''
+ state.userInfo = {}
uni.removeStorageSync('userInfo')
uni.removeStorageSync('token')
}
diff --git a/h5/utils/service.js b/h5/utils/service.js
index bcc3d22..b26180f 100644
--- a/h5/utils/service.js
+++ b/h5/utils/service.js
@@ -2,7 +2,7 @@
export const http = function (options) {
{
return new Promise((resolve, reject) => {
- let token = uni.getStorageSync('token')
+ let token = uni.getStorageSync('token') || ''
// 鍦ㄧ櫥褰曠殑鏃跺�欓渶瑕佸偍瀛� token uni.setStorageSync("authorization","杩欓噷鏄櫥褰曡幏鍙栫殑token鍊�")
// uni.showLoading({
@@ -18,7 +18,7 @@
method: options.method || 'GET',
header: options.header || {
// 鏍规嵁瀹為檯鎺ュ彛璁捐 key 鍙� token 鎴栬�� authorization
- token: token,
+ dm_user_token: token,
"content-type": 'application/json'
},
success: (res) => {
@@ -28,8 +28,8 @@
// 鐧诲綍杩囨湡
if (data.code === 401) {
uni.navigateTo({
- url: '/packageA/loginAgain/loginAgain'
- })
+ url: '/pages/staffLogin/login'
+ });
}
if (data.code !== 200) {
uni.showToast({
@@ -46,6 +46,7 @@
uni.showToast({
title: '璇锋眰鎺ュ彛澶辫触'
})
+
// 杩斿洖閿欒娑堟伅
reject(err)
uni.hideLoading()
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index ba52072..6ba808c 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -417,9 +417,35 @@
int cityUseCar = 3;//甯傚唴鐢ㄨ溅
int unCityUseCar = 4;//甯傚鐢ㄨ溅
int logisticsCarUse = 5;//鐗╂祦杞﹂绾�
+}
+
+
+
+public static Integer approveTypeToNoticeType(Integer approveType){
+ if(Constants.equalsInteger(approveType,Constants.approveObjectType.unConstructionVisit)
+ ||Constants.equalsInteger(approveType,Constants.approveObjectType.constructionVisit)){
+ return Constants.noticesObjectType.visit;
+ }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.visitReporting)){
+ return Constants.noticesObjectType.visitReporting;
+ }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.cityUseCar)
+ ||Constants.equalsInteger(approveType,Constants.approveObjectType.unCityUseCar)){
+ return Constants.noticesObjectType.useCar;
+ }else {
+ return Constants.noticesObjectType.system;
+ }
}
+
+
+ public interface noticesObjectType{
+ int visit = 0;//璁垮鐢宠
+ int visitReporting = 1;//璁垮鎶ュ
+ int useCar = 2;//鐢ㄨ溅鐢宠
+ int dangerDeal = 3;//闅愭偅澶勭悊
+ int logisticsCarUse = 4;//鐗╂祦杞﹀鎵�
+ int system = 5;//绯荤粺娑堟伅
+}
public interface approveStatus{
@@ -427,8 +453,8 @@
int auditIng = 1;//瀹℃壒涓�
int pass = 2;//瀹℃壒閫氳繃
int unPass = 3;//瀹℃壒鏈�氳繃
- int otherDeal = 4;//浠栦汉宸插鐞�
- int cancel = 5;//宸插彇娑�
+ int cancel = 4;//宸插彇娑�
+ int otherDeal = 5;//浠栦汉宸插鐞�
int otherUnPass = 6;//浠栦汉鎷掔粷
}
@@ -569,6 +595,8 @@
return reqJson;
}
+
+
public enum NoticeType {
ZERO(0, "寰呭鏍�","","","寰呭鏍�","寰呭鐞�","澶勭悊涓�"),
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
index e76940e..7f25314 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -961,105 +961,6 @@
}
}
- /**
- * 灏嗘寚瀹氭牸寮忕殑瀛楃涓茶浆鎹负鏃ユ湡鍨�
- *
- * @param strDate
- * - 鏃ユ湡
- * @param oracleFormat
- * --oracle鍨嬫棩鏈熸牸寮�
- * @return 杞崲寰楀埌鐨勬棩鏈�
- */
- @SuppressWarnings("unchecked")
- public static Date stringToDate(String strDate, String oracleFormat) {
- if (strDate == null)
- return null;
- Hashtable<Integer, String> h = new Hashtable<Integer, String>();
- String javaFormat = new String();
- String s = oracleFormat.toLowerCase();
- if (s.indexOf("yyyy") != -1)
- h.put(new Integer(s.indexOf("yyyy")), "yyyy");
- else if (s.indexOf("yy") != -1)
- h.put(new Integer(s.indexOf("yy")), "yy");
- if (s.indexOf("mm") != -1)
- h.put(new Integer(s.indexOf("mm")), "MM");
-
- if (s.indexOf("dd") != -1)
- h.put(new Integer(s.indexOf("dd")), "dd");
- if (s.indexOf("hh24") != -1)
- h.put(new Integer(s.indexOf("hh24")), "HH");
- if (s.indexOf("mi") != -1)
- h.put(new Integer(s.indexOf("mi")), "mm");
- if (s.indexOf("ss") != -1)
- h.put(new Integer(s.indexOf("ss")), "ss");
-
- int intStart = 0;
- while (s.indexOf("-", intStart) != -1) {
- intStart = s.indexOf("-", intStart);
- h.put(new Integer(intStart), "-");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf("/", intStart) != -1) {
- intStart = s.indexOf("/", intStart);
- h.put(new Integer(intStart), "/");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf(" ", intStart) != -1) {
- intStart = s.indexOf(" ", intStart);
- h.put(new Integer(intStart), " ");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf(":", intStart) != -1) {
- intStart = s.indexOf(":", intStart);
- h.put(new Integer(intStart), ":");
- intStart++;
- }
-
- if (s.indexOf("骞�") != -1)
- h.put(new Integer(s.indexOf("骞�")), "骞�");
- if (s.indexOf("鏈�") != -1)
- h.put(new Integer(s.indexOf("鏈�")), "鏈�");
- if (s.indexOf("鏃�") != -1)
- h.put(new Integer(s.indexOf("鏃�")), "鏃�");
- if (s.indexOf("鏃�") != -1)
- h.put(new Integer(s.indexOf("鏃�")), "鏃�");
- if (s.indexOf("鍒�") != -1)
- h.put(new Integer(s.indexOf("鍒�")), "鍒�");
- if (s.indexOf("绉�") != -1)
- h.put(new Integer(s.indexOf("绉�")), "绉�");
-
- int i = 0;
- while (h.size() != 0) {
- Enumeration e = h.keys();
- int n = 0;
- while (e.hasMoreElements()) {
- i = ((Integer) e.nextElement()).intValue();
- if (i >= n)
- n = i;
- }
- String temp = (String) h.get(new Integer(n));
- h.remove(new Integer(n));
-
- javaFormat = temp + javaFormat;
- }
- SimpleDateFormat df = new SimpleDateFormat(javaFormat);
-
- Date myDate = new Date();
- try {
- myDate = df.parse(strDate);
- } catch (Exception e) {
- // e.printStackTrace();
- return null;
- }
-
- return myDate;
- }
public static Date StringToDate(String DATE1) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java b/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
index b0be2e5..2b76c44 100644
--- a/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
+++ b/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
@@ -59,7 +59,7 @@
@ExcelColumn(name="鏍囬")
private String title;
- @ApiModelProperty(value = "绠�浠�")
+ @ApiModelProperty(value = "绠�浠�",notes = "灞曠ず鐘舵�佹弿杩� 鏍规嵁param2 璁剧疆")
@ExcelColumn(name="绠�浠�")
private String info;
@@ -88,11 +88,11 @@
private String typeDetail;
- @ApiModelProperty(value = "鍏宠仈鍙傛暟1")
+ @ApiModelProperty(value = "鍏宠仈鍙傛暟1" ,notes = "瀛樺偍 娑堟伅灞曠ずJSON ")
@ExcelColumn(name="鍏宠仈鍙傛暟1")
private String param1;
- @ApiModelProperty(value = "鍏宠仈鍙傛暟2")
+ @ApiModelProperty(value = "鍏宠仈鍙傛暟2",notes = "鐢ㄤ簬瀛樺偍 涓氬姟鐘舵�佷俊鎭� 0 =寰呭鐞�;1=宸插悓鎰�/宸插鐞�;2=宸叉嫆缁�/宸查��鍥�;3=宸茶浆浜�;4=宸叉挙閿�")
@ExcelColumn(name="鍏宠仈鍙傛暟2")
private String param2;
@@ -128,6 +128,10 @@
@ExcelColumn(name="鐘舵�� 0姝e父 1宸插叧闂� ")
private Integer status;
+ @ApiModelProperty(value = "鏄惁鎶勯�� 0涓嶆槸 1鏄�", example = "1")
+ @ExcelColumn(name="鏄惁鎶勯�� 0涓嶆槸 1鏄�")
+ private Integer sendacopy;
+
@ApiModelProperty(value = "鏄惁宸茶 0鏈 1宸茶", example = "1")
@ExcelColumn(name="鏄惁宸茶 0鏈 1宸茶")
private Integer readed;
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/CarUseBookController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/CarUseBookController.java
index 9737e6e..e3ce650 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/CarUseBookController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/CarUseBookController.java
@@ -31,7 +31,7 @@
@ApiOperation("鏂板缓")
@PostMapping("/create")
@RequiresPermissions("business:carusebook:create")
- public ApiResponse create(@RequestBody CarUseBook carUseBook) {
+ public ApiResponse create(@RequestBody CarUseBook carUseBook) throws Exception {
return ApiResponse.success(carUseBookService.create(carUseBook));
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/CarUseBookCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/CarUseBookCloudController.java
index 7e5ce04..c0f201a 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/CarUseBookCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/CarUseBookCloudController.java
@@ -36,7 +36,7 @@
@ApiOperation("鏂板缓")
@PostMapping("/create")
@CloudRequiredPermission("business:carusebook:create")
- public ApiResponse create(@RequestBody CarUseBook carUseBook,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ public ApiResponse create(@RequestBody CarUseBook carUseBook,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) throws Exception {
LoginUserInfo loginUserInfo = getLoginUser(token);
carUseBook.setCreator(loginUserInfo.getId());
carUseBook.setMemberId(loginUserInfo.getMemberId());
@@ -90,7 +90,7 @@
@ApiOperation("鏌ヨ杞﹁締棰勭害璁板綍")
@PostMapping("/carUseBookList")
- public ApiResponse<List<CarUseBook>> carUseBookList (@RequestBody CarUseBook carUseBook, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ public ApiResponse<List<CarUseBook>> carUseBookList (@RequestBody CarUseBook carUseBook, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) throws Exception {
return ApiResponse.success(carUseBookService.carUseBookList(carUseBook));
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java
index ceb9bf9..7285243 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java
@@ -1,11 +1,13 @@
package com.doumee.cloud.admin;
import com.doumee.api.BaseController;
+import com.doumee.biz.system.SystemUserBiz;
import com.doumee.config.DataSyncConfig;
import com.doumee.config.annotation.CloudRequiredPermission;
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
@@ -17,12 +19,14 @@
import com.doumee.dao.business.dto.ResetPasswordDTO;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.model.MemberRole;
+import com.doumee.dao.system.dto.UpdatePwdDto;
import com.doumee.service.business.MemberService;
import com.doumee.service.business.ext.ERPSyncService;
import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl;
import io.swagger.annotations.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -48,6 +52,8 @@
@Autowired
private MemberService memberService;
+ @Autowired
+ private SystemUserBiz systemUserBiz;
@PreventRepeat
@ApiOperation("鏂板缓")
@PostMapping("/create")
@@ -345,5 +351,13 @@
+ @Trace(withRequestParameters = false)
+ @ApiOperation("淇敼褰撳墠鐢ㄦ埛瀵嗙爜")
+ @PostMapping("/updatePwd")
+ public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) {
+ dto.setUserId(this.getLoginUser(token).getId());
+ systemUserBiz.updatePwd(dto);
+ return ApiResponse.success(null);
+ }
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/VisitsCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/VisitsCloudController.java
index c7edc30..1b048b2 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/VisitsCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/VisitsCloudController.java
@@ -127,6 +127,7 @@
@PostMapping("/createVisit")
public ApiResponse createVisit(@RequestBody Visits visits,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
visits.setMemberId(getLoginUser(token).getMemberId());
+ visits.setReceptMemberId(visits.getMemberId());
return ApiResponse.success("鏌ヨ鎴愬姛", visitsService.visitReporting(visits));
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Approve.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Approve.java
index c1e8b50..0c89c3b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Approve.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Approve.java
@@ -84,6 +84,9 @@
@ExcelColumn(name="瀹℃壒浜�")
private String cheorId;
+ @ApiModelProperty(value = "瀹℃壒鏃堕棿")
+ private Date checkDate;
+
@ApiModelProperty(value = "瀹℃壒浜哄鍚�")
@ExcelColumn(name="瀹℃壒浜哄鍚�")
private String checkorName;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/MemberVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/MemberVO.java
index c849bf6..7fd0d1c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/MemberVO.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/MemberVO.java
@@ -26,9 +26,12 @@
@ApiModelProperty(value = "鎵�灞炵粍缁囩紪鐮�(鍏宠仈company琛�)", example = "1")
private Integer companyId;
- @ApiModelProperty(value = "璁垮鍚嶇О")
+ @ApiModelProperty(value = "琚闂汉鍚嶇О")
private String name;
+ @ApiModelProperty(value = "琚闂汉閮ㄩ棬")
+ private String companyName;
+
@ApiModelProperty(value = "鎵嬫満鍙�")
private String phone;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/CarUseBookService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/CarUseBookService.java
index c6532b5..de88795 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/CarUseBookService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/CarUseBookService.java
@@ -21,7 +21,7 @@
* @param carUseBook 瀹炰綋瀵硅薄
* @return Integer
*/
- Integer create(CarUseBook carUseBook);
+ Integer create(CarUseBook carUseBook) throws Exception ;
/**
* 涓婚敭鍒犻櫎
@@ -100,7 +100,7 @@
long count(CarUseBook carUseBook);
- List<CarUseBook> carUseBookList(CarUseBook carUseBook);
+ List<CarUseBook> carUseBookList(CarUseBook carUseBook) throws Exception ;
List<DateIntervalVO> checkDateUse(Integer cars, String dateDay);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
index b1a219e..43286ff 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -1,18 +1,24 @@
package com.doumee.service.business.impl;
+import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dao.CompanyMapper;
import com.doumee.dao.business.dto.ApproveDTO;
import com.doumee.dao.business.join.ApproveJoinMapper;
+import com.doumee.dao.business.join.CarUseBookJoinMapper;
+import com.doumee.dao.business.join.VisitsJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.ApproveDataVO;
+import com.doumee.dao.system.join.NoticesJoinMapper;
+import com.doumee.dao.system.model.Notices;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.web.response.InternalHomeVO;
import com.doumee.service.business.ApproveService;
@@ -23,6 +29,7 @@
import com.doumee.service.system.NoticesService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.apache.xpath.operations.Bool;
import org.springframework.beans.factory.annotation.Autowired;
@@ -69,6 +76,16 @@
@Autowired
private VisitsMapper visitsMapper;
+
+ @Autowired
+ private VisitsJoinMapper visitsJoinMapper;
+
+ @Autowired
+ private CarUseBookJoinMapper carUseBookJoinMapper;
+ @Autowired
+ private NoticesJoinMapper noticesJoinMapper;
+
+
@Override
public Integer create(Approve approve) {
@@ -295,11 +312,33 @@
for (int i = 0; i < approveParamList.size(); i++) {
ApproveParam approveParam = approveParamList.get(i);
List<Integer> ids = this.getApproveUserIds(approveParam,createMember);
- //鐢熸垚寰呭姙 notices 琛ㄦ暟鎹�
- if(i==0){
-
- }
- for (Integer memberId:ids) {
+ Integer noticeType = Constants.approveTypeToNoticeType(approveTempl.getType());
+ String title = "銆愯瀹㈢敵璇枫�戠敵璇蜂汉 - ";
+ Map<String,Object> jsonMap = new HashMap<>();
+ for (int j = 0; j < ids.size(); j++) {
+ Integer memberId = ids.get(j);
+ //鐢熸垚寰呭姙 notices 琛ㄦ暟鎹�
+ if(i==0){
+ if(jsonMap.isEmpty()){
+ title = this.createNoticesData(noticeType,businessId,title,jsonMap);
+ }
+ Notices notices = new Notices();
+ notices.setCreateDate(new Date());
+ notices.setIsdeleted(Constants.ZERO);
+ notices.setObjId(businessId);
+ notices.setObjType(noticeType);
+ notices.setType(noticeType);
+ notices.setTitle(title);
+ notices.setParam1(JSONObject.toJSONString(jsonMap));
+ notices.setUserId(memberId);
+ notices.setPalt(Constants.ZERO);
+ notices.setStatus(Constants.ZERO);
+ notices.setReaded(Constants.ZERO);
+ notices.setSendacopy(Constants.ZERO);
+ notices.setParam2("0");
+ notices.setInfo("寰呭鐞�");
+ noticesJoinMapper.insert(notices);
+ }
Approve approve = new Approve();
approve.setRemark(approveParam.getRemark());
approve.setCreateDate(new Date());
@@ -319,6 +358,61 @@
approveList.add(approve);
}
}
+ }
+
+
+
+ public String createNoticesData(Integer noticeType,Integer businessId,String title,Map<String,Object> jsonMap){
+ jsonMap.clear();
+ if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)
+ || Constants.equalsInteger(noticeType,Constants.noticesObjectType.visitReporting)){
+ //璁垮璁板綍涓庤瀹㈡姤澶�
+ Visits visits = visitsJoinMapper.selectJoinOne(Visits.class,
+ new MPJLambdaWrapper<Visits>().selectAll(Visits.class)
+ .selectAs(Member::getName,Visits::getReceptMemberName)
+ .selectAs(Company::getName,Visits::getReceptMemberDepartment)
+ .leftJoin(Member.class,Member::getId,Visits::getReceptMemberId)
+ .leftJoin(Company.class,Company::getId,Member::getCompanyId)
+ .eq(Visits::getId,businessId)
+ .last(" limit 1 ")
+ );
+ if(Objects.isNull(visits)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏈煡璇㈠埌涓氬姟鏁版嵁淇℃伅");
+ }
+ if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)){
+ title = title + visits.getName();
+ }else{
+ title = "銆愯瀹㈡姤澶囥�戠敵璇蜂汉 - " + visits.getName();
+ }
+ jsonMap.put("name", "璁块棶浜�:" + visits.getCompanyName() + " - " + visits.getReceptMemberName());
+ jsonMap.put("sTime", "鍏ュ洯鏃堕棿:" + DateUtil.DateToStr(visits.getStarttime() , "yyyy-MM-dd HH:mm"));
+ jsonMap.put("eTime", "绂诲洯鏃堕棿:" + DateUtil.DateToStr(visits.getEndtime() , "yyyy-MM-dd HH:mm"));
+ jsonMap.put("reason", StringUtils.isBlank(visits.getReason())?"鏉ヨ浜嬬敱: - ": "鏉ヨ浜嬬敱:" +visits.getReason());
+ jsonMap.put("carNos", StringUtils.isBlank(visits.getCarNos())?"闅忚杞﹁締: - ": "闅忚杞﹁締:" +visits.getCarNos());
+ }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.useCar)){
+ //鐢ㄨ溅鐢宠
+ CarUseBook carUseBook = carUseBookJoinMapper.selectJoinOne(CarUseBook.class,
+ new MPJLambdaWrapper<CarUseBook>().selectAll(CarUseBook.class)
+ .selectAs(Member::getName,CarUseBook::getMemberName)
+ .selectAs(Company::getName,CarUseBook::getCompanyName)
+ .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId)
+ .leftJoin(Company.class,Company::getId,Member::getCompanyId)
+ .eq(CarUseBook::getId,businessId)
+ .last(" limit 1 ")
+ );
+ if(Objects.isNull(carUseBook)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏈煡璇㈠埌涓氬姟鏁版嵁淇℃伅");
+ }
+ title = "銆愮敤杞︾敵璇枫�戠敵璇蜂汉 - " + carUseBook.getMemberName();
+ jsonMap.put("name", "鐢宠浜�:" + carUseBook.getCompanyName() + " - " + carUseBook.getMemberName());
+ jsonMap.put("sTime", "寮�濮嬫椂闂�:" + DateUtil.DateToStr(carUseBook.getStartTime() , "yyyy-MM-dd HH:mm"));
+ jsonMap.put("eTime", "缁撴潫鏃堕棿:" + DateUtil.DateToStr(carUseBook.getEndTime() , "yyyy-MM-dd HH:mm"));
+ jsonMap.put("usrNum", StringUtils.isBlank(carUseBook.getMemberIds())?"涔樿溅浜烘暟: 0浜�": "涔樿溅浜烘暟: " +carUseBook.getMemberIds().split(",").length +"浜�");
+ jsonMap.put("mdd", StringUtils.isBlank(carUseBook.getAddr())?"鐩殑鍦�: - ": "鐩殑鍦�:" +carUseBook.getAddr());
+ }else {
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED);
+ }
+ return title;
}
@@ -441,13 +535,20 @@
return auditCompany;
}
- public ApproveDataVO arrangeApprovedDataNew(Integer businessId, Integer businessType, Integer memberId){
+ @Override
+ public ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId){
ApproveDataVO approveDateVO = new ApproveDataVO();
approveDateVO.setApproveList(new ArrayList<>());
approveDateVO.setCanBeApproved(Constants.ZERO);
List<Approve> approveGroupList = approveJoinMapper.selectJoinList(Approve.class,
new MPJLambdaWrapper<Approve>().
selectAll(Approve.class)
+ .selectAs(Member::getName,Approve::getMemberName)
+ .selectAs(Member::getPhone,Approve::getMemberPhone)
+ .selectAs(Member::getFaceImg,Approve::getFaceImg)
+ .selectAs(Company::getCompanyNamePath,Approve::getCompanyName)
+ .leftJoin(Member.class,Member::getId,Approve::getChekorId)
+ .leftJoin(Company.class,Company::getId,Member::getCompanyId)
.eq(Approve::getIsdeleted,Constants.ZERO)
.eq(Approve::getObjId,businessId)
.eq(Approve::getObjType,businessType)
@@ -455,7 +556,8 @@
);
//鏌ユ壘鍏ㄩ儴levelList
- List<Approve> levelList = getLevelListFromResult(approveGroupList);
+ List<Approve> levelList = getLevelListFromResult(approveGroupList,approveDateVO,memberId);
+ List<Approve> copyList = getAllCopyList(approveGroupList);
//閬嶅巻level鏌ヨ姣忎竴绾у埆涓氬姟鏁版嵁
for(Approve level:levelList){
List<Approve> tlist = getLevelInfoFromList(level,approveGroupList);
@@ -466,7 +568,27 @@
break;
}
}
+
+ //澶勭悊鎶勯�佽褰�
+ if (CollectionUtils.isNotEmpty(copyList)) {
+ Approve waitModel = new Approve();
+ waitModel.setApproveType(Constants.ONE);
+ waitModel.setStatusInfo("鎶勯��");
+ waitModel.setStatus(Constants.ONE);
+ waitModel.setType(Constants.ONE);
+ waitModel.setApproveList(copyList);
+ approveDateVO.getApproveList().add(waitModel);
+ }
+
return approveDateVO;
+ }
+
+ private List<Approve> getAllCopyList(List<Approve> approveGroupList) {
+ List<Approve> copyList = new ArrayList<>();
+ if (CollectionUtils.isNotEmpty(approveGroupList)) {
+ copyList.addAll(approveGroupList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()));
+ }
+ return copyList;
}
private List<Approve> getLevelInfoFromList(Approve level,List<Approve> approveGroupList) {
@@ -481,8 +603,9 @@
Approve refuseModel = new Approve();//宸叉嫆缁濈殑璁板綍
List<Approve> waitList = new ArrayList<>(); //鏌ヨ鍏ㄩ儴鏈鐞嗙殑闆嗗悎
List<Approve> otherPassList = new ArrayList<>();//浠栦汉宸插鐞嗙殑璁板綍闆�
- dealGroupListBiz(level,passList,refuseModel,waitList,otherPassList);
- if(refuseModel !=null){
+ List<Approve> levelApprove = approveGroupList.stream().filter(i->Constants.equalsInteger(i.getLevel(),level.getLevel())).collect(Collectors.toList());
+ dealGroupListBiz(level,levelApprove,approveGroupList,passList,refuseModel,waitList,otherPassList);
+ if(Objects.nonNull(refuseModel) && Objects.nonNull(refuseModel.getId())){
//瀛樺湪鎷掔粷鐨勶紝鍙渶瑕佽繑鍥炰竴鏉″鐞嗘暟鎹紝鍚庣画涓嶉渶瑕佸洖鏄�
list.add(refuseModel);
return list;
@@ -494,20 +617,34 @@
Approve waitModel = new Approve();
waitModel.setApproveType(Constants.ONE);
waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"瀹℃壒浜�")+"澶勭悊涓�");
- waitModel.setStatus(Constants.ONE);
+ waitModel.setStatus(Constants.equalsInteger(waitList.get(Constants.ZERO).getStatus(),Constants.ONE)?Constants.ONE:Constants.ZERO);
waitModel.setApproveList(waitList);
list.add(waitModel);
}
}else {
- //濡傛灉鏄垨绛�
- if(otherPassList.size()>0){
+ if((waitList.size()> 0 || otherPassList.size()>0)){
Approve waitModel = new Approve();
waitModel.setApproveType(Constants.ONE);
- waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"瀹℃壒浜�")+"锛堟妱閫佹垨绛惧鎵逛汉锛�");
- waitModel.setStatus(Constants.ONE);
- waitModel.setApproveList(otherPassList);
+ waitModel.setStatusInfo(passList.size()<=0?StringUtils.defaultString(level.getTitle(),"瀹℃壒浜�"):"鎶勯�佹垨绛惧鎵逛汉");
+ waitModel.setStatus(passList.size()>0?Constants.ONE:Constants.ZERO);
+ List<Approve> approveList = new ArrayList<>();
+ approveList.addAll(waitList);
+ //濡傛灉鏄垨绛�
+ if(passList.size()>0){
+ approveList.addAll(otherPassList);
+ }
+ waitModel.setApproveList(approveList);
list.add(waitModel);
}
+ //濡傛灉鏄垨绛�
+// if(otherPassList.size()>0){
+// Approve waitModel = new Approve();
+// waitModel.setApproveType(Constants.ONE);
+// waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"瀹℃壒浜�")+"锛堟妱閫佹垨绛惧鎵逛汉锛�");
+// waitModel.setStatus(Constants.ONE);
+// waitModel.setApproveList(otherPassList);
+// list.add(waitModel);
+// }
}
@@ -515,22 +652,65 @@
}
- private void dealGroupListBiz(Approve level, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) {
-
- //TODO----------rk
+ private void dealGroupListBiz(Approve level, List<Approve> levelApprove,List<Approve> approveGroupList, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) {
+ //鏌ヨ鏄惁瀛樺湪鎷掔粷鏁版嵁
+ for (Approve approve:levelApprove) {
+ if(Constants.equalsInteger(Constants.approveStatus.pass,approve.getStatus())){
+ passList.add(approve);
+ }else if(Constants.equalsInteger(Constants.approveStatus.otherDeal,approve.getStatus())){
+ otherPassList.add(approve);
+ }else if(Constants.equalsInteger(Constants.approveStatus.auditIng,approve.getStatus())||Constants.equalsInteger(Constants.approveStatus.wait,approve.getStatus())){
+ waitList.add(approve);
+ }else if(Constants.equalsInteger(Constants.approveStatus.unPass,approve.getStatus())){
+ refuseModel = approve;
+ }
+ }
}
private List<Approve> sortByCreateTime(List<Approve> passList) {
- //TODO----------rk
-
+ Collections.sort(passList, (a, b) -> a.getCheckDate().compareTo(b.getCheckDate()));
return passList;
}
- private List<Approve> getLevelListFromResult(List<Approve> approveGroupList) {
- //TODO----------rk
- return null;
+ private List<Approve> getLevelListFromResult(List<Approve> approveGroupList,ApproveDataVO approveDataVO,Integer memberId) {
+ approveDataVO.setCanBeApproved(Constants.ZERO);
+ approveDataVO.setDriverParam(Constants.ZERO);
+ List<Approve> approveList = new ArrayList<>();
+ String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()
+ +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode();
+ for (Approve approve:approveGroupList) {
+ if(StringUtils.isNotBlank(approve.getFaceImg())){
+ approve.setFaceImg(path + approve.getFaceImg());
+ }
+ if(Constants.equalsInteger(approve.getType(),Constants.ONE)){
+ continue;
+ }
+ if(Constants.equalsInteger(approve.getChekorId(),memberId)){
+ approveDataVO.setCanBeApproved(Constants.ONE);
+ approveDataVO.setDriverParam(approve.getDriverParam());
+ }
+ if(notExsits(approveList,approve.getLevel())){
+ approveList.add(approve);
+ }
+ }
+
+ if(CollectionUtils.isEmpty(approveList)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀹℃壒淇℃伅锛氱骇鍒暟鎹紓甯�");
+ }
+
+ return approveList;
}
+
+ private boolean notExsits(List<Approve> approveList, Integer level) {
+ for (Approve approve:approveList) {
+ if(Constants.equalsInteger(approve.getLevel(),level)){
+ return false;
+ }
+ }
+ return true;
+ }
+
/**
* 鏁寸悊 瀹℃壒鏁版嵁
@@ -538,18 +718,18 @@
* @param businessType
* @return
*/
- @Override
- public ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId){
+// @Override
+ public ApproveDataVO arrangeApprovedDataOld(Integer businessId, Integer businessType, Integer memberId){
ApproveDataVO approveDateVO = new ApproveDataVO();
approveDateVO.setCanBeApproved(Constants.ZERO);
List<Approve> approveGroupList = approveJoinMapper.selectJoinList(Approve.class,
new MPJLambdaWrapper<Approve>().
- select(Approve::getLevel,Approve::getType)
+ select(Approve::getLevel,Approve::getType,Approve::getTitle,Approve::getApproveType)
.eq(Approve::getIsdeleted,Constants.ZERO)
.eq(Approve::getObjId,businessId)
.isNotNull(Approve::getLevel)
.eq(Approve::getObjType,businessType)
- .groupBy(Approve::getLevel,Approve::getType)
+ .groupBy(Approve::getLevel,Approve::getType,Approve::getTitle,Approve::getApproveType)
);
if(CollectionUtils.isEmpty(approveGroupList)){
return approveDateVO;
@@ -673,6 +853,7 @@
approve.setCheckInfo(approveDTO.getCheckInfo());
approve.setCheorId(approveDTO.getLoginUserInfo().getMemberId().toString());
approve.setCheckorName(approve.getLoginUserInfo().getRealname());
+ approve.setCheckDate(new Date());
approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"瀹℃壒閫氳繃":approveDTO.getCheckInfo());
Visits visits = new Visits();
CarUseBook carUseBook = new CarUseBook();
@@ -704,16 +885,18 @@
.ne(Approve::getId,approve.getId()));
}else{
//澶勭悊鍏朵粬涓氬姟鏁版嵁
- if(approve.getApproveType().equals(Constants.ZERO)&&approve.getIsEndCheck()==Constants.ONE){
- //鎴栫 涓� 缁堝
+ if((approve.getApproveType().equals(Constants.ZERO)
+ || approve.getApproveType().equals(Constants.TWO)) &&approve.getIsEndCheck()==Constants.ONE){
+ //鎴栫 / 鍗曚汉瀹� 涓� 缁堝
approveJoinMapper.update(null,new UpdateWrapper<Approve>()
.lambda()
.set(Approve::getStatus,Constants.approveStatus.otherDeal)
.in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList())));
dealBusinessBean = true;
- }else if(approve.getApproveType().equals(Constants.ZERO)&&approve.getIsEndCheck()!=Constants.ONE){
- //鎴栫 闈炵粓瀹� 鍒欏紑鍚笅涓�姝ヤ笟鍔℃祦绋�
+ }else if((approve.getApproveType().equals(Constants.ZERO)
+ || approve.getApproveType().equals(Constants.TWO)) &&approve.getIsEndCheck()!=Constants.ONE){
+ //鎴栫 / 鍗曚汉瀹� 闈炵粓瀹� 鍒欏紑鍚笅涓�姝ヤ笟鍔℃祦绋�
/**澶勭悊鏈骇鏁版嵁**/
approveJoinMapper.update(null,new UpdateWrapper<Approve>()
.lambda()
@@ -728,7 +911,7 @@
.eq(Approve::getObjType,approve.getObjType())
.eq(Approve::getLevel,(approve.getLevel()+1))
);
-
+ //TODO 鏇存柊娑堟伅鏁版嵁 鍙戦�佷笅涓�绾ф暟鎹秷鎭�
}else if(approve.getApproveType().equals(Constants.ONE)&&approve.getIsEndCheck()==Constants.ONE){
//浼氱 涓旂粓瀹�
if(approveList.size()==Constants.ZERO){
@@ -749,8 +932,6 @@
//TODO 瀹℃壒鏈�氳繃閫氱煡
}
-
-
}else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals(
Constants.approveObjectType.unCityUseCar)){
// 甯傚唴澶栫敤杞︾敵璇�
@@ -762,14 +943,73 @@
//TODO 瀹℃壒鏈�氳繃閫氱煡
}
-
-
}else if(approveDTO.getObjType().equals(Constants.approveObjectType.logisticsCarUse)){
//TODO 鐗╂祦杞﹂绾�
}
}
+ public void passNextNotices(Boolean dealBusinessBean,Approve approve){
+ //鏍规嵁瀹℃壒璁板綍鏌ヨ 閫氱煡璁板綍
+ Integer noticeType = Constants.approveTypeToNoticeType(approve.getObjType());
+ Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda()
+ .eq(Notices::getObjId,approve.getObjId())
+ .eq(Notices::getObjType,noticeType)
+ .eq(Notices::getUserId,approve.getChekorId())
+ .eq(Notices::getSendacopy,Constants.ZERO)
+ .eq(Notices::getIsdeleted,Constants.ZERO)
+ );
+ if(Objects.isNull(notices)){
+ return;
+ }
+
+
+ if(Constants.equalsInteger(approve.getApproveType(),Constants.ZERO)){
+ //鎴栫
+ //1銆佷慨鏀硅嚜宸辩殑鏁版嵁璁板綍
+
+ //2銆佹洿鏂颁粬浜虹殑鍚岀骇璁板綍 涓烘妱閫�
+
+ //3銆佸鏋滀笉鏄粓瀹$敓鎴愪笅涓�绾х殑鏁版嵁璁板綍
+
+
+ }else if(Constants.equalsInteger(approve.getApproveType(),Constants.ONE)){
+ //浼氱
+ //1銆佷慨鏀硅嚜宸辩殑鏁版嵁璁板綍
+
+ //2銆佹牴鎹槸鍚︿负鏈�鍚庝竴浣嶅鎵逛汉 濡傛灉涓嶆槸 鍒欑粨鏉�
+
+ //3銆� 濡傛灉鏄渶鍚庝竴浣嶅鎵逛汉 涓斾笉鏄粓瀹″紑鍚笅涓�绾ф暟鎹�
+
+ }else{
+ //鍗曚汉绛�
+ //1銆佷慨鏀硅嚜宸辩殑鏁版嵁璁板綍
+
+ //2銆� 鏄惁鏄粓瀹� 寮�鍚笅涓�绾ф暟鎹�
+
+
+ }
+ //涓氬姟閫氳繃 淇敼瀹℃壒瀵瑰簲娑堟伅璁板綍
+ if(Constants.equalsInteger(approve.getStatus(),Constants.approveStatus.pass)){
+
+ }
+ //
+
+ //缁堝涓氬姟 鍙戦�佹妱閫�
+ if (Constants.equalsInteger(approve.getIsEndCheck(),Constants.ONE)) {
+
+
+
+ }
+
+
+
+
+
+
+
+ }
+
public void dealBusinessData(ApproveDTO approveDTO,Approve approve,Visits visits,CarUseBook carUseBook){
if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit)
||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
index 04afebc..fba319f 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -11,6 +11,7 @@
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.ApproveMapper;
+import com.doumee.dao.business.CarDriverMapper;
import com.doumee.dao.business.CarUseBookMapper;
import com.doumee.dao.business.CarsMapper;
import com.doumee.dao.business.join.ApproveJoinMapper;
@@ -67,9 +68,12 @@
@Autowired
private ApproveService approveService;
+ @Autowired
+ private CarDriverMapper carDriverMapper;
+
@Override
- public Integer create(CarUseBook carUseBook) {
+ public Integer create(CarUseBook carUseBook) throws Exception {
if(Objects.isNull(carUseBook)
|| Objects.isNull(carUseBook.getCarId())
|| Objects.isNull(carUseBook.getStartTime())
@@ -85,31 +89,33 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ if(carUseBook.getEndTime().getTime()<=System.currentTimeMillis()){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"閫夋嫨鏃ユ湡寮傚父[缁撴潫鏃堕棿灏忎簬褰撳墠鏃堕棿],璇峰埛鏂伴噸璇�");
+ }
+ if(!(DateUtil.getDateFromString(carUseBook.getPlanUseDate()+":00").getTime()>=carUseBook.getStartTime().getTime()
+ && DateUtil.getDateFromString(carUseBook.getPlanUseDate() +":00").getTime()<= carUseBook.getEndTime().getTime())
+ ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍑哄彂鏃堕棿閿欒");
+ }
carUseBook.setStatus(Constants.ZERO);
carUseBook.setCreateDate(new Date());
+ carUseBook.setIsdeleted(Constants.ZERO);
Cars cars = carsMapper.selectById(carUseBook.getCarId());
if(Objects.isNull(cars)||!cars.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"杞﹁締淇℃伅寮傚父");
}
- //鏌ヨ杞﹁締鎻愪氦鏃堕棿鏄惁瀛樺湪鍐茬獊鐨勯绾﹁褰�
- List<CarUseBook> carUseBookList = carUseBookJoinMapper.selectJoinList(CarUseBook.class,
- new MPJLambdaWrapper<CarUseBook>()
- .selectAll(CarUseBook.class)
- .selectAs(Member::getName,CarUseBook::getMemberName)
- .selectAs(Member::getPhone,CarUseBook::getMemberMobile)
- .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId)
- .eq(CarUseBook::getId,carUseBook.getCarId())
- .in(CarUseBook::getStatus,0,1,2)
- .and(i->i.and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getStartTime,carUseBook.getStartTime()))
- .or()
- .and(j->j.lt(CarUseBook::getEndTime,carUseBook.getEndTime()).gt(CarUseBook::getEndTime,carUseBook.getStartTime()))
- .or()
- .and(j->j.gt(CarUseBook::getStartTime,carUseBook.getStartTime()).lt(CarUseBook::getEndTime,carUseBook.getEndTime()))
- .or()
- .and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getEndTime()))
- )
+ //鏍规嵁杞﹁締鏌ヨ鍙告満淇℃伅
+ CarDriver carDriver = carDriverMapper.selectOne(new QueryWrapper<CarDriver>().lambda()
+ .eq(CarDriver::getCarId,cars.getId())
+ .eq(CarDriver::getIsdeleted,Constants.ZERO)
+ .eq(CarDriver::getStatus,Constants.ONE)
+ .last( " limit 1 ")
);
- if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)){
+ if(Objects.nonNull(carDriver)&&Objects.nonNull(carDriver.getMemberId())){
+ carUseBook.setDriverId(carDriver.getMemberId());
+ }
+ //鏌ヨ杞﹁締鎻愪氦鏃堕棿鏄惁瀛樺湪鍐茬獊鐨勯绾﹁褰�
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(this.carUseBookList(carUseBook))){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀛樺湪杞﹁締棰勭害鏃堕棿涓庡凡棰勭害鏃堕棿鍐茬獊~");
}
carUseBookMapper.insert(carUseBook);
@@ -244,15 +250,7 @@
.eq(pageWrap.getModel().getMemberId() != null, CarUseBook::getMemberId, pageWrap.getModel().getMemberId())
.eq(pageWrap.getModel().getDriverId() != null, CarUseBook::getDriverId, pageWrap.getModel().getDriverId())
.apply(pageWrap.getModel().getCompanyName() != null, "t4.company_name_path like '%"+pageWrap.getModel().getCompanyName()+"%'")
- .and(StringUtils.isNotBlank(pageWrap.getModel().getQueryDate()),
- i->i.and(j->j.lt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").gt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"23:59:59"))
- .or()
- .and(j->j.lt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59").gt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"00:00:00"))
- .or()
- .and(j->j.gt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").lt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59"))
- .or()
- .and(j->j.lt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").gt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59"))
- )
+
.and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName())
.or().like(Member::getPhone,pageWrap.getModel().getMemberName()))
.ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryStartTime())
@@ -282,7 +280,7 @@
* @return
*/
@Override
- public List<CarUseBook> carUseBookList(CarUseBook carUseBook){
+ public List<CarUseBook> carUseBookList(CarUseBook carUseBook) throws Exception {
if(Objects.isNull(carUseBook)
|| Objects.isNull(carUseBook.getCarId())
|| Objects.isNull(carUseBook.getStartTime())
@@ -295,16 +293,15 @@
.selectAs(Member::getName,CarUseBook::getMemberName)
.selectAs(Member::getPhone,CarUseBook::getMemberMobile)
.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId)
- .eq(CarUseBook::getId,carUseBook.getCarId())
+ .eq(CarUseBook::getCarId,carUseBook.getCarId())
.in(CarUseBook::getStatus,0,1,2)
- .and(i->i.and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getStartTime,carUseBook.getStartTime()))
- .or()
- .and(j->j.lt(CarUseBook::getEndTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getStartTime()))
- .or()
- .and(j->j.gt(CarUseBook::getStartTime,carUseBook.getStartTime()).lt(CarUseBook::getEndTime,carUseBook.getEndTime()))
- .or()
- .and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getEndTime()))
- )
+ .apply(" ( " +
+ " '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' " +
+ " or " +
+ " ( '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' < t.end_time AND t.end_time < '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' ) " +
+ " or " +
+ " ( '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' > t.start_time AND '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' < t.end_time )" +
+ " ) " )
);
return carUseBookList;
}
@@ -329,8 +326,8 @@
||Objects.isNull(interval.getCode())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"閰嶇疆閿欒锛岃鑱旂郴绠$悊鍛�");
}
- Date startTime = DateUtil.StringToDate(dateDay + workStart.getCode(),"yyyy-MM-dd HH:mm:ss");
- Date endTime = DateUtil.StringToDate(dateDay + workEnd.getCode(),"yyyy-MM-dd HH:mm:ss");
+ Date startTime = DateUtil.StringToDate((dateDay + " " +workStart.getCode()),"yyyy-MM-dd HH:mm:ss");
+ Date endTime = DateUtil.StringToDate(dateDay + " " + workEnd.getCode(),"yyyy-MM-dd HH:mm:ss");
Long intervalTime = Long.valueOf(interval.getCode());
LocalDateTime localStartTime = startTime.toInstant()
.atZone(ZoneId.systemDefault())
@@ -344,29 +341,32 @@
.eq(CarUseBook::getIsdeleted,Constants.ZERO)
.eq(CarUseBook::getCarId,cars)
.in(CarUseBook::getStatus,0,1,2)
- .and(i->i.like(CarUseBook::getStartTime,dateDay).or().like(CarUseBook::getEndTime,dateDay)
+ .and(i->i.like(CarUseBook::getStartTime,dateDay)
+ .or().like(CarUseBook::getEndTime,dateDay)
.or().apply(" START_TIME < '"+dateDay+" 00:00:00' and END_TIME > '"+dateDay+" 23:59:59' "))
);
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)){
for (DateIntervalVO dateIntervalVO:dateIntervalVOList) {
- if(
- carUseBookList.stream().filter(
- i->
- ( i.getStartTime().getTime()<DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime()
- && i.getEndTime().getTime() > DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime())
- ||
- ( i.getStartTime().getTime()<DateUtil.stringToDate(dateIntervalVO.getEndTime(),"yyyy-MM-dd HH:mm:ss ").getTime()
- && i.getEndTime().getTime() > DateUtil.stringToDate(dateIntervalVO.getEndTime(),"yyyy-MM-dd HH:mm:ss ").getTime())
- ||
- ( DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() < i.getStartTime().getTime()
- && DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() > i.getStartTime().getTime())
- ||
- ( DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() < i.getEndTime().getTime()
- && DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() > i.getEndTime().getTime())
-
- ).collect(Collectors.toList()).size()>Constants.ZERO){
+ //鍒ゆ柇鏃堕棿鏄惁澶т簬褰撳墠
+ if(DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()<=System.currentTimeMillis()){
dateIntervalVO.setIsUse(Constants.ONE);
- };
+ continue;
+ }
+ for (CarUseBook i:carUseBookList ) {
+ if(
+ (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() <= i.getStartTime().getTime() &&
+ i.getStartTime().getTime() < DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime())
+ ||
+ (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() < i.getEndTime().getTime() &&
+ i.getEndTime().getTime() <= DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime())
+ ||
+ (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() >= i.getStartTime().getTime() &&
+ DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime() <= i.getEndTime().getTime())
+ ){
+ dateIntervalVO.setIsUse(Constants.ONE);
+ break;
+ }
+ }
}
}
return dateIntervalVOList;
@@ -394,6 +394,7 @@
dateIntervalVO.setStartTime(startTime);
dateIntervalVO.setEndTime(endTime);
dateIntervalVO.setIsUse(Constants.ZERO);
+ dateIntervalVOList.add(dateIntervalVO);
}
return dateIntervalVOList;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 321887e..7f6b533 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -1086,6 +1086,9 @@
queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
queryWrapper.selectAll(Member.class)
.selectAs(Company::getName,Member::getCompanyName) ;
+ if(StringUtils.isNotBlank(member.getName())){
+ queryWrapper.like(Member::getName,member.getName());
+ }
if(null != member.getType()) {
queryWrapper.eq(Member::getType,member.getType());
@@ -1657,7 +1660,10 @@
@Override
public List<MemberVO> getVisitedMember(CheckVisitedDTO checkVisitedDTO){
- List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda()
+ List<Member> memberList = memberJoinMapper.selectJoinList(Member.class,new MPJLambdaWrapper<Member>()
+ .selectAll(Member.class)
+ .selectAs(Company::getName,Member::getCompanyName)
+ .leftJoin(Company.class,Company::getId,Member::getCompanyId)
.eq(StringUtils.isNotBlank(checkVisitedDTO.getMobile()),Member::getPhone,checkVisitedDTO.getMobile())
.eq(StringUtils.isNotBlank(checkVisitedDTO.getName()),Member::getName,checkVisitedDTO.getName())
.eq(Member::getIsdeleted,Constants.ZERO)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
index 7c124a7..63bf0b8 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -258,6 +258,7 @@
@Override
@Transactional(rollbackFor = {BusinessException.class,Exception.class})
public Integer visitReporting(Visits visits) {
+ visits.setSourceType(Constants.ZERO);
isValidBaseParam(visits);
//妫�楠岃鎷滆浜烘槸鍚﹀悎娉�
Member visitMember = isValideVisitedUser(visits.getMemberId());
@@ -271,7 +272,7 @@
visits.setVisitType(Integer.valueOf(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MDJ_VISIT_REQUIRED).getCode()));
visits.setIdcardNo(DESUtil.decrypt(Constants.EDS_PWD, visitMember.getIdcardNo()));
//鍒濆鍖栬瀹俊鎭�
- initVisitInfo(visits,date);
+// initVisitInfo(visits,date);
visitsMapper.insert(visits);
return visits.getId();
}
@@ -607,12 +608,17 @@
|| StringUtils.isBlank( visits.getName())
|| StringUtils.isBlank( visits.getPhone())
|| StringUtils.isBlank( visits.getCompanyName())
- || visits.getIdcardType() == null
|| Objects.isNull(visits.getType())
// || StringUtils.isBlank( visits.getFaceImg() )
- || StringUtils.isBlank( visits.getIdcardNo() )
|| visits.getReceptMemberId() == null){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝淇℃伅濉啓涓嶆纭紒");
+ }
+ if(Constants.equalsInteger(visits.getType(),Constants.ZERO)
+ || Constants.equalsInteger(visits.getType(),Constants.ONE)){
+ if( visits.getIdcardType() == null
+ || StringUtils.isBlank( visits.getIdcardNo() ) ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝淇℃伅濉啓涓嶆纭紒");
+ }
}
//璁垮鎶ュ
if(visits.getType().equals(Constants.TWO)
@@ -620,10 +626,10 @@
|| StringUtils.isBlank( visits.getPhone())
|| StringUtils.isBlank( visits.getCompanyName()))
|| StringUtils.isBlank( visits.getCarNos())
+ || Objects.isNull(visits.getReceptMemberId())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝淇℃伅濉啓涓嶆纭紒");
}else if(visits.getType().equals(Constants.ONE) && StringUtils.isBlank(visits.getConstructionReason())){
-
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝鏈~鍐欐柦宸ヤ簨鐢憋紒");
}
if(visits.getEndtime().getTime() < System.currentTimeMillis()){
--
Gitblit v1.9.3