| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6e6accf6"],{1152:function(t,e,o){"use strict";o("beb8")},"14c6":function(t,e,o){"use strict";o.d(e,"p",(function(){return r})),o.d(e,"z",(function(){return a})),o.d(e,"A",(function(){return i})),o.d(e,"w",(function(){return n})),o.d(e,"E",(function(){return l})),o.d(e,"x",(function(){return d})),o.d(e,"F",(function(){return c})),o.d(e,"D",(function(){return u})),o.d(e,"y",(function(){return p})),o.d(e,"B",(function(){return g})),o.d(e,"C",(function(){return m})),o.d(e,"c",(function(){return f})),o.d(e,"g",(function(){return v})),o.d(e,"h",(function(){return h})),o.d(e,"d",(function(){return b})),o.d(e,"e",(function(){return _})),o.d(e,"f",(function(){return y})),o.d(e,"H",(function(){return C})),o.d(e,"K",(function(){return k})),o.d(e,"I",(function(){return w})),o.d(e,"J",(function(){return x})),o.d(e,"G",(function(){return $})),o.d(e,"O",(function(){return G})),o.d(e,"L",(function(){return S})),o.d(e,"M",(function(){return L})),o.d(e,"N",(function(){return R})),o.d(e,"i",(function(){return z})),o.d(e,"n",(function(){return O})),o.d(e,"j",(function(){return j})),o.d(e,"o",(function(){return T})),o.d(e,"k",(function(){return q})),o.d(e,"m",(function(){return D})),o.d(e,"l",(function(){return E})),o.d(e,"P",(function(){return A})),o.d(e,"S",(function(){return J})),o.d(e,"Q",(function(){return M})),o.d(e,"R",(function(){return N})),o.d(e,"t",(function(){return P})),o.d(e,"s",(function(){return U})),o.d(e,"u",(function(){return B})),o.d(e,"v",(function(){return F})),o.d(e,"r",(function(){return H})),o.d(e,"q",(function(){return I})),o.d(e,"T",(function(){return K})),o.d(e,"U",(function(){return Q})),o.d(e,"V",(function(){return V})),o.d(e,"W",(function(){return W})),o.d(e,"a",(function(){return X})),o.d(e,"b",(function(){return Y})),o.d(e,"Y",(function(){return Z})),o.d(e,"X",(function(){return tt}));var s=o("f175");const r=t=>s.a.post("/goods.goods/add",t),a=t=>s.a.post("/goods.goods/edit",t),i=t=>s.a.get("/goods.goods/lists",{params:t}),n=t=>s.a.get("/goods.goods/commonLists",{params:t}),l=t=>s.a.post("/goods.goods/status",t),d=t=>s.a.post("/goods.goods/del",t),c=t=>s.a.post("/goods.goods/changeCategory",t),u=t=>s.a.post("/goods.goods/sort",t),p=t=>s.a.get("/goods.goods/detail",{params:{id:t}}),g=t=>s.a.get("/goods.goods/otherList",{params:t}),m=t=>s.a.post("goods.goods/rename ",t),f=t=>s.a.post("/goods.goods_brand/add",t),v=t=>s.a.get("/goods.goods_brand/lists",{params:t}),h=t=>s.a.post("/goods.goods_brand/status",t),b=t=>s.a.post("/goods.goods_brand/del",t),_=t=>s.a.get("/goods.goods_brand/detail",{params:{id:t}}),y=t=>s.a.post("/goods.goods_brand/edit",t),C=t=>s.a.post("/goods.goods_supplier_category/add",t),k=t=>s.a.get("goods.goods_supplier_category/lists",{params:t}),w=t=>s.a.post("goods.goods_supplier_category/del",{id:t}),x=t=>s.a.post("goods.goods_supplier_category/edit",t),$=t=>s.a.post("/goods.goods_supplier/add",t),G=t=>s.a.get("/goods.goods_supplier/lists",{params:t}),S=t=>s.a.post("goods.goods_supplier/del",{id:t}),L=t=>s.a.get("/goods.goods_supplier/detail",{params:{id:t}}),R=t=>s.a.post("/goods.goods_supplier/edit",t),z=t=>s.a.post("/goods.goods_category/add",t),O=t=>s.a.get("/goods.goods_category/lists",{params:t}),j=t=>s.a.get("/goods.goods_category/commonLists",{params:t}),T=t=>s.a.post("/goods.goods_category/status",t),q=t=>s.a.post("goods.goods_category/del",{id:t}),D=t=>s.a.post("/goods.goods_category/edit",t),E=t=>s.a.get("/goods.goods_category/detail",{params:{id:t}}),A=t=>s.a.post("/goods.goods_unit/add",t),J=t=>s.a.get("/goods.goods_unit/lists",{params:t}),M=t=>s.a.post("goods.goods_unit/del",{id:t}),N=t=>s.a.post("/goods.goods_unit/edit",t),P=t=>s.a.get("goods.goods_comment/lists",{params:t}),U=t=>s.a.post("goods.goods_comment/del",t),B=t=>s.a.post("goods.goods_comment/reply",t),F=t=>s.a.post("/goods.goods_comment/status",t),H=t=>s.a.get("goods.goods_comment_assistant/lists",{params:t}),I=t=>s.a.post("goods.goods_comment_assistant/add",t),K=t=>s.a.get("goods.goodsServiceGuarantee/lists",t),Q=t=>s.a.post("goods.goodsServiceGuarantee/add",t),V=t=>s.a.post("goods.goodsServiceGuarantee/delete",t),W=t=>s.a.post("goods.goodsServiceGuarantee/edit",t),X=()=>s.a.get("goods.GoodsDeliveryTemplate/lists"),Y=t=>s.a.post("goods.GoodsDeliveryTemplate/add",t),Z=t=>s.a.post("goods.GoodsDeliveryTemplate/edit",t),tt=t=>s.a.post("goods.GoodsDeliveryTemplate/delete",t)},"308b":function(t,e,o){"use strict";o.d(e,"f",(function(){return r})),o.d(e,"d",(function(){return a})),o.d(e,"e",(function(){return i})),o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return l})),o.d(e,"b",(function(){return d}));var s=o("f175");const r=t=>s.a.get("/live.LiveRoom/lists",{params:t}),a=t=>s.a.post("/live.LiveRoom/add",t),i=t=>s.a.post("/live.LiveRoom/del",t),n=t=>s.a.get("/live.LiveGoods/lists",{params:t}),l=t=>s.a.post("/live.LiveGoods/add",t),d=t=>s.a.post("/live.LiveGoods/del",t)},beb8:function(t,e,o){},f931:function(t,e,o){"use strict";o.r(e);var s=o("9ab4"),r=o("1b40"),a=o("4201"),i=o("b3ad"),n=o("14c6"),l=o("6ddb"),d=o("3c50");let c=class extends r.e{constructor(){super(...arguments),this.visible=!1,this.form={keyword:""},this.pager=new l.a,this.currentRow={}}onTrigger(){this.getList(),this.visible=!0}close(){this.visible=!1,this.form.keyword=""}onSubmit(){return"{}"==JSON.stringify(this.currentRow)||null==this.currentRow?this.$message.error("请选择商品"):(this.$emit("getGoods",this.currentRow),void(this.visible=!1))}getList(){this.pager.request({callback:n.A,params:{...this.form}}).then(t=>{})}onReset(){this.form.keyword="",this.getList()}handleCurrentChange(t){this.currentRow=t}};Object(s.a)([Object(r.c)({default:"选择商品"})],c.prototype,"title",void 0),Object(s.a)([Object(r.c)({default:"880px"})],c.prototype,"width",void 0),Object(s.a)([Object(r.c)({default:"10vh"})],c.prototype,"top",void 0),c=Object(s.a)([Object(r.a)({components:{LsPagination:d.a}})],c);var u=c,p=o("2877"),g=Object(p.a)(u,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"ls-dialog__trigger",on:{click:t.onTrigger}},[t._t("trigger")],2),o("el-dialog",{attrs:{"coustom-class":"ls-dialog__content",title:t.title,visible:t.visible,width:t.width,top:t.top,"modal-append-to-body":!1,center:"","before-close":t.close,"close-on-click-modal":!1,"append-to-body":!0}},[o("div",{},[o("el-form",{staticClass:"ls-form",attrs:{inline:"",model:t.form,"label-width":"70px",size:"small"}},[o("el-form-item",{attrs:{label:"商品名称"}},[o("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:t.form.keyword,callback:function(e){t.$set(t.form,"keyword",e)},expression:"form.keyword"}})],1),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.getList}},[t._v("查询")]),o("el-button",{attrs:{size:"small"},on:{click:t.onReset}},[t._v("重置")])],1),o("div",{staticClass:"list-table m-t-16"},[o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pager.loading,expression:"pager.loading"}],staticStyle:{width:"100%"},attrs:{height:"420",data:t.pager.lists,size:"mini","header-cell-style":{background:"#f5f8ff"},"highlight-current-row":""},on:{"current-change":t.handleCurrentChange}},[o("el-table-column",{attrs:{prop:"",label:"商品名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("div",{staticClass:"flex"},[o("div",{staticStyle:{"min-width":"40px","min-height":"40px"}},[o("el-image",{staticStyle:{width:"40px",height:"40px"},attrs:{src:e.row.image}})],1),o("div",{staticClass:"m-l-10"},[t._v(" "+t._s(e.row.name)+" ")])])]}}])}),o("el-table-column",{attrs:{prop:"price",label:"价格"}}),o("el-table-column",{attrs:{prop:"total_stock",label:"库存"}})],1)],1),o("div",{staticClass:"flex row-right m-t-16 row-right"},[o("ls-pagination",{on:{change:function(e){return t.getList()}},model:{value:t.pager,callback:function(e){t.pager=e},expression:"pager"}})],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{size:"small"},on:{click:t.close}},[t._v("取消")]),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onSubmit}},[t._v("确认")])],1)])],1)}),[],!1,null,"b514511c",null).exports,m=o("308b"),f=o("d70b");let v=class extends r.e{constructor(){super(...arguments),this.action=f.a.baseURL+"/adminapi/upload/wechatMaterial",this.version=f.a.version,this.ishide=!1,this.mode=a.g.ADD,this.goodsType="1",this.form={name:"",image:"",price_type:1,price:0,price2:0,url:""},this.allPrice={},this.formRules={name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],image:[{required:!0,message:"请选择图片",trigger:"blur"}],url:[{required:!0,message:"请输入商品链接",trigger:"change"}],price_type:[{required:!0,message:"请选择价格类型",trigger:"change"}]},this.selecGoods={}}getGoods(t){null!=t&&(this.selecGoods=t,this.form.url="pages/goods_detail/goods_detail?id="+t.id,this.form.name=t.name,this.form.price=t.min_price)}onSubmit(){this.$refs.formRef.validate(t=>{t&&this.liveGoodsAdd()})}liveGoodsAdd(){Object(m.a)(this.form).then(t=>{setTimeout(()=>this.$router.go(-1),500)}).catch(t=>{})}handleRemove(t,e){this.ishide=!1}handleSuccess(t,e,o){this.form.image=t.data.media_id,this.ishide=!0}handleError(t,e){this.$message.error(e.name+"文件上传失败")}handleExceed(){this.$message.error("超出上传上限,请重新上传")}created(){this.onSubmit=Object(l.h)(this.onSubmit,1e3)}};v=Object(s.a)([Object(r.a)({components:{MaterialSelect:i.a,LsGoodsSelect:g}})],v);var h=v,b=(o("1152"),Object(p.a)(h,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"add-broadcast-goods"},[o("div",{staticClass:"ls-card"},[o("el-page-header",{attrs:{content:"add"===t.mode?"添加直播商品":""},on:{back:function(e){return t.$router.go(-1)}}})],1),o("el-form",{ref:"formRef",attrs:{rules:t.formRules,model:t.form,"label-width":"120px",size:"small"}},[o("div",{staticClass:"ls-card m-t-16"},[o("div",{staticClass:"card-content m-t-24"},[o("el-form-item",{attrs:{label:"产品来源",prop:"",required:""}},[o("el-select",{attrs:{placeholder:"请选择产品来源"},model:{value:t.goodsType,callback:function(e){t.goodsType=e},expression:"goodsType"}},[o("el-option",{attrs:{label:"商品库",value:"1"}}),o("el-option",{attrs:{label:"自定义",value:"2"}})],1),"1"==t.goodsType?o("div",{staticClass:"m-t-16"},[o("ls-goods-select",{attrs:{title:"选择商品"},on:{getGoods:t.getGoods}},[o("el-button",{attrs:{slot:"trigger",type:"primary",size:"small"},slot:"trigger"},[t._v("选择商品")])],1)],1):t._e()],1),o("el-form-item",{attrs:{label:"商品名称",prop:"name"}},[o("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),o("el-form-item",{attrs:{label:"商品封面",prop:"image"}},[o("el-upload",{class:t.ishide?"hide":"",attrs:{action:t.action,headers:{token:t.$store.getters.token,version:t.version},"list-type":"picture-card",limit:1,"on-remove":t.handleRemove,"on-success":t.handleSuccess,"on-exceed":t.handleExceed,"on-error":t.handleError}},[o("i",{staticClass:"el-icon-plus"})]),o("div",{staticClass:"muted xs m-r-16"},[t._v(" 建议尺寸:200像素 * 200像素,图片尺寸不能超过300像素 * 300像素。 ")])],1),o("el-form-item",{attrs:{label:"价格形式",prop:"price_type"}},[o("div",{},[o("el-radio",{attrs:{label:1},model:{value:t.form.price_type,callback:function(e){t.$set(t.form,"price_type",e)},expression:"form.price_type"}},[o("span",{staticClass:"m-r-30 first-desc"},[t._v("一口价")]),o("span",{staticClass:"m-r-5"},[t._v("价格")]),o("el-input",{staticClass:"ls-input",attrs:{size:"small"},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}}),o("span",{staticClass:"m-l-5"},[t._v("元")])],1)],1),o("div",{staticClass:"m-t-16"},[o("el-radio",{attrs:{label:2},model:{value:t.form.price_type,callback:function(e){t.$set(t.form,"price_type",e)},expression:"form.price_type"}},[o("span",{staticClass:"m-r-20 first-desc"},[t._v("价格区间")]),o("span",{staticClass:"m-r-5"},[t._v("价格")]),o("el-input",{staticClass:"ls-input",attrs:{size:"small"},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}}),o("span",{staticClass:"m-l-5"},[t._v("元")]),o("span",{staticClass:"m-l-5 m-r-5"},[t._v("-")]),o("el-input",{staticClass:"ls-input",attrs:{size:"small"},model:{value:t.form.price2,callback:function(e){t.$set(t.form,"price2",e)},expression:"form.price2"}}),o("span",{staticClass:"m-l-5"},[t._v("元")])],1)],1),o("div",{staticClass:"m-t-16"},[o("el-radio",{attrs:{label:3},model:{value:t.form.price_type,callback:function(e){t.$set(t.form,"price_type",e)},expression:"form.price_type"}},[o("span",{staticClass:"m-r-10 first-desc"},[t._v("显示折扣价")]),o("span",{staticClass:"m-r-5"},[t._v("原价")]),o("el-input",{staticClass:"ls-input",attrs:{size:"small"},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}}),o("span",{staticClass:"m-l-5"},[t._v("元")]),o("span",{staticClass:"m-l-5 m-r-5"},[t._v("现价")]),o("el-input",{staticClass:"ls-input",attrs:{size:"small"},model:{value:t.form.price2,callback:function(e){t.$set(t.form,"price2",e)},expression:"form.price2"}}),o("span",{staticClass:"m-l-5"},[t._v("元")])],1)],1)]),o("el-form-item",{attrs:{label:"商品链接",prop:"url"}},[o("el-input",{attrs:{placeholder:"请输入商品链接"},model:{value:t.form.url,callback:function(e){t.$set(t.form,"url",e)},expression:"form.url"}}),o("div",{staticClass:"muted xs m-r-16"},[t._v(" 请确保小程序页面路径可被访问,例如:pages/goods_detail/goods_detail?id=goods_id ")])],1)],1)])]),o("div",{staticClass:"bg-white ls-fixed-footer"},[o("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[o("el-button",{attrs:{size:"small"},on:{click:function(e){return t.$router.go(-1)}}},[t._v("取消")]),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.onSubmit()}}},[t._v("保存")])],1)])],1)}),[],!1,null,"259f373e",null));e.default=b.exports}}]);
|