1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1bf7a518"],{b0fa:function(e,t,a){},d494:function(e,t,a){"use strict";var l=a("b0fa"),s=a.n(l);s.a},fe2f:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-tabs",{on:{"tab-click":function(t){return e.getList(1)}},model:{value:e.tableFrom.type,callback:function(t){e.$set(e.tableFrom,"type",t)},expression:"tableFrom.type"}},e._l(e.headeNum,(function(e,t){return a("el-tab-pane",{key:t,attrs:{name:e.type.toString(),label:e.name+"("+e.count+")"}})})),1),e._v(" "),a("div",{staticClass:"container"},[a("div",{staticClass:"demo-input-suffix acea-row"},[a("el-form",{attrs:{inline:"",size:"small"}},[a("el-form-item",{attrs:{label:"商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.merCateList,props:{checkStrictly:!0,emitPath:!1},clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.pid,callback:function(t){e.$set(e.tableFrom,"pid",t)},expression:"tableFrom.pid"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"商户名称:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.mer_id,callback:function(t){e.$set(e.tableFrom,"mer_id",t)},expression:"tableFrom.mer_id"}},e._l(e.merSelect,(function(e){return a("el-option",{key:e.mer_id,attrs:{label:e.mer_name,value:e.mer_id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"商户类别:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",placeholder:"请选择"},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.is_trader,callback:function(t){e.$set(e.tableFrom,"is_trader",t)},expression:"tableFrom.is_trader"}},[a("el-option",{attrs:{label:"自营",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"非自营",value:"0"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"商品状态:"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.us_status,callback:function(t){e.$set(e.tableFrom,"us_status",t)},expression:"tableFrom.us_status"}},e._l(e.productStatusList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"推荐级别:"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.star,callback:function(t){e.$set(e.tableFrom,"star",t)},expression:"tableFrom.star"}},e._l(e.recommendedLevelStatus,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(t){return e.getList(1)}},slot:"append"})],1)],1)],1)],1)]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"===e.tableFrom.type,expression:"tableFrom.type === '6'"}],attrs:{size:"mini"},on:{click:e.batch}},[e._v("批量审核")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:Number(e.tableFrom.type)<3,expression:"Number(tableFrom.type) < 3"}],staticStyle:{"margin-left":"0px"},attrs:{size:"mini"},on:{click:e.batchOff}},[e._v("批量强制下架")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"mini"},on:{"selection-change":e.handleSelectionChange}},[Number(e.tableFrom.type)<7?a("el-table-column",{key:"2",attrs:{type:"selection",width:"55"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"平台分类:"}},[a("span",[e._v(e._s(t.row.storeCategory?t.row.storeCategory.cate_name:"-"))])]),e._v(" "),a("el-form-item",{attrs:{label:"商品分类:"}},[t.row.merCateId.length?e._l(t.row.merCateId,(function(t,l){return a("span",{key:l,staticClass:"mr10"},[e._v(e._s(t.category?t.category.cate_name:"-"))])})):a("span",[e._v("-")])],2),e._v(" "),a("el-form-item",{attrs:{label:"品牌:"}},[a("span",[e._v(e._s(t.row.brand?t.row.brand.brand_name:"-"))])]),e._v(" "),a("el-form-item",{attrs:{label:"市场价格:"}},[a("span",[e._v(e._s(e._f("filterEmpty")(t.row.ot_price)))])]),e._v(" "),a("el-form-item",{attrs:{label:"成本价:"}},[a("span",[e._v(e._s(e._f("filterEmpty")(t.row.cost)))])]),e._v(" "),a("el-form-item",{attrs:{label:"收藏:"}},[a("span",[e._v(e._s(e._f("filterEmpty")(t.row.care_count)))])]),e._v(" "),a("el-form-item",{attrs:{label:"虚拟销量:"}},[a("span",[e._v(e._s(e._f("filterEmpty")(t.row.ficti)))])])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"商户名称","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.merchant?t.row.merchant.mer_name:""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"mer_name",label:"商户类别","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.merchant?a("span",{staticClass:"spBlock"},[e._v(e._s(t.row.merchant.is_trader?"自营":"非自营"))]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"商品售价","min-width":"90"}}),e._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"销量","min-width":"90"}}),e._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"90"}}),e._v(" "),a("el-table-column",{attrs:{label:"推荐级别","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-rate",{attrs:{disabled:"",colors:e.colors},model:{value:t.row.star,callback:function(a){e.$set(t.row,"star",a)},expression:"scope.row.star"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"rank",label:"排序","min-width":"70"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return e.onchangeIsShow(t.row)}},model:{value:t.row.is_used,callback:function(a){e.$set(t.row,"is_used",a)},expression:"scope.row.is_used"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"商品状态","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("productStatusFilter")(t.row.us_status)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),e._v(" "),Number(e.tableFrom.type)<7?a("el-table-column",{key:"8",attrs:{label:"操作","min-width":"100",fixed:"right",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[Number(e.tableFrom.type)<7?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.onEdit(t.row.product_id)}}},[e._v("编辑")]):e._e(),e._v(" "),"6"===e.tableFrom.type||"1"===e.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toVirtualSales(t.row.product_id)}}},[e._v("虚拟销量")]):e._e(),e._v(" "),"6"===e.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toExamine(t.row.product_id)}}},[e._v("审核")]):e._e(),e._v(" "),Number(e.tableFrom.type)<3?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toOff([t.row.product_id])}}},[e._v("强制下架")]):e._e()]}}],null,!1,2487140822)}):e._e()],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1),e._v(" "),a("info-from",{ref:"infoFrom",attrs:{"is-show":e.isShow,ids:e.OffId},on:{subSuccess:e.subSuccess}}),e._v(" "),a("el-dialog",{attrs:{title:"商品编辑",visible:e.dialogVisible,width:"1000px","before-close":e.handleClose,"append-to-body":"true"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:e.ruleValidate,model:e.formValidate,"label-width":"100px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[a("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:e.formValidate.store_name,callback:function(t){e.$set(e.formValidate,"store_name",t)},expression:"formValidate.store_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"活动列表推荐:"}},[a("el-rate",{staticClass:"rate_star",attrs:{colors:e.colors},model:{value:e.formValidate.star,callback:function(t){e.$set(e.formValidate,"star",t)},expression:"formValidate.star"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"商品推荐:"}},[a("el-checkbox-group",{attrs:{size:"small"},on:{change:e.onChangeGroup},model:{value:e.checkboxGroup,callback:function(t){e.checkboxGroup=t},expression:"checkboxGroup"}},e._l(e.recommend,(function(t,l){return a("el-checkbox",{key:l,attrs:{label:t.value}},[e._v(e._s(t.name))])})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入排序序号"},model:{value:e.formValidate.rank,callback:function(t){e.$set(e.formValidate,"rank",t)},expression:"formValidate.rank"}})],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("ueditor-from",{attrs:{content:e.formValidate.content},model:{value:e.formValidate.content,callback:function(t){e.$set(e.formValidate,"content",t)},expression:"formValidate.content"}})],1)],1),e._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("提交")])],1)],1)],1)],1)},s=[],i=(a("6762"),a("2fdb"),a("96cf"),a("3b8d")),r=(a("7f7f"),a("c4c8")),o=a("83d6"),n=a("6461"),c=a("ef0d"),u=[{name:"热门榜单",value:"is_hot"},{name:"促销单品",value:"is_benefit"},{name:"精品推荐",value:"is_best"},{name:"首发新品",value:"is_new"}],m={name:"ProductExamine1",components:{infoFrom:n["a"],ueditorFrom:c["a"]},data:function(){return{props:{emitPath:!1},ruleValidate:{store_name:[{required:!0,message:"请输入商品名称",trigger:"blur"}]},dialogVisible:!1,checkboxGroup:[],colors:["#99A9BF","#F7BA2A","#FF9900"],recommendedLevelStatus:[{label:"全部",value:""},{label:"5星",value:5},{label:"4星",value:4},{label:"3星",value:3},{label:"2星",value:2},{label:"1星",value:1}],recommend:u,formValidate:{is_hot:0,is_best:0,is_new:0,is_benefit:0,ficti:0,content:"",store_name:"",rank:"",us_status:"",star:""},productStatusList:[{label:"上架显示",value:1},{label:"下架",value:0},{label:"平台关闭",value:-1}],fullscreenLoading:!1,isShow:!1,roterPre:o["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,cate_id:"",pid:"",store_name:"",type:"6",mer_id:"",keyword:"",is_trader:"",star:"",product_id:this.$route.query.id?this.$route.query.id:""},categoryList:[],merCateList:[],multipleSelection:[],headeNum:[],merSelect:[],OffId:[],productId:0}},mounted:function(){this.getMerSelect(),this.getList(),this.getCategorySelect(),this.getLstFilterApi()},methods:{subSuccess:function(){this.getList(""),this.getLstFilterApi()},onchangeIsShow:function(e){var t=this;Object(r["u"])(e.product_id,e.is_used).then((function(e){var a=e.message;t.$message.success(a),t.getList("")})).catch((function(e){var a=e.message;t.$message.error(a)}))},getInfo:function(e){var t=this;this.fullscreenLoading=!0,this.checkboxGroup=[],Object(r["H"])(e).then((function(e){var a=e.data;t.formValidate={is_hot:a.is_hot,is_best:a.is_best,is_new:a.is_new,is_benefit:a.is_benefit,ficti:a.ficti,content:a.content,store_name:a.store_name,rank:a.rank,star:a.star},1===a.is_benefit&&t.checkboxGroup.push("is_benefit"),1===a.is_hot&&t.checkboxGroup.push("is_hot"),1===a.is_best&&t.checkboxGroup.push("is_best"),1===a.is_new&&t.checkboxGroup.push("is_new"),t.fullscreenLoading=!1,console.log(t.formValidate)})).catch((function(e){t.$message.error(e.message),t.fullscreenLoading=!1}))},onEdit:function(e){this.productId=e,this.getInfo(e),this.dialogVisible=!0},toVirtualSales:function(e){var t=this;this.$modalForm(Object(r["cb"])(e)).then((function(){return t.getList("")}))},handleSubmit:function(e){var t=this;console.log(this.formValidate),this.$refs[e].validate((function(e){if(!e)return!1;Object(r["L"])(t.productId,t.formValidate).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.fullscreenLoading=!1,t.$message.success(a.message),t.dialogVisible=!1,t.getList("");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.$message.error(e.message)}))}))},onChangeGroup:function(){this.checkboxGroup.includes("is_benefit")?this.formValidate.is_benefit=1:this.formValidate.is_benefit=0,this.checkboxGroup.includes("is_best")?this.formValidate.is_best=1:this.formValidate.is_best=0,this.checkboxGroup.includes("is_new")?this.formValidate.is_new=1:this.formValidate.is_new=0,this.checkboxGroup.includes("is_hot")?this.formValidate.is_hot=1:this.formValidate.is_hot=0},handleClose:function(){this.dialogVisible=!1},batchOff:function(){if(0===this.multipleSelection.length)return this.$message.warning("请先选择商品");this.toOff(this.OffId)},toOff:function(e){var t=this;this.$prompt("强制下架",{confirmButtonText:"确定",cancelButtonText:"取消",inputErrorMessage:"请输入强制下架原因",inputType:"textarea",inputPlaceholder:"请输入强制下架原因",inputValidator:function(e){if(!e)return"请输入强制下架原因"}}).then((function(a){var l=a.value;Object(r["J"])({id:e,status:-2,refusal:l}).then((function(e){t.$message({type:"success",message:"提交成功"}),t.getLstFilterApi(),t.getList("")})).catch((function(e){t.$message.error(e.message)}))})).catch((function(){t.$message({type:"info",message:"取消输入"})}))},getLstFilterApi:function(){var e=this;Object(r["w"])().then((function(t){e.headeNum=t.data})).catch((function(t){e.$message.error(t.message)}))},getMerSelect:function(){var e=this;Object(r["y"])().then((function(t){e.merSelect=t.data})).catch((function(t){e.$message.error(t.message)}))},batch:function(){if(0===this.multipleSelection.length)return this.$message.warning("请先选择商品");this.$refs.infoFrom.dialogVisible=!0,this.isShow=!1},handleSelectionChange:function(e){this.multipleSelection=e;var t=[];this.multipleSelection.map((function(e){t.push(e.product_id)})),this.OffId=t},toExamine:function(e){this.$refs.infoFrom.dialogVisible=!0,this.isShow=!0,this.$refs.infoFrom.getInfo(e)},getCategorySelect:function(){var e=this;Object(r["t"])().then((function(t){e.merCateList=t.data})).catch((function(t){e.$message.error(t.message)}))},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(r["I"])(this.tableFrom).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(e){this.tableFrom.page=e,this.getList("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList("")}}},d=m,f=(a("d494"),a("2877")),b=Object(f["a"])(d,l,s,!1,null,"e5ce712c",null);t["default"]=b.exports}}]);
|