webpackJsonp([74],{"/pg7":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Xxa5"),a=r.n(n),o=r("Dd8w"),m=r.n(o),s=r("exGp"),u=r.n(s),i=r("1fzb"),l=r("znzC"),c=r("P9l9"),d={components:{setActCode:i.default,SelectClerk:l.default},data:function(){return{hmMemberNum:0,form:{hmType:1,clerkIdList:[],hmUserNum:null},memberType:1,data:[],storeClerkList:[]}},created:function(){this.getClerkNum()},methods:{radioChange:function(e){1==e&&(this.form.clerkIdList=["-1"],this.data=[],this.form.hmUserNum=this.hmMemberNum)},getClerkNum:function(){var e=this;Object(c.b)("/haoban-manage3-web/hm/qrcode/getAddCount",{}).then(function(t){0==t.data.code&&(e.hmMemberNum=t.data.result||0)})},onChange:function(e){this.data=e,this.form.clerkIdList=e.map(function(e){return e.clerkId}),this.form.hmUserNum=e.length},onSubmit:function(e){var t=this;return u()(a.a.mark(function r(){var n;return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return 1==t.memberType&&(t.form.clerkIdList=["-1"],t.form.hmUserNum=t.hmMemberNum),n=m()({},e,t.form),r.next=4,Object(c.f)("/haoban-manage3-web/hm/qrcode/addList",n).then(function(e){if(0!=e.data.code)return t.$parent.btnLoading=!1,t.$message.error(e.data.message);setTimeout(function(){t.$route.meta.refresh=!0,t.$parent.btnLoading=!1,t.$router.go(-1),t.form={hmType:1,clerkIdList:[],hmUserNum:null}},1e3)});case 4:case"end":return r.stop()}},r,t)}))()}}},f={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("setActCode",{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",{attrs:{multiple:!0,data:e.data},on:{change:e.onChange}}):e._e()],1)]},proxy:!0}])})],1)},staticRenderFns:[]};var h=r("VU/8")(d,f,!1,function(e){r("udo8")},"data-v-78194b30",null);t.default=h.exports},udo8:function(e,t){}});