Просмотр исходного кода

外来人员进出登记功能优化

lidie 1 год назад
Родитель
Сommit
0c719a4436
1 измененных файлов с 509 добавлено и 341 удалено
  1. 509 341
      src/views/platform/bpmn/alienRegistration/index.vue

+ 509 - 341
src/views/platform/bpmn/alienRegistration/index.vue

@@ -1,362 +1,513 @@
 <template>
-  <div ref="alienRegistrationRootClass" class="alienRegistrationRootClass20241028">
-    <van-sticky>
-      <van-nav-bar
-        :title="'外来人员登记'"
-        :left-text="$t('common.button.back')"
-        left-arrow
-        @click-left="$router.push({ name: 'login' })"
-      />
-    </van-sticky>
-    <div v-if="statusCode==='1'">
-      <van-form validate-first @failed="onFailed">
-        <van-field
-          v-model="waiLaiRenYuan"
-          required
-          label="姓名:"
-          placeholder="请输入姓名"
-          label-width="7em"
-          clearable
-        />
-        <van-field
-          v-model="keHuMing"
-          label="单位:"
-          placeholder="请输入单位"
-          label-width="7em"
-          clearable
-        />
-        <van-field
-          v-model="jinRuYuanYin"
-          required
-          label="进入原因:"
-          placeholder="请输入原因"
-          label-width="7em"
-          clearable
-        />
-        <van-field
-          v-model="jinRuQuYu"
-          label="进入区域:"
-          placeholder="请输入区域"
-          label-width="7em"
-          clearable
-        />
-        <van-field
-          v-model="shouJiHao"
-          required
-          label="手机号:"
-          placeholder="请输入您的手机号"
-          label-width="7em"
-          :rules="[{ validator, message: '请输入正确内容' }]"
-          clearable
-        />
-        <van-field
-          v-model="peiTongRen"
-          required
-          label="接待人:"
-          placeholder="请输入人员名称"
-          label-width="7em"
-          clearable
-        /><van-field
-          v-model="jieDaiBuMen"
-          label="接待部门:"
-          placeholder="请输入部门"
-          label-width="7em"
-          clearable
-        />
-        <van-field
-          v-model="beiZhu"
-          label="备注:"
-          placeholder="请输入备注"
-          label-width="7em"
-          clearable
-        />
-        <div class="qdBtn">
-          <van-button
-            type="success"
-            class="btn btn-back-color"
-            @click="onSubmit"
-          >
-            登记进入
-          </van-button>
+    <div ref="alienRegistrationRootClass" class="alienRegistrationRootClass20241028">
+        <van-sticky>
+            <van-nav-bar
+                :title="'外来人员登记'"
+                :left-text="$t('common.button.back')"
+                left-arrow
+                @click-left="$router.push({ name: 'login' })"
+            />
+        </van-sticky>
+        <div v-if="statusCode==='1'">
+            <van-form validate-first @failed="onFailed">
+                <van-field
+                    v-model="waiLaiRenYuan"
+                    required
+                    label="姓名:"
+                    placeholder="请输入姓名"
+                    label-width="7em"
+                    clearable
+                />
+                <van-field
+                    v-model="keHuMing"
+                    label="单位:"
+                    placeholder="请输入单位"
+                    label-width="7em"
+                    clearable
+                />
+                <!-- <van-field
+                    v-model="jinRuYuanYin"
+                    required
+                    label="进入原因:"
+                    placeholder="请输入原因"
+                    label-width="7em"
+                    clearable
+                /> -->
+
+                <van-field
+                    v-model="jinRuYuanYin"
+                    readonly
+                    clickable
+                    label-width="7em"
+                    label="进入原因"
+                    placeholder="请选择原因"
+                    @click="showPicker = true"
+                />
+                <van-popup v-model="showPicker" position="bottom">
+                    <van-picker
+                        show-toolbar
+                        :columns="columns"
+                        @confirm="onConfirm"
+                        @cancel="showPicker = false"
+                    />
+                </van-popup>
+
+                <!-- 其他 -->
+                <van-field
+                    v-if="jinRuYuanYin=='其他'"
+                    v-model="qiTa"
+                    label=""
+                    placeholder="请输入原因"
+                    label-width="7em"
+                    clearable
+                />
+                <van-field
+                    v-model="jinRuQuYu"
+                    label="进入区域:"
+                    placeholder="请输入区域"
+                    label-width="7em"
+                    clearable
+                />
+                <van-field
+                    v-model="shouJiHao"
+                    required
+                    label="手机号:"
+                    placeholder="请输入您的手机号"
+                    label-width="7em"
+                    :rules="[{ validator, message: '请输入正确内容' }]"
+                    clearable
+                />
+                <van-field
+                    v-model="peiTongRen"
+                    required
+                    label="接待人:"
+                    placeholder="请输入人员名称"
+                    label-width="7em"
+                    clearable
+                /><van-field
+                    v-model="jieDaiBuMen"
+                    label="接待部门:"
+                    placeholder="请输入部门"
+                    label-width="7em"
+                    clearable
+                />
+                <van-field
+                    v-model="beiZhu"
+                    label="备注:"
+                    placeholder="请输入备注"
+                    label-width="7em"
+                    clearable
+                />
+                <div class="qdBtn">
+                    <van-button
+                        type="success"
+                        class="btn btn-back-color"
+                        @click="onSubmit"
+                    >
+                        登记进入
+                    </van-button>
+
+                </div>
+            </van-form>
         </div>
-      </van-form>
-    </div>
-    <div v-if="statusCode==='2'">
-      <!-- <button class="btn68">登记离开</button> -->
-      <van-form validate-first @failed="onFailed">
-        <van-field
-          v-model="shouJiHao"
-          label="手机号:"
-          required
-          placeholder="请输入您的手机号"
-          label-width="7em"
-          clearable
-          :rules="[{ validator, message: '请输入正确内容' }]"
-        />
-        <div class="qdBtn">
-          <van-button
-            type="success"
-            class="btn btn-back-color"
-            @click="onSubmit"
-          >
-            登记离开
-          </van-button>
+        <div v-if="statusCode==='2'">
+            <!-- <button class="btn68">登记离开</button> -->
+            <van-form validate-first @failed="onFailed">
+                <van-field
+                    v-model="shouJiHao"
+                    label="手机号:"
+                    required
+                    placeholder="请输入您的手机号"
+                    label-width="7em"
+                    clearable
+                    :rules="[{ validator, message: '请输入正确内容' }]"
+                />
+                <div class="qdBtn">
+                    <van-button
+                        type="success"
+                        class="btn btn-back-color"
+                        @click="onSubmit"
+                    >
+                        登记离开
+                    </van-button>
+                </div>
+            </van-form>
         </div>
-      </van-form>
+        <!-- 登录成功和退出成功的提示 -->
+        <van-popup v-if="promptShow" v-model="promptShow" position="bottom" :style="{height:'100%',width:'100%'}">
+            <div class="promptStyle">
+                <van-icon :name="promptObj.iconName" :color="promptObj.color" size="10rem" />
+                <div class="content">{{ promptObj.promptontent }}</div>
+                <div class="nowTime">{{ this.getNowTime() }}</div>
+                <div class="btn"><van-button :type="promptObj.buttonColor" @click="quding()">{{ promptObj.buttonName }}</van-button></div>
+            </div>
+        </van-popup>
     </div>
-  </div>
 </template>
 <script>
 import { query, save } from '@/api/platform/feature/alienRegistration'
 import ActionUtils from '@/utils/action'
 export default {
-  data() {
-    const { userInfo } = this.$store.getters
-    return {
-      userInfo,
-      qdInfo: [],
-      statusCode: '1',
-      waiLaiRenYuan: '',
-      keHuMing: '',
-      jinRuYuanYin: '',
-      jinRuQuYu: '',
-      peiTongRen: '',
-      jieDaiBuMen: '',
-      beiZhu: '',
-      shouJiHao: ''
-      // aa: ''
-    }
-  },
-  created() {
+    data() {
+        const { userInfo } = this.$store.getters
+        return {
+            userInfo,
+            qdInfo: [],
+            statusCode: '1',
+            waiLaiRenYuan: '',
+            keHuMing: '',
+            jinRuYuanYin: '',
+            jinRuQuYu: '实验室',
+            peiTongRen: '',
+            jieDaiBuMen: '',
+            beiZhu: '',
+            shouJiHao: '',
+            // aa: ''
+            qiTa: '',
+            showPicker: false,
+            columns: ['参观学习', '设备安装调试', '设备维修维护', '配送试剂耗材', '其他'],
+            promptShow: false,
+            promptObj: {
+                iconName: 'passed',
+                promptontent: '登记成功',
+                color: '#1989fa',
+                buttonColor: 'info',
+                buttonName: '确定'
+            }
+        }
+    },
+    created() {
     // console.log(navigator)
     // document.addEventListener('plusready', function() {
     //   this.aa = plus.device.uuid
     // }, true)
-    this.getQdInfo()
-  },
-  mounted() {
-    this.$refs.alienRegistrationRootClass.style.height = document.documentElement.clientHeight + 'px'
-  },
-  methods: {
-    validator(val) {
-      return /^1[3-9]\d{9}$/.test(val)
+        this.getQdInfo()
     },
-    onFailed(errorInfo) {
-      console.log('failed', errorInfo)
+    mounted() {
+        this.$refs.alienRegistrationRootClass.style.height = document.documentElement.clientHeight + 'px'
     },
-    getQdInfo() {
-      console.log(this.$route.query)
-      // type: 1.登记进入,2.登记离开
-      if (this.$route.query.type) {
-        this.statusCode = this.$route.query.type
-        // query(this.getSearcFormData('qrcode')).then(res => {
-        //   const data = res.data.dataResult || []
-        //   console.log(data)
-        //   // if (data.length > 0) {
-        //   //   this.qdInfo = data[0].xiangXiXinXi !== '' ? JSON.parse(data[0].xiangXiXinXi) : 0
-        //   //   this.scanList = data[0]
-        //   //   if (data[0].zhuangTai === '失效') {
-        //   //     // 二维码失效
-        //   //     this.statusCode = 3
-        //   //   } else {
-        //   //     this.guanlianID = data[0].guanLianId
-        //   //     this.yeWuBiaoMing = data[0].biaoMing
-        //   //     this.statusCode = 2
-        //   //   }
-        //   // }
-        // })
-      } else {
-        // 无type
-        this.statusCode = '0'
-      }
-    },
-    getAlreadyQD() {
-      const paramWhere1 = {
-        bianZhiShiJian: this.getNow().slice(0, 10),
-        waiLaiRenYuan: this.waiLaiRenYuan,
-        keHuMing: this.keHuMing,
-        jinRuYuanYin: this.jinRuYuanYin,
-        jinRuQuYu: this.jinRuQuYu,
-        peiTongRen: this.peiTongRen,
-        jieDaiBuMen: this.jieDaiBuMen,
-        beiZhu: this.beiZhu,
-        shouJiHao: this.shouJiHao,
-        jinRuShiJian: this.getNow(),
-        shiFouGuoShen: '已暂存'
-      }
-      const paramWhere2 = {
-        shouJiHao: this.shouJiHao,
-        liKaiShiJian: this.getNow(),
-        shiFouGuoShen: '已完成'
-      }
-      query(this.getSearcFormData('qrcode')).then(res => {
-        const data = res.data.dataResult || []
-        console.log(data)
-        if (this.statusCode === '1') {
-          if (data.length === 0 || !data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
-            save(paramWhere1).then(res => {
-              if (res.state === 200) {
-                this.$toast({
-                  duration: 30000, // 持续展示 toast
-                  message: '登记进入成功'
-                })
-                setTimeout(() => {
-                  this.statusCode = '0'
-                  this.$router.push({ name: 'login' })
-                }, 1000)
-              }
-            })
-          } else if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
-            this.$toast({
-              duration: 30000, // 持续展示 toast
-              message: '该手机号存在未登记离开数据,请扫离开码登记离开!'
-            })
-          }
-        } else if (this.statusCode === '2') {
-          if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
-            paramWhere2.id = data[0].id
-            save(paramWhere2).then(res => {
-              if (res.state === 200) {
-                this.$toast({
-                  duration: 30000, // 持续展示 toast
-                  message: '登记离开成功'
-                })
-                setTimeout(() => {
-                  this.statusCode = '0'
-                  this.$router.push({ name: 'login' })
-                }, 1000)
-              }
-            })
-          } else {
-            this.$toast({
-              duration: 30000, // 持续展示 toast
-              message: '该手机号不存在未登记离开的数据!'
+    methods: {
+        getNowTime() {
+            const now = new Date()
+            const year = now.getFullYear()
+            const month = String(now.getMonth() + 1).padStart(2, '0') // 月份从0开始,需要加1
+            const day = String(now.getDate()).padStart(2, '0')
+            const hour = String(now.getHours()).padStart(2, '0')
+            const minute = String(now.getMinutes()).padStart(2, '0')
+            const second = String(now.getSeconds()).padStart(2, '0')
+            const formattedTime = `${year}-${month}-${day} ${hour}:${minute}:${second}`
+            return formattedTime
+        },
+        quding() {
+            setTimeout(() => {
+                this.statusCode = '0'
+                this.$router.push({ name: 'login' })
+                this.promptShow = false
+            }, 1000)
+        },
+        validator(val) {
+            return /^1[3-9]\d{9}$/.test(val)
+        },
+        onFailed(errorInfo) {
+            console.log('failed', errorInfo)
+        },
+        onConfirm(value) {
+            this.jinRuYuanYin = value
+            this.showPicker = false
+        },
+
+        getQdInfo() {
+            console.log(this.$route.query)
+            // type: 1.登记进入,2.登记离开
+            if (this.$route.query.type) {
+                this.statusCode = this.$route.query.type
+                // query(this.getSearcFormData('qrcode')).then(res => {
+                //   const data = res.data.dataResult || []
+                //   console.log(data)
+                //   // if (data.length > 0) {
+                //   //   this.qdInfo = data[0].xiangXiXinXi !== '' ? JSON.parse(data[0].xiangXiXinXi) : 0
+                //   //   this.scanList = data[0]
+                //   //   if (data[0].zhuangTai === '失效') {
+                //   //     // 二维码失效
+                //   //     this.statusCode = 3
+                //   //   } else {
+                //   //     this.guanlianID = data[0].guanLianId
+                //   //     this.yeWuBiaoMing = data[0].biaoMing
+                //   //     this.statusCode = 2
+                //   //   }
+                //   // }
+                // })
+            } else {
+                // 无type
+                this.statusCode = '0'
+            }
+        },
+        // getAlreadyQD() {
+        //     const paramWhere1 = {
+        //         bianZhiShiJian: this.getNow().slice(0, 10),
+        //         waiLaiRenYuan: this.waiLaiRenYuan,
+        //         keHuMing: this.keHuMing,
+        //         jinRuYuanYin: this.jinRuYuanYin,
+        //         jinRuQuYu: this.jinRuQuYu,
+        //         peiTongRen: this.peiTongRen,
+        //         jieDaiBuMen: this.jieDaiBuMen,
+        //         beiZhu: this.beiZhu,
+        //         shouJiHao: this.shouJiHao,
+        //         jinRuShiJian: this.getNow(),
+        //         shiFouGuoShen: '已暂存'
+        //     }
+        //     const paramWhere2 = {
+        //         shouJiHao: this.shouJiHao,
+        //         liKaiShiJian: this.getNow(),
+        //         shiFouGuoShen: '已完成'
+        //     }
+        //     query(this.getSearcFormData('qrcode')).then(res => {
+        //         const data = res.data.dataResult || []
+        //         console.log(data)
+        //         if (this.statusCode === '1') {
+        //             if (data.length === 0 || !data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+        //                 save(paramWhere1).then(res => {
+        //                     if (res.state === 200) {
+        //                         this.$toast({
+        //                             duration: 30000, // 持续展示 toast
+        //                             message: '登记进入成功'
+        //                         })
+        //                         setTimeout(() => {
+        //                             this.statusCode = '0'
+        //                             this.$router.push({ name: 'login' })
+        //                         }, 1000)
+        //                     }
+        //                 })
+        //             } else if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+        //                 this.$toast({
+        //                     duration: 30000, // 持续展示 toast
+        //                     message: '该手机号存在未登记离开数据,请扫离开码登记离开!'
+        //                 })
+        //             }
+        //         } else if (this.statusCode === '2') {
+        //             if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+        //                 paramWhere2.id = data[0].id
+        //                 save(paramWhere2).then(res => {
+        //                     if (res.state === 200) {
+        //                         this.$toast({
+        //                             duration: 30000, // 持续展示 toast
+        //                             message: '登记离开成功'
+        //                         })
+        //                         setTimeout(() => {
+        //                             this.statusCode = '0'
+        //                             this.$router.push({ name: 'login' })
+        //                         }, 1000)
+        //                     }
+        //                 })
+        //             } else {
+        //                 this.$toast({
+        //                     duration: 30000, // 持续展示 toast
+        //                     message: '该手机号不存在未登记离开的数据!'
+        //                 })
+        //             }
+        //         } else {
+        //             this.$toast({
+        //                 duration: 30000, // 持续展示 toast
+        //                 message: '进入路径错误,请联系管理人员!'
+        //             })
+        //         }
+        //     })
+        // },
+        getAlreadyQD() {
+            const paramWhere1 = {
+                bianZhiShiJian: this.getNow().slice(0, 10),
+                waiLaiRenYuan: this.waiLaiRenYuan,
+                keHuMing: this.keHuMing,
+                jinRuYuanYin: this.jinRuYuanYin,
+                jinRuQuYu: this.jinRuQuYu,
+                peiTongRen: this.peiTongRen,
+                jieDaiBuMen: this.jieDaiBuMen,
+                beiZhu: this.beiZhu,
+                shouJiHao: this.shouJiHao,
+                jinRuShiJian: this.getNow(),
+                shiFouGuoShen: '已暂存'
+            }
+            const paramWhere2 = {
+                shouJiHao: this.shouJiHao,
+                liKaiShiJian: this.getNow(),
+                shiFouGuoShen: '已完成'
+            }
+            query(this.getSearcFormData('qrcode')).then(res => {
+                const data = res.data.dataResult || []
+                console.log(data)
+                if (this.statusCode === '1') {
+                    if (data.length === 0 || !data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+                        save(paramWhere1).then(res => {
+                            if (res.state === 200) {
+                                this.promptShow = true
+                                this.promptObj.iconName = 'passed'
+                                this.promptObj.promptontent = '登记成功'
+                                this.promptObj.color = '#1989fa'
+                                this.promptObj.buttonColor = 'info'
+                                this.promptObj.buttonName = '确定'
+                                this.$toast({
+                                    duration: 30000, // 持续展示 toast
+                                    message: this.promptObj.promptontent
+                                })
+                            }
+                        })
+                    } else if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+                        this.$toast({
+                            duration: 30000, // 持续展示 toast
+                            message: '该手机号存在未登记离开数据,请扫离开码登记离开!'
+                        })
+                    }
+                } else if (this.statusCode === '2') {
+                    if (data.length > 0 && data.some(r => r.liKaiShiJian === null || r.liKaiShiJian === '')) {
+                        paramWhere2.id = data[0].id
+                        save(paramWhere2).then(res => {
+                            if (res.state === 200) {
+                                this.promptObj.iconName = 'passed'
+                                this.promptObj.promptontent = '离开成功'
+                                this.promptObj.color = '#1989fa'
+                                this.promptObj.buttonColor = 'info'
+                                this.promptObj.buttonName = '确定'
+                                this.promptShow = true
+                                this.$toast({
+                                    duration: 30000, // 持续展示 toast
+                                    message: this.promptObj.promptontent
+                                })
+                                // setTimeout(() => {
+                                //     this.statusCode = '0'
+                                //     this.$router.push({ name: 'login' })
+                                // }, 1000)
+                            }
+                        })
+                    } else {
+                        this.$toast({
+                            duration: 30000, // 持续展示 toast
+                            message: '该手机号不存在未登记离开的数据!'
+                        })
+                    }
+                } else {
+                    this.$toast({
+                        duration: 30000, // 持续展示 toast
+                        message: '进入路径错误,请联系管理人员!'
+                    })
+                }
             })
-          }
-        } else {
-          this.$toast({
-            duration: 30000, // 持续展示 toast
-            message: '进入路径错误,请联系管理人员!'
-          })
-        }
-      })
-    },
-    onSubmit() {
-      console
-      if (this.statusCode === '1') {
-        if (this.waiLaiRenYuan === '') {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '请输入外来人员姓名'
-          })
-        } else if (this.waiLaiRenYuan.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '外来人员姓名长度超出'
-          })
-        } else if (this.jinRuYuanYin === '') {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '请输入进入原因'
-          })
-        } else if (this.jinRuYuanYin.length > 1000) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '进入原因长度超出'
-          })
-        } else if (this.peiTongRen === '') {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '请输入接待人'
-          })
-        } else if (this.peiTongRen.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '接待人长度超出'
-          })
-        } else if (this.keHuMing.length > 1000) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '外来人员单位长度超出'
-          })
-        } else if (this.jinRuQuYu.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '进入区域长度超出'
-          })
-        } else if (this.jieDaiBuMen.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '接待部门长度超出'
-          })
-        } else if (this.beiZhu.length > 1000) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '备注长度超出'
-          })
-        } else if (this.shouJiHao.length === '') {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '请输入手机号'
-          })
-        } else if (this.shouJiHao.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '手机号长度超出'
-          })
-        } else if (!(/^1[3-9]\d{9}$/.test(this.shouJiHao))) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '手机号格式不正确'
-          })
-        } else {
-          this.getAlreadyQD()
-        }
-      } else if (this.statusCode === '2') {
-        if (this.shouJiHao === '') {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '请输入手机号'
-          })
-        } else if (this.shouJiHao.length > 200) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '手机号长度超出'
-          })
-        } else if (!(/^1[3-9]\d{9}$/.test(this.shouJiHao))) {
-          this.$toast({
-            duration: 2000, // 持续展示 toast
-            message: '手机号格式不正确'
-          })
-        } else {
-          this.getAlreadyQD()
-        }
-      }
-    },
-    // 获取当前时间
-    getNow() {
-      const now = new Date()
-      const year = now.getFullYear()
-      const month = ('0' + (now.getMonth() + 1)).slice(-2)
-      const day = ('0' + now.getDate()).slice(-2)
-      const hours = ('0' + now.getHours()).slice(-2)
-      const minutes = ('0' + now.getMinutes()).slice(-2)
-      // const seconds = ('0' + now.getSeconds()).slice(-2)
-      const formattedTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes
-      return formattedTime
-    },
-    /**
+        },
+        onSubmit() {
+            console
+            if (this.statusCode === '1') {
+                if (this.waiLaiRenYuan === '') {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '请输入外来人员姓名'
+                    })
+                } else if (this.waiLaiRenYuan.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '外来人员姓名长度超出'
+                    })
+                } else if (this.jinRuYuanYin === '' || (this.jinRuYuanYin === '其他' && this.qiTa === '')) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '请输入进入原因'
+                    })
+                } else if (this.jinRuYuanYin.length > 1000) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '进入原因长度超出'
+                    })
+                } else if (this.peiTongRen === '') {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '请输入接待人'
+                    })
+                } else if (this.peiTongRen.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '接待人长度超出'
+                    })
+                } else if (this.keHuMing.length > 1000) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '外来人员单位长度超出'
+                    })
+                } else if (this.jinRuQuYu.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '进入区域长度超出'
+                    })
+                } else if (this.jieDaiBuMen.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '接待部门长度超出'
+                    })
+                } else if (this.beiZhu.length > 1000) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '备注长度超出'
+                    })
+                } else if (this.shouJiHao.length === '') {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '请输入手机号'
+                    })
+                } else if (this.shouJiHao.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '手机号长度超出'
+                    })
+                } else if (!(/^1[3-9]\d{9}$/.test(this.shouJiHao))) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '手机号格式不正确'
+                    })
+                } else {
+                    this.getAlreadyQD()
+                }
+            } else if (this.statusCode === '2') {
+                if (this.shouJiHao === '') {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '请输入手机号'
+                    })
+                } else if (this.shouJiHao.length > 200) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '手机号长度超出'
+                    })
+                } else if (!(/^1[3-9]\d{9}$/.test(this.shouJiHao))) {
+                    this.$toast({
+                        duration: 2000, // 持续展示 toast
+                        message: '手机号格式不正确'
+                    })
+                } else {
+                    this.getAlreadyQD()
+                }
+            }
+        },
+        // 获取当前时间
+        getNow() {
+            const now = new Date()
+            const year = now.getFullYear()
+            const month = ('0' + (now.getMonth() + 1)).slice(-2)
+            const day = ('0' + now.getDate()).slice(-2)
+            const hours = ('0' + now.getHours()).slice(-2)
+            const minutes = ('0' + now.getMinutes()).slice(-2)
+            // const seconds = ('0' + now.getSeconds()).slice(-2)
+            const formattedTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes
+            return formattedTime
+        },
+        /**
      * 获取格式化参数
      */
-    getSearcFormData(val) {
-      const params = { 'Q^shou_ji_hao_^SL': this.shouJiHao }
-      const sorts = { 'create_time_': 'DESC' }
-      return ActionUtils.formatParams(
-        params,
-        {},
-        sorts)
+        getSearcFormData(val) {
+            const params = { 'Q^shou_ji_hao_^SL': this.shouJiHao }
+            const sorts = { 'create_time_': 'DESC' }
+            return ActionUtils.formatParams(
+                params,
+                {},
+                sorts)
+        }
     }
-  }
 }
 </script>
 <style lang="scss" scoped>
@@ -454,5 +605,22 @@ export default {
 .alienRegistrationRootClass20241028::-webkit-scrollbar{
   width: 0;
 }
-
+.promptStyle{
+  width: 100%;
+  margin-top: 50%;
+  text-align: center;
+  .content{
+    padding: 15px 0;
+  }
+  .nowTime{
+     padding: 0 0 15px 0;
+     font-size: 18px;
+  }
+  .btn{
+    margin-top: 15%;
+    .van-button{
+      width: 75%;
+    }
+  }
+}
 </style>