(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0488cecb"],{"71f6":function(t,a,e){"use strict";e.d(a,"a",(function(){return u}));e("ac6a"),e("456d");var i=e("b775");function u(t,a){t=t||{};var e=Object.keys(t);return e.forEach((function(e){var u=t[e];"string"===typeof u&&(u={url:u}),u.url="".concat(a).concat(u.url),t[e]=function(t,a){return Object(i["a"])(u,t,a)}})),t}},8175:function(t,a,e){"use strict";a["a"]=[{type:"3",title:"导购账号新增",desc:"能看到管辖范围内导购添加的审核事项"},{type:"1",title:"导购账号绑定",desc:"能看到管辖范围内导购账号绑定申请"}]},8483:function(t,a,e){},"96b6":function(t,a,e){"use strict";var i=e("71f6"),u={getReview:"/audit/audit-list",getWxEnterprise:"/auth-enterprise-list",getStaffInfo:"/get-staff-info",postAudit:{url:"/audit/agree",method:"post",useFormData:!0,useIntercept:!1},postBatchApprove:{url:"/audit/batch-agree",method:"post",useFormData:!0,useIntercept:!1},postRefuse:{url:"/audit/refuse",method:"post",useFormData:!0,useIntercept:!1},getAuditDetail:"/audit/batch-log-list",getAuditGroupList:"/auditGroup/audit-group-list",delAuditGroup:"/auditGroup/del-audit-group",auditGroupDetail:"/auditGroup/audit-group-detail",editAuditGroup:{url:"/auditGroup/edit-audit-group",method:"post",useFormData:!0},addAuditGroup:{url:"/auditGroup/add-audit-group",method:"post",useFormData:!0},getAdminList:"/auditGroup/select-manager-list",auditItemList:"/auditGroup/audit-item-list",delAuditItem:"/auditGroup/del-audit-item",addAuditItem:"/auditGroup/add-audit-item",editAuditItem:"/auditGroup/edit-audit-item",auditItemDetail:"/auditGroup/audit-item-detail",findAuditSetting:"/audit/find-audit-setting",saveAuditSetting:"/audit/save-audit-setting"};u=Object(i["a"])(u,"/hb-manage-web"),a["a"]=u},c360:function(t,a,e){"use strict";e("8483")},e0c0:function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-form",{ref:"auditData",staticClass:"create-audit-item",attrs:{model:t.auditData,rules:t.auditDataRules,"label-width":"110px"}},[e("el-form-item",{attrs:{label:"审核组名称",prop:"auditGroupIds"}},[e("el-select",{staticStyle:{width:"480px"},attrs:{multiple:"","collapse-tags":""},model:{value:t.auditData.auditGroupIds,callback:function(a){t.$set(t.auditData,"auditGroupIds",a)},expression:"auditData.auditGroupIds"}},t._l(t.auditGroupList,(function(t){return e("el-option",{key:t.auditGroupId,attrs:{value:t.auditGroupId,label:t.auditGroupName}})})),1)],1),e("el-form-item",{attrs:{label:"审核事项",prop:"auditTypes"}},[e("el-checkbox-group",{model:{value:t.auditData.auditTypes,callback:function(a){t.$set(t.auditData,"auditTypes",a)},expression:"auditData.auditTypes"}},t._l(t.auditTypes,(function(a){return e("el-checkbox",{key:a.type,staticClass:"audit-types",attrs:{label:a.type}},[e("p",{staticClass:"audit-type-title"},[t._v(t._s(a.title))]),e("p",{staticClass:"audit-type-desc"},[t._v(t._s(a.desc))])])})),1)],1),e("el-form-item",{staticStyle:{"margin-top":"50px"}},[e("el-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.onSave}},[t._v(t._s(t.auditData.auditItemId?"保存":"确认新建"))])],1)],1)},u=[],d=(e("28a5"),e("8175")),r=e("96b6"),s=r["a"].addAuditItem,o=r["a"].editAuditItem,n=r["a"].auditItemDetail,p=r["a"].getAuditGroupList,l={name:"CreateAuditItem",data:function(){return{loading:!1,auditGroupList:[],auditTypes:d["a"],auditData:{auditGroupIds:[],auditTypes:[],wxEnterpriseId:"",auditItemId:""},auditDataRules:{auditGroupIds:[{required:!0,message:"请选择审核组",trigger:"change"}],auditTypes:[{required:!0,message:"请选择审核事项",trigger:"change"}]}}},created:function(){var t=this.$route.query.auditItemId,a=JSON.parse(localStorage.getItem("haoBanUser")||"{}");this.auditData.wxEnterpriseId=a.wxEnterpriseId,this.$emit("showTab","/audit-item-list"),t&&this.getAuditItemDetail(t),this.getAuditGroupList()},methods:{getAuditGroupList:function(){var t=this;p({wxEnterpriseId:this.auditData.wxEnterpriseId}).then((function(a){t.auditGroupList=a.result||[]}))},getAuditItemDetail:function(t){var a=this;n({auditItemId:t}).then((function(t){var e=t.result||{},i=e.auditItemId,u=e.auditGroupId,d=e.auditTypes;a.auditData.auditItemId=i,"string"==typeof d&&(a.auditData.auditTypes=d.split(",")),"string"!=typeof u&&"number"!=typeof u||(a.auditData.auditGroupIds=[u])}))},onSave:function(){var t=this;this.$refs.auditData.validate((function(a){if(a){var e=t.auditData,i=e.auditGroupIds,u=e.auditTypes,d=e.wxEnterpriseId,r=e.auditItemId,n={auditGroupIds:i.join(","),auditTypes:u.join(","),wxEnterpriseId:d};r?(n.auditItemId=r,o(n).then(p.bind(t,"保存成功！")).finally((function(){return t.loading=!1}))):s(n).then(p.bind(t,"新建成功！")).finally((function(){return t.loading=!1}))}function p(t){this.$message.success(t),this.$router.go(-1)}}))}}},c=l,m=(e("c360"),e("2877")),f=Object(m["a"])(c,i,u,!1,null,"17b0bdf5",null);a["default"]=f.exports}}]);