webpackJsonp([121],{"/pg7":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("Dd8w"),m=r.n(a),o=r("1fzb"),s=r("znzC"),n=r("P9l9"),i={components:{setActCode:o.default,SelectClerk:s.default},data:function(){return{hmMemberNum:0,form:{hmId:"",hmGroupId:"",passFlag:1,welcomeId:"",hmType:1,name:"",memberLabelId:"",memberLabelName:"",memberLabelStatus:-1,clerkList:[],welcomeType:1,hmUserNum:null},memberType:1}},created:function(){this.getClerkNum()},methods:{radioChange:function(e){1==e&&(this.form.clerkList=[],this.form.hmUserNum=0)},getClerkNum:function(){var e=this;Object(n.b)("/haoban-manage3-web/hm/qrcode/getAddCount",{}).then(function(t){0==t.data.code&&(e.hmMemberNum=t.data.result||0)})},onChange:function(e){this.form.clerkList=e,this.form.hmUserNum=e.length},onSubmit:function(e){var t=this;1==this.memberType?(this.form.clerkIdList=["-1"],this.form.hmUserNum=this.hmMemberNum):this.form.clerkIdList=this.form.clerkList.map(function(e){return e.clerkId});var r=m()({},e,this.form);Object(n.f)("/haoban-manage3-web/hm/qrcode/addList",r).then(function(e){if(0!=e.data.code)return t.$refs.setActCodePage.saveLoading=!1,t.$message.error(e.data.message);setTimeout(function(){t.$refs.setActCodePage.saveLoading=!1,t.$router.go(-1)},1e3)})}}},l={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("setActCode",{ref:"setActCodePage",attrs:{actCodeData:e.form},on:{sumbit:e.onSubmit},scopedSlots:e._u([{key:"typeCode",fn:function(){return[r("el-form-item",{attrs:{label:"活码类型",rules:[{required:!0,message:"请选择活码类型",trigger:"blur"}]}},[r("el-radio-group",{model:{value:e.form.hmType,callback:function(t){e.$set(e.form,"hmType",t)},expression:"form.hmType"}},[r("el-radio",{attrs:{label:1}},[e._v("单人活码")])],1)],1)]},proxy:!0},{key:"member",fn:function(){return[r("el-form-item",{attrs:{label:"关联导购",rules:[{required:!0,message:"请选择使用成员",trigger:"blur"}]}},[r("el-radio-group",{on:{change:e.radioChange},model:{value:e.memberType,callback:function(t){e.memberType=t},expression:"memberType"}},[r("el-radio",{attrs:{label:1}},[e._v("全部成员")]),e._v(" "),r("el-radio",{attrs:{label:2}},[e._v("部分成员")])],1),e._v(" "),r("br"),e._v(" "),1==e.memberType?r("p",{staticClass:"tips"},[e._v("当前已选择 "+e._s(e.hmMemberNum)+" 个成员 "),r("span",[e._v("(活码名称默认为使用成员名称)")])]):e._e(),e._v(" "),2==e.memberType?r("select-clerk",{staticStyle:{"margin-top":"12px"},attrs:{"is-simple":!0,multiple:!0,data:e.form.clerkList},on:{change:e.onChange}}):e._e()],1)]},proxy:!0}])})],1)},staticRenderFns:[]};var u=r("VU/8")(i,l,!1,function(e){r("Bz9S")},"data-v-030e8f1b",null);t.default=u.exports},Bz9S:function(e,t){}});