webpackJsonp([110],{"/pg7":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("Xxa5"),n=r.n(a),o=r("Dd8w"),s=r.n(o),m=r("exGp"),u=r.n(m),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()(n.a.mark(function r(){var a;return n.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),(a=s()({},e,t.form)).passFlag=a.passFlag?1:0,r.next=5,Object(c.f)("/haoban-manage3-web/hm/qrcode/addList",a).then(function(e){if(0!=e.data.code)return t.$refs.setActCodePage.btnLoading=!1,t.$refs.setActCodePage.saveLoading=!1,t.$message.error(e.data.message);setTimeout(function(){t.$route.meta.refresh=!0,t.$refs.setActCodePage.btnLoading=!1,t.$refs.setActCodePage.saveLoading=!1,t.$router.go(-1),t.form={hmType:1,clerkIdList:[],hmUserNum:null}},1e3)});case 5: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",{ref:"setActCodePage",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("jsh0")},"data-v-21cbf748",null);t.default=h.exports},jsh0:function(e,t){}});