刘琳琳 преди 2 седмици
родител
ревизия
4552439173
променени са 3 файла, в които са добавени 108 реда и са изтрити 33 реда
  1. 4 4
      components/expirationReminderModal/index.axml
  2. 82 12
      pages/settings/visitorLog/index.axml
  3. 22 17
      pages/settings/visitorLog/index.js

+ 4 - 4
components/expirationReminderModal/index.axml

@@ -1,9 +1,9 @@
-<view a:if="{{visible}}" class="expiration-dialog-overlay" onTap="cancel">
+<view a:if="{{visible}}" class="expiration-dialog-overlay">
   <view class="dialog">
     <view class="dialog-header flex">
-      <image class="tips-title" mode="scaleToFill" src="../../image/tips-title.png" />
-      <image class="tips-icon" mode="scaleToFill" src="../../image/tips-icon.png" />
-      <image  a:if="{{btnStatus}}" class="tips-close-icon" mode="scaleToFill" src="../../image/tips-close-icon.png" onTap="confirm"/>
+      <image class="tips-title" mode="scaleToFill" src="/image/tips-title.png" />
+      <image class="tips-icon" mode="scaleToFill" src="/image/tips-icon.png" />
+      <image  a:if="{{btnStatus}}" class="tips-close-icon" mode="scaleToFill" src="/image/tips-close-icon.png" onTap="cancel"/>
     </view>
     <view class="dialog-body" a:if="{{btnStatus}}">
       设备还有 <text>{{ content }}</text> 到期,请尽快联系服务商续费。

+ 82 - 12
pages/settings/visitorLog/index.axml

@@ -37,12 +37,45 @@
               <view class="search-item">
                 <text>手机号:</text>
                 <input
-                  class="input m-r"
-                  value="{{searchForm.data.phone}}"
-                  onInput="getVal"
-                  data-key="phone"
-                  placeholder="手机号"
-                  placeholder-class="time-placeholder"
+                        class="input m-r"
+                        value="{{searchForm.data.phone}}"
+                        onInput="getVal"
+                        data-key="phone"
+                        placeholder="手机号"
+                        placeholder-class="time-placeholder"
+                />
+              </view>
+              <view class="search-item">
+                <text>来访单位:</text>
+                <input
+                        class="input m-r"
+                        value="{{searchForm.data.company}}"
+                        onInput="getVal"
+                        data-key="company"
+                        placeholder="来访单位"
+                        placeholder-class="time-placeholder"
+                />
+              </view>
+              <view class="search-item">
+                <text>来访人:</text>
+                <input
+                        class="input m-r"
+                        value="{{searchForm.data.visiteeXm}}"
+                        onInput="getVal"
+                        data-key="visiteeXm"
+                        placeholder="来访人"
+                        placeholder-class="time-placeholder"
+                />
+              </view>
+              <view class="search-item">
+                <text>来访人部门:</text>
+                <input
+                        class="input m-r"
+                        value="{{searchForm.data.visiteeBm}}"
+                        onInput="getVal"
+                        data-key="visiteeBm"
+                        placeholder="来访人部门"
+                        placeholder-class="time-placeholder"
                 />
               </view>
               <view style="display: inline-block;">
@@ -64,9 +97,9 @@
               <view class="search-item wid1 flex">
                 <text>来访时间:</text>
                 <view
-                  class="{{searchForm.data.startTime?'input wid-time':'input wid-time time-placeholder'}}"
-                  onTap="datePicker"
-                  data-key="startTime"
+                        class="{{searchForm.data.startTime?'input wid-time':'input wid-time time-placeholder'}}"
+                        onTap="datePicker"
+                        data-key="startTime"
                 >
                   {{searchForm.data.startTime ? searchForm.data.startTime : '起始时间'}}
                 </view>
@@ -74,13 +107,50 @@
                 </view>
                 <view
-                  class="{{searchForm.data.endTime?'input wid-time':'input wid-time time-placeholder'}}"
-                  onTap="datePicker"
-                  data-key="endTime"
+                        class="{{searchForm.data.endTime?'input wid-time':'input wid-time time-placeholder'}}"
+                        onTap="datePicker"
+                        data-key="endTime"
                 >
                   {{searchForm.data.endTime ? searchForm.data.endTime : '结束时间'}}
                 </view>
               </view>
+              <view class="search-item wid1 flex">
+                <text>签离时间:</text>
+                <view
+                        class="{{searchForm.data.signOutStartTime?'input wid-time':'input wid-time time-placeholder'}}"
+                        onTap="datePicker"
+                        data-key="signOutStartTime"
+                >
+                  {{searchForm.data.signOutStartTime ? searchForm.data.signOutStartTime : '起始时间'}}
+                </view>
+                <view class="pad">
+                  至
+                </view>
+                <view
+                        class="{{searchForm.data.signOutEndTime?'input wid-time':'input wid-time time-placeholder'}}"
+                        onTap="datePicker"
+                        data-key="signOutEndTime"
+                >
+                  {{searchForm.data.signOutEndTime ? searchForm.data.signOutEndTime : '结束时间'}}
+                </view>
+              </view>
+
+              <view style="display: inline-block;">
+                <picker
+                        value="{{searchForm.data.reason}}"
+                        range="{{causeMatterList}}"
+                        range-key="name"
+                        onChange='getVal'
+                        data-key="reason"
+                >
+                  <view class="search-item flex">
+                    <text>事由:</text>
+                    <view class="{{searchForm.data.reason?'input m-r ':'input m-r time-placeholder'}}">
+                      {{searchForm.data.reason?searchForm.data.reason:'请选择事由'}}
+                    </view>
+                  </view>
+                </picker>
+              </view>
             </view>
 
 

+ 22 - 17
pages/settings/visitorLog/index.js

@@ -16,8 +16,14 @@ Page({
         name: '',
         phone: '',
         idNumber: '',
+        company: '',//	来访单位
+        visiteeXm: '',//	来访人
+        visiteeBm: '',// 来访人部门
         startTime: '',
         endTime: '',
+        signOutStartTime: '',
+        signOutEndTime: '',
+        reason: '', // 事由
         sn: '',
       },
       pageNum: 1,
@@ -34,11 +40,14 @@ Page({
         id: false,
         name: '未签离'
       },
-    ]
+    ],
+    causeMatterList: []
   },
   onLoad(e) {
     my.hideBackHome();
+    let visitReasonList = (app.globalData.snDisposition.visitReason || '业务拜访/会议邀请/施工单位/其他事项').split('/');
     this.setData({
+      causeMatterList: visitReasonList,
       formPath: e.formPath || null,
       notDesensitizedColumn: app.globalData.snDisposition.notDesensitizedColumn
     })
@@ -67,7 +76,7 @@ Page({
   clickAudio() {
     getWaterDrop()
   },
-  //签离 
+  //签离
   async signOff(e) {
     let item = e.currentTarget.dataset.item
     let data = {
@@ -85,7 +94,14 @@ Page({
     let key = e.currentTarget.dataset.key
     let key1 = `searchForm.data[${key}]`
     let signOutList = this.data.signOutList
+    let causeMatterList = this.data.causeMatterList
+    console.log(e.detail.value, causeMatterList[e.detail.value])
     switch (key) {
+      case 'reason':
+        this.setData({
+          'searchForm.data.reason': causeMatterList[e.detail.value],
+        })
+        break;
       case 'isSignOut':
         this.setData({
           'searchForm.data.isSignOut': signOutList[e.detail.value].id,
@@ -109,20 +125,9 @@ Page({
       endDate: getDate(), //最大日期时间
       success: res => {
         let key = e.currentTarget.dataset.key
-        switch (key) {
-          case 'startTime':
-            this.setData({
-              'searchForm.data.startTime': res.date
-            })
-            break;
-          case 'endTime':
-            this.setData({
-              'searchForm.data.endTime': res.date
-            })
-            break;
-          default:
-            break;
-        }
+        this.setData({
+          [`searchForm.data.${key}`]: res.date
+        });
       },
     });
   },
@@ -168,4 +173,4 @@ Page({
       url: url
     });
   },
-});
+});