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
16 KiB
1 lines
16 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-affa539c"],{"4dc8":function(t,e,n){"use strict";n("8564")},8564:function(t,e,n){},e519:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return i})),n.d(e,"u",(function(){return o})),n.d(e,"z",(function(){return s})),n.d(e,"C",(function(){return l})),n.d(e,"F",(function(){return c})),n.d(e,"B",(function(){return u})),n.d(e,"w",(function(){return f})),n.d(e,"a",(function(){return d})),n.d(e,"v",(function(){return m})),n.d(e,"p",(function(){return p})),n.d(e,"b",(function(){return b})),n.d(e,"r",(function(){return h})),n.d(e,"x",(function(){return g})),n.d(e,"y",(function(){return _})),n.d(e,"o",(function(){return v})),n.d(e,"I",(function(){return k})),n.d(e,"l",(function(){return w})),n.d(e,"H",(function(){return y})),n.d(e,"q",(function(){return x})),n.d(e,"g",(function(){return F})),n.d(e,"f",(function(){return L})),n.d(e,"j",(function(){return C})),n.d(e,"e",(function(){return V})),n.d(e,"n",(function(){return S})),n.d(e,"i",(function(){return $})),n.d(e,"h",(function(){return O})),n.d(e,"G",(function(){return G})),n.d(e,"A",(function(){return z})),n.d(e,"D",(function(){return I})),n.d(e,"E",(function(){return j})),n.d(e,"s",(function(){return E})),n.d(e,"t",(function(){return N})),n.d(e,"m",(function(){return D}));var r=n("0c6d");function a(){return r["a"].get("config/others/lst")}function i(t){return r["a"].post("config/others/update",t)}function o(){return r["a"].post("store/product/check")}function s(t){return r["a"].get("user/promoter/lst",t)}function l(t,e){return r["a"].get("user/spread/lst/".concat(t),e)}function c(t,e){return r["a"].get("user/spread/order/".concat(t),e)}function u(t){return r["a"].post("user/spread/clear/".concat(t))}function f(t){return r["a"].get("store/bag/lst",t)}function d(){return r["a"].get("store/category/list")}function m(t){return r["a"].get("store/bag/detail/".concat(t))}function p(){return r["a"].get("store/bag/lst_filter")}function b(t,e){return r["a"].post("store/bag/change/".concat(t),{status:e})}function h(){return r["a"].get("store/product/mer_select")}function g(t){return r["a"].post("store/bag/status",t)}function _(t,e){return r["a"].post("store/bag/update/".concat(t),e)}function v(t){return r["a"].get("agreement/".concat(t))}function k(t,e){return r["a"].post("agreement/".concat(t),e)}function w(t){return r["a"].get("agreement/".concat(t))}function y(t,e){return r["a"].post("agreement/".concat(t),e)}function x(t){return r["a"].post("user/brokerage/create",t)}function F(t){return r["a"].get("user/brokerage/lst",t)}function L(t){return r["a"].get("user/brokerage/detail/".concat(t))}function C(t,e){return r["a"].post("user/brokerage/update/".concat(t),e)}function V(t){return r["a"].delete("user/brokerage/delete/".concat(t))}function S(){return r["a"].get("user/brokerage/options")}function $(t){return r["a"].get("user/promoter/count",t)}function O(t){return r["a"].get("user/spread/".concat(t,"/form"))}function G(t){return r["a"].get("spread/order/lst",t)}function z(){return r["a"].get("spread/order/chart")}function I(t){return r["a"].get("spread/order/detail/".concat(t))}function j(t){return r["a"].get("spread/order/express/".concat(t))}function E(t){return r["a"].get("spread/store/order/delivery/".concat(t,"/form"))}function N(t,e){return r["a"].get("spread/order/status/".concat(t),e)}function D(t){return r["a"].get("spread/order/children/".concat(t))}},f35f:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"divBox"},[n("div",{staticClass:"selCard"},[n("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,inline:"",size:"small","label-width":"85px"}},[n("el-form-item",{attrs:{label:"商户分类:",prop:"cate_id"}},[n("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(" "),n("el-form-item",{attrs:{label:"商户名称:",prop:"mer_id"}},[n("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 n("el-option",{key:t.mer_id,attrs:{label:t.mer_name,value:t.mer_id}})})),1)],1),t._v(" "),n("el-form-item",{attrs:{label:"商品搜索:",prop:"keyword"}},[n("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号",clearable:""},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"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),n("el-card",{staticClass:"mt14"},[n("div",{staticClass:"mb20"},[n("el-tabs",{on:{"tab-click":function(e){t.getList(1),t.getLstFilterApi()}},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 n("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.name+"("+t.count+")"}})})),1),t._v(" "),"6"===t.tableFrom.type?n("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.batch}},[t._v("批量审核")]):t._e(),t._v(" "),Number(t.tableFrom.type)<3?n("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.batchOff}},[t._v("批量强制下架")]):t._e()],1),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"},on:{"selection-change":t.handleSelectionChange}},[Number(t.tableFrom.type)<7?n("el-table-column",{key:"2",attrs:{type:"selection",width:"55"}}):t._e(),t._v(" "),n("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[n("el-form-item",{attrs:{label:"平台分类:"}},[n("span",[t._v(t._s(e.row.storeCategory?e.row.storeCategory.cate_name:"-"))])]),t._v(" "),n("el-form-item",{attrs:{label:"商品分类:"}},[e.row.merCateId.length?t._l(e.row.merCateId,(function(e,r){return n("span",{key:r,staticClass:"mr10"},[t._v(t._s(e.category.cate_name))])})):n("span",[t._v("-")])],2),t._v(" "),n("el-form-item",{attrs:{label:"品牌:"}},[n("span",[t._v(t._s(e.row.brand?e.row.brand.brand_name:"-"))])]),t._v(" "),n("el-form-item",{attrs:{label:"市场价格:"}},[n("span",[t._v(t._s(t._f("filterEmpty")(e.row.ot_price)))])]),t._v(" "),n("el-form-item",{attrs:{label:"成本价:"}},[n("span",[t._v(t._s(t._f("filterEmpty")(e.row.cost)))])]),t._v(" "),n("el-form-item",{attrs:{label:"收藏:"}},[n("span",[t._v(t._s(t._f("filterEmpty")(e.row.care_count)))])]),t._v(" "),n("el-form-item",{attrs:{label:"已售数量 :"}},[n("span",[t._v(t._s(t._f("filterEmpty")(e.row.ficti)))])])],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),n("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{staticClass:"demo-image__preview"},[n("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"}}),t._v(" "),n("el-table-column",{attrs:{label:"商户名称","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.merchant?e.row.merchant.mer_name:""))])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"price",label:"商品售价","min-width":"90"}}),t._v(" "),n("el-table-column",{attrs:{prop:"sales",label:"销量","min-width":"90"}}),t._v(" "),n("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"90"}}),t._v(" "),n("el-table-column",{attrs:{prop:"rank",label:"排序","min-width":"70"}}),t._v(" "),n("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(n){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_used,callback:function(n){t.$set(e.row,"is_used",n)},expression:"scope.row.is_used"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),Number(t.tableFrom.type)<7?n("el-table-column",{key:"8",attrs:{label:"操作","min-width":"130",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[Number(t.tableFrom.type)<7?n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.onEdit(e.row.product_id)}}},[t._v("编辑")]):t._e(),t._v(" "),"6"===t.tableFrom.type?n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.toExamine(e.row.product_id)}}},[t._v("审核")]):t._e(),t._v(" "),Number(t.tableFrom.type)<3?n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.toOff([e.row.product_id])}}},[t._v("强制下架")]):t._e()]}}],null,!1,2644917324)}):t._e()],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),n("el-dialog",{attrs:{title:"商品编辑",visible:t.dialogVisible,width:"1000px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("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()}}},[n("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[n("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(" "),n("el-form-item",{attrs:{label:"商品推荐:"}},[n("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,r){return n("el-checkbox",{key:r,attrs:{label:e.value}},[t._v(t._s(e.name))])})),1)],1),t._v(" "),n("el-form-item",{attrs:{label:"排序:"}},[n("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(" "),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"商品详情:"}},[n("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(" "),n("el-form-item",{staticStyle:{"margin-top":"30px"}},[n("el-button",{staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)],1),t._v(" "),n("info-from",{ref:"infoFrom",attrs:{"is-show":t.isShow,ids:t.OffId},on:{subSuccess:t.subSuccess}})],1)},a=[],i=(n("6762"),n("2fdb"),n("c80c")),o=(n("96cf"),n("3b8d")),s=(n("7f7f"),n("e519")),l=n("83d6"),c=n("ef0d"),u=n("6461"),f=[{name:"推荐礼包",value:"is_best"}],d={name:"ProductExamine1",components:{infoFrom:u["a"],ueditorFrom:c["a"]},data:function(){return{props:{emitPath:!1},ruleValidate:{},dialogVisible:!1,checkboxGroup:[],recommend:f,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:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},subSuccess:function(){this.getList(),this.getLstFilterApi()},onchangeIsShow:function(t){var e=this;Object(s["b"])(t.product_id,t.is_used).then((function(t){var n=t.message;e.$message.success(n),e.getList()})).catch((function(t){var n=t.message;e.$message.error(n)}))},getInfo:function(t){var e=this;this.fullscreenLoading=!0,this.checkboxGroup=[],Object(s["v"])(t).then((function(t){var n=t.data;e.formValidate={is_hot:n.is_hot,is_best:n.is_best,is_new:n.is_new,is_benefit:n.is_benefit,rank:n.rank,content:n.content,store_name:n.store_name},1===n.is_good&&e.checkboxGroup.push("is_good"),1===n.is_benefit&&e.checkboxGroup.push("is_benefit"),1===n.is_best&&e.checkboxGroup.push("is_best"),1===n.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(s["y"])(e.productId,e.formValidate).then(function(){var t=Object(o["a"])(Object(i["a"])().mark((function t(n){return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.fullscreenLoading=!1,e.$message.success(n.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(n){var r=n.value;Object(s["x"])({id:t,status:-2,refusal:r}).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(s["p"])().then((function(e){t.headeNum=e.data})).catch((function(e){t.$message.error(e.message)}))},getMerSelect:function(){var t=this;Object(s["r"])().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(s["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(s["w"])(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()}}},m=d,p=(n("4dc8"),n("2877")),b=Object(p["a"])(m,r,a,!1,null,"08d49c90",null);e["default"]=b.exports}}]); |