From 513bf4d2d2b70be718f5c8d3f6a2aab5c6e7f4e9 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期一, 25 四月 2022 14:01:40 +0800
Subject: [PATCH] Fixed#138076 顧問端-成交與未成交資訊 增加 最後編輯時間

---
 PAMapp/pages/appointment/_appointmentId/close/index.vue |   65 ++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/PAMapp/pages/appointment/_appointmentId/close/index.vue b/PAMapp/pages/appointment/_appointmentId/close/index.vue
index 0514edc..53c062f 100644
--- a/PAMapp/pages/appointment/_appointmentId/close/index.vue
+++ b/PAMapp/pages/appointment/_appointmentId/close/index.vue
@@ -15,9 +15,9 @@
         <el-row
           type="flex"
           class="pam-paragraph" style="flex-direction: column">
-          <UiField label="靽頨怠�����" :labelSize="20" class="required">
+          <UiField label="頨怠�����/撅�����" :labelSize="20" class="required">
             <input
-              class="appointment-client-detail-close__input"
+              class="appointment-client-detail-close__input mt-10"
               :class="{'is-invalid':!identityIdValid}"
               v-model="appointmentCloseInfo.policyholderIdentityId"
               placeholder="隢撓�"
@@ -31,9 +31,9 @@
         <el-row
           type="flex"
           class="pam-paragraph">
-          <UiField label="���誨蝣噗lan Code" :labelSize="20" class="required">
+          <UiField label="����迂" :labelSize="20" class="required">
             <input
-              class="appointment-client-detail-close__input"
+              class="appointment-client-detail-close__input mt-10"
               v-model="appointmentCloseInfo.planCode"
               placeholder="隢撓�"
               type="text">
@@ -46,7 +46,7 @@
           <UiField label="�脖辣����" :labelSize="20" class="required">
             <DateTimePicker
               :defaultValue="appointmentCloseInfo.policyEntryDate"
-              :isFutureDateDisabled="true"
+              class="mt-10"
               @changeDateTime="appointmentCloseDate = $event"></DateTimePicker>
           </UiField>
         </el-row>
@@ -57,7 +57,7 @@
           class="pam-paragraph">
           <UiField label="���漱����" :labelSize="20" class="required">
             <UiSelect :closeReason.sync="appointmentCloseInfo.closedReason"
-              :options="appointmentFailReason"/>
+              :options="appointmentFailReason" class="mt-10"/>
           </UiField>
           <input
             v-if="appointmentCloseInfo.closedReason === 'other'
@@ -74,6 +74,7 @@
         class="pam-paragraph">
         <UiField label="��酉" :labelSize="20">
           <el-input
+          class="mt-10"
             type="textarea"
             :rows="3"
             placeholder="隢撓�"
@@ -210,26 +211,42 @@
     this.$router.push(`/myAppointmentList/contactedList`);
   }
 
-  checkIdentityId (id) {
-  const tab = "ABCDEFGHJKLMNPQRSTUVXYWZIO";
-  const A1 = [ 1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3 ];
-  const A2 = [ 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5 ];
-  const Mx = [ 9,8,7,6,5,4,3,2,1,1 ];
+  checkIdentityId(id) {
+    const tab = 'ABCDEFGHJKLMNPQRSTUVXYWZIO';
+    const weight = [9, 8, 7, 6, 5, 4, 3, 2, 1, 1];
+    if (id.length !== 10) return false;
+    let i = tab.indexOf(id.charAt(0)) + 10;
+    if (i === 9) return false;
+    let sum = Math.floor((i % 100) / 10) + (i % 10) * 9;
+    for (i = 1; i < 10; i += 1) {
+      let v = parseInt(id.charAt(i), 10);
+      if (i === 1 && Number.isNaN(v)) {
+        switch (id.charAt(i)) {
+          case 'A':
+            v = 0;
+            break;
+          case 'B':
+            v = 1;
+            break;
+          case 'C':
+            v = 2;
+            break;
+          case 'D':
+            v = 3;
+            break;
+          default:
+            return false;
+        }
+      } else if (i === 1 && ([1, 2, 8, 9].indexOf(v) === -1)) {
+        return false;
+      }
+      if (i > 1 && Number.isNaN(v)) return false;
+      sum += v * weight[i];
+    }
 
-  if ( id.length != 10 ) return false;
-  let i = tab.indexOf( id.charAt(0) );
-  if ( i == -1 ) return false;
-  let sum = A1[i] + A2[i]*9;
-
-  for ( i=1; i<10; i++ ) {
-    const v = parseInt( id.charAt(i) );
-    if ( isNaN(v) ) return false;
-    sum = sum + v * Mx[i];
+    if (sum % 10 !== 0) return false;
+    return true;
   }
-
-  if ( sum % 10 != 0 ) return false;
-  return true;
-}
 
   get isSubmitBtnDisabled() {
     const {

--
Gitblit v1.8.0