cyy 1 год назад
Родитель
Сommit
59562dbb91
1 измененных файлов с 369 добавлено и 367 удалено
  1. 369 367
      src/views/platform/bpmn/alienRegistration/index.vue

+ 369 - 367
src/views/platform/bpmn/alienRegistration/index.vue

@@ -25,6 +25,23 @@
                     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="jinRuYuanYin"
                     required
@@ -68,29 +85,14 @@
                     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
+
+                <!-- <van-field
                     v-model="jieDaiBuMen"
                     label="接待部门:"
                     placeholder="请输入部门"
                     label-width="7em"
                     clearable
-                />
+                /> -->
                 <van-field
                     v-model="beiZhu"
                     label="备注:"
@@ -148,366 +150,366 @@
 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: ''
-            qiTa: '',
-            showPicker: false,
-            columns: ['参观学习', '设备安装调试', '设备维修维护', '配送试剂耗材', '其他'],
-            promptShow: false,
-            promptObj: {
-                iconName: 'passed',
-                promptontent: '登记成功',
-                color: '#1989fa',
-                buttonColor: 'info',
-                buttonName: '确定'
-            }
-        }
-    },
-    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()
+    this.getQdInfo()
+  },
+  mounted() {
+    this.$refs.alienRegistrationRootClass.style.height = document.documentElement.clientHeight + 'px'
+  },
+  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)
     },
-    mounted() {
-        this.$refs.alienRegistrationRootClass.style.height = document.documentElement.clientHeight + 'px'
+    onFailed(errorInfo) {
+      console.log('failed', errorInfo)
+    },
+    onConfirm(value) {
+      this.jinRuYuanYin = value
+      this.showPicker = false
     },
-    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(),
-                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: '进入路径错误,请联系管理人员!'
-                    })
-                }
+    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(),
+        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)
+              }
             })
-        },
-        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
-        },
-        /**
+          } 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.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>