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.
1 lines
16 KiB
1 lines
16 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9d6d22b0"],{"15dc":function(t,e,a){"use strict";a("c176")},"26ab":function(t,e,a){"use strict";a("5dc8")},"4ce4":function(t,e,a){},"5dc8":function(t,e,a){},"5e763":function(t,e,a){},c176:function(t,e,a){},ca86:function(t,e,a){"use strict";a("4ce4")},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&&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(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.broadcast_goods_id,e.$index)}}},[t._v("删除")])]}}])})],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("bd86"),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("26ab"),a("2877")),g=Object(m["a"])(u,r,c,!1,null,"71c7a22c",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,1061971268)})],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["eb"])(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("15dc"),Object(m["a"])(k,_,v,!1,null,"aed747c2",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("ffa5"),Object(m["a"])(D,h,p,!1,null,"76a17d47",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["lb"])(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),a.getList()})).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("ca86"),Object(m["a"])(S,i,s,!1,null,"4e9cef11",null));e["default"]=z.exports},ffa5:function(t,e,a){"use strict";a("5e763")}}]); |