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
27 KiB
1 lines
27 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43974c00"],{"2b77":function(t,e,a){},"41dc":function(t,e,a){"use strict";a("2b77")},"62e4":function(t,e,a){"use strict";a("9e97")},6461:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.dialogVisible?a("el-dialog",{staticClass:"projectInfo",attrs:{title:"商品审核",visible:t.dialogVisible,"append-to-body":t.isAppend,width:"900px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[t.projectData&&t.isShow?a("el-tabs",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[a("el-tab-pane",{attrs:{label:"商品信息",name:"first"}},[a("div",{staticClass:"acea-row"},[a("span",{staticClass:"sp"},[t._v("商品名称:"+t._s(t.projectData.store_name))]),t._v(" "),a("span",{staticClass:"sp"},[t._v("平台分类:"+t._s(t.projectData.storeCategory?t.projectData.storeCategory.cate_name:""))]),t._v(" "),a("span",{staticClass:"sp"},[t._v("品牌:"+t._s(t.projectData.brand?t.projectData.brand.brand_name:""))]),t._v(" "),a("span",{staticClass:"sp"},[t._v("商品关键字:"+t._s(t.projectData.keyword))]),t._v(" "),a("span",{staticClass:"sp"},[t._v("商品单位:"+t._s(t.projectData.unit_name))]),t._v(" "),t.projectData.temp&&t.projectData.temp.name?a("span",{staticClass:"sp"},[t._v("运费模板:"+t._s(t.projectData.temp?t.projectData.temp.name:""))]):t._e(),t._v(" "),t.projectData.temp&&t.projectData.temp.info?a("span",{staticClass:"sp100"},[t._v("运费说明:"+t._s(t.projectData.temp?t.projectData.temp.info:""))]):t._e(),t._v(" "),a("span",{staticClass:"sp100"},[t._v("\n 商品分类:\n "),t.projectData.merCateId?t._l(t.projectData.merCateId,(function(e,n){return a("span",{key:n,staticClass:"mr10"},[t._v(t._s(e.category?e.category.cate_name:""))])})):a("span",[t._v("-")])],2),t._v(" "),a("span",{staticClass:"sp100"},[t._v("商品简介:"+t._s(t.projectData.store_info))]),t._v(" "),a("span",{staticClass:"sp100"},[t._v("\n 商品封面图:\n "),a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:t.projectData.image,"preview-src-list":[t.projectData.image]}})],1)]),t._v(" "),t.projectData.video_link?a("span",{staticClass:"sp100"},[t._v("\n 主图视频:\n "),a("video",{staticStyle:{width:"40%",height:"180px","border-radius":"10px"},attrs:{src:t.projectData.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")])]):t._e(),t._v(" "),a("span",{staticClass:"sp100"},[t._v("商品轮播图:\n "),t._l(t.projectData.slider_image,(function(t,e){return a("div",{key:e,staticClass:"pictrue"},[a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:t,"preview-src-list":[t]}})],1)}))],2)])]),t._v(" "),a("el-tab-pane",{attrs:{label:"商品详情",name:"second"}},[a("span",{staticClass:"sp100"},[t._v("商品详情:")]),t._v(" "),a("div",{staticClass:"contentPic",domProps:{innerHTML:t._s(t.projectData.content)}})]),t._v(" "),a("el-tab-pane",{attrs:{label:"其他设置",name:"third"}},[a("span",{staticClass:"sp100"},[t._v("商品排序:"+t._s(t.projectData.sort))]),t._v(" "),a("span",{staticClass:"third mb20"},[a("span",[t._v("商品推荐:")]),t._v(" "),a("el-checkbox-group",{attrs:{size:"small"},model:{value:t.checkboxGroup,callback:function(e){t.checkboxGroup=e},expression:"checkboxGroup"}},t._l(t.recommend,(function(e,n){return a("el-checkbox",{key:n,attrs:{disabled:"",label:e.value}},[t._v(t._s(e.name))])})),1)],1),t._v(" "),t.projectData.guarantee&&t.projectData.guarantee.templateValue.length?a("span",{staticClass:"third mb20"},[a("span",[t._v("服务保障:")]),t._v(" "),t._l(t.projectData.guarantee.templateValue,(function(e,n){return a("span",{key:n},[e.value?a("span",[t._v(t._s(n+1)+". "+t._s(e.value.guarantee_name)+";")]):t._e()])}))],2):t._e()]),t._v(" "),a("el-tab-pane",{attrs:{label:"商品规格",name:"fourth"}},[a("span",{staticClass:"sp"},[t._v("商品规格:"+t._s(0===t.projectData.spec_type?"单规格":"多规格"))]),t._v(" "),a("span",{staticClass:"sp"},[t._v("佣金设置:"+t._s(0===t.projectData.extension_type?"默认设置":"单独设置"))]),t._v(" "),a("span",{staticClass:"sp100"},[a("span",{staticClass:"mb15",staticStyle:{display:"block"}},[t._v("商品规格:")]),t._v(" "),0===t.projectData.spec_type?[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:t.row.image}})],1)]}}],null,!1,323865937)}),t._v(" "),t._l(t.attrValue,(function(e,n){return a("el-table-column",{key:n,attrs:{label:t.formThead[n].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[n])}})]}}],null,!0)})})),t._v(" "),1===t.projectData.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row.extension_one)}})]}}],null,!1,102250766)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row.extension_two)}})]}}],null,!1,4284057702)})]:t._e()],2)]:t._e(),t._v(" "),1===t.projectData.spec_type?[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.ManyAttrValue,border:"",size:"mini"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,n){return a("el-table-column",{key:n,attrs:{align:"center",label:t.manyTabTit[n].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[n])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox"},[a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})])])]}}],null,!1,651288578)}),t._v(" "),t._l(t.attrValue,(function(e,n){return a("el-table-column",{key:n,attrs:{label:t.formThead[n].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row[n]))])]}}],null,!0)})})),t._v(" "),1===t.projectData.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row.extension_one))])]}}],null,!1,1519547738)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row.extension_two))])]}}],null,!1,603129202)})]:t._e()],2)]:t._e()],2)])],1):t._e(),t._v(" "),a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"审核状态",prop:"status"}},[a("el-radio-group",{model:{value:t.ruleForm.status,callback:function(e){t.$set(t.ruleForm,"status",e)},expression:"ruleForm.status"}},[a("el-radio",{attrs:{label:1}},[t._v("通过")]),t._v(" "),a("el-radio",{attrs:{label:-1}},[t._v("拒绝")])],1)],1),t._v(" "),-1===t.ruleForm.status?a("el-form-item",{attrs:{label:"原因",prop:"refusal"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入原因"},model:{value:t.ruleForm.refusal,callback:function(e){t.$set(t.ruleForm,"refusal",e)},expression:"ruleForm.refusal"}})],1):t._e(),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("提交")])],1)],1)],1):t._e()},s=[],r=(a("ac6a"),a("c4c8")),i={image:"",slider_image:[],store_name:"",store_info:"",keyword:"",brand_id:"",cate_id:"",mer_cate_id:[],unit_name:"",sort:0,is_show:0,is_benefit:0,is_new:0,is_good:0,temp_id:"",attrValue:[{image:"",price:null,svip_price:null,cost:null,ot_price:null,stock:null,bar_code:"",weight:null,volume:null}],attr:[],selectRule:"",extension_type:0,content:"",spec_type:0},o={price:{title:"售价"},svip_price:{title:"付费会员价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},l=[{name:"是否热卖",value:"is_hot"},{name:"优品推荐",value:"is_good"},{name:"促销单品",value:"is_benefit"},{name:"是否精品",value:"is_best"},{name:"是否新品",value:"is_new"}],c={name:"Info",props:{isShow:{type:Boolean,default:!0},ids:{type:Array,default:function(){return[]}}},data:function(){return{rules:{status:[{required:!0,message:"请选择审核状态",trigger:"change"}],refusal:[{required:!0,message:"请填写拒绝原因",trigger:"blur"}]},isAppend:!0,proId:0,ruleForm:{refusal:"",status:1,id:""},formThead:Object.assign({},o),manyTabDate:{},manyTabTit:{},loading:!1,dialogVisible:!1,activeNames:"first",projectData:{},recommend:l,checkboxGroup:[],svip_type:0,OneattrValue:[Object.assign({},i.attrValue[0])],ManyAttrValue:[Object.assign({},i.attrValue[0])]}},computed:{attrValue:function(){var t=Object.assign({},i.attrValue[0]);return 0==this.svip_type&&delete t.svip_price,delete t.image,t},oneFormBatch:function(){var t=[Object.assign({},i.attrValue[0])];return delete t[0].bar_code,t}},methods:{onSubmit:function(){var t=this;this.isShow?this.ruleForm.id=this.proId:this.ruleForm.id=this.ids,Object(r["jb"])(this.ruleForm).then((function(e){t.$message.success(e.message),t.dialogVisible=!1,t.activeNames="first",t.$emit("subSuccess")})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},handleClose:function(){this.dialogVisible=!1,this.activeNames="first"},getInfo:function(t){var e=this;this.proId=t,this.loading=!0,Object(r["bb"])(t).then((function(t){e.projectData=t.data,e.svip_type=t.data.svip_price_type,0===e.projectData.spec_type?e.OneattrValue=t.data.attrValue:e.ManyAttrValue=t.data.attrValue;var a={},n={};e.projectData.attr.forEach((function(t,e){a["value"+e]={title:t.value},n["value"+e]=""})),e.manyTabDate=n,e.manyTabTit=a,e.checkboxGroup=[],e.formThead=Object.assign({},e.formThead,a),1===e.projectData.is_hot&&e.checkboxGroup.push("is_hot"),1===e.projectData.is_good&&e.checkboxGroup.push("is_good"),1===e.projectData.is_benefit&&e.checkboxGroup.push("is_benefit"),1===e.projectData.is_best&&e.checkboxGroup.push("is_best"),1===e.projectData.is_new&&e.checkboxGroup.push("is_new"),e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))}}},u=c,p=(a("62e4"),a("2877")),m=Object(p["a"])(u,n,s,!1,null,"1e82037e",null);e["a"]=m.exports},"9e97":function(t,e,a){},e519:function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"d",(function(){return r})),a.d(e,"q",(function(){return i})),a.d(e,"v",(function(){return o})),a.d(e,"x",(function(){return l})),a.d(e,"y",(function(){return c})),a.d(e,"w",(function(){return u})),a.d(e,"s",(function(){return p})),a.d(e,"a",(function(){return m})),a.d(e,"r",(function(){return d})),a.d(e,"n",(function(){return f})),a.d(e,"b",(function(){return _})),a.d(e,"p",(function(){return b})),a.d(e,"t",(function(){return h})),a.d(e,"u",(function(){return g})),a.d(e,"m",(function(){return v})),a.d(e,"A",(function(){return w})),a.d(e,"k",(function(){return y})),a.d(e,"z",(function(){return k})),a.d(e,"o",(function(){return x})),a.d(e,"g",(function(){return C})),a.d(e,"f",(function(){return j})),a.d(e,"j",(function(){return V})),a.d(e,"e",(function(){return S})),a.d(e,"l",(function(){return D})),a.d(e,"i",(function(){return F})),a.d(e,"h",(function(){return L}));var n=a("0c6d");function s(){return n["a"].get("config/others/lst")}function r(t){return n["a"].post("config/others/update",t)}function i(){return n["a"].post("store/product/check")}function o(t){return n["a"].get("user/promoter/lst",t)}function l(t,e){return n["a"].get("user/spread/lst/".concat(t),e)}function c(t,e){return n["a"].get("user/spread/order/".concat(t),e)}function u(t){return n["a"].post("user/spread/clear/".concat(t))}function p(t){return n["a"].get("store/bag/lst",t)}function m(){return n["a"].get("store/category/list")}function d(t){return n["a"].get("store/bag/detail/".concat(t))}function f(){return n["a"].get("store/bag/lst_filter")}function _(t,e){return n["a"].post("store/bag/change/".concat(t),{status:e})}function b(){return n["a"].get("store/product/mer_select")}function h(t){return n["a"].post("store/bag/status",t)}function g(t,e){return n["a"].post("store/bag/update/".concat(t),e)}function v(t){return n["a"].get("agreement/".concat(t))}function w(t,e){return n["a"].post("agreement/".concat(t),e)}function y(t){return n["a"].get("agreement/".concat(t))}function k(t,e){return n["a"].post("agreement/".concat(t),e)}function x(t){return n["a"].post("user/brokerage/create",t)}function C(t){return n["a"].get("user/brokerage/lst",t)}function j(t){return n["a"].get("user/brokerage/detail/".concat(t))}function V(t,e){return n["a"].post("user/brokerage/update/".concat(t),e)}function S(t){return n["a"].delete("user/brokerage/delete/".concat(t))}function D(){return n["a"].get("user/brokerage/options")}function F(){return n["a"].get("user/promoter/count")}function L(t){return n["a"].get("user/spread/".concat(t,"/form"))}},f35f:function(t,e,a){"use strict";a.r(e);var n=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("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableFrom.type,callback:function(e){t.$set(t.tableFrom,"type",e)},expression:"tableFrom.type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.name+"("+t.count+")"}})})),1),t._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:t.merCateList,props:t.props,clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.cate_id,callback:function(e){t.$set(t.tableFrom,"cate_id",e)},expression:"tableFrom.cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户名称:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_id,callback:function(e){t.$set(t.tableFrom,"mer_id",e)},expression:"tableFrom.mer_id"}},t._l(t.merSelect,(function(t){return a("el-option",{key:t.mer_id,attrs:{label:t.mer_name,value:t.mer_id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号"},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.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1)]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"6"===t.tableFrom.type,expression:"tableFrom.type === '6'"}],attrs:{size:"mini"},on:{click:t.batch}},[t._v("批量审核")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:Number(t.tableFrom.type)<3,expression:"Number(tableFrom.type) < 3"}],staticStyle:{"margin-left":"0px"},attrs:{size:"mini"},on:{click:t.batchOff}},[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:"mini"},on:{"selection-change":t.handleSelectionChange}},[Number(t.tableFrom.type)<7?a("el-table-column",{key:"2",attrs:{type:"selection",width:"55"}}):t._e(),t._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"平台分类:"}},[a("span",[t._v(t._s(e.row.storeCategory?e.row.storeCategory.cate_name:"-"))])]),t._v(" "),a("el-form-item",{attrs:{label:"商品分类:"}},[e.row.merCateId.length?t._l(e.row.merCateId,(function(e,n){return a("span",{key:n,staticClass:"mr10"},[t._v(t._s(e.category.cate_name))])})):a("span",[t._v("-")])],2),t._v(" "),a("el-form-item",{attrs:{label:"品牌:"}},[a("span",[t._v(t._s(e.row.brand?e.row.brand.brand_name:"-"))])]),t._v(" "),a("el-form-item",{attrs:{label:"市场价格:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.ot_price)))])]),t._v(" "),a("el-form-item",{attrs:{label:"成本价:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.cost)))])]),t._v(" "),a("el-form-item",{attrs:{label:"收藏:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.care_count)))])]),t._v(" "),a("el-form-item",{attrs:{label:"已售数量 :"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.ficti)))])])],1)]}}])}),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)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"商户名称","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.merchant?e.row.merchant.mer_name:""))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"商品售价","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"销量","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"rank",label:"排序","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_used,callback:function(a){t.$set(e.row,"is_used",a)},expression:"scope.row.is_used"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),Number(t.tableFrom.type)<7?a("el-table-column",{key:"8",attrs:{label:"操作","min-width":"130",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[Number(t.tableFrom.type)<7?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.product_id)}}},[t._v("编辑")]):t._e(),t._v(" "),"6"===t.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.toExamine(e.row.product_id)}}},[t._v("审核")]):t._e(),t._v(" "),Number(t.tableFrom.type)<3?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.toOff([e.row.product_id])}}},[t._v("强制下架")]):t._e()]}}],null,!1,2644917324)}):t._e()],1),t._v(" "),a("div",{staticClass:"block"},[a("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),t._v(" "),a("el-dialog",{attrs:{title:"商品编辑",visible:t.dialogVisible,width:"1000px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":"100px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[a("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品推荐:"}},[a("el-checkbox-group",{attrs:{size:"small"},on:{change:t.onChangeGroup},model:{value:t.checkboxGroup,callback:function(e){t.checkboxGroup=e},expression:"checkboxGroup"}},t._l(t.recommend,(function(e,n){return a("el-checkbox",{key:n,attrs:{label:e.value}},[t._v(t._s(e.name))])})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{label:"已售数量"},model:{value:t.formValidate.rank,callback:function(e){t.$set(t.formValidate,"rank",e)},expression:"formValidate.rank"}})],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("ueditor-from",{attrs:{content:t.formValidate.content},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)],1),t._v(" "),a("info-from",{ref:"infoFrom",attrs:{"is-show":t.isShow,ids:t.OffId},on:{subSuccess:t.subSuccess}})],1)},s=[],r=(a("6762"),a("2fdb"),a("c80c")),i=(a("96cf"),a("3b8d")),o=(a("7f7f"),a("e519")),l=a("83d6"),c=a("ef0d"),u=a("6461"),p=[{name:"推荐礼包",value:"is_best"}],m={name:"ProductExamine1",components:{infoFrom:u["a"],ueditorFrom:c["a"]},data:function(){return{props:{emitPath:!1},ruleValidate:{},dialogVisible:!1,checkboxGroup:[],recommend:p,formValidate:{is_hot:0,is_best:0,is_new:0,is_benefit:0,rank:0,content:"",keyword:""},fullscreenLoading:!1,isShow:!1,roterPre:l["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(t){var e=this;Object(o["b"])(t.product_id,t.is_used).then((function(t){var a=t.message;e.$message.success(a),e.getList()})).catch((function(t){var a=t.message;e.$message.error(a)}))},getInfo:function(t){var e=this;this.fullscreenLoading=!0,this.checkboxGroup=[],Object(o["r"])(t).then((function(t){var a=t.data;e.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&&e.checkboxGroup.push("is_good"),1===a.is_benefit&&e.checkboxGroup.push("is_benefit"),1===a.is_best&&e.checkboxGroup.push("is_best"),1===a.is_new&&e.checkboxGroup.push("is_new"),e.fullscreenLoading=!1})).catch((function(t){e.$message.error(t.message),e.fullscreenLoading=!1}))},onEdit:function(t){this.productId=t,this.getInfo(t),this.dialogVisible=!0},handleSubmit:function(t){var e=this;this.onChangeGroup(),this.$refs[t].validate((function(t){if(!t)return!1;Object(o["u"])(e.productId,e.formValidate).then(function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(a){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.fullscreenLoading=!1,e.$message.success(a.message),e.dialogVisible=!1,e.getList();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.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(t){var e=this;this.$prompt("强制下架",{confirmButtonText:"确定",cancelButtonText:"取消",inputErrorMessage:"请输入强制下架原因",inputType:"textarea",inputPlaceholder:"请输入强制下架原因",inputValidator:function(t){if(!t)return"请输入强制下架原因"}}).then((function(a){var n=a.value;Object(o["t"])({id:t,status:-2,refusal:n}).then((function(t){e.$message({type:"success",message:"提交成功"}),e.getLstFilterApi(),e.getList()})).catch((function(t){e.$message.error(t.message)}))})).catch((function(){e.$message({type:"info",message:"取消输入"})}))},getLstFilterApi:function(){var t=this;Object(o["n"])().then((function(e){t.headeNum=e.data})).catch((function(e){t.$message.error(e.message)}))},getMerSelect:function(){var t=this;Object(o["p"])().then((function(e){t.merSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},batch:function(){if(0===this.multipleSelection.length)return this.$message.warning("请先选择商品");this.$refs.infoFrom.dialogVisible=!0,this.isShow=!1},handleSelectionChange:function(t){this.multipleSelection=t;var e=[];this.multipleSelection.map((function(t){e.push(t.product_id)})),this.OffId=e,this.ids=e.join(",")},toExamine:function(t){this.$refs.infoFrom.dialogVisible=!0,this.isShow=!0,this.$refs.infoFrom.getInfo(t)},getCategorySelect:function(){var t=this;Object(o["a"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(o["s"])(this.tableFrom).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.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()}}},d=m,f=(a("41dc"),a("2877")),_=Object(f["a"])(d,n,s,!1,null,"3ee8db86",null);e["default"]=_.exports}}]); |