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/mer/js/chunk-03944393.e51b8aa5.js

1 line
4.6 KiB

12 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-03944393"],{"26f0":function(t,e,i){"use strict";i("78e5")},"283f":function(t,e,i){"use strict";i.r(e);var l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("div",{staticClass:"header clearfix"},[i("div",{staticClass:"filter-container"},[i("div",{staticClass:"demo-input-suffix acea-row"},[i("span",{staticClass:"seachTiele"},[t._v("商品搜索:")]),t._v(" "),i("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号",size:"small"},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[i("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList()}},slot:"append"})],1)],1)])]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleSelection",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":"","row-key":function(t){return t.id}},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),i("el-table-column",{attrs:{prop:"broadcast_goods_id",label:"ID","min-width":"50"}}),t._v(" "),i("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[i("div",{staticClass:"demo-image__preview"},[i("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.cover_img,"preview-src-list":[t.row.cover_img]}})],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"name",label:"商品名称","min-width":"200"}})],1),t._v(" "),i("div",{staticClass:"block mb20"},[i("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)},a=[],n=(i("ac6a"),i("b7be")),o=i("83d6"),s={name:"GoodList",data:function(){return{templateRadio:0,merCateList:[],roterPre:o["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,status_tag:1,keyword:"",mer_valid:1},multipleSelectionAll:window.form_create_helper.get(this.$route.query.field)||[],multipleSelection:[],checked:[],broadcast_room_id:""}},mounted:function(){this.getList();var t=[];this.multipleSelectionAll=t,form_create_helper.onOk(this.unloadHandler)},methods:{unloadHandler:function(){this.multipleSelectionAll.length>0?this.$route.query.field&&(form_create_helper.set(this.$route.query.field,this.multipleSelectionAll.map((function(t){return{id:t.product_id,src:t.cover_img}}))),console.log(this.multipleSelectionAll),localStorage.setItem("broadcastPro",JSON.stringify(this.multipleSelectionAll))):this.$message.warning("请先选择商品")},handleSelectionChange:function(t){var e=this;this.multipleSelection=t,this.multipleSelectionAll=t,setTimeout((function(){e.changePageCoreRecordData()}),50)},setSelectRow:function(){if(this.multipleSelectionAll&&!(this.multipleSelectionAll.length<=0)){var t=this.idKey,e=[];this.multipleSelectionAll.forEach((function(i){e.push(i[t])})),this.$refs.table.clearSelection();for(var i=0;i<this.tableData.data.length;i++)e.indexOf(this.tableData.data[i][t])>=0&&this.$refs.table.toggleRowSelection(this.tableData.data[i],!0)}},changePageCoreRecordData:function(){var t=this.idKey,e=this;if(this.multipleSelectionAll.length<=0)this.multipleSelectionAll=this.multipleSelection;else{var i=[];this.multipleSelectionAll.forEach((function(e){i.push(e[t])}));var l=[];this.multipleSelection.forEach((function(a){l.push(a[t]),i.indexOf(a[t])<0&&e.multipleSelectionAll.push(a)}));var a=[];this.tableData.data.forEach((function(e){l.indexOf(e[t])<0&&a.push(e[t])})),a.forEach((function(l){if(i.indexOf(l)>=0)for(var a=0;a<e.multipleSelectionAll.length;a++)if(e.multipleSelectionAll[a][t]==l){e.multipleSelectionAll.splice(a,1);break}}))