webpackJsonp([53],{"/pg7":function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("Xxa5"),a=t.n(n),m=t("Dd8w"),o=t.n(m),s=t("exGp"),u=t.n(s),i=t("1fzb"),l=t("znzC"),c=t("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(r){0==r.data.code&&(e.hmMemberNum=r.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 r=this;return u()(a.a.mark(function t(){var n;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return 1==r.memberType&&(r.form.clerkIdList=["-1"],r.form.hmUserNum=r.hmMemberNum),n=o()({},e,r.form),t.next=4,Object(c.f)("/haoban-manage3-web/hm/qrcode/addList",n).then(function(e){if(0!=e.data.code)return r.$message.error(e.data.message);setTimeout(function(){r.$route.meta.refresh=!0,r.$router.go(-1),r.form={hmType:1,clerkIdList:[],hmUserNum:null}},1e3)});case 4:case"end":return t.stop()}},t,r)}))()}}},f={render:function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",[t("setActCode",{on:{sumbit:e.onSubmit},scopedSlots:e._u([{key:"typeCode",fn:function(){return[t("el-form-item",{attrs:{label:"活码类型",rules:[{required:!0,message:"请选择活码类型",trigger:"blur"}]}},[t("el-radio-group",{model:{value:e.form.hmType,callback:function(r){e.$set(e.form,"hmType",r)},expression:"form.hmType"}},[t("el-radio",{attrs:{label:1}},[e._v("单人活码")])],1)],1)]},proxy:!0},{key:"member",fn:function(){return[t("el-form-item",{attrs:{label:"关联导购",rules:[{required:!0,message:"请选择使用成员",trigger:"blur"}]}},[t("el-radio-group",{on:{change:e.radioChange},model:{value:e.memberType,callback:function(r){e.memberType=r},expression:"memberType"}},[t("el-radio",{attrs:{label:1}},[e._v("全部成员")]),e._v(" "),t("el-radio",{attrs:{label:2}},[e._v("部分成员")])],1),e._v(" "),t("br"),e._v(" "),1==e.memberType?t("p",{staticClass:"tips"},[e._v("当前已选择 "+e._s(e.hmMemberNum)+" 个成员 "),t("span",[e._v("(活码名称默认为使用成员名称)")])]):e._e(),e._v(" "),2==e.memberType?t("select-clerk",{attrs:{multiple:!0,data:e.data},on:{change:e.onChange}}):e._e()],1)]},proxy:!0}])})],1)},staticRenderFns:[]};var h=t("VU/8")(d,f,!1,function(e){t("DGVQ")},"data-v-fce32800",null);r.default=h.exports},DGVQ:function(e,r){}});