(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bd77ad12"],{3460:function(t,e,n){"use strict";n("f7b1")},"433f":function(t,e,n){"use strict";n.r(e);var i,s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-card",{attrs:{bordered:!1}},[1===t.isSuper||"activity-zy-audit"==t.role?n("a-button",{staticClass:"addPoster",attrs:{type:"primary"},on:{click:t.handleCreate}},[t._v("配置会员价")]):t._e(),n("s-table",{ref:"table",staticClass:"tableBox",attrs:{rowKey:"id",loading:t.isLoading,columns:t.columns,data:t.loadData,pageSize:15,bordered:""},scopedSlots:t._u([{key:"goods_name",fn:function(e){return n("span",{},[n("p",{staticClass:"textWrap"},[t._v(t._s(e))])])}},{key:"discount",fn:function(e){return n("span",{},[n("p",[t._v(t._s(e)+" %")])])}},{key:"status",fn:function(e){return n("span",{},[n("p",[t._v(" "+t._s(0==e?"否":"是")+" ")])])}},{key:"action",fn:function(e,i){return n("div",{staticClass:"actions"},[1===t.isSuper||"activity-zg-audit"==t.role?n("div",[0==i.status?n("a",{on:{click:function(e){return t.handleOpen(i,1)}}},[t._v("暂停优惠")]):t._e(),1==i.status?n("a",{on:{click:function(e){return t.handleOpen(i,2)}}},[t._v("继续优惠")]):t._e(),n("a",{on:{click:function(e){return t.handleOpen(i,3)}}},[t._v("移除")])]):n("p",[t._v("--")])])}}])},[n("span",{attrs:{slot:"customTitle"},slot:"customTitle"},[t._v(" 会员折扣(生效中) "),n("a-tooltip",{attrs:{placement:"topLeft"}},[n("template",{slot:"title"},[n("p",[t._v("会员价 = 当前售价(商品活动价 或 促销价) x 会员折扣")]),n("p",[t._v("*即会员折扣与活动价(拼团和砍价除外)叠加享受")])]),n("a-icon",{attrs:{type:"question-circle",theme:"filled"}})],2)],1)]),n("a-modal",{attrs:{title:t.openTitle,visible:t.openVisible},on:{cancel:t.openCancel,ok:t.openOk}},[n("p",[t._v(t._s(t.openContent))])])],1)},o=[],r=n("5530"),a=n("ade3"),d=(n("d3b7"),n("159b"),n("6af1")),c=n("2af9"),u=[{title:"商品SPU",width:"200px",dataIndex:"goods.goods_no"},{title:"商品名称",width:"500px",dataIndex:"goods.goods_name",scopedSlots:{customRender:"goods_name"}},{title:"促销价",width:"100px",dataIndex:"goods.goods_price_min"},(i={dataIndex:"code",width:"100px",slots:{title:"customTitle"}},Object(a["a"])(i,"dataIndex","discount"),Object(a["a"])(i,"scopedSlots",{customRender:"discount"}),i),{title:"是否暂停",dataIndex:"status",width:"80px",scopedSlots:{customRender:"status"}},{title:"操作",width:"140px",scopedSlots:{customRender:"action"}}],l={components:{STable:c["c"]},data:function(){var t=this;return{searchForm:this.$form.createForm(this),isLoading:!1,queryParam:{},columns:u,openTitle:"",openContent:"",okText:"",openVisible:!1,refuseVisible:!1,record:{},recordType:"",isSuper:1,role:"",loadData:function(e){return d["i"](Object(r["a"])(Object(r["a"])({},e),t.queryParam)).then((function(t){return t.data.list}))}}},created:function(){var t=this;if(this.$store.getters.roles){this.isSuper=this.$store.getters.roles.isSuper;var e=this.$store.getters.roles.permissions;e.forEach((function(e){"/memberCenter/menberGoods/configList"==e.permissionId&&e.actionEntitySet&&e.actionEntitySet.length>0&&(t.role=e.actionEntitySet[0].action)}))}},methods:{handleSearch:function(t){var e=this;t.preventDefault(),this.searchForm.validateFields((function(t,n){t||(e.queryParam=Object(r["a"])(Object(r["a"])({},e.queryParam),n),e.handleRefresh(!0))}))},reloadList:function(){this.searchForm.resetFields(),this.queryParam={},this.handleRefresh(!0)},handleRefresh:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(t),this.selectedRowKeys=[]},handleOpen:function(t,e){return this.openVisible=!0,this.record=t,this.recordType=e,1==e?(this.openTitle="暂停会员优惠",void(this.openContent="暂停会员优惠后,该商品的会员折扣将暂时失效,是否确认?")):2==e?(this.openTitle="继续生效",void(this.openContent="确认后,该商品的会员折扣将继续生效~")):3==e?(this.openTitle="移除提醒",void(this.openContent="移除商品后,该商品的会员折扣将失效,您是否确认移除?")):void 0},openOk:function(){var t=this;this.isLoading=!0,3!=this.recordType?d["g"]({form:{id:this.record.id,status:1==this.recordType?1:0}}).then((function(e){t.$message.success(e.message,1.5),t.openVisible=!1,t.handleRefresh()})).finally((function(e){t.isLoading=!1})):d["j"]({form:{id:this.record.id}}).then((function(e){t.$message.success(e.message,1.5),t.openVisible=!1,t.handleRefresh()})).finally((function(e){t.isLoading=!1}))},openCancel:function(){this.openVisible=!1},handleCreate:function(){this.$router.push({path:"./create"})},handleEdit:function(t){this.$router.push({path:"./edit",query:{editState:1,id:t.id}})},handleLook:function(t){this.$router.push({path:"./details",query:{id:t.id}})}}},p=l,h=(n("3460"),n("2877")),m=Object(h["a"])(p,s,o,!1,null,"afcc56ae",null);e["default"]=m.exports},"6af1":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return d})),n.d(e,"a",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"j",(function(){return l})),n.d(e,"c",(function(){return p})),n.d(e,"h",(function(){return h})),n.d(e,"e",(function(){return m}));var i=n("b775"),s={applyList:"/members.Apply/list",list:"/members.MemberGoods/list",detail:"/members.Apply/detail",actionsList:"/members.MemberCards/actionsList",edit:"/members.MemberGoods/edit",remove:"/members.MemberGoods/remove",addGoodsList:"/members.Apply/addGoodsList",editGoodsList:"/members.Apply/editGoodsList",add:"/members.Apply/add",audit:"/members.Apply/audit"};function o(t){return Object(i["b"])({url:s.add,method:"post",data:t})}function r(t){return Object(i["b"])({url:s.applyList,method:"get",params:t})}function a(t){return Object(i["b"])({url:s.list,method:"get",params:t})}function d(t){return Object(i["b"])({url:s.detail,method:"get",params:t})}function c(t){return Object(i["b"])({url:s.actionsList,method:"get",params:t})}function u(t){return Object(i["b"])({url:s.edit,method:"post",data:t})}function l(t){return Object(i["b"])({url:s.remove,method:"post",data:t})}function p(t){return Object(i["b"])({url:s.addGoodsList,method:"get",params:t})}function h(t){return Object(i["b"])({url:s.editGoodsList,method:"get",params:t})}function m(t){return Object(i["b"])({url:s.audit,method:"post",data:t})}},f7b1:function(t,e,n){}}]);