فهرست منبع

出入管理需求变更

凉纪 1 سال پیش
والد
کامیت
8454692101

+ 6 - 0
src/assets/css/index.scss

@@ -58,3 +58,9 @@ pre{
 .wj-title-red{
   color: #d7000f;
 }
+.required::before{
+  content: '*';
+  color: #ee0a24;
+  position: absolute;
+  left: -14px;
+}

+ 1 - 1
src/views/menu/securityCheckRegister/add.vue

@@ -337,7 +337,7 @@ export default {
         // 查找是否有与 valItem.itemId 相同的项
         const existingItem = this.checkList.find(checkItem => checkItem.itemId === valItem.itemId)
         if (existingItem) {
-          // // 如果存在相同 itemId 的项,查找 pointList 是否有与 valItem.pointId 相同的项
+          // 如果存在相同 itemId 的项,查找 pointList 是否有与 valItem.pointId 相同的项
           const existingPoint = existingItem.pointList.find(pointItem => pointItem.pointId === valItem.id)
           if (!existingPoint) {
             console.log(existingItem, 'point添加成功')

+ 4 - 4
src/views/menu/securityCheckRegister/detail.vue

@@ -38,9 +38,9 @@
                       class="nfc-icon"
                       @click="clickNFC(item.nfcList)"
                     />
-                    <span v-if="item.status">
-                      <van-tag v-if="item.status == '0'" type="warning">隐患</van-tag>
-                      <van-tag v-if="item.status == '1'" type="success">正常</van-tag>
+                    <span v-if="item.status != null">
+                      <van-tag v-if="item.status == '1'" type="warning">隐患</van-tag>
+                      <van-tag v-else type="success">正常</van-tag>
                     </span>
                   </template>
 
@@ -48,7 +48,7 @@
 
 
                 </van-cell>
-                <van-cell-group v-show="item.status" :border="false">
+                <van-cell-group v-show="item.status =='1'" :border="false">
                   <van-cell v-if="item.nfcList && item.nfcList.length > 0" :border="false">
                     <div
                       v-if="img.img"

+ 1 - 0
src/views/menu/securityCheckRegister/index.vue

@@ -171,6 +171,7 @@ export default {
       this.query.pageNum = 1;
       this.dataList = [];
       this.getDataList();
+
     },
     initData(){
       this.query.checkOrgId = this.orgId;

+ 9 - 14
src/views/menu/visitCheck/detail.vue

@@ -15,13 +15,11 @@
             </van-cell>
           </template>
           <div class="panel-box">
-            <van-cell title="介绍信类型" :value="getDictLabel(visitInfo.type,'out_in_type')"></van-cell>
-            <van-cell title="接待机构" :value="visitInfo.orgName"></van-cell>
+            <van-cell title="来访类型" :value="getDictLabel(visitInfo.type,'out_in_type')"></van-cell>
             <van-cell title="来访事由" :value="visitInfo.reasons"></van-cell>
-            <van-cell title="开具日期" :value="visitInfo.startTimeStr"></van-cell>
-            <van-cell title="有效天数" :value="visitInfo.startTimeStr"></van-cell>
-<!--            <van-cell title="访问日期" :value="visitInfo.startTimeStr"></van-cell>-->
-<!--            <van-cell title="结束日期" :value="visitInfo.endTimeStr"></van-cell>-->
+            <van-cell title="介绍信编号" v-if="visitInfo.letterNo"  :value="visitInfo.letterNo"></van-cell>
+            <van-cell title="开具日期" v-if="visitInfo.startTimeStr"  :value="visitInfo.startTimeStr"></van-cell>
+            <van-cell title="有效天数" v-if="visitInfo.effectiveDays"  :value="`${visitInfo.effectiveDays}天`"></van-cell>
             <van-cell title="介绍信"  v-if="visitInfo.letterFile && visitInfo.letterFile.length > 0">
               <template #right-icon>
                 <div class="file-box">
@@ -43,11 +41,10 @@
             <img :src="imgUrl(v.imgFile[0])" alt="">
           </div>
           <div class="card-cell-box">
-            <van-cell title="来访单位" :value="v.userName"></van-cell>
+            <van-cell title="来访单位" :value="v.companyName"></van-cell>
             <van-cell title="来访人员" :value="v.userName"></van-cell>
-            <van-cell title="证件类型" :value="v.idCard"></van-cell>
+            <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="v.idCard"></van-cell>
-<!--            <van-cell title="单位" :value="v.companyName"></van-cell>-->
           </div>
         </div>
       </div>
@@ -90,7 +87,7 @@ export default {
         obj:{
           name:'visitCheck',
           path:'/visitCheck',
-          params:{event:'refresh'},
+          //params:{event:'refresh'},
         }
       },
       visitId:null,
@@ -103,7 +100,7 @@ export default {
 
       },
       showInput:false,
-      dicts:['out_in_approve_status','out_in_type']
+      dicts:['out_in_approve_status','out_in_type','letter_id_type']
     }
   },
   computed:{
@@ -111,7 +108,6 @@ export default {
   },
   mounted(){
     this.visitId = this.$route.query.id;
-    console.log(this.visitId,'idddddddd')
     this.getInfo();
   },
   methods:{
@@ -151,7 +147,6 @@ export default {
       })
     },
     getState(state){
-      console.log(state,'state')
       switch (state){
         case 0:
           return '#008cd6';
@@ -210,7 +205,7 @@ export default {
   .card-cell-box{
     width: 70%;
     .van-cell{
-      padding: 10px;
+      padding: 4px;
       &::after{
         left:10px;
         right:10px;

+ 3 - 3
src/views/menu/visitCheck/index.vue

@@ -30,8 +30,8 @@
           <empty  v-if="!dataList || dataList.length === 0" />
           <card v-else v-for="(v,i) in dataList" :key="v.id">
             <van-cell
-              :title-style="{color:v.type == 3?'#D7000F':''}"
-              :title="getDictLabel(v.type,'out_in_type')"
+              :title-style="{color:'#008cd6'}"
+              :title="`介绍信类型: ${getDictLabel(v.type,'out_in_type')}`"
               @click="clickItem(v.id)">
               <template #right-icon>
                   <span :style="{color:getState(getDictLabel(v.approveStatus,'out_in_approve_status'))}">
@@ -45,7 +45,7 @@
                     <div class="item-value"> {{v.letterNo}}</div>
                   </div>
                   <div class="info-item">
-                    <div class="item-label">有效期:</div>
+                    <div class="item-label">有效期:</div>
                     <div class="item-value">{{v.startTime}}~{{v.endTime}}</div>
                   </div>
                   <div class="info-item">

+ 10 - 7
src/views/menu/visitRecord/add.vue

@@ -18,8 +18,12 @@
 <!--            </van-cell>-->
 <!--          </template>-->
           <div class="panel-box">
+            <van-cell title="介绍信类型" :value="getDictLabel(selectedUser.type,'out_in_type')"></van-cell>
+            <van-cell title="来访事由" :value="selectedUser.reasons"></van-cell>
+            <van-cell title="来访单位" :value="selectedUser.companyName"></van-cell>
+
             <select-cell
-              title="出入人员"
+              title="来访人员"
               :prop="prop"
               is-row
               @itemInfo="getItemInfo"
@@ -27,9 +31,10 @@
               :data-list="userList"
               required>
             </select-cell>
+            <van-cell title="证件类型" :value="selectedUser.idType"></van-cell>
             <van-cell title="证件号码" :value="selectedUser.idCard"></van-cell>
             <div class="upload-box"  v-if="selectedUser.imgFile && selectedUser.imgFile.length > 0">
-              <span>证件</span>
+              <span>证件图片</span>
               <van-cell>
                 <div
                   class="nfc-img van-hairline--surround"
@@ -40,8 +45,7 @@
                 </div>
               </van-cell>
             </div>
-            <van-cell title="单位" :value="selectedUser.companyName"></van-cell>
-            <van-cell title="出入事由" :value="selectedUser.reasons"></van-cell>
+
             <van-cell title="介绍信"  v-if="selectedUser.letterFile && selectedUser.letterFile.length > 0">
               <template #right-icon>
                 <div class="file-box">
@@ -51,14 +55,13 @@
                 </div>
               </template>
             </van-cell>
-            <van-cell title="出入类型" :value="getDictLabel(selectedUser.type,'out_in_type')"></van-cell>
+
             <van-field
               v-model="formData.accompanyingPerson"
-              required
               rows="1"
               autosize
               :maxlength="200"
-              placeholder="请输入"
+              placeholder="请输入人员姓名"
               label="陪同人员"></van-field>
             <div class="upload-box" >
               <span class="required">核验结果</span>

+ 16 - 14
src/views/menu/visitRecord/detail.vue

@@ -9,10 +9,14 @@
               <span></span>
             </template>
           <div class="panel-box">
-            <van-cell title="出入人员" :value="selectedUser.userName"></van-cell>
+            <van-cell title="介绍信类型" :value="getDictLabel(selectedUser.type,'out_in_type')"></van-cell>
+            <van-cell title="来访事由" :value="selectedUser.reasons"></van-cell>
+            <van-cell title="来访单位" :value="selectedUser.companyName"></van-cell>
+            <van-cell title="来访人员" :value="selectedUser.userName"></van-cell>
+            <van-cell title="证件类型" :value="getDictLabel(selectedUser.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="selectedUser.idCard"></van-cell>
             <div class="upload-box" v-if="selectedUser.imgFile && selectedUser.imgFile.length > 0">
-              <span>证件照</span>
+              <span>证件图片</span>
               <van-cell >
                 <div
                   class="nfc-img van-hairline--surround"
@@ -23,8 +27,7 @@
                 </div>
               </van-cell>
             </div>
-            <van-cell title="单位" :value="selectedUser.companyName"></van-cell>
-            <van-cell title="出入事由" :value="selectedUser.reasons"></van-cell>
+
             <van-cell title="介绍信"  v-if="selectedUser.letterFile && selectedUser.letterFile.length > 0">
               <template #right-icon>
                 <div class="file-box">
@@ -34,20 +37,19 @@
                 </div>
               </template>
             </van-cell>
-            <van-cell title="出入类型" :value="getDictLabel(selectedUser.type,'out_in_type')"></van-cell>
-            <van-cell title="陪同人员" :value="selectedUser.accompanyingPerson"></van-cell>
             <div class="upload-box" v-if="selectedUser.checkImage && selectedUser.checkImage.length > 0">
               <span>核验结果</span>
               <van-cell >
-              <div
-                class="nfc-img van-hairline--surround"
-                v-for="(v, i) in selectedUser.checkImage"
-                :key="v"
-                @click="preView(selectedUser.checkImage)">
-                <img :src="imgUrl(v)" alt="" />
-              </div>
+                <div
+                  class="nfc-img van-hairline--surround"
+                  v-for="(v, i) in selectedUser.checkImage"
+                  :key="v"
+                  @click="preView(selectedUser.checkImage)">
+                  <img :src="imgUrl(v)" alt="" />
+                </div>
               </van-cell>
             </div>
+            <van-cell title="陪同人员" :value="selectedUser.accompanyingPerson"></van-cell>
             <van-cell title="到达时间" v-if="selectedUser.arrivalTime" :value="selectedUser.arrivalTime"></van-cell>
             <date-cell v-else required title="到达时间" :max-date="maxData" :is-row="true"  v-model="formData.arrivalTime" date-type="datetime" />
             <van-cell title="离开时间" v-if="selectedUser.departureTime" :value="selectedUser.departureTime"></van-cell>
@@ -88,7 +90,7 @@ export default {
         arrivalTime:null,
         departureTime:null,
       },
-      dicts:['out_in_approve_status','out_in_type']
+      dicts:['out_in_approve_status','out_in_type','letter_id_type']
     }
   },
   computed:{

+ 12 - 12
src/views/menu/visitRecord/index.vue

@@ -23,8 +23,8 @@
           <empty  v-if="!dataList || dataList.length === 0"/>
           <card v-else v-for="(v,i) in dataList" :key="v.id">
             <van-cell
-            :title-style="{color:v.type == 3?'#D7000F':''}"
-            :title="getDictLabel(v.type,'out_in_type')"
+              :title-style="{color:'#008cd6'}"
+              :title="`介绍信类型: ${getDictLabel(v.type,'out_in_type')}`"
             @click="clickItem(v.id)">
               <template #extra>
                 <van-button v-if="!v.departureTime" type="info" size="mini">登记离开时间</van-button>
@@ -35,10 +35,10 @@
                   <div class="item-label">人员姓名:</div>
                   <div class="item-value"> {{v.userName}}</div>
                 </div>
-                <div class="info-item">
-                  <div class="item-label">证件号码:</div>
-                  <div class="item-value">{{v.idCard}}</div>
-                </div>
+<!--                <div class="info-item">-->
+<!--                  <div class="item-label">证件号码:</div>-->
+<!--                  <div class="item-value">{{v.idCard}}</div>-->
+<!--                </div>-->
                 <div class="info-item">
                   <div class="item-label">到达时间:</div>
                   <div class="item-value">
@@ -51,12 +51,12 @@
                     {{v.departureTime || '暂无'}}
                   </div>
                 </div>
-                <div class="info-item">
-                  <div class="item-label">出入事由:</div>
-                  <div class="item-value">
-                    {{v.reasons}}
-                  </div>
-                </div>
+<!--                <div class="info-item">-->
+<!--                  <div class="item-label">出入事由:</div>-->
+<!--                  <div class="item-value">-->
+<!--                    {{v.reasons}}-->
+<!--                  </div>-->
+<!--                </div>-->
               </div>
             </template>
           </van-cell>

+ 103 - 73
src/views/menu/visitRegister/add.vue

@@ -15,12 +15,12 @@
               :prop="prop"
               v-model="visitType"
               :data-list="typeList"
+              @change="changeType"
               required>
             </select-cell>
             <van-field
-              v-if="visitType != 3"
               label="介绍信编号"
-              required
+              :required="visitType == 2"
               v-model="formData.letterNo"
               placeholder="请输入"
               :maxlength="20"/>
@@ -34,34 +34,38 @@
               placeholder="请输入"
               :maxlength="200"/>
             <date-cell
-              v-if="visitType != 3"
-              required
-              v-model="formData.date"
+              v-if="visitType=='2'"
+              is-row
+              :required="visitType == 2"
+              v-model="formData.startTime"
               title="开具日期">
             </date-cell>
-            <select-cell
-              required
-              v-if="visitType != 3"
-              title="有效天数"
+            <van-cell
+              v-else
               is-row
-              :label="formData.date"
-              is-link
-              @click="showCalendar">
-            </select-cell>
+              v-model="formData.startTime"
+              title="开具日期">
+            </van-cell>
             <van-cell
-              required
-              v-if="visitType != 2"
-              title="出入期限"
-              :label="formData.date"
-              is-link
-              @click="showCalendar">
+              title="有效天数"
+              :required="visitType == 2">
+              <van-stepper :disabled="visitType == 3" integer :min="1" :max="356" v-model="formData.effectiveDays" step="1" />
             </van-cell>
-            <div class="upload-box" v-if="visitType != 3" >
-              <span><i>*</i> 上传介绍信</span>
-              <uploader :maxCount="1" v-model="formData.letterFile"/>
+<!--            <select-cell-->
+<!--              :required="visitType == 2"-->
+<!--              title="有效天数"-->
+<!--              is-row-->
+<!--              :label="formData.effectiveDays"-->
+<!--              is-link-->
+<!--              @click="showCalendar">-->
+<!--            </select-cell>-->
+            <div class="upload-box">
+              <span :class="{'required':visitType == 2}">上传介绍信</span>
+              <van-cell>
+                <uploader :maxCount="1" v-model="formData.letterFile"/>
+              </van-cell>
             </div>
             <van-field
-              v-if="visitType != 3"
               v-model="formData.description"
               rows="1"
               autosize
@@ -69,15 +73,15 @@
               label="备注信息"
               type="textarea"
               placeholder="请输入"/>
+            <van-cell required title="添加人员">
+              <template #right-icon>
+                <div class="flex-box">
+                  <span style="color: #aaa;"></span>
+                  <van-switch size="20px" v-model="checked" />
+                </div>
+              </template>
+            </van-cell>
           </div>
-          <van-cell required title="添加人员">
-            <template #right-icon>
-              <div class="flex-box">
-                <span style="color: #aaa;"></span>
-                <van-switch size="20px" v-model="checked" />
-              </div>
-            </template>
-          </van-cell>
         </van-panel>
       </div>
 
@@ -89,9 +93,10 @@
              <img :src="imgUrl(v.imgFile[0].imgPath)" alt="">
            </div>
            <div class="card-cell-box">
-            <van-cell title="出入人员" :value="v.userName"></van-cell>
-            <van-cell title="身份证" :value="v.idCard"></van-cell>
-            <van-cell title="单位" :value="v.companyName"></van-cell>
+            <van-cell title="来访单位" :value="v.companyName"></van-cell>
+            <van-cell title="来访人员" :value="v.userName"></van-cell>
+             <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
+            <van-cell title="证件号码" :value="v.idCard"></van-cell>
            </div>
           </div>
           <template #left>
@@ -107,7 +112,7 @@
       <div class="card" v-show="checked">
         <van-cell title="人员信息">
           <template #right-icon>
-            <van-button type="primary" v-if="isAdd" icon="plus" size="mini" @click="onAdd">添加</van-button>
+            <van-button type="info" v-if="isAdd" icon="plus" size="mini" @click="onAdd">添加</van-button>
             <van-button type="info" v-else icon="edit" size="mini" @click="onEdit">确认</van-button>
           </template>
         </van-cell>
@@ -115,27 +120,27 @@
           <van-form validate-first @failed="onFailed">
             <van-field
               required
-              v-model="personnel.userName"
+              v-model="personnel.companyName"
               rows="1"
               autosize
               :maxlength="20"
-              label="出入人员"
+              label="来访单位"
               :rules="[{ pattern:/^(.+)$/, message: '请输入' }]"
               placeholder="请输入"/>
             <van-field
               required
-              v-model="personnel.idCard"
+              v-model="personnel.userName"
               rows="1"
               autosize
               :maxlength="20"
-              label="证件号码"
+              label="出入人员"
+              :rules="[{ pattern:/^(.+)$/, message: '请输入' }]"
               placeholder="请输入"/>
             <select-cell
               title="证件类型"
-              :prop="prop"
               is-row
-              v-model="visitType"
-              :data-list="typeList"
+              v-model="personnel.idType"
+              :data-list="getDictItem('letter_id_type')"
               required>
             </select-cell>
             <van-field
@@ -148,8 +153,10 @@
               placeholder="请输入"/>
           </van-form>
           <div class="upload-box" >
-            <span><i>*</i> 上传证件照</span>
-            <uploader :maxCount="2" v-model="personnel.imgFile"/>
+            <span class="required">上传证件照</span>
+            <van-cell>
+              <uploader :maxCount="2" v-model="personnel.imgFile"/>
+            </van-cell>
           </div>
           <p class="tip-text" >注:证件号码将作为唯一识别码</p>
         </div>
@@ -186,6 +193,7 @@ import {mapGetters} from "vuex";
 import {imgUrl} from "@/utils";
 import { ImagePreview } from 'vant'
 import {visitAdd} from './api'
+import dayjs from "dayjs";
 export default {
   components: {SelectCell,Uploader,DateCell,CalendarPicker,OrgPicker},
   data(){
@@ -199,13 +207,14 @@ export default {
         letterNo:null,
         letterFile:null,
         description:null,
-        range:null,
-        date:null,
+        startTime:null,
+        effectiveDays:null,
       },
       personnel:{
+        companyName:null,
         userName:null,
         idCard:null,
-        companyName:null,
+        idType:null,
         imgFile:[],
       },
       pList:[],
@@ -226,13 +235,18 @@ export default {
           value:3
         }
       ],
+      dicts:['letter_id_type']
     }
   },
   computed:{
-    ...mapGetters(['orgId','id'])
+    ...mapGetters(['orgId','id','dictionary'])
   },
   methods:{
     imgUrl,formatDate,
+    changeType(){
+      this.formData.startTime = dayjs(new Date()).format('YYYY-MM-DD');
+      this.formData.effectiveDays = 1;
+    },
     onSubmit(){
       // if(this.visitType ==  '1'){
       //   if(!this.formData.receptionOrgIds){
@@ -249,28 +263,45 @@ export default {
       //   }
       // }
       try{
-        if(this.visitType ==  '2'){
-          if(!this.formData.letterNo){
+        if (!this.visitType) {
+          this.$toast('请选择介绍信类型');
+          return;
+        }
+        if(this.visitType ==  '2') {
+          if (!this.formData.letterNo) {
             this.$toast('请输入介绍信编号');
             return;
           }
-          if(!this.formData.letterFile){
+          if (!this.formData.reasons) {
+            this.$toast('请输入来访事由');
+            return;
+          }
+          if (!this.formData.startTime) {
+            this.$toast('请选择开具日期');
+            return;
+          }
+          if (!this.formData.startTime) {
+            this.$toast('请选择有效天数');
+            return;
+          }
+          if (!this.formData.letterFile) {
             this.$toast('请上传介绍信');
             return;
           }
+          if (this.pList.length == 0) {
+            this.$toast('请添加人员信息');
+            return;
+          }
         }
-
-        if(!this.formData.reasons){
-          this.$toast('请输入出入事由');
-          return;
-        }
-        if(!this.formData.range){
-          this.$toast('请选择有效期');
-          return;
-        }
-        if(this.pList.length == 0){
-          this.$toast('请添加人员信息');
-          return;
+        if(this.visitType ==  '3') {
+          if (!this.formData.reasons) {
+            this.$toast('请输入来访事由');
+            return;
+          }
+          if (this.pList.length == 0) {
+            this.$toast('请添加人员信息');
+            return;
+          }
         }
         this.formData.status = 1;
         this.formData.type = this.visitType;
@@ -324,7 +355,7 @@ export default {
       this.pList.splice(i,1);
     },
     onEdit(){
-      if(!this.personnel.userName || !this.personnel.idCard || !this.personnel.companyName || !this.personnel.imgFile){
+      if(!this.personnel.companyName || !this.personnel.userName || !this.personnel.idType || !this.personnel.idCard || !this.personnel.imgFile){
         this.$toast('请完善人员信息');
         return;
       }
@@ -332,9 +363,10 @@ export default {
       let index = this.pList.findIndex(v=>{return v.uuid === strObj.uuid});
       this.pList.splice(index,1,strObj);
       this.personnel = {
+        companyName:null,
         userName:null,
+        idType:null,
         idCard:null,
-        companyName:null,
         imgFile:[],
       };
       this.isAdd = true;
@@ -357,7 +389,7 @@ export default {
       //   this.personnel.idCard = '123456789012345678'
       //   this.personnel.companyName = '测试单位';
       // }
-      if(!this.personnel.userName || !this.personnel.idCard || !this.personnel.companyName || !this.personnel.imgFile){
+      if(!this.personnel.companyName || !this.personnel.userName || !this.personnel.idType || !this.personnel.idCard || !this.personnel.imgFile){
         this.$toast('请完善人员信息');
         return;
       }
@@ -371,9 +403,10 @@ export default {
       strObj.uuid = `${new Date().getTime()}`;
       this.pList.push(strObj);
       this.personnel = {
+        companyName:null,
         userName:null,
+        idType:null,
         idCard:null,
-        companyName:null,
         imgFile:[],
       };
     },
@@ -409,7 +442,7 @@ export default {
   .card-cell-box{
     width: 70%;
     .van-cell{
-      padding: 10px;
+      padding: 4px;
       &::after{
         left:10px;
         right:10px;
@@ -470,7 +503,7 @@ export default {
   align-items: center;
 }
 .upload-box{
-  padding: 20px 30px;
+  padding: 0 30px;
   display: flex;
   >span{
     display: inline-block;
@@ -479,10 +512,7 @@ export default {
     line-height: 160px;
     font-size: 28px;
     color:#999;
-    >i{
-      font-style: normal;
-      color: #ee0a24;
-    }
+    position: relative;
   }
 }
 .goods-card{

+ 13 - 13
src/views/menu/visitRegister/detail.vue

@@ -5,7 +5,8 @@
       <!--   基本信息   -->
       <div class="card">
         <van-panel title="来访信息" >
-          <template #header>
+          <template #header></template>
+          <div class="panel-box">
             <van-cell title="状态">
               <template #extra>
                   <span :style="{color:getState(getDictLabel(visitInfo.status,'out_in_approve_status'))}">
@@ -13,13 +14,11 @@
                   </span>
               </template>
             </van-cell>
-          </template>
-          <div class="panel-box">
             <van-cell title="来访类型" :value="getDictLabel(visitInfo.type,'out_in_type')"></van-cell>
-            <van-cell title="到访机构" :value="visitInfo.orgName"></van-cell>
-            <van-cell title="出入事由" :value="visitInfo.reasons"></van-cell>
-            <van-cell title="访问日期" :value="visitInfo.startTimeStr"></van-cell>
-            <van-cell title="结束日期" :value="visitInfo.endTimeStr"></van-cell>
+            <van-cell title="来访事由" :value="visitInfo.reasons"></van-cell>
+            <van-cell title="介绍信编号" v-if="visitInfo.letterNo"  :value="visitInfo.letterNo"></van-cell>
+            <van-cell title="开具日期" v-if="visitInfo.startTimeStr"  :value="visitInfo.startTimeStr"></van-cell>
+            <van-cell title="有效天数" v-if="visitInfo.effectiveDays"  :value="`${visitInfo.effectiveDays}天`"></van-cell>
             <van-cell title="介绍信"  v-if="visitInfo.letterFile && visitInfo.letterFile.length > 0">
               <template #right-icon>
                 <div class="file-box">
@@ -41,9 +40,10 @@
              <img :src="imgUrl(v.imgFile[0])" alt="">
            </div>
            <div class="card-cell-box">
-            <van-cell title="出入人员" :value="v.userName"></van-cell>
-            <van-cell title="身份证" :value="v.idCard"></van-cell>
-            <van-cell title="单位" :value="v.companyName"></van-cell>
+             <van-cell title="来访单位" :value="v.companyName"></van-cell>
+             <van-cell title="来访人员" :value="v.userName"></van-cell>
+             <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
+             <van-cell title="证件号码" :value="v.idCard"></van-cell>
            </div>
           </div>
       </div>
@@ -74,7 +74,7 @@ export default {
         description: null,
         images: null,
       },
-      dicts:['out_in_approve_status','out_in_type']
+      dicts:['out_in_approve_status','out_in_type','letter_id_type']
     }
   },
   computed:{
@@ -95,7 +95,7 @@ export default {
           return '#bc9f71';
         case '同意':
           return '#009240';
-        case '已逾期':
+        case '未审批':
           return '#D7000F';
       }
     },
@@ -141,7 +141,7 @@ export default {
   .card-cell-box{
     width: 70%;
     .van-cell{
-      padding: 10px;
+      padding: 4px;
       &::after{
         left:10px;
         right:10px;

+ 14 - 14
src/views/menu/visitRegister/index.vue

@@ -22,28 +22,28 @@
           <empty  v-if="!dataList || dataList.length === 0" />
           <card v-else v-for="(v,i) in dataList" :key="v.id"  >
               <van-cell
-                :title-style="{color:v.type == 3?'#D7000F':''}"
-                :title="getDictLabel(v.type,'out_in_type')"
+                :title-style="{color:'#008cd6'}"
+                :title="`介绍信类型: ${getDictLabel(v.type,'out_in_type')}`"
                 @click="clickItem(v.id)">
-<!--                <template #extra>-->
-<!--                  <span :style="{color:getState(getDictLabel(v.approveStatus,'out_in_approve_status'))}">-->
-<!--                    {{getDictLabel(v.approveStatus,'out_in_approve_status') }}-->
-<!--                  </span>-->
-<!--                </template>-->
+                <template #right-icon>
+                  <span :style="{color:getState(getDictLabel(v.status,'out_in_approve_status'))}">
+                    {{getDictLabel(v.status,'out_in_approve_status') }}
+                  </span>
+                </template>
                 <template #label>
                   <div class="info-box">
-                    <div v-if="v.type == 2" class="info-item">
-                      <div class="item-label">介绍信编号:</div>
-                      <div class="item-value"> {{v.letterNo}}</div>
-                    </div>
+<!--                    <div v-if="v.type == 2" class="info-item">-->
+<!--                      <div class="item-label">介绍信编号:</div>-->
+<!--                      <div class="item-value"> {{v.letterNo}}</div>-->
+<!--                    </div>-->
                     <div class="info-item">
-                      <div class="item-label">来访事由</div>
+                      <div class="item-label">来访事由</div>
                       <div class="item-value">
                           {{v.reasons}}
                       </div>
                     </div>
                     <div class="info-item">
-                      <div class="item-label">{{v.type == 2? '介绍信有效期': '出入期'}}</div>
+                      <div class="item-label">有效期限</div>
                       <div class="item-value">{{v.startTime}}~{{v.endTime}}</div>
                     </div>
                   </div>
@@ -128,7 +128,7 @@ export default {
           return '#bc9f71';
         case '同意':
           return '#009240';
-        case '已逾期':
+        case '未审批':
           return '#D7000F';
       }
     },