(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7bcd8c7a"],{1482:function(e,t,a){"use strict";a.d(t,"d",(function(){return r})),a.d(t,"f",(function(){return i})),a.d(t,"e",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"g",(function(){return c})),a.d(t,"h",(function(){return d})),a.d(t,"b",(function(){return u})),a.d(t,"c",(function(){return p}));var o=a("b775"),n={list:"/members.MonthlyWelfare/welfareLists",sort:"/members.MonthlyWelfare/editOrder",remove:"/members.MonthlyWelfare/delWelfare",couponlist:"/members.MonthlyWelfare/couponlist",welDawList:"/members.MonthlyWelfare/getDiffWelfareDrawRecords",welDawListExport:"/members.MonthlyWelfare/getDiffwDrawExport",getDiffWelDrawDetails:"/members.MonthlyWelfare/getDiffWelDrawDetails",getDiffwDrawDetExport:"/members.MonthlyWelfare/getDiffwDrawDetExport"};function r(e){return Object(o["b"])({url:n.list,method:"get",params:e})}function i(e){return Object(o["b"])({url:n.sort,method:"post",data:e})}function s(e){return Object(o["b"])({url:n.remove,method:"get",params:e})}function l(e){return Object(o["b"])({url:n.couponlist,method:"get",params:e})}function c(e){return Object(o["b"])({url:n.welDawList,method:"get",params:e})}function d(e){return Object(o["b"])({url:n.welDawListExport,method:"post",data:e})}function u(e){return Object(o["b"])({url:n.getDiffWelDrawDetails,method:"get",params:e})}function p(e){return Object(o["b"])({url:n.getDiffwDrawDetExport,method:"post",data:e})}},"161f":function(e,t,a){},"27c3":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"f",(function(){return i})),a.d(t,"e",(function(){return s})),a.d(t,"c",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"d",(function(){return d}));var o=a("b775"),n={add:"/members.MonthlyWelfare/add",detail:"/members.MonthlyWelfare/detail",annex:"/upload/annex",actionsList:"/members.MemberCards/actionsList",update:"/members.MonthlyWelfare/update",audit:"/members.MonthlyWelfare/audit"};function r(e){return Object(o["b"])({url:n.add,method:"post",data:e})}function i(e){return Object(o["b"])({url:n.update,method:"post",data:e})}function s(e){return Object(o["b"])({url:n.detail,method:"get",params:e})}function l(e){return Object(o["b"])({url:n.annex,method:"post",data:e,headers:{"content-type":"application/json"}})}function c(e){return Object(o["b"])({url:n.actionsList,method:"get",params:e})}function d(e){return Object(o["b"])({url:n.audit,method:"post",data:e})}},"4dd0":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-spin",{attrs:{spinning:e.isLoading}},[a("div",[a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"title"},[e._v("福利基本信息")]),a("a-row",[a("a-col",{attrs:{span:24}},[a("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[a("a-form-item",{attrs:{label:"福利编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{staticClass:"aInput",attrs:{placeholder:"创建后自动生成",disabled:""}})],1),a("a-form-item",{attrs:{label:"福利名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入福利名称"}]}],expression:"['name', { rules: [{ required: true, message: '请输入福利名称' }] }]"}],staticClass:"aInput",attrs:{placeholder:"请输入福利名称"}})],1),a("a-form-item",{attrs:{label:"福利价值",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["cost",{rules:[{required:!0,message:"请输入福利价值"}]}],expression:"['cost', { rules: [{ required: true, message: '请输入福利价值' }] }]"}],staticClass:"aInput",attrs:{min:0,precision:2,placeholder:"请输入福利价值"}}),a("span",{staticClass:"pageItemTips"},[e._v("元")])],1),a("a-form-item",{attrs:{label:"福利数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["amount",{rules:[{required:!0,message:"请输入福利数量"}]}],expression:"['amount', { rules: [{ required: true, message: '请输入福利数量' }] }]"}],staticClass:"aInput",attrs:{min:0,placeholder:"请输入福利数量"}})],1),a("a-form-item",{staticClass:"selBack",attrs:{label:"发放时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-range-picker",{staticClass:"pageInupt",attrs:{format:"YYYY-MM",placeholder:["开始时间","结束时间"],mode:e.mode2,value:e.value},on:{change:e.handleChange,panelChange:e.handlePanelChange}})],1),a("a-form-item",{staticClass:"selBack",attrs:{label:"背景图",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"只能上传jpg/png格式图片,图片尺寸:566 x 176"}},[a("SelectImage",{attrs:{multiple:"",maxNum:1},on:{change:e.selectImageChange}})],1),a("div",{staticClass:"title"},[e._v("福利内容")]),a("a-button",{staticStyle:{"margin-left":"5.5%","margin-bottom":"15px"},attrs:{type:"primary"},on:{click:e.showChoiceCoupons}},[e._v("选择会员专享券")]),a("a-table",{staticClass:"goodsBox",staticStyle:{"margin-left":"5.5%",width:"90%"},attrs:{rowKey:"coupon_id",columns:e.couponsColumns,dataSource:e.couponsData,pagination:!1,bordered:""},scopedSlots:e._u([{key:"reduce_price",fn:function(t){return a("span",{},[a("p",[e._v("¥"+e._s(t))])])}},{key:"getTerm",fn:function(t,o){return a("span",{},[a("p",[e._v("实付满"+e._s(o.min_price)+"元,可减"+e._s(o.reduce_price)+"元")])])}},{key:"expire_day",fn:function(t){return a("span",{},[a("p",[e._v("领取后"+e._s(t)+"天")])])}},{key:"total_num",fn:function(t,o){return a("span",{},[10==o.limit_total_type?a("p",[e._v(e._s("总量"+t+"张"))]):a("p",[e._v("不限")])])}},{key:"limit_receive_cnt",fn:function(t,o){return a("span",{},[a("p",[e._v(e._s(10==o.limit_receive_type?"每人每自然月限领1张":"每人每自然年限领1张"))])])}},{key:"action",fn:function(t,o,n){return a("span",{},[a("a-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteCoupons(n)}}},[e._v("移除")])],1)}}])}),a("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[a("a-button",{staticClass:"button",attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交审核")])],1)],1)],1)],1),a("ChoiceCoupons",{ref:"ChoiceCoupons",on:{handleSubmit:e.handleChoiceCoupons}})],1)],1)])],1)},n=[],r=(a("a434"),a("d3b7"),a("a59f"),a("2af9")),i=a("6b01"),s=a("8ded"),l=a.n(s),c=a("27c3"),d=(a("f766"),a("ca00"),[{title:"券ID",width:"100px",dataIndex:"coupon_id"},{title:"优惠券名称",dataIndex:"name",width:"200px",ellipsis:!0},{title:"面额",dataIndex:"reduce_price",width:"100px",scopedSlots:{customRender:"reduce_price"}},{title:"使用条件",width:"200px",scopedSlots:{customRender:"getTerm"}},{title:"使用有效期",dataIndex:"expire_day",width:"100px",scopedSlots:{customRender:"expire_day"}},{title:"发券数量",width:"100px",dataIndex:"total_num",scopedSlots:{customRender:"total_num"}},{title:"领券数量",width:"100px",dataIndex:"limit_receive_cnt",scopedSlots:{customRender:"limit_receive_cnt"}},{title:"操作",width:"80px",dataIndex:"action",scopedSlots:{customRender:"action"}}]),u={name:"AddCompensateOrder",components:{SelectImage:r["d"],ChoiceCoupons:i["a"]},data:function(){return{form:this.$form.createForm(this),isLoading:!1,isBtnLoading:!1,userId:"",labelCol:{span:3},wrapperCol:{span:20},orderDetail:null,selectImageList:[],couponsColumns:d,couponsData:[],value:[],mode2:["month","month"]}},created:function(){},methods:{showChoiceCoupons:function(){this.$refs.ChoiceCoupons.open(this.couponsData)},handleChoiceCoupons:function(){var e=l.a.get("selectCoupons");this.couponsData=e||[]},deleteCoupons:function(e){var t=this;this.$confirm({title:"提示",content:"确认移除吗?",okText:"确定",cancelText:"取消",onOk:function(){t.couponsData.splice(e,1)}})},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){if(e)return!1;t.value&&0!=t.value.length?t.selectImageList&&0!=t.selectImageList.length?t.couponsData&&0!=t.couponsData.length?(a.send_times=t.value,a.img=t.selectImageList[0].file_id,a.target_type="1",a.coupon_id=t.couponsData[0].coupon_id,a.exchange_type=[],t.onFormSubmit(a)):t.$message.error("请选择会员专享券",1.5):t.$message.error("请上传背景图",1.5):t.$message.error("请选择发放时间",1.5)}))},onFormSubmit:function(e){var t=this;this.isBtnLoading=!0,this.isLoading=!0,c["b"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("../index")}),1e3)})).catch((function(){t.isBtnLoading=!1,t.isLoading=!1})).finally((function(){t.isBtnLoading=!1,t.isLoading=!1}))},selectImageChange:function(e,t){this.selectImageList=t||[]},handleChange:function(e){this.value=e},handlePanelChange:function(e,t){this.value=e,this.mode2=["date"===t[0]?"month":t[0],"date"===t[1]?"month":t[1]]}}},p=u,m=(a("a21d"),a("2877")),f=Object(m["a"])(p,o,n,!1,null,"29b16f2f",null);t["default"]=f.exports},6331:function(e,t,a){"use strict";a("9537")},"6b01":function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{title:"选择会员专享券",visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.handleCancel,ok:e.handleOk}},[a("div",{staticClass:"formBox"},[a("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[a("a-form-item",{attrs:{label:"券ID"}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["couponId"],expression:"['couponId']"}],attrs:{placeholder:"请输入券ID","allow-clear":""}})],1),a("a-form-item",{attrs:{label:"优惠券名称"}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:"请输入优惠券名称","allow-clear":""}})],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),e.visible?a("s-table",{ref:"table",attrs:{scroll:{y:"420px",scrollToFirstRowOnChange:!0},rowKey:"coupon_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,"row-selection":e.rowSelection},scopedSlots:e._u([{key:"reduce_price",fn:function(t){return a("span",{},[a("p",[e._v("¥"+e._s(t))])])}},{key:"getTerm",fn:function(t,o){return a("span",{},[a("p",[e._v("实付满"+e._s(o.min_price)+"元,可减"+e._s(o.reduce_price)+"元")])])}},{key:"expire_day",fn:function(t){return a("span",{},[a("p",[e._v("领取后"+e._s(t)+"天")])])}},{key:"total_num",fn:function(t,o){return a("span",{},[10==o.limit_total_type?a("p",[e._v(e._s("总量"+t+"张"))]):a("p",[e._v("不限")])])}},{key:"limit_receive_cnt",fn:function(t,o){return a("span",{},[a("p",[e._v(e._s(10==o.limit_receive_type?"每人每自然月限领1张":"每人每自然年限领1张"))])])}}],null,!1,2429735908)}):e._e()],1)},n=[],r=a("5530"),i=(a("d3b7"),a("159b"),a("1482")),s=a("2af9"),l=a("8ded"),c=a.n(l),d=[{title:"券ID",width:"100px",dataIndex:"coupon_id"},{title:"优惠券名称",dataIndex:"name",width:"200px",ellipsis:!0},{title:"面额",dataIndex:"reduce_price",width:"100px",scopedSlots:{customRender:"reduce_price"}},{title:"使用条件",width:"200px",scopedSlots:{customRender:"getTerm"}},{title:"使用有效期",dataIndex:"expire_day",width:"100px",scopedSlots:{customRender:"expire_day"}},{title:"发券数量",width:"100px",dataIndex:"total_num",scopedSlots:{customRender:"total_num"}},{title:"领券数量",width:"140px",dataIndex:"limit_receive_cnt",scopedSlots:{customRender:"limit_receive_cnt"}}],u={components:{STable:s["c"]},data:function(){var e=this;return{visible:!1,confirmLoading:!1,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:d,selectedRowKeys:[],selectListSpu:[],data:[],loadData:function(t){return i["a"](Object(r["a"])(Object(r["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},computed:{rowSelection:function(){return{type:"radio",onChange:this.onSelectChange,getCheckboxProps:this.getCheckboxProps}}},methods:{open:function(e){this.visible=!0,this.data=e,this.$refs.table&&this.handleRefresh(!0)},getCheckboxProps:function(e){return e.defaultChecked=!1,this.data&&this.data.length>0&&this.data.forEach((function(t,a){e.coupon_id==t.coupon_id&&(e.defaultChecked=!0)})),{props:{defaultChecked:e.defaultChecked}}},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(r["a"])(Object(r["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)},handleOk:function(){if(0!=this.data.length){var e=this.data||[];c.a.set("selectCoupons",e),this.$message.success("选择成功",1.5),this.handleCancel(),this.$emit("handleSubmit")}else this.$message.error("请先选择会员专享券",1.5)},handleCancel:function(){this.visible=!1,this.searchForm.resetFields(),this.queryParam={},this.handleRefresh()},onSelectChange:function(e,t){this.selectedRowKeys=e,this.data=t||[]}}},p=u,m=(a("6331"),a("2877")),f=Object(m["a"])(p,o,n,!1,null,"616a31b8",null);t["a"]=f.exports},9537:function(e,t,a){},a21d:function(e,t,a){"use strict";a("161f")},a59f:function(e,t,a){var o,n,r;(function(i,s){n=[t,a("313e")],o=s,r="function"===typeof o?o.apply(t,n):o,void 0===r||(e.exports=r)})(0,(function(e,t){var a=function(e){"undefined"!==typeof console&&console&&console.error&&console.error(e)};if(t){var o=["#00a8c6","#40c0cb","#f0dec2","#aee239","#8fbe00","#33e0ff","#b3f4ff","#e6ff99"],n={color:o,title:{textStyle:{fontWeight:"normal",color:"#00a8c6"}},visualMap:{color:["#00a8c6","#a2d4e6"]},toolbox:{color:["#00a8c6","#00a8c6","#00a8c6","#00a8c6"]},tooltip:{backgroundColor:"rgba(0,0,0,0.5)",axisPointer:{type:"line",lineStyle:{color:"#00a8c6",type:"dashed"},crossStyle:{color:"#00a8c6"},shadowStyle:{color:"rgba(200,200,200,0.3)"}}},dataZoom:{dataBackgroundColor:"#eee",fillerColor:"rgba(144,197,237,0.2)",handleColor:"#00a8c6"},timeline:{lineStyle:{color:"#00a8c6"},controlStyle:{color:"#00a8c6",borderColor:"#00a8c6"}},candlestick:{itemStyle:{color:"#40c0cb",color0:"#f0dec2"},lineStyle:{width:1,color:"#8fbe00",color0:"#aee239"},areaStyle:{color:"#00a8c6",color0:"#aee239"}},map:{itemStyle:{color:"#ddd"},areaStyle:{color:"#f0dec2"},label:{color:"#c12e34"}},graph:{itemStyle:{color:"#f0dec2"},linkStyle:{color:"#00a8c6"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#40c0cb"],[.8,"#00a8c6"],[1,"#8fbe00"]],width:8}}}};t.registerTheme("fresh-cut",n)}else a("ECharts is not Loaded")}))}}]);