(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34b74788"],{"1fa6":function(t,e,s){"use strict";s.d(e,"d",(function(){return a})),s.d(e,"b",(function(){return r})),s.d(e,"c",(function(){return n})),s.d(e,"a",(function(){return l}));var o=s("a27e");function a(t){return o["a"].post("/entrust/add",t)}function r(t){return o["a"].post("/entrust/list",t)}function n(t){return o["a"].post("/entrust/listById",t)}function l(t){return o["a"].post("/goods/add",t)}},"503a":function(t,e,s){"use strict";s("a3e9")},a3e9:function(t,e,s){},e89e:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[s("div",{staticClass:"app-editEntrust"},[s("div",{staticClass:"app-header"},[s("appHeader"),s("el-divider")],1),s("div",{staticClass:"editEntrust-body"},[s("el-form",{ref:"form",staticClass:"formTable",attrs:{"label-width":"150px"}},[s("el-form-item",{attrs:{label:"委托物品图片"}},[s("img",{staticStyle:{width:"150px",height:"150px"},attrs:{src:t.getImgUrl(t.entrustDetail.eGoodsCoverImg)}})]),s("el-form-item",{attrs:{label:"委托物品名称"}},[s("el-input",{attrs:{placeholder:"请输入物品名称"},model:{value:t.entrustDetail.eGoodsName,callback:function(e){t.$set(t.entrustDetail,"eGoodsName",e)},expression:"entrustDetail.eGoodsName"}})],1),s("el-form-item",{attrs:{label:"委托物品单价 "}},[s("el-input",{attrs:{placeholder:"请输入物品单价"},model:{value:t.entrustDetail.eGoodsPrice,callback:function(e){t.$set(t.entrustDetail,"eGoodsPrice",e)},expression:"entrustDetail.eGoodsPrice"}})],1),s("el-form-item",{attrs:{label:"委托物品数量 "}},[s("el-input-number",{attrs:{min:1,max:100,label:"物品数量"},model:{value:t.entrustDetail.eStockNum,callback:function(e){t.$set(t.entrustDetail,"eStockNum",e)},expression:"entrustDetail.eStockNum"}})],1),s("el-form-item",{attrs:{label:"委托物品简介 "}},[s("el-input",{attrs:{placeholder:"请输入物品简介"},model:{value:t.entrustDetail.eGoodsIntro,callback:function(e){t.$set(t.entrustDetail,"eGoodsIntro",e)},expression:"entrustDetail.eGoodsIntro"}})],1),s("el-form-item",{attrs:{label:"选择分类"}},[s("el-select",{attrs:{placeholder:"请选择分类"},model:{value:t.entrustDetail.eGoodsCategory,callback:function(e){t.$set(t.entrustDetail,"eGoodsCategory",e)},expression:"entrustDetail.eGoodsCategory"}},t._l(t.childrenCategoryList,(function(t){return s("el-option",{key:t.categoryId,attrs:{label:t.categoryName,value:t.categoryId}})})),1)],1),s("el-form-item",{attrs:{label:"物品描述"}},[s("el-input",{attrs:{type:"textarea"},model:{value:t.entrustDetail.eGoodsDetailContent,callback:function(e){t.$set(t.entrustDetail,"eGoodsDetailContent",e)},expression:"entrustDetail.eGoodsDetailContent"}})],1)],1)],1),s("div",{staticClass:"app-footer"},[s("el-divider"),s("appFooter",{staticClass:"app-footer"})],1)])])},a=[],r=(s("14d9"),s("f392")),n=s("2c4b"),l=s("1fa6"),i=s("42f1"),u={name:"editEntrust",components:{appHeader:r["a"],appFooter:n["a"]},data(){return{entrustDetail:"",childrenCategoryList:""}},methods:{getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"},async listEntrustDetail(){let t=this.$store.state.editEntrustId;try{await Object(l["c"])({entrustId:t}).then(t=>{this.entrustDetail=t,console.log(t)})}catch(e){console.log(e)}},async listChildren(){try{await Object(i["c"])({}).then(t=>{this.childrenCategoryList=t,console.log(t)})}catch(t){console.log(t)}},async publishEntrust(){try{await Object(l["a"])({entrust:{goodsName:this.entrustDetail.eGoodsName,goodsIntro:this.entrustDetail.eGoodsIntro,goodsCategoryId:this.entrustDetail.eGoodsCategory,goodsCoverImg:this.entrustDetail.eGoodsCoverImg,goodsCarousel:this.entrustDetail.eGoodsCarousel,goodsDetailContent:this.entrustDetail.eGoodsDetailContent,stockNum:this.entrustDetail.eStockNum,goodsStatus:1,goodsScore:3.7},itPrice:this.entrustDetail.eGoodsPrice,entrustId:this.entrustDetail.entrustId}).then(t=>{console.log(t),alert("发布成功！"),this.$router.push({name:"verifyEntrust",query:{t:Date.now()}})})}catch(t){console.log(t)}}},mounted(){this.listEntrustDetail(),this.listChildren()},beforeRouteUpdate(){this.listEntrustDetail(),this.listChildren()}},c=u,d=(s("503a"),s("2877")),m=Object(d["a"])(c,o,a,!1,null,"38702800",null);e["default"]=m.exports}}]);
//# sourceMappingURL=chunk-34b74788.305efea2.js.map