You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
crmeb_php/public/system/js/chunk-1dff22e4.05843b88.js

1 lines
26 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1dff22e4"],{"0a18":function(t,e,a){"use strict";a("1769")},1769:function(t,e,a){},"9b92":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card mb20",attrs:{"body-style":{padding:"0 20px 20px"}}},[t.tabList.length>0?a("el-tabs",{model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.tabList,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.value,label:t.title}})})),1):t._e(),t._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":"110px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:1==t.currentTab,expression:"currentTab == 1"}]},[a("el-form-item",{attrs:{label:"边框名称",prop:"activity_name"}},[a("el-input",{staticClass:"selWidth",attrs:{size:"small",placeholder:"请输入边框名称"},model:{value:t.formValidate.activity_name,callback:function(e){t.$set(t.formValidate,"activity_name",e)},expression:"formValidate.activity_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"活动时间:",required:""}},[a("el-date-picker",{staticClass:"selWidth",attrs:{size:"small",type:"datetimerange",placement:"bottom-end",placeholder:"请选择显示时间","default-time":["00:00:00","23:59:59"]},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}}),t._v(" "),a("p",{staticClass:"desc mt10"},[t._v("设置活动氛围图在商城展示时间")])],1),t._v(" "),a("el-form-item",{attrs:{label:"边框图:"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1","dan")}}},[t.formValidate.pic?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.pic}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])]),t._v(" "),a("p",{staticClass:"desc mt10"},[t._v("宽750px,高750px\n "),a("el-popover",{attrs:{placement:"bottom-start",title:"","min-width":"200",trigger:"hover"}},[a("img",{staticStyle:{height:"270px"},attrs:{src:t.baseURL+"/statics/system/activityBackground.png",alt:""}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[t._v("查看示例")])],1)],1)]),t._v(" "),a("el-form-item",{attrs:{label:"是否开启:"}},[a("el-switch",{attrs:{width:56,"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}})],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:2==t.currentTab,expression:"currentTab == 2"}]},[a("el-form-item",{attrs:{"label-width":"0"}},[a("el-radio-group",{model:{value:t.formValidate.scope_type,callback:function(e){t.$set(t.formValidate,"scope_type",e)},expression:"formValidate.scope_type"}},[a("el-radio",{attrs:{label:0}},[t._v("全部商品参与")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("指定商品参与")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("指定分类参与")]),t._v(" "),a("el-radio",{attrs:{label:3}},[t._v("指定商户参与")])],1)],1),t._v(" "),1==t.formValidate.scope_type?a("el-form-item",{attrs:{"label-width":"0"}},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.addGoods}},[t._v("添加商品")]),t._v(" "),a("el-button",{attrs:{size:"small",disabled:!t.multipleSelection.length},on:{click:t.batchDel}},[t._v("批量删除")])],1):t._e(),t._v(" "),1==t.formValidate.scope_type?a("el-form-item",{attrs:{"label-width":"0"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"tableList",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini"},on:{"selection-change":t.handleSelectionChange,"select-all":t.selectAll,select:t.selectOne}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{prop:"product_id",width:"90"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-dropdown",{attrs:{szie:"mini"},on:{command:t.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[t._v("选择页"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.options,(function(e){return a("el-dropdown-item",{key:e.value,attrs:{command:e.value}},[t._v(t._s(e.label))])})),1)],1)]}}],null,!1,1537211165)}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}],null,!1,1825039654)}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售价","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"库存","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"140",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]}}],null,!1,1945863928)})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1):t._e(),t._v(" "),2==t.formValidate.scope_type?a("el-form-item",{attrs:{label:"选择分类:",span:24,"label-width":"80px",prop:"cate_ids"}},[a("el-cascader",{staticClass:"selWidth",attrs:{props:t.props,options:t.categoryList,multiple:"","show-all-levels":!1,clearable:""},model:{value:t.formValidate.cate_ids,callback:function(e){t.$set(t.formValidate,"cate_ids",e)},expression:"formValidate.cate_ids"}})],1):t._e(),t._v(" "),3==t.formValidate.scope_type?a("el-form-item",{attrs:{label:"选择商户:",span:24,"label-width":"80px",prop:"mer_ids"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",cearable:"",multiple:""},model:{value:t.formValidate.mer_ids,callback:function(e){t.$set(t.formValidate,"mer_ids",e)},expression:"formValidate.mer_ids"}},t._l(t.merchantList,(function(t){return a("el-option",{key:t.mer_id,attrs:{label:t.mer_name,value:t.mer_id}})})),1)],1):t._e()],1)])],1),t._v(" "),a("el-card",{staticClass:"fixed-card"},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:1==t.currentTab,expression:"currentTab == 1"}],attrs:{size:"small",type:"primary"},on:{click:function(e){t.currentTab="2"}}},[t._v("下一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:2==t.currentTab,expression:"currentTab == 2"}],attrs:{size:"small"},on:{click:function(e){t.currentTab="1"}}},[t._v("上一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:2==t.currentTab,expression:"currentTab == 2"}],attrs:{size:"small",type:"primary"},on:{click:function(e){return t.submitForm("formValidate")}}},[t._v("保存")])],1),t._v(" "),a("goodsList",{ref:"goodsList",on:{onSelectList:t.selectList}})],1)},i=[],r=(a("1c4c"),a("20d6"),a("6b54"),a("ac6a"),a("5df3"),a("4f7f"),a("75fc")),o=a("b7be"),s=a("c4c8"),l=a("bbcc"),c=a("83d6"),u=a("ecc0"),d={name:"addBorder",data:function(){return{baseURL:l["a"].httpUrl||"http://localhost:8080",pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()}},props:{multiple:!0,emitPath:!1},roterPre:c["roterPre"],currentTab:"1",tabList:[{value:"1",title:"基础设置"},{value:"2",title:"使用范围"}],fullscreenLoading:!1,timeVal:"",formValidate:{activity_name:"",start_time:"",end_time:"",pic:"",cate_ids:[],mer_ids:[],is_show:0,scope_type:0,spu_ids:[]},ruleValidate:{activity_name:[{required:!0,message:"请输入名称",trigger:"blur"}]},listLoading:!1,selectGoods:!1,multipleSelection:[],categoryList:[],merchantList:[],tableData:{data:[],total:0},options:[{value:"all",label:"所有页"},{value:"one",label:"当前页"}],tableFrom:{page:1,limit:20,spu_ids:[]},ids:[]}},components:{goodsList:u["a"]},computed:{isEdit:function(){return!!this.$route.params.id}},mounted:function(){this.$route.params.id&&(this.setTagsViewTitle(),this.getInfo(this.$route.params.id)),this.getMerSelect(),this.getCategorySelect()},methods:{onchangeTime:function(t){this.timeVal=t,this.formValidate.start_time=t?this.moment(t[0]).format("YYYY-MM-DD HH:mm:ss"):"",this.formValidate.end_time=t?this.moment(t[1]).format("YYYY-MM-DD HH:mm:ss"):""},modalPicTap:function(t,e){var a=this;this.$modalUpload((function(t){a.formValidate.pic=t[0]}),t)},setTagsViewTitle:function(){var t="编辑商品边框",e=Object.assign({},this.tempRoute,{title:"".concat(t,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",e)},getMerSelect:function(){var t=this;Object(s["P"])().then((function(e){t.merchantList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategorySelect:function(){var t=this;Object(s["w"])({type:1}).then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getInfo:function(t){var e=this;this.fullscreenLoading=!0,Object(o["h"])(t).then((function(t){var a=t.data;e.formValidate={activity_name:a.activity_name,start_time:a.start_time,end_time:a.end_time,cate_ids:a.cate_ids,mer_ids:a.mer_ids,spu_ids:a.spu_ids,pic:a.pic,is_show:a.is_show,scope_type:a.scope_type},e.fullscreenLoading=!1,e.timeVal=[new Date(t.data.start_time),new Date(t.data.end_time)],1==a.scope_type&&(e.$set(e.tableFrom,"spu_ids",a.spu_ids),e.getList(""))})).catch((function(t){e.$message.error(t.message),e.fullscreenLoading=!1}))},addGoods:function(){this.$refs.goodsList.dialogVisible=!0},selectList:function(t){var e,a;(this.listLoading=!0,(e=console).log.apply(e,Object(r["a"])(t)),this.tableFrom.spu_ids.length)?((a=this.tableFrom.spu_ids).push.apply(a,Object(r["a"])(t)),this.tableFrom.spu_ids=Object(r["a"])(new Set(this.tableFrom.spu_ids))):this.$set(this.tableFrom,"spu_ids",t);this.getList("")},getList:function(t){var e=this;this.tableFrom.page=t||this.tableFrom.page,Object(o["ib"])({spu_ids:this.tableFrom.spu_ids.toString(),page:this.tableFrom.page,limit:this.tableFrom.limit}).then((function(t){var a;(e.tableData.data=t.data.list,e.tableData.total=t.data.count,"all"==e.selectAllPage)&&((a=e.multipleSelection).push.apply(a,Object(r["a"])(e.tableData.data)),e.multipleSelection.forEach((function(t){e.$refs.tableList.toggleRowSelection(t,!0)})));e.listLoading=!1})).catch((function(t){e.$message.error(t.message),e.listLoading=!1}))},handleDelete:function(t,e){this.tableData.data.splice(t,1);var a=this.tableFrom.spu_ids.findIndex((function(t){return t==e.product_id}));this.tableFrom.spu_ids.splice(a,1)},batchDel:function(){var t=this,e=this.tableData.data;this.$refs.tableList.selection.forEach((function(a,n){for(var i=0;i<t.tableFrom.spu_ids.length;i++){var r=t.tableFrom.spu_ids[i];r==a.spu_ids&&t.tableFrom.spu_ids.splice(i,1)}for(var o=0;o<e.length;o++){r=e[o].spu_id;r==a.spu_id&&e.splice(o,1)}t.multipleSelection=[]}))},handleSelectionChange:function(t){this.multipleSelection=t;var e=[];this.multipleSelection.map((function(t){e.push(t.spu_id)}))},selectAll:function(t){var e=t.map((function(t,e){return t.spu_id}));this.ids=Array.from(new Set([].concat(Object(r["a"])(this.ids),Object(r["a"])(e))))},selectOne:function(t,e){var a=t.map((function(t,e){return t.spu_id})),n=this.ids.findIndex((function(t){return t==e.spu_id}));this.ids.splice(n,1),this.ids=Array.from(new Set([].concat(Object(r["a"])(this.ids),Object(r["a"])(a))))},handleCommand:function(t){var e=this;this.$message("click on item "+t),this.selectAllPage="all"===t,this.$nextTick((function(){e.$refs.tableList.toggleAllSelection()}))},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){return!!t&&(e.formValidate.spu_ids=e.tableFrom.spu_ids.toString(),1==e.formValidate.scope_type&&""==e.formValidate.spu_ids?e.$message.error("请选择商品"):""==e.formValidate.pic?e.$message.error("请上传氛围图"):void(e.isEdit?Object(o["k"])(e.$route.params.id,e.formValidate).then((function(t){e.$message.success(t.message),e.$router.push({path:e.roterPre+"/marketing/border/list"})})).catch((function(t){e.$message.error(t.message)})):Object(o["P"])(e.formValidate).then((function(t){e.$message.success(t.message),e.$router.push({path:e.roterPre+"/marketing/border/list"})})).catch((function(t){e.$message.error(t.message)}))))}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},m=d,f=(a("0a18"),a("2877")),p=Object(f["a"])(m,n,i,!1,null,"6c3dbc2d",null);e["default"]=p.exports},b7be:function(t,e,a){"use strict";a.d(e,"gb",(function(){return i})),a.d(e,"fb",(function(){return r})),a.d(e,"bb",(function(){return o})),a.d(e,"ab",(function(){return s})),a.d(e,"Z",(function(){return l})),a.d(e,"cb",(function(){return c})),a.d(e,"db",(function(){return u})),a.d(e,"eb",(function(){return d})),a.d(e,"N",(function(){return m})),a.d(e,"I",(function(){return f})),a.d(e,"J",(function(){return p})),a.d(e,"L",(function(){return b})),a.d(e,"K",(function(){return g})),a.d(e,"W",(function(){return h})),a.d(e,"H",(function(){return v})),a.d(e,"o",(function(){return _})),a.d(e,"u",(function(){return y})),a.d(e,"m",(function(){return w})),a.d(e,"l",(function(){return L})),a.d(e,"n",(function(){return k})),a.d(e,"X",(function(){return V})),a.d(e,"Y",(function(){return x})),a.d(e,"pb",(function(){return S})),a.d(e,"r",(function(){return C})),a.d(e,"q",(function(){return $})),a.d(e,"v",(function(){return F})),a.d(e,"a",(function(){return T})),a.d(e,"ob",(function(){return z})),a.d(e,"lb",(function(){return D})),a.d(e,"nb",(function(){return O})),a.d(e,"kb",(function(){return j})),a.d(e,"mb",(function(){return P})),a.d(e,"hb",(function(){return A})),a.d(e,"qb",(function(){return M})),a.d(e,"p",(function(){return N})),a.d(e,"t",(function(){return W})),a.d(e,"s",(function(){return Y})),a.d(e,"F",(function(){return E})),a.d(e,"x",(function(){return B})),a.d(e,"A",(function(){return I})),a.d(e,"B",(function(){return R})),a.d(e,"z",(function(){return G})),a.d(e,"C",(function(){return H})),a.d(e,"G",(function(){return U})),a.d(e,"E",(function(){return q})),a.d(e,"D",(function(){return J})),a.d(e,"w",(function(){return K})),a.d(e,"y",(function(){return Q})),a.d(e,"M",(function(){return X})),a.d(e,"V",(function(){return Z})),a.d(e,"U",(function(){return tt})),a.d(e,"jb",(function(){return et})),a.d(e,"T",(function(){return at})),a.d(e,"rb",(function(){return nt})),a.d(e,"S",(function(){return it})),a.d(e,"Q",(function(){return rt})),a.d(e,"R",(function(){return ot})),a.d(e,"ib",(function(){return st})),a.d(e,"O",(function(){return lt})),a.d(e,"f",(function(){return ct})),a.d(e,"e",(function(){return ut})),a.d(e,"d",(function(){return dt})),a.d(e,"c",(function(){return mt})),a.d(e,"b",(function(){return ft})),a.d(e,"P",(function(){return pt})),a.d(e,"k",(function(){return bt})),a.d(e,"i",(function(){return gt})),a.d(e,"h",(function(){return ht})),a.d(e,"j",(function(){return vt})),a.d(e,"g",(function(){return _t}));var n=a("0c6d");function i(t){return n["a"].get("/store/coupon/platformLst",t)}function r(t){return n["a"].get("/store/coupon/update/".concat(t,"/form"))}function o(t){return n["a"].get("/store/coupon/show/".concat(t))}function s(t){return n["a"].delete("store/coupon/delete/".concat(t))}function l(t){return n["a"].get("/store/coupon/sys/clone/".concat(t,"/form"))}function c(t){return n["a"].get("store/coupon/sys/issue",t)}function u(t,e){return n["a"].get("store/coupon/show_lst/".concat(t),e)}function d(t){return n["a"].get("/store/coupon/send/lst",t)}function m(t){return n["a"].post("store/coupon/send",t)}function f(t){return n["a"].get("store/coupon/detail/".concat(t))}function p(t){return n["a"].get("store/coupon/lst",t)}function b(t,e){return n["a"].post("store/coupon/status/".concat(t),{status:e})}function g(){return n["a"].get("store/coupon/create/form")}function h(t){return n["a"].get("store/coupon/issue",t)}function v(t){return n["a"].delete("store/coupon/delete/".concat(t))}function _(t){return n["a"].get("broadcast/room/lst",t)}function y(t,e){return n["a"].post("broadcast/room/status/".concat(t),e)}function w(t){return n["a"].delete("broadcast/room/delete/".concat(t))}function L(t){return n["a"].get("broadcast/room/apply/form/".concat(t))}function k(t){return n["a"].get("broadcast/room/detail/".concat(t))}function V(t,e){return n["a"].post("broadcast/room/feedsPublic/".concat(t),{status:e})}function x(t,e){return n["a"].post("broadcast/room/comment/".concat(t),{status:e})}function S(t,e){return n["a"].post("broadcast/room/closeKf/".concat(t),{status:e})}function C(t){return n["a"].get("broadcast/goods/lst",t)}function $(t){return n["a"].get("broadcast/goods/detail/".concat(t))}function F(t,e){return n["a"].post("broadcast/goods/status/".concat(t),e)}function T(t){return n["a"].get("broadcast/goods/apply/form/".concat(t))}function z(){return n["a"].get("seckill/config/create/form")}function D(t){return n["a"].get("seckill/config/lst",t)}function O(t){return n["a"].get("seckill/config/update/".concat(t,"/form"))}function j(t){return n["a"].delete("seckill/config/delete/".concat(t))}function P(t,e){return n["a"].post("seckill/config/status/".concat(t),{status:e})}function A(t,e){return n["a"].get("seckill/product/detail/".concat(t),e)}function M(t,e){return n["a"].get("broadcast/room/goods/".concat(t),e)}function N(t){return n["a"].delete("broadcast/goods/delete/".concat(t))}function W(t,e){return n["a"].post("broadcast/room/sort/".concat(t),e)}function Y(t,e){return n["a"].post("broadcast/goods/sort/".concat(t),e)}function E(t){return n["a"].post("config/others/group_buying",t)}function B(){return n["a"].get("config/others/group_buying")}function I(t){return n["a"].get("store/product/group/lst",t)}function R(t){return n["a"].get("store/product/group/get/".concat(t))}function G(t){return n["a"].get("store/product/group/detail/".concat(t))}function H(t){return n["a"].post("store/product/group/status",t)}function U(t,e){return n["a"].post("store/product/group/is_show/".concat(t),{status:e})}function q(t){return n["a"].get("store/product/group/get/".concat(t))}function J(t,e){return n["a"].post("store/product/group/update/".concat(t),e)}function K(t){return n["a"].get("store/product/group/buying/lst",t)}function Q(t,e){return n["a"].get("store/product/group/buying/detail/".concat(t),e)}function X(t,e){return n["a"].get("store/coupon/product/".concat(t),e)}function Z(){return n["a"].get("user/integral/title")}function tt(t){return n["a"].get("user/integral/lst",t)}function et(t){return n["a"].get("user/integral/excel",t)}function at(){return n["a"].get("user/integral/config")}function nt(t){return n["a"].post("user/integral/config",t)}function it(t){return n["a"].get("discounts/lst",t)}function rt(t,e){return n["a"].post("discounts/status/".concat(t),{status:e})}function ot(t){return n["a"].get("discounts/detail/".concat(t))}function st(t){return n["a"].get("marketing/spu/lst",t)}function lt(t){return n["a"].post("activity/atmosphere/create",t)}function ct(t,e){return n["a"].post("activity/atmosphere/update/".concat(t),e)}function ut(t){return n["a"].get("activity/atmosphere/lst",t)}function dt(t){return n["a"].get("activity/atmosphere/detail/".concat(t))}function mt(t,e){return n["a"].post("activity/atmosphere/status/".concat(t),{status:e})}function ft(t){return n["a"].delete("activity/atmosphere/delete/".concat(t))}function pt(t){return n["a"].post("activity/border/create",t)}function bt(t,e){return n["a"].post("activity/border/update/".concat(t),e)}function gt(t){return n["a"].get("activity/border/lst",t)}function ht(t){return n["a"].get("activity/border/detail/".concat(t))}function vt(t,e){return n["a"].post("activity/border/status/".concat(t),{status:e})}function _t(t){return n["a"].delete("activity/border/delete/".concat(t))}},db05:function(t,e,a){"use strict";a("dcb4")},dcb4:function(t,e,a){},ecc0:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.dialogVisible?a("el-dialog",{attrs:{title:"商品信息",visible:t.dialogVisible,width:"1000px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"divBox"},[a("div",{staticClass:"header clearfix"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small",inline:"","label-width":"100px"}},[a("el-form-item",{attrs:{label:"商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.categoryList,props:t.props,filterable:"",clearable:""},on:{change:function(e){return t.getList()}},model:{value:t.tableFrom.cate_id,callback:function(e){t.$set(t.tableFrom,"cate_id",e)},expression:"tableFrom.cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.sys_labels,callback:function(e){t.$set(t.tableFrom,"sys_labels",e)},expression:"tableFrom.sys_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商户选择:"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",cearable:"",multiple:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_ids,callback:function(e){t.$set(t.tableFrom,"mer_ids",e)},expression:"tableFrom.mer_ids"}},t._l(t.merSelect,(function(t){return a("el-option",{key:t.mer_id,attrs:{label:t.mer_name,value:t.mer_name}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品关键字",clearable:""},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("查询")])],1)],1)],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"mainTable",attrs:{data:t.tableData.data,"row-key":"spu_id",size:"small","max-height":"500"},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品信息","min-width":"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"acea-row",staticStyle:{"align-items":"center"}},[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1),t._v(" "),a("div",{staticClass:"row_title line2"},[t._v(t._s(e.row.store_name))])])]}}],null,!1,1964586086)}),t._v(" "),a("el-table-column",{attrs:{prop:"merchant",label:"商户名称","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.merchant.mer_name))])]}}],null,!1,2388555776)}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售价","min-width":"100"}})],1),t._v(" "),a("div",{staticClass:"acea-row row-between row-bottom"},[a("el-pagination",{attrs:{"page-sizes":[10,20,30],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}}),t._v(" "),a("div",[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.submitProduct}},[t._v("确定")])],1)],1)],1)]):t._e()},i=[],r=(a("ac6a"),a("75fc")),o=a("c4c8"),s=a("b7be"),l=a("83d6"),c={name:"GoodsList",props:{resellShow:{type:Boolean,default:!1}},data:function(){return{dialogVisible:!1,templateRadio:0,categoryList:[],merSelect:[],labelList:[],merList:[],options:[{value:"all",label:"所有页"},{value:"one",label:"当前页"}],roterPre:l["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:10,cate_id:"",keyword:"",mer_ids:"",label_ids:[],type:21},mer_ids:[],props:{emitPath:!1},multipleSelection:[],checked:[],selectAllPage:!1}},mounted:function(){this.multipleSelection=[],this.getLabelLst(),this.getCategoryList(),this.getMerchantList(),this.getList("")},methods:{handleSelectionChange:function(t){this.multipleSelection=t},handleCommand:function(t){var e=this;this.selectAllPage=t,this.$nextTick((function(){e.$refs.mainTable.toggleAllSelection()}))},getCategoryList:function(){var t=this;Object(o["w"])({type:1}).then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getMerchantList:function(){var t=this;Object(o["P"])().then((function(e){t.merSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},getLabelLst:function(){var t=this;Object(o["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["ib"])(this.tableFrom).then((function(t){var a;(e.tableData.data=t.data.list,e.tableData.total=t.data.count,"all"==e.selectAllPage)&&((a=e.multipleSelection).push.apply(a,Object(r["a"])(e.tableData.data)),e.multipleSelection.forEach((function(t){e.$refs.mainTable.toggleAllSelection()})));e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},submitProduct:function(){var t=this.multipleSelection.map((function(t){return t.spu_id}));this.$emit("onSelectList",t),this.$refs.mainTable.clearSelection(),this.dialogVisible=!1},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},u=c,d=(a("db05"),a("2877")),m=Object(d["a"])(u,n,i,!1,null,"c0e44504",null);e["a"]=m.exports}}]);