(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b22b4ffa"],{"104d":function(e,t,a){"use strict";a.d(t,"h",(function(){return s})),a.d(t,"e",(function(){return r})),a.d(t,"b",(function(){return n})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return d})),a.d(t,"f",(function(){return c})),a.d(t,"a",(function(){return u})),a.d(t,"g",(function(){return p}));var i=a("b775"),o={list:"/kjActivity/list",down:"/kjActivity/down",add:"/kjActivity/add",detail:"/kjActivity/detail",audit:"/kjActivity/audit",edit:"/kjActivity/edit",activityInfo:"/kjActivity/activityinfo",joinList:"/kjActivity/joinlist"};function s(e){return Object(i["b"])({url:o.list,method:"get",params:e})}function r(e){return Object(i["b"])({url:o.down,method:"post",data:e})}function n(e){return Object(i["b"])({url:o.add,method:"post",data:e})}function l(e){return Object(i["b"])({url:o.detail,method:"get",params:e})}function d(e){return Object(i["b"])({url:o.audit,method:"post",data:e})}function c(e){return Object(i["b"])({url:o.edit,method:"post",data:e})}function u(e){return Object(i["b"])({url:o.activityInfo,method:"get",params:e})}function p(e){return Object(i["b"])({url:o.joinList,method:"get",params:e})}},"2b53":function(e,t,a){"use strict";a("6b20")},"499b":function(e,t,a){"use strict";a.r(t);a("aa8b"),a("72dd"),a("edc0");var i=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("div",{staticClass:"tabs-content"},[t("div",{staticClass:"title"},[e._v("活动基本信息")]),t("a-form-item",{attrs:{label:"活动名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{initialValue:e.detail.name,rules:[{required:!0,message:"请输入活动名称"}]}],expression:"[\n 'name',\n { initialValue: detail.name, rules: [{ required: true, message: '请输入活动名称' }] },\n ]"}],staticClass:"pageInupt",attrs:{maxLength:15,placeholder:"请输入活动名称"}}),t("span",{staticClass:"input-text_right"},[e._v("(仅内部可见)")])],1),t("a-form-item",{attrs:{label:"活动编码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{initialValue:e.detail.code}],expression:"['code', { initialValue: detail.code }]"}],staticClass:"pageInupt",attrs:{placeholder:"请输入活动编码",disabled:""}})],1),t("a-form-item",{attrs:{label:"砍价类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["kj_type",{initialValue:e.detail.kj_type,rules:[{required:!0}]}],expression:"['kj_type', { initialValue: detail.kj_type, rules: [{ required: true }] }]"}],on:{change:e.handleChange}},[t("a-radio",{attrs:{value:1}},[e._v("促销版")]),t("a-radio",{attrs:{value:2}},[e._v("拉新版")])],1)],1),t("a-form-item",{attrs:{label:"活动时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["between_time",{initialValue:e.detail.start_time&&e.detail.end_time?[e.detail.start_time,e.detail.end_time]:null,rules:[{required:!0,message:"请选择活动时间"}]}],expression:"[\n 'between_time',\n {\n initialValue: detail.start_time && detail.end_time ? [detail.start_time, detail.end_time] : null,\n rules: [{ required: true, message: '请选择活动时间' }],\n },\n ]"}],staticClass:"pageInupt",attrs:{"show-time":!0,format:"YYYY-MM-DD HH:mm",placeholder:["开始时间","结束时间"],"disabled-date":e.disabledDate}})],1),t("a-form-item",{attrs:{label:"砍价有效期",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["expire_hour",{initialValue:e.detail.expire_hour,rules:[{required:!0,message:"请输入砍价有效期"}]}],expression:"[\n 'expire_hour',\n { initialValue: detail.expire_hour, rules: [{ required: true, message: '请输入砍价有效期' }] },\n ]"}],staticClass:"pageInupt",attrs:{maxLength:15,placeholder:"请输入砍价有效期,单位:小时"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}}),t("span",{staticClass:"input-text_right"},[e._v("自用户发起砍价到砍价截止的时间,单位:小时")])],1),t("a-form-item",{attrs:{label:"分享标题",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["share_title",{initialValue:e.detail.share_title,rules:[{required:!0,message:"请输入分享标题"}]}],expression:"[\n 'share_title',\n { initialValue: detail.share_title, rules: [{ required: true, message: '请输入分享标题' }] },\n ]"}],staticClass:"pageInupt",attrs:{maxLength:28,placeholder:"请输入分享标题"}}),t("span",{staticClass:"input-text_right"},[e._v("字数上限 28 个字")])],1),t("a-form-item",{attrs:{label:"自己砍价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["self_kj_percent",{initialValue:e.detail.self_kj_percent,rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'self_kj_percent',\n { initialValue: detail.self_kj_percent, rules: [{ required: true, message: '请输入' }] },\n ]"}],staticClass:"pageInupt",attrs:{maxLength:15,placeholder:"请输入"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}}),t("span",{staticClass:"input-text_right"},[e._v("默认发起砍价时自己砍价,砍价金额 = (商品促销价 - 活动底价)x 自己砍价百分比")])],1),t("a-form-item",{attrs:{label:"最多可助力",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["limit_kj_day_cnt",{initialValue:e.detail.limit_kj_day_cnt,rules:[{required:!0,message:"请输入最多可助力人数"}]}],expression:"[\n 'limit_kj_day_cnt',\n { initialValue: detail.limit_kj_day_cnt, rules: [{ required: true, message: '请输入最多可助力人数' }] },\n ]"}],staticClass:"pageInupt",attrs:{maxLength:15,placeholder:"请输入最多可助力人数"},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}}),t("span",{staticClass:"lastTitle"},[e._v("人")]),t("span",{staticClass:"input-text_right"},[e._v("同一用户每日最多可帮助xx位好友砍价")])],1),t("a-form-item",{attrs:{label:"参与次数上限",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["fq_count",{initialValue:e.detail.fq_count,rules:[{required:!0,message:"请输入参与次数上限"}]}],expression:"['fq_count', { initialValue: detail.fq_count, rules: [{ required: true, message: '请输入参与次数上限' }] }]"}],staticClass:"pageInupt",on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}}),t("span",{staticClass:"lastTitle"},[e._v("次")]),t("span",{staticClass:"input-text_right"},[e._v("同一用户每期砍价活动最多可以参与的次数")])],1),t("div",{staticClass:"title"},[e._v("选择活动商品")]),t("div",{staticClass:"setGoods"},[t("a-button",{staticStyle:{"margin-left":"5.5%","margin-bottom":"15px"},attrs:{type:"primary"},on:{click:e.showChoiceGooods}},[e._v("添加商品")]),t("span",{staticStyle:{"margin-left":"15px"}},[e._v("仅支持选择一款且是单规格的普通商品")]),t("a-table",{staticClass:"goodsBox",staticStyle:{"margin-left":"5.5%"},attrs:{rowKey:"goods_id",columns:e.goodsColumns,dataSource:e.goodsData,pagination:!1,bordered:""},scopedSlots:e._u([{key:"goods_image",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{staticStyle:{"object-fit":"cover"},attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"goods_price_min",fn:function(a){return t("span",{},[t("p",[e._v("¥"+e._s(a))])])}},{key:"status",fn:function(a){return t("span",{},[t("p",[e._v(e._s(10==a?"上架":"下架"))])])}},{key:"low_price",fn:function(a){return t("span",{},[t("a-form-item",{attrs:{label:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["low_price",{initialValue:a,rules:[{required:!0,message:"请输入"}]}],expression:"['low_price', { initialValue: text, rules: [{ required: true, message: '请输入' }] }]"}],staticClass:"aInput",attrs:{min:0,precision:2}})],1)],1)}},{key:"help_kj_up_cnt",fn:function(a){return t("span",{},[t("a-form-item",{attrs:{label:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["help_kj_up_cnt",{initialValue:a,rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'help_kj_up_cnt',\n { initialValue: text, rules: [{ required: true, message: '请输入' }] },\n ]"}],staticClass:"goodsInput",attrs:{min:0},on:{change:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}})],1)],1)}},{key:"limit_stock",fn:function(a,i){return[t("a-form-item",{attrs:{label:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["limit_stock",{initialValue:a,rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'limit_stock',\n { initialValue: text, rules: [{ required: true, message: '请输入' }] },\n ]"}],attrs:{min:1,max:i.stock_total}})],1)]}},{key:"action",fn:function(a,i,o){return t("span",{},[t("a-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteGoods(o)}}},[e._v("删除")])],1)}}])},[t("span",{attrs:{slot:"customTitle"},slot:"customTitle"},[e._v(" 帮砍人数上限 "),t("a-tooltip",{attrs:{placement:"topLeft"}},[t("template",{slot:"title"},[t("p",[e._v("帮砍人数达到上限后,价格被砍至底价")])]),t("a-icon",{attrs:{type:"question-circle",theme:"filled"}})],2)],1)])],1)],1),t("a-form-item",{staticClass:"mt-20 buttonBox",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交审核")])],1),t("div",{staticClass:"hisBox"},[t("div",{staticClass:"title"},[e._v("行为日志")]),t("div",{staticClass:"action-list",staticStyle:{"margin-left":"5.5%",width:"80%"}},[t("a-table",{attrs:{rowKey:"id",columns:e.columns,"data-source":e.his,pagination:!1}})],1)])],1),t("ChoiceGooods",{ref:"ChoiceGooods",on:{handleSubmit:e.handleChoiceGooods}})],1)],1)},o=[],s=(a("9f29"),a("0528"),a("a2bf"),a("104d")),r=a("e533"),n=a("9b2d"),l=a.n(n),d=a("2f42"),c=a.n(d),u=[{title:"商品spu编码",width:"170px",dataIndex:"goods_no"},{title:"商品标题",width:"240px",ellipsis:!0,dataIndex:"goods_name"},{title:"商品图片",width:"80px",dataIndex:"goods_image",scopedSlots:{customRender:"goods_image"}},{title:"促销价(售价)",width:"100px",dataIndex:"goods_price_min",scopedSlots:{customRender:"goods_price_min"}},{title:"状态",width:"60px",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"活动底价",width:"100px",dataIndex:"low_price",scopedSlots:{customRender:"low_price"}},{width:"110px",dataIndex:"help_kj_up_cnt",slots:{title:"customTitle"},scopedSlots:{customRender:"help_kj_up_cnt"}},{title:"活动商品库存(件)",width:"140px",dataIndex:"limit_stock",scopedSlots:{customRender:"limit_stock"}},{title:"操作",width:"80px",dataIndex:"action",scopedSlots:{customRender:"action"}}],p=[{title:"账号",width:"100px",dataIndex:"name"},{title:"行为",dataIndex:"remark",width:"300px",ellipsis:!0},{title:"时间",width:"150px",dataIndex:"create_time"}],m={components:{ChoiceGooods:r["a"]},data:function(){return{id:"",labelCol:{span:3},wrapperCol:{span:20},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),goodsColumns:u,goodsData:[],detail:{},isSuper:1,role:"",columns:p,his:[]}},created:function(){var e=this;if(this.$store.getters.roles){this.isSuper=this.$store.getters.roles.isSuper;var t=this.$store.getters.roles.permissions;t.forEach((function(t){"/activityCenter/bargain/index"==t.permissionId&&t.actionEntitySet&&t.actionEntitySet.length>0&&(e.role=t.actionEntitySet[0].action)}))}this.id=this.$route.query.id,this.getDetail()},methods:{disabledDate:function(e){return e&&e0&&this.goodsData.forEach((function(t,a){e.goods_id==t.goods_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(s["a"])(Object(s["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.goodsData.length){var e=[];this.goodsData&&this.goodsData.length>0&&this.goodsData.forEach((function(t){e.push({goods_name:t.goods_name,goods_no:t.goods_no,goods_image:t.goods_image,goods_price_min:t.goods_price_min,status:t.status,goods_id:t.goods_id,stock_total:t.stock_total})})),d.a.set("selectListSpu",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.goodsData=t||[]}}},p=u,m=(a("2b53"),a("829d")),h=Object(m["a"])(p,i,o,!1,null,"30f446db",null);t["a"]=h.exports}}]);