(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f589ab6"],{"2c73":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"outmain ba_f"},[e._m(0),a("el-tabs",{on:{"tab-click":e.handleTabClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"已上架",name:"1"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("已上架("+e._s(""==e.allTotal?0:e.allTotal)+")")])]),a("el-tab-pane",{attrs:{label:"库存不足",name:"2"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("库存不足("+e._s(""==e.noStock?0:e.noStock)+")")])]),a("el-tab-pane",{attrs:{label:"已售罄",name:"5"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("已售罄("+e._s(""==e.sellOutTotal?0:e.sellOutTotal)+")")])]),a("el-tab-pane",{attrs:{label:"已下架",name:"3"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("已下架("+e._s(""==e.errDisplay?0:e.errDisplay)+")")])]),a("el-tab-pane",{attrs:{label:"待上架",name:"4"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("待上架("+e._s(""==e.noDisplay?0:e.noDisplay)+")")])]),a("el-tab-pane",{attrs:{label:"回收站",name:"6"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("回收站("+e._s(""==e.recycleTotal?0:e.recycleTotal)+")")])])],1),a("div",{staticClass:"content ba_f"},[a("div",{staticClass:"flex-bet pad_20"},[a("div",[a("el-form",{staticClass:"demo-form-inline searchform",attrs:{inline:!0,model:e.formInline}},[a("div",[a("el-form-item",{attrs:{label:"商品名称"}},[a("el-input",{attrs:{size:"medium",placeholder:"请输入商品名称"},on:{input:e.onSearch},model:{value:e.formInline.name,callback:function(t){e.$set(e.formInline,"name",t)},expression:"formInline.name"}})],1),a("el-form-item",{attrs:{label:"商品分类"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择分类"},on:{change:e.onSearch},model:{value:e.formInline.typePid,callback:function(t){e.$set(e.formInline,"typePid",t)},expression:"formInline.typePid"}},e._l(e.typeOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{size:"medium"},on:{click:e.onSearch}},[e._v("搜索")])],1)],1)])],1),a("div",{staticClass:"flex"},[a("ul",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}],staticClass:"flex tablebtn mar_r40"},[a("li",{staticClass:"t_btn bor_dd curs"},[a("el-button",{attrs:{size:"medium"},on:{click:function(t){return e.handleGoodEdit("row","1")}}},[e._v("沽清")])],1),a("li",{staticClass:"t_btn bor_dd curs"},[a("el-button",{attrs:{size:"medium"},on:{click:function(t){return e.handleGoodEdit("row","2")}}},[e._v("置满")])],1),a("li",{staticClass:"t_btn bor_dd curs"},[a("el-button",{attrs:{size:"medium"},on:{click:function(t){return e.handlexgkc()}}},[e._v("修改库存")])],1),a("li",{staticClass:"t_btn bor_dd curs"},[a("el-button",{attrs:{size:"medium"},on:{click:function(t){return e.goodDown("row",2)}}},[e._v("上架")])],1),a("li",{staticClass:"t_btn bor_dd curs"},[a("el-button",{attrs:{size:"medium"},on:{click:function(t){return e.goodDown("row",1)}}},[e._v("下架")])],1)]),a("div",[a("el-button",{attrs:{size:"medium"},on:{click:e.handleDelete}},[e._v("批量删除")]),a("el-button",{staticClass:"mar_l10",attrs:{type:"primary",size:"medium"},on:{click:function(t){return e.addgood()}}},[e._v("添加商品")])],1)])]),a("div",{staticClass:"mar_b20"},[a("el-button",{attrs:{size:"medium",type:"success"},on:{click:e.handletb}},[e._v("同步商品到门店")]),a("el-button",{attrs:{size:"medium",type:"danger"},on:{click:e.handletbwm}},[e._v("同步商品到店内")]),a("el-checkbox",{staticClass:"mar_l10",on:{change:function(t){return e.toggleSelection(e.list)}},model:{value:e.allGood,callback:function(t){e.allGood=t},expression:"allGood"}},[e._v("全部商品")]),a("div",{staticClass:"yb_margin lh16"},[e._v("如需同步所有商品到门店请勾选此选项,如需同步局部商品到门店请勿勾选!")])],1),a("div",{staticClass:"tabledata"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{"element-loading-text":e.elementLoadingText,data:e.list,stripe:""},on:{"selection-change":e.setSelectRows}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{prop:"sort",label:"排序",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex bixuan"},[a("div",{},[e._v(e._s(t.row.sort))]),a("span",{staticClass:"el-icon-edit-outline curs subjectcolor2 mar_l5",on:{click:function(a){return e.handleEdit(t.row,"sort")}}})])]}}])}),a("el-table-column",{attrs:{prop:"id",label:"商品ID",width:"100"}}),a("el-table-column",{attrs:{prop:"name",label:"商品名称",width:"390"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex flex-y-top"},[a("div",{},[a("img",{staticClass:"goodlogo bor_rad5",attrs:{src:t.row.icon}})]),a("div",{staticClass:"mar_l10"},[a("div",{staticClass:"flex bixuan"},[a("div",{},[e._v(e._s(t.row.name))]),a("span",{staticClass:"el-icon-edit-outline curs subjectcolor2",on:{click:function(a){return e.handleEdit(t.row,"name")}}}),a("el-tag",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.isRecommend,expression:"scope.row.isRecommend=='1'"}],staticClass:"mar_l10",attrs:{size:"medium",type:"danger"}},[e._v("推荐")]),a("el-tag",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.discountOpen,expression:"scope.row.discountOpen=='1'"}],staticClass:"mar_l10",staticStyle:{background:"#faf3ec"},attrs:{size:"medium",type:"danger"}},[a("span",{staticStyle:{color:"#ca8743"}},[e._v("会员价")])])],1),a("p",{staticClass:"fon_12 color_9 mar_t5"},[e._v("销量:"+e._s(t.row.salesNum))])])])]}}])}),a("el-table-column",{attrs:{prop:"category_name",label:"商品分类"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("p",[a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v(e._s(t.row.category_name))])],1)])]}}])}),a("el-table-column",{attrs:{prop:"price",label:"价格"},scopedSlots:e._u([{key:"default",fn:function(t){return["2"==t.row.isSpecs?a("div",[e._v(" ¥"+e._s(t.row.price)+" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}],staticClass:"el-icon-edit-outline",attrs:{type:"text"},on:{click:function(a){return e.handleEdit(t.row,"price")}}})],1):a("div",[e._v(" "+e._s(t.row.price)+"~"+e._s(t.row.maxPrice)+" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}],staticClass:"el-icon-edit-outline",attrs:{type:"text"},on:{click:function(a){return e.handleGoodSpec(t.row,"dPrice")}}})],1)]}}])}),a("el-table-column",{attrs:{prop:"stock",label:"库存"},scopedSlots:e._u([{key:"default",fn:function(t){return["2"==t.row.isSpecs?a("div",{staticClass:"flex"},[a("div",{staticClass:"mar_r5"},[e._v(e._s(t.row.stock))]),a("span",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}]},[a("el-button",{staticClass:"el-icon-edit-outline",attrs:{type:"text"},on:{click:function(a){return e.handleEdit(t.row,"stock")}}}),a("el-button",{staticClass:"color_6",attrs:{type:"text"},on:{click:function(a){return e.handleGoodEdit(t.row,"1")}}},[e._v("估清")]),a("el-button",{staticClass:"color_6",attrs:{type:"text"},on:{click:function(a){return e.handleGoodEdit(t.row,"2")}}},[e._v("置满")])],1)]):a("div",[e._v(" 多规格 "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}],staticClass:"color_6 mar_l10",attrs:{type:"text"},on:{click:function(a){return e.handleGoodSpec(t.row,"dStock")}}},[e._v("库存管理")])],1)]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{directives:[{name:"show",rawName:"v-show",value:"6"!=e.activeName,expression:"activeName!='6'"}],staticClass:"flex gengduo"},[a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.display,expression:"scope.row.display=='1'"}],staticClass:"ruleHot"}),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.display,expression:"scope.row.display=='1'"}],attrs:{type:"text"},on:{click:function(a){return e.goodDown(t.row,1)}}},[e._v("下架")]),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.display,expression:"scope.row.display=='2'"}],staticClass:"redHot"}),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.display,expression:"scope.row.display=='2'"}],attrs:{type:"text"},on:{click:function(a){return e.goodDown(t.row,2)}}},[e._v("上架")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editGood(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.vipGood(t.row)}}},[e._v("会员价")]),a("el-dropdown",{attrs:{trigger:"click"}},[a("span",{staticClass:"curs subjectcolor2 mar_l10"},[e._v(" 更多 "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",[a("a",{staticClass:"alinks",on:{click:function(a){return e.tongjiGood(t.row)}}},[e._v("商品统计")])]),a("el-dropdown-item",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.isRecommend,expression:"scope.row.isRecommend=='2'"}]},[a("a",{staticClass:"alinks",on:{click:function(a){return e.handleRecommend(t.row,2)}}},[e._v("商品推荐")])]),a("el-dropdown-item",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.isRecommend,expression:"scope.row.isRecommend=='1'"}]},[a("a",{staticClass:"alinks",on:{click:function(a){return e.handleRecommend(t.row,1)}}},[e._v("取消推荐")])]),a("el-dropdown-item",[a("a",{staticClass:"alinks",on:{click:function(a){return e.qbxj(t.row)}}},[e._v("全部下架")])]),a("el-dropdown-item",[a("a",{staticClass:"alinks",on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("商品删除")])])],1)],1)],1),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"==e.activeName,expression:"activeName=='6'"}],attrs:{type:"text"},on:{click:function(a){return e.goodRecovery(t.row)}}},[e._v("恢复")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"==e.activeName,expression:"activeName=='6'"}],attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("商品删除")])]}}])})],1),a("el-dialog",{attrs:{title:"批量修改库存",visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",[a("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.plkc,callback:function(t){e.plkc="string"===typeof t?t.trim():t},expression:"plkc"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.qrplxg()}}},[e._v("确 定")])],1)]),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}}),a("edit",{ref:"edit",on:{fetchData:e.fetchData}}),a("specs",{ref:"specs",on:{fetchData:e.fetchData}}),a("EditVip",{ref:"editvip",on:{fetchData:e.fetchData}}),a("tbGoods",{ref:"tbgoods",on:{fetchData:e.fetchData}})],1)])],1)},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("商品列表")])])])}],r=(a("99af"),a("4160"),a("d81d"),a("b0c0"),a("159b"),a("96cf"),a("1da1")),i=a("419d"),o=a("40c5"),c=a("e6b2"),l=a("cbb1"),u=a("5a4a"),d={name:"goodlist",components:{Edit:i["a"],Specs:c["a"],EditVip:o["a"],tbGoods:l["a"]},created:function(){this.$route.query.currentPage||this.$route.query.activeName?(this.page.currentPage=+this.$route.query.currentPage,this.activeName=this.$route.query.activeName?this.$route.query.activeName:"1",this.type=this.$route.query.type?this.$route.query.type:1,this.fetchData()):this.fetchData()},data:function(){return{formInline:{name:"",typePid:""},typeOptions:[],activeName:"1",tdHover:!1,list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},stock:"1",msg:"",display:"1",dialogVisible:!1,plkc:"",allTotal:"",errDisplay:"",noDisplay:"",noStock:"",sellOutTotal:"",type:1,recycleTotal:"",allGood:!1}},methods:{fetchData:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var a,s,n,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={page:e.page.currentPage,type:e.type,name:e.formInline.name,typePid:e.formInline.typePid},e.listLoading=!1,t.next=4,Object(u["r"])(a);case 4:s=t.sent,n=s.data,r=s.count,i=s.msg,e.msg=i,e.list=n.data,e.page.total=r,e.typeOptions=n.categoryData?n.categoryData:[],e.allTotal=n.allTotal?n.allTotal:0,e.errDisplay=n.errDisplay?n.errDisplay:0,e.noDisplay=n.noDisplay?n.noDisplay:0,e.noStock=n.noStock?n.noStock:0,e.sellOutTotal=n.sellOutTotal?n.sellOutTotal:0,e.recycleTotal=n.recycleTotal?n.recycleTotal:0;case 18:case"end":return t.stop()}}),t)})))()},onSearch:function(){this.fetchData()},setSelectRows:function(e){this.selectRows=e},handleCurrentChange:function(e){this.page.currentPage=e,this.fetchData()},addgood:function(){var e=this;"无效的门店"==this.msg?this.$baseConfirm2("请完善门店信息",null,"去完善信息",null,Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$router.push({path:"/storeinformation"});case 1:case"end":return t.stop()}}),t)})))):"请添加商品分类"==this.msg?this.$baseConfirm2("请先添加商品分类",null,"去添加分类",null,Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$router.push({path:"/goodclassify"});case 1:case"end":return t.stop()}}),t)})))):"请添加商品单位"==this.msg?this.$baseConfirm2("请先添加商品单位",null,"去添加单位",null,Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$router.push({path:"/goodunit"});case 1:case"end":return t.stop()}}),t)})))):this.$router.push("/addgood1?currentPage=".concat(this.page.currentPage,"&activeName=").concat(this.activeName,"&type=").concat(this.type))},editGood:function(e){this.$router.push("/addgood1?id=".concat(e.id,"¤tPage=").concat(this.page.currentPage,"&activeName=").concat(this.activeName,"&type=").concat(this.type))},vipGood:function(e){e.id&&this.$refs["editvip"].showEdit(e)},handleGoodSpec:function(e,t){e.id&&this.$refs["specs"].showEdit(e,t)},handleEdit:function(e,t){e.id&&this.$refs["edit"].showEdit(e,t)},handleTabClick:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.page.currentPage=1,t.t0=+e.activeName,t.next=1===t.t0?4:2===t.t0?9:3===t.t0?14:4===t.t0?19:5===t.t0?24:6===t.t0?29:34;break;case 4:return e.stock=1,e.display=1,e.type=1,e.fetchData(),t.abrupt("break",34);case 9:return e.stock=0,e.display=1,e.type=2,e.fetchData(),t.abrupt("break",34);case 14:return e.display=2,e.stock=1,e.type=4,e.fetchData(),t.abrupt("break",34);case 19:return e.display=3,e.stock=1,e.type=5,e.fetchData(),t.abrupt("break",34);case 24:return e.display=1,e.stock=0,e.type=3,e.fetchData(),t.abrupt("break",34);case 29:return e.display=1,e.stock=0,e.type=6,e.fetchData(),t.abrupt("break",34);case 34:case"end":return t.stop()}}),t)})))()},handleDelete:function(e){var t=this;if(e.id){var a=1;"6"==this.activeName&&(a=2),this.$baseConfirm("你确定要删除当前项吗",null,Object(r["a"])(regeneratorRuntime.mark((function s(){var n,r;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,Object(u["y"])({id:e.id,type:a});case 2:n=s.sent,r=n.msg,t.$baseMessage(r,"success"),t.fetchData();case 6:case"end":return s.stop()}}),s)}))))}else{if(!(this.selectRows.length>0||this.allGood))return this.$baseMessage("未选中任何行","error"),!1;var s="";s=this.allGood?"你确定要删除所有商品吗":"你确定要删除选中项吗";var n=this.selectRows.map((function(e){return e.id}));this.$baseConfirm(s,null,Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["y"])({id:t.allGood?"all":n,type:"6"==t.activeName?2:1});case 2:a=e.sent,s=a.msg,t.$baseMessage(s,"success"),t.fetchData();case 6:case"end":return e.stop()}}),e)}))))}},handletb:function(){if(!(this.selectRows.length>0||this.allGood))return this.$baseMessage("未选中任何商品","error"),!1;var e=this.selectRows.map((function(e){return e.id}));this.$refs["tbgoods"].showEdit(e,this.allGood)},handletbwm:function(){var e=this;if(!(this.selectRows.length>0||this.allGood))return this.$baseMessage("未选中任何商品","error"),!1;var t=this.selectRows.map((function(e){return e.id}));this.$baseConfirm("您确定要将外卖商品以及商品分类同步到店内吗?(注意:此操作会损耗大量的服务器资源,请谨慎操作!)",null,Object(r["a"])(regeneratorRuntime.mark((function a(){var s,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.listLoading2=!0,a.next=3,Object(u["M"])({goodIds:e.allGood?"all":t});case 3:s=a.sent,n=s.msg,e.listLoading2=!1,e.$baseMessage(n,"success"),e.fetchData();case 8:case"end":return a.stop()}}),a)}))))},toggleSelection:function(e){var t=this;this.selectRows.length?this.$refs.multipleTable.clearSelection():e.forEach((function(e){t.$refs.multipleTable.toggleRowSelection(e)}))},goodRecovery:function(e){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var s,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["F"])({id:e.id});case 2:s=a.sent,n=s.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return a.stop()}}),a)})))()},handlexgkc:function(){if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;this.dialogVisible=!0},qrplxg:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var a,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.selectRows.map((function(e){return e.id})),!e.plkc){t.next=11;break}return t.next=4,Object(u["W"])({id:a,num:e.plkc});case 4:s=t.sent,n=s.msg,e.$baseMessage(n,"success"),e.dialogVisible=!1,e.fetchData(),t.next=13;break;case 11:return e.$baseMessage("未输入内容","error"),t.abrupt("return",!1);case 13:case"end":return t.stop()}}),t)})))()},goodDown:function(e,t){var a,s=this;if(a="1"==t?"下架":"上架",e.id)this.$baseConfirm("你确定要".concat(a,"当前商品吗"),null,Object(r["a"])(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["A"])({id:e.id,display:t});case 2:n=a.sent,r=n.msg,s.$baseMessage(r,"success"),s.fetchData();case 6:case"end":return a.stop()}}),a)}))));else{if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;var n=this.selectRows.map((function(e){return e.id}));this.$baseConfirm("你确定".concat(a,"商品吗"),null,Object(r["a"])(regeneratorRuntime.mark((function e(){var a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["A"])({id:n,display:t});case 2:a=e.sent,r=a.msg,s.$baseMessage(r,"success"),s.fetchData();case 6:case"end":return e.stop()}}),e)}))))}},handleGoodEdit:function(e,t){var a,s=this;if(a="1"==t?"估清":"置满",e.id)this.$baseConfirm("你确定".concat(a,"商品吗"),null,Object(r["a"])(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["W"])({id:e.id,type:t});case 2:n=a.sent,r=n.msg,s.$baseMessage(r,"success"),s.fetchData();case 6:case"end":return a.stop()}}),a)}))));else{if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;var n=this.selectRows.map((function(e){return e.id}));this.$baseConfirm("你确定".concat(a,"商品吗"),null,Object(r["a"])(regeneratorRuntime.mark((function e(){var a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["W"])({id:n,type:t});case 2:a=e.sent,r=a.msg,s.$baseMessage(r,"success"),s.fetchData();case 6:case"end":return e.stop()}}),e)}))))}},handleRecommend:function(e,t){var a,s=this;a="1"==t?"取消推荐":"推荐",e.id&&this.$baseConfirm("你确定要".concat(a,"当前商品吗"),null,Object(r["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["A"])({id:e.id,isRecommend:e.isRecommend});case 2:a=t.sent,n=a.msg,s.$baseMessage(n,"success"),s.fetchData();case 6:case"end":return t.stop()}}),t)}))))},tongjiGood:function(e){this.$router.push("/goodtongji?id=".concat(e.id))},qbxj:function(e){var t=this;e.id&&this.$baseConfirm("你确定要全部下架该商品吗",null,Object(r["a"])(regeneratorRuntime.mark((function a(){var s,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["a"])({id:e.id});case 2:s=a.sent,n=s.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return a.stop()}}),a)}))))}}},p=d,m=(a("5d08"),a("2877")),h=Object(m["a"])(p,s,n,!1,null,null,null);t["default"]=h.exports},5478:function(e,t,a){},"5d08":function(e,t,a){"use strict";var s=a("5478"),n=a.n(s);n.a}}]);