(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f8e930e"],{"0c25":function(t,e,n){},"5a4a":function(t,e,n){"use strict";n.d(e,"B",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"G",(function(){return c})),n.d(e,"z",(function(){return u})),n.d(e,"r",(function(){return i})),n.d(e,"y",(function(){return l})),n.d(e,"W",(function(){return d})),n.d(e,"A",(function(){return s})),n.d(e,"F",(function(){return p})),n.d(e,"D",(function(){return h})),n.d(e,"f",(function(){return f})),n.d(e,"e",(function(){return m})),n.d(e,"g",(function(){return g})),n.d(e,"i",(function(){return b})),n.d(e,"w",(function(){return v})),n.d(e,"ab",(function(){return y})),n.d(e,"o",(function(){return j})),n.d(e,"Z",(function(){return O})),n.d(e,"C",(function(){return w})),n.d(e,"H",(function(){return _})),n.d(e,"q",(function(){return x})),n.d(e,"c",(function(){return k})),n.d(e,"h",(function(){return C})),n.d(e,"b",(function(){return T})),n.d(e,"u",(function(){return L})),n.d(e,"N",(function(){return N})),n.d(e,"m",(function(){return S})),n.d(e,"L",(function(){return M})),n.d(e,"x",(function(){return A})),n.d(e,"db",(function(){return F})),n.d(e,"j",(function(){return $})),n.d(e,"cb",(function(){return E})),n.d(e,"t",(function(){return G})),n.d(e,"J",(function(){return P})),n.d(e,"l",(function(){return z})),n.d(e,"I",(function(){return D})),n.d(e,"v",(function(){return q})),n.d(e,"S",(function(){return I})),n.d(e,"n",(function(){return J})),n.d(e,"R",(function(){return R})),n.d(e,"bb",(function(){return B})),n.d(e,"E",(function(){return H})),n.d(e,"s",(function(){return K})),n.d(e,"X",(function(){return Q})),n.d(e,"T",(function(){return U})),n.d(e,"Y",(function(){return V})),n.d(e,"V",(function(){return W})),n.d(e,"Q",(function(){return X})),n.d(e,"k",(function(){return Y})),n.d(e,"M",(function(){return Z})),n.d(e,"a",(function(){return tt})),n.d(e,"K",(function(){return et})),n.d(e,"U",(function(){return nt})),n.d(e,"P",(function(){return at})),n.d(e,"p",(function(){return rt})),n.d(e,"O",(function(){return ot}));var a=n("b775");function r(t){return Object(a["a"])({url:"channel/good/good-render",method:"get",params:t})}function o(t){return Object(a["a"])({url:"channel/good/attr-show",method:"get",params:t})}function c(t){return Object(a["a"])({url:"channel/good/goods-save",method:"post",data:t})}function u(t){return Object(a["a"])({url:"channel/good/good-detail",method:"get",params:t})}function i(t){return Object(a["a"])({url:"channel/good/get-good-list",method:"get",params:t})}function l(t){return Object(a["a"])({url:"channel/good/good-del",method:"post",data:t})}function d(t){return Object(a["a"])({url:"channel/good/set-good-num",method:"post",data:t})}function s(t){return Object(a["a"])({url:"channel/good/good-down",method:"post",data:t})}function p(t){return Object(a["a"])({url:"channel/good/goods-recovery",method:"post",data:t})}function h(t){return Object(a["a"])({url:"channel/good/good-usave",method:"post",data:t})}function f(t){return Object(a["a"])({url:"channel/category/get-category-list",method:"get",params:t})}function m(t){return Object(a["a"])({url:"channel/category/category-del",method:"post",data:t})}function g(t){return Object(a["a"])({url:"channel/category/category-save",method:"post",data:t})}function b(t){return Object(a["a"])({url:"channel/category/change-switch",method:"post",data:t})}function v(t){return Object(a["a"])({url:"channel/specs/get-specs-list",method:"get",params:t})}function y(t){return Object(a["a"])({url:"channel/specs/specs-save",method:"post",data:t})}function j(t){return Object(a["a"])({url:"channel/specs/change-specs",method:"post",data:t})}function O(t){return Object(a["a"])({url:"channel/specs/specs-del",method:"post",data:t})}function w(t){return Object(a["a"])({url:"channel/good/specs-list",method:"post",data:t})}function _(t){return Object(a["a"])({url:"channel/good/specs-save",method:"post",data:t})}function x(t){return Object(a["a"])({url:"channel/attribute/get-attr-list",method:"get",params:t})}function k(t){return Object(a["a"])({url:"channel/attribute/attr-save",method:"post",data:t})}function C(t){return Object(a["a"])({url:"channel/attribute/change-attr",method:"post",data:t})}function T(t){return Object(a["a"])({url:"channel/attribute/attr-del",method:"post",data:t})}function L(t){return Object(a["a"])({url:"channel/material/get-materia-list",method:"get",params:t})}function N(t){return Object(a["a"])({url:"channel/material/meteria-save",method:"post",data:t})}function S(t){return Object(a["a"])({url:"channel/material/change-materia",method:"post",data:t})}function M(t){return Object(a["a"])({url:"channel/material/materia-del",method:"post",data:t})}function A(t){return Object(a["a"])({url:"channel/unit/get-unit-list",method:"get",params:t})}function F(t){return Object(a["a"])({url:"channel/unit/unit-save",method:"post",data:t})}function $(t){return Object(a["a"])({url:"channel/unit/change-display",method:"post",data:t})}function E(t){return Object(a["a"])({url:"channel/unit/unit-del",method:"post",data:t})}function G(t){return Object(a["a"])({url:"channel/good-label/get-label-list",method:"get",params:t})}function P(t){return Object(a["a"])({url:"channel/good-label/label-save",method:"post",data:t})}function z(t){return Object(a["a"])({url:"channel/good-label/change-label",method:"post",data:t})}function D(t){return Object(a["a"])({url:"channel/good-label/label-del",method:"post",data:t})}function q(t){return Object(a["a"])({url:"channel/print/get-print-list",method:"get",params:t})}function I(t){return Object(a["a"])({url:"channel/print/print-save",method:"post",data:t})}function J(t){return Object(a["a"])({url:"channel/print/change-print",method:"post",data:t})}function R(t){return Object(a["a"])({url:"channel/print/print-del",method:"post",data:t})}function B(t){return Object(a["a"])({url:"channel/good/synchro-goods",method:"post",data:t})}function H(t){return Object(a["a"])({url:"channel/activity/goods-activity-list",method:"get",params:t})}function K(t){return Object(a["a"])({url:"channel/activity/save-goods-activity",method:"get",params:t})}function Q(t){return Object(a["a"])({url:"channel/activity/save-goods-activity",method:"post",data:t})}function U(t){return Object(a["a"])({url:"channel/activity/modify-goods-activity",method:"post",data:t})}function V(t){return Object(a["a"])({url:"channel/category/special-category",method:"get",params:t})}function W(t){return Object(a["a"])({url:"channel/category/save-special",method:"post",data:t})}function X(t){return Object(a["a"])({url:"channel/category/modify-special",method:"post",data:t})}function Y(t){return Object(a["a"])({url:"channel/good/change-goods",method:"post",data:t})}function Z(t){return Object(a["a"])({url:"channel/good/merge-goods",method:"post",data:t})}function tt(t){return Object(a["a"])({url:"channel/good/all-down",method:"post",data:t})}function et(t){return Object(a["a"])({url:"channel/comment/label-list",method:"get",params:t})}function nt(t){return Object(a["a"])({url:"channel/comment/save-label",method:"post",data:t})}function at(t){return Object(a["a"])({url:"channel/comment/modify-label",method:"post",data:t})}function rt(t){return Object(a["a"])({url:"channel/comment/comment-list",method:"get",params:t})}function ot(t){return Object(a["a"])({url:"channel/comment/modify-comment",method:"post",data:t})}},"77af":function(t,e,n){"use strict";var a=n("0c25"),r=n.n(a);r.a},e74b:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[n("div",{staticClass:"shuju_title"},[n("div",{staticClass:"shuju_title_text"},[n("span",[t._v(t._s(1==t.pageType?"商品活动":"第二件折扣"))])])]),n("el-form",{staticClass:"demo-form-inline searchform mar_t20",attrs:{inline:!0,model:t.formInline}},[n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.addEditActive("")}}},[t._v("新增活动")])],1)],1),n("div",{staticClass:"tabledata mar_t20"},[n("el-tabs",{staticStyle:{"margin-bottom":"20px"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"待开始",name:"1"}}),n("el-tab-pane",{attrs:{label:"进行中",name:"2"}}),n("el-tab-pane",{attrs:{label:"已失效",name:"3"}})],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.datalist,"element-loading-text":t.elementLoadingText,stripe:""}},[n("el-table-column",{attrs:{prop:"name",label:"商品名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"flex"},[n("div",{staticClass:"flex-g-0"},[n("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:e.row.icon,fit:"cover"}})],1),n("div",{staticClass:"flex-g-1 t_l"},[n("div",{staticClass:"mar_l10"},[t._v(t._s(e.row.name))])])])]}}])}),n("el-table-column",{attrs:{prop:"name",label:"活动规则",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",{attrs:{size:"mini",type:"success"}},[t._v(t._s(1==t.pageType?1==e.row.type?"特价":2==e.row.type?parseFloat(e.row.goodsMoney)+"折":"减¥"+e.row.goodsMoney:4==e.row.type?"第二件"+parseFloat(e.row.goodsMoney)+"折":"买一送一"))]),5!=e.row.type?n("div",[n("span",{staticClass:"mar_r10"},[t._v(t._s(1==t.pageType?3==e.row.type?"¥"+parseFloat(e.row.discount).toFixed(2):2==e.row.type?"¥"+(e.row.price*(e.row.goodsMoney/10)).toFixed(2):e.row.goodsMoney:4==e.row.type?"¥"+(e.row.price*(e.row.goodsMoney/10)).toFixed(2):""))]),n("span",{staticClass:"color_9",staticStyle:{"text-decoration":"line-through"}},[t._v("¥"+t._s(e.row.price))])]):t._e()]}}])}),n("el-table-column",{attrs:{prop:"time",label:"活动时间",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v(t._s(e.row.startTime))]),n("div",[t._v(t._s(e.row.endTime))])]}}])}),n("el-table-column",{attrs:{prop:"stock",label:"每日库存",align:"center"}}),n("el-table-column",{attrs:{prop:"createdAt",label:"创建时间",align:"center"}}),n("el-table-column",{attrs:{prop:"display",label:"状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(n){return t.changeSwitch(e.row)}},model:{value:e.row.display,callback:function(n){t.$set(e.row,"display",n)},expression:"scope.row.display"}})]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[3!=t.activeName1?[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.addEditActive(e.row.id)}}},[t._v("编辑")]),n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleDelete(e.row.id,3)}}},[t._v("作废")])]:t._e(),n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleDelete(e.row.id,2)}}},[t._v("删除")])]}}])})],1),n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.total,"page-size":10,"current-page":t.currentPage},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"current-change":t.handleCurrentChange}})],1)],1)},r=[],o=(n("b0c0"),n("5a4a")),c={data:function(){return{pageType:1,activeName:"2",activeName1:"2",total:0,currentPage:1,formInline:{name:"",type:""},typeName:{1:"特价商品",2:"折扣商品",3:"立减商品"},datalist:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",labelOptions:[{label:1,value:"特价商品"},{label:2,value:"折扣商品"},{label:3,value:"立减商品"}]}},created:function(){this.pageType=this.$route.query.pageType||1,this.getGoodsList()},methods:{handleClick:function(t){this.getGoodsList(1,t.name)},getGoodsList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;Object(o["E"])({page:e,type:n,activityType:this.pageType}).then((function(e){1==e.code&&(t.total=e.count,t.datalist=e.data,t.activeName1=t.activeName),t.listLoading=!1}))},addEditActive:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$router.push({path:"/goodsActiveAdd",query:{id:t,pageType:this.pageType}})},handleDelete:function(t,e){var n=this;this.$baseConfirm("你确定要".concat(2==e?"删除":"作废","当前项吗"),null,(function(){Object(o["T"])({id:t,type:e}).then((function(t){1==t.code&&(n.$baseMessage(2==e?"删除成功!":"成功作废!","success"),n.getGoodsList(1,n.activeName))}))}))},changeSwitch:function(t){var e=this;Object(o["T"])({id:t.id,type:1,display:t.display}).then((function(t){1==t.code&&e.$baseMessage("操作成功!","success")}))},handleCurrentChange:function(t){this.getGoodsList(t)}}},u=c,i=(n("77af"),n("2877")),l=Object(i["a"])(u,a,r,!1,null,"55eb0008",null);e["default"]=l.exports}}]);