| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-17db5416"],{"16b1":function(e,t,a){"use strict";var n=a("712f"),i=a.n(n);i.a},"712f":function(e,t,a){},e519:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return r})),a.d(t,"g",(function(){return o})),a.d(t,"l",(function(){return s})),a.d(t,"n",(function(){return l})),a.d(t,"o",(function(){return c})),a.d(t,"m",(function(){return u})),a.d(t,"i",(function(){return m})),a.d(t,"a",(function(){return f})),a.d(t,"h",(function(){return d})),a.d(t,"e",(function(){return p})),a.d(t,"b",(function(){return h})),a.d(t,"f",(function(){return b})),a.d(t,"j",(function(){return g})),a.d(t,"k",(function(){return _}));var n=a("0c6d");function i(){return n["a"].get("config/others/lst")}function r(e){return n["a"].post("config/others/update",e)}function o(){return n["a"].post("store/product/check")}function s(e){return n["a"].get("user/promoter/lst",e)}function l(e,t){return n["a"].get("user/spread/lst/".concat(e),t)}function c(e,t){return n["a"].get("user/spread/order/".concat(e),t)}function u(e){return n["a"].post("user/spread/clear/".concat(e))}function m(e){return n["a"].get("store/bag/lst",e)}function f(){return n["a"].get("store/category/list")}function d(e){return n["a"].get("store/bag/detail/".concat(e))}function p(){return n["a"].get("store/bag/lst_filter")}function h(e,t){return n["a"].post("store/bag/change/".concat(e),{status:t})}function b(){return n["a"].get("store/product/mer_select")}function g(e){return n["a"].post("store/bag/status",e)}function _(e,t){return n["a"].post("store/bag/update/".concat(e),t)}},f35f:function(e,t,a){"use strict";a.r(t);var n=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:e.props,clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.cate_id,callback:function(t){e.$set(e.tableFrom,"cate_id",t)},expression:"tableFrom.cate_id"}})],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-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,n){return a("span",{key:n,staticClass:"mr10"},[e._v(e._s(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":"120"},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:"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:{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:"create_time",label:"创建时间","min-width":"150"}}),e._v(" "),Number(e.tableFrom.type)<7?a("el-table-column",{key:"8",attrs:{label:"操作","min-width":"130",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?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,2644917324)}):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("el-dialog",{attrs:{title:"商品编辑",visible:e.dialogVisible,width:"1000px","before-close":e.handleClose},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-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,n){return a("el-checkbox",{key:n,attrs:{label:t.value}},[e._v(e._s(t.name))])})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{label:"虚拟销量"},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),e._v(" "),a("info-from",{ref:"infoFrom",attrs:{"is-show":e.isShow,ids:e.OffId},on:{subSuccess:e.subSuccess}})],1)},i=[],r=(a("6762"),a("2fdb"),a("96cf"),a("3b8d")),o=(a("7f7f"),a("e519")),s=a("83d6"),l=a("ef0d"),c=a("6461"),u=[{name:"推荐礼包",value:"is_best"}],m={name:"ProductExamine1",components:{infoFrom:c["a"],ueditorFrom:l["a"]},data:function(){return{props:{emitPath:!1},ruleValidate:{},dialogVisible:!1,checkboxGroup:[],recommend:u,formValidate:{is_hot:0,is_best:0,is_new:0,is_benefit:0,rank:0,content:"",keyword:""},fullscreenLoading:!1,isShow:!1,roterPre:s["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,cate_id:"",store_name:"",type:"6",mer_id:""},categoryList:[],merCateList:[],ids:"",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(o["b"])(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(o["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,rank:a.rank,content:a.content,store_name:a.store_name},1===a.is_good&&t.checkboxGroup.push("is_good"),1===a.is_benefit&&t.checkboxGroup.push("is_benefit"),1===a.is_best&&t.checkboxGroup.push("is_best"),1===a.is_new&&t.checkboxGroup.push("is_new"),t.fullscreenLoading=!1})).catch((function(e){t.$message.error(e.message),t.fullscreenLoading=!1}))},onEdit:function(e){this.productId=e,this.getInfo(e),this.dialogVisible=!0},handleSubmit:function(e){var t=this;this.onChangeGroup(),this.$refs[e].validate((function(e){if(!e)return!1;Object(o["k"])(t.productId,t.formValidate).then(function(){var e=Object(r["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 n=a.value;Object(o["j"])({id:e,status:-2,refusal:n}).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(o["e"])().then((function(t){e.headeNum=t.data})).catch((function(t){e.$message.error(t.message)}))},getMerSelect:function(){var e=this;Object(o["f"])().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,this.ids=t.join(",")},toExamine:function(e){this.$refs.infoFrom.dialogVisible=!0,this.isShow=!0,this.$refs.infoFrom.getInfo(e)},getCategorySelect:function(){var e=this;Object(o["a"])().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(o["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()}}},f=m,d=(a("16b1"),a("2877")),p=Object(d["a"])(f,n,i,!1,null,"0469f8d3",null);t["default"]=p.exports}}]);
|