1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4dc91edc"],{"010b":function(t,e,a){},3516:function(t,e,a){"use strict";a("f2ec")},"735a":function(t,e,a){"use strict";a("c012")},"79a3":function(t,e,a){"use strict";a("010b")},"869b7":function(t,e,a){"use strict";a("d1d4")},c012:function(t,e,a){},d1d4:function(t,e,a){},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("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableForm,size:"small","label-width":"65px",inline:""}},[a("el-form-item",{attrs:{label:"状态:",prop:"status_tag"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择状态",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableForm.status_tag,callback:function(e){t.$set(t.tableForm,"status_tag",e)},expression:"tableForm.status_tag"}},[a("el-option",{attrs:{label:"全部",value:""}}),t._v(" "),a("el-option",{attrs:{label:"未审核",value:"0"}}),t._v(" "),a("el-option",{attrs:{label:"已审核",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"审核失败",value:"-1"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入直播商品名称/ID"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableForm.keyword,callback:function(e){t.$set(t.tableForm,"keyword",e)},expression:"tableForm.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("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("div",{staticClass:"mb20"},[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"}],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",{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:{background:"","page-size":t.tableForm.limit,"current-page":t.tableForm.page,layout:"total, 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:"650px"},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["j"])(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["l"])(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("735a"),a("2877")),b=Object(m["a"])(u,r,c,!1,null,"10c927bb",null),g=b.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"}],attrs:{data:t.tableData.data,size:"small","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("div",{staticClass:"use-template-dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{staticStyle:{"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:{size:"small",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-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"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",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},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["lb"])(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("79a3"),Object(m["a"])(k,_,v,!1,null,"b1e2d2b2",null)),C=y.exports,D={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["c"])({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()}}},F=D,L=(a("869b7"),Object(m["a"])(F,h,p,!1,null,"7477d2d2",null)),x=L.exports,$={name:"BroadcastProList",components:{detailsFrom:g,batchAdd:x},data:function(){return Object(l["a"])(Object(l["a"])({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:""}},"broadcast_goods_id",this.$route.query.id?this.$route.query.id:""),"liveRoomStatus","")},watch:{broadcast_goods_id:function(t,e){this.getList("")}},mounted:function(){this.getList()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},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["Cb"])(t)).then((function(){return e.getList()}))},handleDelete:function(t,e){var a=this;this.$modalSureDelete().then((function(){Object(o["i"])(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(t){var e=this;this.listLoading=!0,this.tableForm.page=t||this.tableForm.page,console.log(this.tableForm),Object(o["k"])(this.tableForm).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.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["n"])(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("3516"),Object(m["a"])(S,i,s,!1,null,"40ef1a38",null));e["default"]=z.exports},f2ec:function(t,e,a){}}]); |