You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
27 KiB
1 line
27 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a5f075c"],{"05f7":function(t,e,a){},"0a5a":function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"d",(function(){return n})),a.d(e,"c",(function(){return c})),a.d(e,"a",(function(){return r}));var i=a("b775");function s(t){return Object(i["a"])({url:"/api/admin/visit/index",method:"get",params:t})}function n(t){return Object(i["a"])({method:"get",url:"/api/admin/visit/show",params:t})}function c(t){return Object(i["a"])({method:"post",url:"/api/admin/visit/save",data:t})}function r(t){return Object(i["a"])({method:"get",url:"/api/admin/visit/destroy",params:t})}},"22a7":function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){return c}));var i=a("b775");function s(t){return Object(i["a"])({url:"/api/admin/gate/visit-list",method:"get",params:t})}function n(t){return Object(i["a"])({url:"/api/admin/gate/user-list",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/api/admin/gate/use-code",method:"get",params:t})}},"44e6":function(t,e,a){"use strict";a("8f0f")},"52fb":function(t,e,a){"use strict";a("05f7")},"8f0f":function(t,e,a){},a597:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"listwrap",staticStyle:{padding:"0 20px"}},[a("el-dialog",{attrs:{title:"今日访客",visible:t.listShow,width:"80%"},on:{"update:visible":function(e){t.listShow=e}}},[a("xy-table",{attrs:{"table-item":t.table,list:t.data,total:t.total,height:t.tableHeights,auths:[],"is-page":!1},on:{pageSizeChange:function(e){t.select.rows=e,t.select.page=1,t.getList()},pageIndexChange:function(e){t.select.page=e,t.getList()}},scopedSlots:t._u([{key:"btns",fn:function(){return[a("div")]},proxy:!0}])}),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.listShow=!1}}},[t._v("关 闭")])],1)],1)],1)},s=[],n=a("c7eb"),c=a("1da1"),r=a("22a7"),o={components:{},data:function(){return{listShow:!1,tableHeights:0,select:{page:1,rows:999,keyword:"",audit_status:"",start_date:"",end_date:"",is_export:0},selectRange:[],statusList:[{id:-1,value:"待学习"},{id:0,value:"待审核"},{id:1,value:"通过(待进厂)"},{id:2,value:"驳回"},{id:3,value:"已进厂"},{id:4,value:"已离厂"}],total:0,data:[],table:[{label:"序号",type:"index",fixed:"left",width:80},{label:"姓名",sortable:!1,prop:"name",fixed:"left",width:120},{label:"类型",sortable:!1,prop:"type_text",width:120},{label:"状态",sortable:!1,prop:"audit_status_text",width:120},{label:"是否随访",sortable:!1,prop:"follw_people",width:80,formatter:function(t,e,a){return a?"是":"否"}},{label:"预约时间",sortable:!1,prop:"date",width:120},{label:"证件类型",sortable:!1,prop:"credent",width:120,formatter:function(t,e,a){return 1==a?"身份证":"护照"}},{label:"证件号",sortable:!1,prop:"idcard",width:180},{label:"手机号",sortable:!1,prop:"mobile",width:120},{label:"单位名称",sortable:!1,prop:"company_name",width:180},{label:"开始时间",sortable:!1,prop:"start_date",width:180},{label:"结束时间",sortable:!1,prop:"end_date",width:180},{label:"创建时间",sortable:!1,prop:"created_at",width:180}]}},computed:{},mounted:function(){},created:function(){this.tableHeight(),this.getToday()},watch:{listShow:function(t){t&&this.getList()}},methods:{getToday:function(){var t=new Date,e=this.$moment(t).format("YYYY-MM-DD");this.select.start_date=e,this.select.end_date=e,this.selectRange=[e,e]},getList:function(){var t=this;return Object(c["a"])(Object(n["a"])().mark((function e(){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(r["b"])(t.select);case 2:a=e.sent,t.data=a.data,t.total=a.total;case 5:case"end":return e.stop()}}),e)})))()},selectRangeM:function(t){console.log(t),t?(this.select.start_date=t[0],this.select.end_date=t[1]):(this.select.start_date="",this.select.end_date="")},tableHeight:function(t){this.$nextTick((function(){var t=document.documentElement.clientHeight;this.tableHeights=.5*t,console.log(this.tableHeights)}))}}},l=o,d=(a("44e6"),a("2877")),u=Object(d["a"])(l,i,s,!1,null,"9f475ce6",null);e["default"]=u.exports},c119:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"gatewrap"},[a("div",{staticClass:"gateLeft"},[a("span",{on:{click:t.openList}},[t._v("今日访客")])]),a("div",{staticClass:"gateRight"},[a("span",[t._v(" "+t._s(t.gateName)),a("span",{on:{click:function(e){t.gateShow=!0}}},[t._v("切换")])]),a("span",{on:{click:t.screen}},[t._v(t._s(t.fullscreen?"取消全屏":"打开全屏"))])]),a("div",{staticClass:"gatecode"},[a("div",[t._v(" 拜访日期: "),a("el-date-picker",{staticStyle:{width:"400px","vertical-align":"middle"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.selectRangeM},model:{value:t.selectRange,callback:function(e){t.selectRange=e},expression:"selectRange"}})],1),a("div",[t._v(" 核验销码: "),a("el-input",{ref:"codeInput",staticStyle:{width:"160px","margin-right":"10px"},attrs:{clearable:"",size:"mini",placeholder:"请输入核销码或扫码"},on:{change:t.getList},model:{value:t.select.code,callback:function(e){t.$set(t.select,"code",e)},expression:"select.code"}})],1),a("div",[t._v(" 身份证件: "),a("el-input",{ref:"idInput",staticStyle:{width:"160px","margin-right":"10px"},attrs:{clearable:"",size:"mini",placeholder:"请输入身份证"},model:{value:t.select.idcard,callback:function(e){t.$set(t.select,"idcard",e)},expression:"select.idcard"}}),a("el-button",{attrs:{type:"primary"},on:{click:t.getIdcard}},[t._v("查询身份证")])],1),a("div",[a("el-button",{staticClass:"getButton",attrs:{type:"primary"},on:{click:t.getList}},[t._v("查询")])],1)])]),a("showVisit",{ref:"showVisit",on:{refresh:t.clearCode}}),a("list",{ref:"list"}),a("el-dialog",{attrs:{title:"请先选择门岗人员",visible:t.gateShow,width:"60%","close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(e){t.gateShow=e}}},[a("el-radio-group",{model:{value:t.gateAdminId,callback:function(e){t.gateAdminId=e},expression:"gateAdminId"}},t._l(t.gateData,(function(e){return a("el-radio",{attrs:{label:e.id,border:""}},[t._v(t._s(e.name))])})),1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.confirmGate}},[t._v("确 定")])],1)],1)],1)},s=[],n=a("c7eb"),c=a("b85c"),r=a("1da1"),o=(a("d81d"),a("b0c0"),a("ac1f"),a("5319"),a("a78e")),l=a.n(o),d=a("bc3a"),u=a.n(d),m=a("fcc0"),p=a("a597"),f=a("22a7"),h={components:{showVisit:m["default"],list:p["default"]},data:function(){return{fullscreen:!1,gateShow:!1,gateAdminId:"",gateName:"",gateData:[],gateUser:{},selectRange:[],select:{page:1,rows:10,keyword:"",audit_status:"",start_date:"",end_date:"",is_export:0,code:"",idcard:""},data:[]}},computed:{},mounted:function(){},created:function(){this.getUserList(),this.getToday()},methods:{openList:function(){this.$refs.list.listShow=!0},getToday:function(){var t=new Date,e=this.$moment(t).format("YYYY-MM-DD");this.select.start_date=e,this.select.end_date=e,this.selectRange=[e,e]},selectRangeM:function(t){console.log(t),t?(this.select.start_date=t[0],this.select.end_date=t[1]):(this.select.start_date="",this.select.end_date="")},clearCode:function(){var t=this;this.select.code="",this.select.idcard="",this.$nextTick((function(){t.$refs.codeInput.focus()}))},getList:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){var a,i,s,r;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(""!=t.select.code||""!=t.select.idcard){e.next=3;break}return t.$successMessage("请输入核销码或身份证件","","warning"),e.abrupt("return");case 3:return e.next=5,Object(f["b"])(t.select);case 5:if(a=e.sent,t.data=a.data,!(t.data.length>0)){e.next=34;break}i=Object(c["a"])(t.data),e.prev=9,i.s();case 11:if((s=i.n()).done){e.next=24;break}if(r=s.value,1!=r.audit_status&&3!=r.audit_status){e.next=21;break}return t.$refs["showVisit"].form=r,t.$refs["showVisit"].formDataType="coderecord",t.$refs["showVisit"].gateAdminId=t.gateAdminId,t.$refs["showVisit"].isShow=!0,e.abrupt("return");case 21:t.$successMessage(r.audit_status_text,"","success");case 22:e.next=11;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e["catch"](9),i.e(e.t0);case 29:return e.prev=29,i.f(),e.finish(29);case 32:e.next=35;break;case 34:t.$successMessage("未查询到记录","","warning");case 35:t.select.code="",t.select.idcard="";case 37:case"end":return e.stop()}}),e,null,[[9,26,29,32]])})))()},getUserList:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.gateUser=l.a.get("gateUser")?JSON.parse(l.a.get("gateUser")):"",console.log(t.gateUser),e.next=4,Object(f["c"])();case 4:if(a=e.sent,t.gateData=a,!t.gateUser.gateAdminId){e.next=13;break}return t.gateAdminId=t.gateUser.gateAdminId,t.gateName=t.gateUser.gateName,t.gateShow=!1,e.abrupt("return");case 13:t.gateShow=!0;case 14:case"end":return e.stop()}}),e)})))()},confirmGate:function(){var t=this;this.gateAdminId?(this.gateData.map((function(e){t.gateAdminId==e.id&&(t.gateName=e.name)})),l.a.set("gateUser",{gateName:this.gateName,gateAdminId:this.gateAdminId}),this.$nextTick((function(){t.$refs.codeInput.focus()})),this.gateShow=!1):this.$successMessage("请先选择门岗","","warning")},getIdcard:function(){var t=this,e=this;u.a.get("https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1",{headers:{"Content-Type":"application/json"}}).then((function(t){if(console.log(t),console.log(t.data),t.data){var a=t.data?t.data.split('"IDNumber"'):"",i=a[1].split(","),s=i[0].replace(/[^\d]/g,"");e.select.idcard=s,e.getList()}})).catch((function(e){console.log(e),t.$successMessage(e.statusText,"","warning")}))},screen:function(){var t=document.documentElement;this.fullscreen?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),this.fullscreen=!this.fullscreen},enterfullscreen:function(){var t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():elem.msRequestFullscreen&&elem.msRequestFullscreen()},exitfullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}}},b=h,v=(a("52fb"),a("2877")),y=Object(v["a"])(b,i,s,!1,null,"bdc1d70c",null);e["default"]=y.exports},eb62:function(t,e,a){},ebce:function(t,e,a){"use strict";a("eb62")},fcc0:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("xy-dialog",{ref:"dialog",attrs:{width:70,"is-show":t.isShow,type:"form",title:""+t.form.type_text,form:t.formData},on:{"update:isShow":function(e){t.isShow=e},"update:is-show":function(e){t.isShow=e}},scopedSlots:t._u([{key:"logs",fn:function(){return[a("el-timeline",{attrs:{reverse:!0}},t._l(t.form.logs,(function(e,i){return a("el-timeline-item",{key:i,attrs:{timestamp:e.created_at}},[t._v(" "+t._s(e.remark)+" ")])})),1)]},proxy:!0},"coderecord"==t.formDataType?{key:"checkcode",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label",staticStyle:{"font-size":"32px",width:"230px!important"}},[t._v(" 核销码: ")]),a("div",{staticClass:"xy-table-item-content"},[a("div",{staticStyle:{"font-size":"32px",padding:"25px",width:"400px"}},[t._v(" "+t._s(t.form.code)+" ")])])])]},proxy:!0}:null,"coderecord"==t.formDataType?{key:"codeType",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label",staticStyle:{"font-size":"32px",width:"280px!important"}},[t._v(" 核销状态: ")]),a("div",{staticClass:"xy-table-item-content"},[a("div",{staticStyle:{"font-size":"32px",padding:"25px",width:"400px"}},t._l(t.codeTypeList,(function(e){return a("div",[e.id==t.codeForm.type?a("div",[t._v(" "+t._s(e.value)+" ")]):t._e()])})),0)])])]},proxy:!0}:null,"coderecord"==t.formDataType?{key:"person_no",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label",staticStyle:{"font-size":"32px",width:"230px!important"}},[t._v(" 入场牌: ")]),a("div",{staticClass:"xy-table-item-content"},[a("xy-table",{staticStyle:{width:"600px"},attrs:{height:260,"is-page":!1,list:t.codeForm.person_no,"table-item":t.codefollowTable},scopedSlots:t._u([{key:"btns",fn:function(){},proxy:!0}],null,!1,992159138)})],1)])]},proxy:!0}:null,"coderecord"==t.formDataType?{key:"car_no",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label",staticStyle:{"font-size":"32px",width:"230px!important"}},[t._v(" 停车牌: ")]),a("div",{staticClass:"xy-table-item-content"},[a("xy-table",{staticStyle:{width:"600px"},attrs:{height:260,"is-page":!1,list:t.codeForm.car_no,"table-item":t.carfollowTable},scopedSlots:t._u([{key:"btns",fn:function(){},proxy:!0}],null,!1,992159138)})],1)])]},proxy:!0}:null,{key:"visitinfo",fn:function(){return[a("div",{staticStyle:{width:"600px"}},[t._v(" 拜访信息 ")])]},proxy:!0},{key:"date",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("到访日期: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.date)+" ")])])]},proxy:!0},{key:"visit_time_id",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("到访时段: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.visit_time?t.form.visit_time.start_time:"")+"至"+t._s(t.form.visit_time?t.form.visit_time.end_time:"")+" ")])])]},proxy:!0},{key:"visit_area_id",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("前往区域: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.visit_area?t.form.visit_area.name:"")+" ")])])]},proxy:!0},1==t.form.type?{key:"reason",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("到访事由: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.reason)+" ")])])]},proxy:!0}:null,2==t.form.type?{key:"workRange",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("施工时段: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.work_start_time)+"至"+t._s(t.form.work_end_time)+" ")])])]},proxy:!0}:null,3==t.form.type?{key:"plate",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 车辆类型: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.plate)+" ")])])]},proxy:!0}:null,{key:"remark",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 备注: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.remark)+" ")])])]},proxy:!0},{key:"visitorinfo",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-content",staticStyle:{width:"400px"}},[t._v(" 拜访人信息: ")])])]},proxy:!0},{key:"name",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("姓名: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.name)+" ")])])]},proxy:!0},{key:"mobile",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("联系电话: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.mobile)+" ")])])]},proxy:!0},{key:"credent",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v("证件类型: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(1==t.form.credent?"身份证":"护照")+" ")])])]},proxy:!0},{key:"idcard",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 证件号码: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.idcard)+" ")])])]},proxy:!0},{key:"company_name",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 单位名称: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.company_name)+" ")])])]},proxy:!0},{key:"cars",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 到访车辆: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.cars?t.form.cars.join(","):"")+" ")])])]},proxy:!0},1==t.form.type||2==t.form.type?{key:"follw_people",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("随访人员: ")]),a("div",{staticClass:"xy-table-item-content"},[a("xy-table",{staticStyle:{width:"620px"},attrs:{height:260,"is-page":!1,list:t.form.follw_people,"table-item":t.followTable},scopedSlots:t._u([{key:"btns",fn:function(){},proxy:!0}],null,!1,992159138)})],1)])]},proxy:!0}:null,{key:"long_time",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("长访客申请: ")]),a("div",{staticClass:"xy-table-item-content",staticStyle:{width:"620px"}},[t._v(" "+t._s(0==t.form.long_time?"否":"是")+" "),1==t.form.long_time?a("div",{staticStyle:{display:"inline-block","vertical-align":"middle","margin-left":"10px"}},[t._v(" "+t._s(t.form.start_date)+"至"+t._s(t.form.end_date)+" ")]):t._e()])])]},proxy:!0},{key:"visitorinfos",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-content",staticStyle:{width:"400px"}},[t._v(" 被访人信息: ")])])]},proxy:!0},{key:"accept_admin_id",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("人员: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.accept_admin?t.form.accept_admin.name:"")+" ")])])]},proxy:!0},3==t.form.type?{key:"accept_goods_admin_id",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[a("span",{staticStyle:{color:"red","font-weight":"600","padding-right":"4px"}}),t._v("收货人: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.accept_goods_admin?t.form.accept_goods_admin.name:"")+" ")])])]},proxy:!0}:null,"checkrecord"==t.formDataType?{key:"checkRecord",fn:function(){return[a("div",{staticStyle:{width:"600px"}},[t._v(" 审核 ")])]},proxy:!0}:null,0==t.form.audit_status&&t.isCheck?{key:"checkForm",fn:function(){return[a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{prop:"checkForm.status"}},[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v("状态: ")]),a("div",{staticClass:"xy-table-item-content"},[a("el-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择"},model:{value:t.checkForm.status,callback:function(e){t.$set(t.checkForm,"status",e)},expression:"checkForm.status"}},t._l(t.statusList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.value,value:t.id}})})),1)],1)])]),a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{prop:"checkForm.reason"}},[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" 备注: ")]),a("div",{staticClass:"xy-table-item-content"},[a("el-input",{staticStyle:{width:"300px"},attrs:{type:"textarea",placeholder:"请输入备注"},model:{value:t.checkForm.reason,callback:function(e){t.$set(t.checkForm,"reason",e)},expression:"checkForm.reason"}})],1)])])]},proxy:!0}:null,0!=t.form.audit_status||t.isCheck?null:{key:"checkText",fn:function(){return[a("div",{staticClass:"checkforms dbitem",staticStyle:{padding:"30rpx"}},[t._v(" "+t._s(t.checkText)+" ")])]},proxy:!0},{key:"footerContent",fn:function(){return[a("div",[a("Button",{attrs:{ghost:"",type:"primary"},on:{click:t.reset}},[t._v("取消")]),"checkrecord"==t.formDataType&&t.isCheck?a("Button",{attrs:{type:"primary"},on:{click:t.checkSubmit}},[t._v("审核")]):t._e(),"coderecord"==t.formDataType?a("Button",{attrs:{type:"primary"},on:{click:t.codeSubmit}},[t._v("确认")]):t._e()],1)]},proxy:!0}],null,!0)})],1)},s=[],n=a("5530"),c=a("c7eb"),r=a("1da1"),o=a("b85c"),l=(a("b0c0"),a("d81d"),a("b775"));function d(t){return Object(l["a"])({method:"post",url:"/api/admin/visit_audit/save",data:t})}var u=a("0a5a"),m=a("22a7"),p=a("c24f"),f=(a("a78e"),{components:{},data:function(){var t=this,e=this.$createElement;return{isShow:!1,id:"",userId:"",formDataType:"",formData:{checkcode:"",codeType:"",person_no:"",car_no:"",visitinfo:"",date:"",visit_time_id:"",visit_area_id:"",workRange:"",reason:"",plate:"",remark:"",visitorinfo:"",name:"",mobile:"",credent:1,idcard:"",company_name:"",cars:"",follw_people:[],long_time:0,longrange:"",visitorinfos:"",accpet_department_id:"",accept_admin_id:"",accept_goods_admin_id:"",checkRecord:"",checkForm:{},checkText:""},form:{},checkForm:{status:1},codeForm:{type:1,car_no:[],person_no:[]},codeTypeList:[{id:0,value:"请提醒被访人签字"},{id:1,value:"入场"},{id:2,value:"离场"}],gateAdminId:"",check_admin_name:"",carfollowTable:[{label:"车牌",prop:"car",width:200},{label:"停车牌",prop:"car_no",width:400,customFn:function(a,i){return e("el-input",{attrs:{type:"text",placeholder:"请填写停车牌"},model:{value:a.car_no,callback:function(e){t.$set(a,"car_no",e)}}})}}],codefollowTable:[{label:"姓名",prop:"name",width:200},{label:"入场牌",prop:"person_no",width:400,customFn:function(a,i){return e("el-input",{attrs:{type:"text",placeholder:"请填写入场牌"},model:{value:a.person_no,callback:function(e){t.$set(a,"person_no",e)}}})}}],followTable:[{label:"姓名",prop:"name",width:200},{label:"联系电话",prop:"mobile",width:200},{label:"证件类型",prop:"credent",width:200,formatter:function(t,e,a){return 1==a?"身份证":"护照"}},{label:"证件号码",prop:"idcard",width:200}],statusList:[{id:1,value:"通过"},{id:2,value:"驳回"}],checkLevel:[{id:1,value:"请等待一级审核完成"},{id:2,value:"请等待二级审核完成"},{id:3,value:"请等待三级审核完成"}],checkText:"",isCheck:!1}},created:function(){},watch:{isShow:function(t){if(t){if("checkrecord"==this.formDataType&&(this.checkForm.visit_id=this.id,this.getUserId(),this.getDetail()),"coderecord"==this.formDataType)if(console.log("123"),console.log(this.form),this.codeForm.code=this.form.code,this.codeForm.admin_id=parseInt(this.gateAdminId),this.codeForm.type=1==this.form.audit_status?1:3==this.form.audit_status&&this.form.accept_admin_sign?2:0,1==this.codeForm.type){this.codeForm.person_no.push({name:this.form.name,person_no:""});var e,a=Object(o["a"])(this.form.follw_people);try{for(a.s();!(e=a.n()).done;){var i=e.value;this.codeForm.person_no.push({name:i.name,person_no:""})}}catch(m){a.e(m)}finally{a.f()}var s,n=Object(o["a"])(this.form.cars);try{for(n.s();!(s=n.n()).done;){var c=s.value;this.codeForm.car_no.push({car:c,car_no:""})}}catch(m){n.e(m)}finally{n.f()}}else{var r,l=Object(o["a"])(this.form.person_no);try{for(l.s();!(r=l.n()).done;){i=r.value;this.codeForm.person_no.push(JSON.parse(i))}}catch(m){l.e(m)}finally{l.f()}var d,u=Object(o["a"])(this.form.car_no);try{for(u.s();!(d=u.n()).done;){c=d.value;this.codeForm.car_no.push(JSON.parse(c))}}catch(m){u.e(m)}finally{u.f()}}}else this.reset()}},methods:{selectLevel:function(t){var e=this;this.form.audit.map((function(a){a.level==t&&(e.checkForm.level=a.level,e.checkForm.id=a.id,e.checkForm.audit_admin_id=a.audit_admin_id,e.check_admin_name=a.audit_admin?a.audit_admin.name:"")}))},getUserId:function(){var t=this;return Object(r["a"])(Object(c["a"])().mark((function e(){var a;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(p["b"])();case 2:a=e.sent,t.userId=a.id;case 4:case"end":return e.stop()}}),e)})))()},getDetail:function(){var t=this;return Object(r["a"])(Object(c["a"])().mark((function e(){var a,i,s,n,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["d"])({id:t.id});case 2:a=e.sent,i=t,t.form=a,s=Object(o["a"])(i.form.audit),e.prev=6,s.s();case 8:if((n=s.n()).done){e.next=27;break}if(r=n.value,0!=r.status){e.next=24;break}if(r.audit_admin_id!=i.userId){e.next=19;break}return i.checkForm.level=r.level,i.checkForm.id=r.id,i.checkForm.audit_admin_id=r.audit_admin_id,i.isCheck=!0,e.abrupt("return");case 19:return i.checkText="请等待"+r.audit_admin.name+"审核",i.isCheck=!1,e.abrupt("return");case 22:e.next=25;break;case 24:i.isCheck=!1;case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e["catch"](6),s.e(e.t0);case 32:return e.prev=32,s.f(),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[6,29,32,35]])})))()},reset:function(){this.id="",this.formDataType="",this.checkForm={},this.check_admin_name="",this.codeForm={type:1,car_no:[],person_no:[]},this.codeType="",this.gateAdminId="",this.isShow=!1,this.$refs["dialog"].reset()},checkSubmit:function(){var t=this;console.log(this.checkForm);var e=this;d(Object(n["a"])({},e.checkForm)).then((function(e){t.$successMessage("审核成功"),t.isShow=!1,t.$emit("refresh")}))},codeSubmit:function(){var t=this,e=this;if(console.log(this.codeForm),console.log(this.codeForm.person_no),0==this.codeForm.type)return this.$successMessage("请提醒被访人签字","","warning"),void(this.isShow=!1);Object(m["a"])(Object(n["a"])({},e.codeForm)).then((function(e){t.$successMessage("核销成功"),t.isShow=!1,t.$emit("refresh")}))}}}),h=f,b=(a("ebce"),a("2877")),v=Object(b["a"])(h,i,s,!1,null,"772341ac",null);e["default"]=v.exports}}]); |