(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5fdbddf6"],{"3f33":function(e,t,s){"use strict";s.d(t,"a",(function(){return i})),s.d(t,"b",(function(){return r})),s.d(t,"g",(function(){return o})),s.d(t,"c",(function(){return l})),s.d(t,"h",(function(){return n})),s.d(t,"f",(function(){return c})),s.d(t,"e",(function(){return d})),s.d(t,"d",(function(){return p}));var a=s("6b2d");const i=e=>a.a.post("/pointsshop.points_goods/add",e),r=e=>a.a.get("/pointsshop.points_goods/detail",{params:e}),o=e=>a.a.post("/pointsshop.points_goods/update",e),l=e=>a.a.get("/pointsshop.points_goods/list",{params:e}),n=e=>a.a.post("/pointsshop.points_goods/status",e),c=e=>a.a.get("/pointsshop.order/list",{params:e}),d=e=>a.a.get("/pointsshop.order/detail",{params:e}),p=e=>a.a.post("/pointsshop.order/delivery",e)},"6b2d":function(e,t,s){"use strict";var a=s("0613"),i=s("bc3a"),r=s.n(i),o=s("d70b"),l=s("afbc"),n=s("5c96"),c=s("6ddb");const d={baseURL:o.a.baseURL+"/adminapi",headers:{"content-type":"application/json"}},p=(Object(c.g)(()=>(a.a.commit("setToken",""),a.a.commit("setUserInfo",{}),a.a.commit("setPermission",{}),l.b.push("/account/login"),Promise.reject())),r.a.create(d));p.interceptors.request.use(e=>{const t=a.a.getters.token;return t&&(e.headers.token=t),e.headers.version=o.a.version,e},e=>Promise.reject(e)),p.interceptors.response.use(e=>e.data,e=>(Object(n.Message)({type:"error",message:"系统错误，请稍候再试"}),Promise.reject(e))),t.a=p},e1b0:function(e,t,s){"use strict";s.r(t);var a=s("3f33"),i={components:{MaterialSelect:s("b3ad").a},data:()=>({mode:"",detail:{name:"",image:"",description:"",points_price:0,stock:0,limit_per_user:0,status:0},rules:{name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],points_price:[{required:!0,message:"请输入所需积分",trigger:"blur"},{type:"number",message:"积分必须为数字值",trigger:"blur"}]},table:{currentPage:1,pageSizes:[10],total:0,data:null},imgHost:""}),methods:{onSubmit(e){this.$refs[e].validate(e=>{if(!e)return!1;this.detail.image?this.detail.points_price<1?this.$message.error("所需积分不能小于1"):this.addGood():this.$message.error("请先上传图片")})},addGood(){Object(a.a)(this.detail).then(e=>{this.$message.success(e.msg),1==e.code&&this.$router.push({path:"/scoreshop/goods/lists"})})}},mounted(){}},r=(s("e6ff"),s("2877")),o=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"substance_edit-help"},[s("div",{staticClass:"ls-card m-t-16 form-container"},[s("div",{staticClass:"form-left"},[s("el-form",{ref:"form",attrs:{rules:e.rules,model:e.detail,"label-width":"120px",size:"small"}},[s("el-form-item",{attrs:{label:"商品名称",prop:"name"}},[s("el-input",{staticClass:"ls-input",attrs:{"show-word-limit":"",placeholder:"请输入商品名称"},model:{value:e.detail.name,callback:function(t){e.$set(e.detail,"name",t)},expression:"detail.name"}})],1),s("el-form-item",{attrs:{label:"商品图片",prop:"image"}},[s("material-select",{attrs:{limit:1},model:{value:e.detail.image,callback:function(t){e.$set(e.detail,"image",t)},expression:"detail.image"}})],1),s("el-form-item",{attrs:{label:"商品描述",prop:"description"}},[s("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入商品描述内容"},model:{value:e.detail.description,callback:function(t){e.$set(e.detail,"description",t)},expression:"detail.description"}})],1),s("el-form-item",{attrs:{label:"所需积分",prop:"points_price"}},[s("el-input",{staticClass:"ls-input",attrs:{type:"number",placeholder:"请设置所需积分"},model:{value:e.detail.points_price,callback:function(t){e.$set(e.detail,"points_price",e._n(t))},expression:"detail.points_price"}})],1),s("el-form-item",{attrs:{label:"库存数量",prop:"stock"}},[s("el-input-number",{attrs:{min:1,label:"描述文字"},model:{value:e.detail.stock,callback:function(t){e.$set(e.detail,"stock",t)},expression:"detail.stock"}})],1),s("el-form-item",{attrs:{label:"每人限购数量",prop:"limit_per_user"}},[s("el-input-number",{attrs:{min:1,label:"描述文字"},model:{value:e.detail.limit_per_user,callback:function(t){e.$set(e.detail,"limit_per_user",t)},expression:"detail.limit_per_user"}})],1),s("el-form-item",{attrs:{label:"状态",prop:"status"}},[s("el-radio",{attrs:{label:1},model:{value:e.detail.status,callback:function(t){e.$set(e.detail,"status",t)},expression:"detail.status"}},[e._v("上架")]),s("el-radio",{attrs:{label:0},model:{value:e.detail.status,callback:function(t){e.$set(e.detail,"status",t)},expression:"detail.status"}},[e._v("下架")])],1)],1)],1)]),s("div",{staticClass:"bg-white ls-fixed-footer"},[s("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[s("el-button",{attrs:{size:"small"},on:{click:function(t){return e.$router.go(-1)}}},[e._v("取消")]),s("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.onSubmit("form")}}},[e._v("保存")])],1)])])}),[],!1,null,"2b97cf38",null);t.default=o.exports},e4b6:function(e,t,s){},e6ff:function(e,t,s){"use strict";s("e4b6")}}]);