text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16dce33b"],{"01f3":function(t,e,a){},"07bc":function(t,e,a){},"121c":function(t,e,a){},"308c":function(t,e,a){"use strict";a("01f3")},"86f7":function(t,e,a){"use strict";a("e89c")},a6ca:function(t,e,a){"use strict";a("121c")},dcdca:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"100px"}},[a("el-form-item",{attrs:{label:"狀態："}},[a("el-radio-group",{attrs:{type:"button"},on:{change:t.getList},model:{value:t.tableForm.status_tag,callback:function(e){t.$set(t.tableForm,"status_tag",e)},expression:"tableForm.status_tag"}},[a("el-radio-button",{attrs:{label:""}},[t._v("全部")]),t._v(" "),a("el-radio-button",{attrs:{label:"0"}},[t._v("待審核")]),t._v(" "),a("el-radio-button",{attrs:{label:"1"}},[t._v("已審核")]),t._v(" "),a("el-radio-button",{attrs:{label:"-1"}},[t._v("審核失敗")])],1)],1),t._v(" "),a("el-form-item",{staticClass:"width100",attrs:{label:"關鍵字："}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"請輸入直播商品名稱/ID",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.tableForm.keyword,callback:function(e){t.$set(t.tableForm,"keyword",e)},expression:"tableForm.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.getList},slot:"append"})],1)],1)],1),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/broadcast/addProduct"}}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("添加直播商品")])],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"success"},on:{click:t.batchAdd}},[t._v("批量添加直播商品")])],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"序號","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.$index+(t.tableForm.page-1)*t.tableForm.limit+1))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"goods_id",label:"商品ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"商品名稱","min-width":"150"}}),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.cover_img,"preview-src-list":[t.row.cover_img]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"原價","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.product?e.row.product.price:""))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"直播價","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"庫存","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.product.stock))])]}}])}),t._v(" "),1!==t.tableForm.status_tag?a("el-table-column",{key:"3",attrs:{label:"審核狀態","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("liveReviewStatusFilter")(e.row.status)))]),t._v(" "),-1===e.row.status?a("span",{staticStyle:{display:"block","font-size":"12px"}},[t._v("原因 "+t._s(e.row.error_msg))]):t._e()]}}],null,!1,2330978579)}):t._e(),t._v(" "),a("el-table-column",{attrs:{label:"是否上架","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return 2===e.row.status?[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"上架","inactive-text":"下架"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_mer_show,callback:function(a){t.$set(e.row,"is_mer_show",a)},expression:"scope.row.is_mer_show"}})]:void 0}}],null,!0)}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"創建時間","min-width":"160"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.onProDetails(e.row.broadcast_goods_id)}}},[t._v("詳情")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleUpdate(e.row.broadcast_goods_id)}}},[t._v("編輯")]),t._v(" "),0===e.row.status||-1===e.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.broadcast_goods_id,e.$index)}}},[t._v("刪除")]):t._e()]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableForm.limit,"current-page":t.tableForm.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("details-from",{ref:"ProDetail",on:{getList:t.getList}}),t._v(" "),a("batch-add",{ref:"batchAdd",on:{"get-list":t.getList}})],1)},s=[],l=a("ade3"),o=a("b7be"),n=a("83d6"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[t.dialogVisible?a("el-dialog",{attrs:{title:"商品信息",visible:t.dialogVisible,width:"700px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("div",{staticClass:"box-container"},[a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("商品名稱：")]),t._v(" "),a("span",{staticClass:"info"},[t._v(t._s(t.FormData.name))])]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("直播價：")]),t._v(" "),a("span",{staticClass:"info"},[t._v(t._s(t.FormData.price))])]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("庫存：")]),t._v(" "),t.FormData.product?a("span",{staticClass:"info"},[t._v(t._s(t.FormData.product.stock))]):t._e()]),t._v(" "),a("div",{staticClass:"list sp100 image"},[a("label",{staticClass:"name"},[t._v("商品圖：")]),t._v(" "),t.FormData.product?a("img",{staticStyle:{"max-width":"150px",height:"80px"},attrs:{src:t.FormData.cover_img}}):t._e()]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("審核結果：")]),t._v(" "),a("span",{staticClass:"info"},[t._v(t._s(t._f("liveReviewStatusFilter")(t.FormData.status)))])]),t._v(" "),a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("備註：")]),t._v(" "),a("span",{staticClass:"info"},[a("el-input",{attrs:{type:"textarea",rows:1},model:{value:t.FormData.mark,callback:function(e){t.$set(t.FormData,"mark",e)},expression:"FormData.mark"}})],1)]),t._v(" "),a("div",{staticClass:"list sp100 mt20"},[a("el-button",{staticClass:"el-button el-button--primary el-button--medium",staticStyle:{width:"100%"},attrs:{type:"button",disabled:""==t.FormData.mark},on:{click:function(e){return t.handleRemarks()}}},[t._v("提交")])],1)])])]):t._e()],1)},c=[],d={name:"BroadcastProDetail",data:function(){return{dialogVisible:!1,option:{form:{labelWidth:"150px"}},FormData:{product:{stock:"",image:""}},loading:!1}},mounted:function(){},methods:{getData:function(t){var e=this;this.loading=!0,Object(o["i"])(t).then((function(t){e.FormData=t.data,e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},handleRemarks:function(t){var e=this;Object(o["k"])(this.FormData.broadcast_goods_id,this.FormData.mark).then((function(t){e.loading=!1,e.$message.success(t.message),e.dialogVisible=!1,e.$emit("getList")})).catch((function(t){e.$message.error(t.message),e.loading=!1}))}}},u=d,m=(a("86f7"),a("2877")),g=Object(m["a"])(u,r,c,!1,null,"4bed58b7",null),b=g.exports,h=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[t.dialogVisible?a("el-dialog",{attrs:{title:"批量添加直播商品",visible:t.dialogVisible,width:"900px","custom-class":"customHeight"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-button",{attrs:{size:"small",type:"success"},on:{click:t.selectGoods}},[t._v("選擇商品")]),t._v(" "),a("div",{staticClass:"container"},[a("div",{staticClass:"table-cont"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":"","row-key":function(t){return t.product_id}}},[a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品名稱","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:e.row.store_name,callback:function(a){t.$set(e.row,"store_name",a)},expression:"scope.row.store_name"}})]}}],null,!1,1215066990)}),t._v(" "),a("el-table-column",{attrs:{label:"商品圖","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(a){return t.modalPicTap("1","duo",e.$index)}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,3478746955)}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"直播價","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"庫存","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.stock))])]}}],null,!1,2684418342)}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.$index)}}},[t._v("刪除")])]}}],null,!1,2572340110)})],1)],1),t._v(" "),a("el-button",{staticStyle:{width:"80px","margin-top":"30px"},attrs:{size:"small",type:"primary"},on:{click:t.submit}},[t._v("提交")])],1)],1):t._e(),t._v(" "),a("select-goods",{ref:"selectGoods",on:{"get-goods":t.getList}})],1)},p=[],_=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[t.dialogVisible?a("el-dialog",{attrs:{title:"選擇商品",visible:t.dialogVisible,width:"700px","custom-class":"customHeight"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleSelection",attrs:{data:t.tableData.data,"row-key":function(t){return t.product_id}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55"}}),t._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),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",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}],null,!1,2331550732)}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名稱","min-width":"200"}})],1),t._v(" "),a("div",{staticClass:"block mb20"},[a("el-pagination",{attrs:{"page-sizes":[5,10],"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),t._v(" "),a("div",{staticClass:"use-template-dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.submitProduct}},[t._v("確定")])],1)],1):t._e()],1)},v=[],f=(a("c5f6"),a("55dd"),a("ac6a"),a("456d"),a("c4c8")),w={name:"GoodList",data:function(){return{dialogVisible:!1,templateRadio:0,merCateList:[],roterPre:n["roterPre"],listLoading:!0,selectedGoods:[],tableData:{data:[],total:0},tableFrom:{page:1,limit:5,mer_cate_id:"",cate_id:"",keyword:"",type:"1",is_gift_bag:""},multipleSelection:[],checked:[],broadcast_room_id:""}},mounted:function(){},methods:{handleSelectionChange:function(t){this.multipleSelection=t},submitProduct:function(){console.log(this.multipleSelection);var t=this.deteleObject(this.multipleSelection);this.$emit("get-goods",t),this.dialogVisible=!1},deteleObject:function(t){for(var e=[],a={},i=0;i<t.length;i++){var s=Object.keys(t[i]);s.sort((function(t,e){return Number(t)-Number(e)}));for(var l="",o=0;o<s.length;o++)l+=JSON.stringify(s[o]),l+=JSON.stringify(t[i][s[o]]);a.hasOwnProperty(l)||(e.push(t[i]),a[l]=!0)}return e},getList:function(t,e){var a=this;this.listLoading=!0,this.selectedGoods=t,Object(f["F"])(this.tableFrom).then((function(i){a.tableData.data=i.data.list,a.tableData.total=i.data.count,t&&t.length>0&&a.$nextTick((function(){t.forEach((function(t){a.$refs.multipleSelection.toggleRowSelection(t,!0)}))})),e&&a.pageChange(1),a.listLoading=!1})).catch((function(t){a.listLoading=!1,a.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()}}},k=w,y=(a("fc38"),Object(m["a"])(k,_,v,!1,null,"d9297fde",null)),C=y.exports,x={name:"GoodList",components:{selectGoods:C},data:function(){return{dialogVisible:!1,listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:3,status_tag:1,keyword:""},checked:[],broadcast_room_id:""}},mounted:function(){},methods:{selectGoods:function(){this.$refs.selectGoods.dialogVisible=!0,this.$refs.selectGoods.getList(this.tableData.data,1)},handleDelete:function(t){this.tableData.data.splice(t,1)},submit:function(){var t=this,e=this.filtersArr(this.tableData.data);Object(o["b"])({goods:e}).then((function(e){t.$message.success(e.message),t.dialogVisible=!1,t.$emit("get-list")})).catch((function(e){t.$message.error(e.message)}))},filtersArr:function(t){var e=t.map((function(t,e){return Object.assign({},{product_id:t.product_id,name:t.store_name,cover_img:t.image,price:t.price})}));return e},modalPicTap:function(t,e,a){var i=this;this.$modalUpload((function(t){i.tableData.data[a].image=t[0]}),t)},getList:function(t){this.tableData.data=t,this.tableData.total=t.length,this.listLoading=!1},pageChange:function(t){this.tableForm.page=t,this.getList()},handleSizeChange:function(t){this.tableForm.limit=t,this.getList()}}},D=x,L=(a("308c"),Object(m["a"])(D,h,p,!1,null,"15a8c5a5",null)),F=L.exports,$={name:"broadcastProList",components:{detailsFrom:b,batchAdd:F},data:function(){var t;return t={Loading:!1,roterPre:n["roterPre"],listLoading:!0,broadcast_goods_id:"",dialogVisible:!1,tableData:{data:[],total:0},tableForm:{page:1,limit:20,status_tag:this.$route.query.status?this.$route.query.status:"",keyword:"",broadcast_goods_id:this.$route.query.id?this.$route.query.id:""}},Object(l["a"])(t,"broadcast_goods_id",this.$route.query.id?this.$route.query.id:""),Object(l["a"])(t,"liveRoomStatus",""),t},watch:{broadcast_goods_id:function(t,e){this.getList("")}},mounted:function(){this.getList()},methods:{batchAdd:function(){this.$refs.batchAdd.dialogVisible=!0,this.$refs.batchAdd.getList([])},onProDetails:function(t){this.broadcast_goods_id=t,this.$refs.ProDetail.dialogVisible=!0,this.$refs.ProDetail.getData(t)},handleUpdate:function(t){var e=this;this.$modalForm(Object(o["P"])(t)).then((function(){return e.getList()}))},handleDelete:function(t,e){var a=this;this.$modalSureDelete().then((function(){Object(o["h"])(t).then((function(t){var i=t.message;a.$message.success(i),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},handleSizeChangeIssue:function(t){this.tableFormIssue.limit=t,this.getIssueList()},getList:function(){var t=this;this.listLoading=!0,console.log(this.tableForm),Object(o["j"])(this.tableForm).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableForm.page=t,this.getList()},handleSizeChange:function(t){this.tableForm.limit=t,this.getList()},onchangeIsShow:function(t){var e=this;Object(o["m"])(t.broadcast_goods_id,{is_show:t.is_mer_show}).then((function(t){var a=t.message;e.$message.success(a),e.getList()})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},S=$,z=(a("a6ca"),Object(m["a"])(S,i,s,!1,null,"1824ed71",null));e["default"]=z.exports},e89c:function(t,e,a){},fc38:function(t,e,a){"use strict";a("07bc")}}]);