|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-053cb896"],{"0490":function(t,e,a){"use strict";a("4517")},"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 o}));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 o(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})}},4517:function(t,e,a){},"4dc5":function(t,e,a){},"813a":function(t,e,a){"use strict";a("4dc5")},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.page_size=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("c14f"),c=a("1da1"),o=a("22a7"),r={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"])().m((function e(){var a;return Object(n["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,Object(o["b"])(t.select);case 1:a=e.v,t.data=a.data,t.total=a.total;case 2:return e.a(2)}}),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=r,d=(a("0490"),a("2877")),u=Object(d["a"])(l,i,s,!1,null,"a54bd442",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("c14f"),c=a("b85c"),o=a("1da1"),r=(a("d81d"),a("b0c0"),a("b64b"),a("d3b7"),a("ac1f"),a("5319"),a("0643"),a("a573"),a("a78e")),l=a.n(r),d=a("bc3a"),u=a.n(d),m=a("fcc0"),f=a("a597"),p=a("22a7"),h={components:{showVisit:m["default"],list:f["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(o["a"])(Object(n["a"])().m((function e(){var a,i,s,o,r;return Object(n["a"])().w((function(e){while(1)switch(e.p=e.n){case 0:if(""!=t.select.code||""!=t.select.idcard){e.n=1;break}return t.$successMessage("请输入核销码或身份证件","","warning"),e.a(2);case 1:return e.n=2,Object(p["b"])(t.select);case 2:if(a=e.v,t.data=a.data,!(t.data.length>0)){e.n=11;break}i=Object(c["a"])(t.data),e.p=3,i.s();case 4:if((s=i.n()).done){e.n=7;break}if(o=s.value,1!=o.audit_status&&3!=o.audit_status){e.n=5;break}return t.$refs["showVisit"].form=o,t.$refs["showVisit"].formDataType="coderecord",t.$refs["showVisit"].gateAdminId=t.gateAdminId,t.$refs["showVisit"].isShow=!0,e.a(2);case 5:t.$successMessage(o.audit_status_text,"","success");case 6:e.n=4;break;case 7:e.n=9;break;case 8:e.p=8,r=e.v,i.e(r);case 9:return e.p=9,i.f(),e.f(9);case 10:e.n=12;break;case 11:t.$successMessage("未查询到记录","","warning");case 12:t.select.code="",t.select.idcard="";case 13:return e.a(2)}}),e,null,[[3,8,9,10]])})))()},getUserList:function(){var t=this;return Object(o["a"])(Object(n["a"])().m((function e(){var a;return Object(n["a"])().w((function(e){while(1)switch(e.n){case 0:return t.gateUser=l.a.get("gateUser")?JSON.parse(l.a.get("gateUser")):"",console.log(t.gateUser),e.n=1,Object(p["c"])();case 1:if(a=e.v,t.gateData=a,!t.gateUser.gateAdminId){e.n=2;break}return t.gateAdminId=t.gateUser.gateAdminId,t.gateName=t.gateUser.gateName,t.gateShow=!1,e.a(2);case 2:t.gateShow=!0;case 3:return e.a(2)}}),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()}}},v=h,b=(a("813a"),a("2877")),y=Object(b["a"])(v,i,s,!1,null,"bdc1d70c",null);e["default"]=y.exports},dda2:function(t,e,a){},f207:function(t,e,a){"use strict";a("dda2")},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},1==t.form.type&&t.form.visit_area&&"生产区"==t.form.visit_area.name?{key:"cda",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-label"},[t._v(" CDA编号: ")]),a("div",{staticClass:"xy-table-item-content"},[t._v(" "+t._s(t.form.cda)+" ")])])]},proxy:!0}:null,{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:"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},t.form.visit_area&&"生产区"==t.form.visit_area.name?{key:"visitorinfos1",fn:function(){return[a("div",{staticClass:"xy-table-item"},[a("div",{staticClass:"xy-table-item-content",staticStyle:{width:"400px"}},[t._v(" 陪同人信息: ")])])]},proxy:!0}:null,t.form.visit_area&&"生产区"==t.form.visit_area.name?{key:"accompany_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.accompany?t.form.accompany.name:"")+" ")])])]},proxy:!0}:null,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("c14f"),o=a("1da1"),r=a("b85c"),l=(a("d81d"),a("b0c0"),a("b64b"),a("d3b7"),a("0643"),a("a573"),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"),f=a("c24f"),p=(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:"",cda:"",cars:"",follw_people:[],long_time:0,longrange:"",visitorinfos:"",accpet_department_id:"",accept_admin_id:"",visitorinfos1:"",accompany_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(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(r["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(r["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 o,l=Object(r["a"])(this.form.person_no);try{for(l.s();!(o=l.n()).done;){i=o.value;this.codeForm.person_no.push(JSON.parse(i))}}catch(m){l.e(m)}finally{l.f()}var d,u=Object(r["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(o["a"])(Object(c["a"])().m((function e(){var a;return Object(c["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,Object(f["b"])();case 1:a=e.v,t.userId=a.id;case 2:return e.a(2)}}),e)})))()},getDetail:function(){var t=this;return Object(o["a"])(Object(c["a"])().m((function e(){var a,i,s,n,o,l;return Object(c["a"])().w((function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,Object(u["d"])({id:t.id});case 1:a=e.v,i=t,t.form=a,s=Object(r["a"])(i.form.audit),e.p=2,s.s();case 3:if((n=s.n()).done){e.n=8;break}if(o=n.value,0!=o.status){e.n=6;break}if(o.audit_admin_id!=i.userId){e.n=4;break}return i.checkForm.level=o.level,i.checkForm.id=o.id,i.checkForm.audit_admin_id=o.audit_admin_id,i.isCheck=!0,e.a(2);case 4:return i.checkText="请等待"+o.audit_admin.name+"审核",i.isCheck=!1,e.a(2);case 5:e.n=7;break;case 6:i.isCheck=!1;case 7:e.n=3;break;case 8:e.n=10;break;case 9:e.p=9,l=e.v,s.e(l);case 10:return e.p=10,s.f(),e.f(10);case 11:return e.a(2)}}),e,null,[[2,9,10,11]])})))()},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=p,v=(a("f207"),a("2877")),b=Object(v["a"])(h,i,s,!1,null,"d7b4757e",null);e["default"]=b.exports}}]); |