| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CommodityAdd"],{"011b":function(e,t,r){"use strict";r("b97a")},3184:function(e,t,r){"use strict";r("56e4")},"48e2":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"view",attrs:{id:"CommodityListAdd"}},[r("el-form",{ref:"params",staticClass:"form",attrs:{model:e.params,rules:e.rules,"label-position":""}},[r("el-row",[r("el-col",{staticClass:"add-left",attrs:{span:18,sm:18,md:18,lg:18}},[r("div",{staticClass:"add-left-first"},[r("el-form-item",{attrs:{prop:"lang"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Label.Lang",expression:"'Label.Lang'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("div",{staticClass:"chooseLang"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Label.CN",expression:"'Label.CN'"}],staticClass:"crm-cursor",class:{active:"cn"==e.params.lang},on:{click:function(t){return e.chooseLang("cn")}}}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Label.EN",expression:"'Label.EN'"}],staticClass:"crm-cursor",class:{active:"en"==e.params.lang},on:{click:function(t){return e.chooseLang("en")}}})])])])],1),r("div",{staticClass:"add-left-first"},[r("el-form-item",{attrs:{prop:"recommender"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Recommender",expression:"'Commodity_info.Recommender'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-switch",{staticClass:"crm_switch",attrs:{"active-value":1,"inactive-value":0,"active-text":e.$t("Btn.Yes"),"inactive-text":e.$t("Btn.No"),"active-color":"#368FEC","inactive-color":"#EB3F57"},model:{value:e.params.recommender,callback:function(t){e.$set(e.params,"recommender",t)},expression:"params.recommender"}})],1)]),r("el-form-item",{attrs:{prop:"show"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Label.Show",expression:"'Label.Show'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-switch",{staticClass:"crm_switch",attrs:{"active-value":1,"inactive-value":0,"active-text":e.$t("Btn.Yes"),"inactive-text":e.$t("Btn.No"),"active-color":"#368FEC","inactive-color":"#EB3F57"},model:{value:e.params.show,callback:function(t){e.$set(e.params,"show",t)},expression:"params.show"}})],1)])],1),r("el-form-item",{attrs:{prop:"name"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Name",expression:"'Commodity_info.Name'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",attrs:{placeholder:e.$t("Placeholder.Input")},model:{value:e.params.name,callback:function(t){e.$set(e.params,"name",t)},expression:"params.name"}})],1)]),r("el-form-item",{attrs:{prop:"typeId"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Type",expression:"'Commodity_info.Type'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("Placeholder.Choose")},model:{value:e.params.typeId,callback:function(t){e.$set(e.params,"typeId",t)},expression:"params.typeId"}},e._l(e.commodityTypeAll,(function(t){return r("el-option",{key:t.id,attrs:{label:"cn"==e.lang?t.name:t.nameEn,value:t.id}})})),1)],1)]),r("el-form-item",{attrs:{prop:"price"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Price",expression:"'Commodity_info.Price'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",attrs:{placeholder:e.$t("Placeholder.Input")},model:{value:e.params.price,callback:function(t){e.$set(e.params,"price",t)},expression:"params.price"}})],1)]),r("el-form-item",{attrs:{prop:"integral"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Point",expression:"'Commodity_info.Point'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",attrs:{placeholder:e.$t("Placeholder.Input")},model:{value:e.params.integral,callback:function(t){e.$set(e.params,"integral",t)},expression:"params.integral"}})],1)]),r("el-form-item",{attrs:{prop:"number"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Number",expression:"'Commodity_info.Number'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",attrs:{placeholder:e.$t("Placeholder.Input")},model:{value:e.params.number,callback:function(t){e.$set(e.params,"number",t)},expression:"params.number"}})],1)]),r("el-form-item",{attrs:{prop:"subIndex"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Subindex",expression:"'Commodity_info.Subindex'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",attrs:{placeholder:e.$t("Placeholder.Input")},model:{value:e.params.subIndex,callback:function(t){e.$set(e.params,"subIndex",t)},expression:"params.subIndex"}}),r("div",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.SubDer",expression:"'Commodity_info.SubDer'"}],staticStyle:{opacity:"0.6"}})],1)]),r("el-form-item",{attrs:{prop:"level"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Level",expression:"'Commodity_info.Level'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("Placeholder.Choose")},model:{value:e.params.level,callback:function(t){e.$set(e.params,"level",t)},expression:"params.level"}},[r("el-option",{attrs:{label:1,value:1}}),r("el-option",{attrs:{label:2,value:2}}),r("el-option",{attrs:{label:3,value:3}})],1)],1)]),r("el-form-item",{attrs:{prop:"content"}},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Content",expression:"'Commodity_info.Content'"}]}),e._v(":")]),r("div",{staticClass:"my-form-item-con"},[r("tinymce",{ref:"editor",attrs:{context:e.context,disabled:e.disabled},on:{tinymcehtml:e.tinymceHtml},model:{value:e.params.content,callback:function(t){e.$set(e.params,"content",t)},expression:"params.content"}})],1)])],1),r("el-col",{attrs:{span:6,sm:6,md:6,lg:6}},[r("el-form-item",{attrs:{prop:""}},[r("div",{staticClass:"my-form-item-label label-left"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Files",expression:"'Commodity_info.Files'"}]}),e._v(":")]),r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Files",expression:"'Commodity_info.Files'"}],attrs:{size:"small",type:"primary"},on:{click:function(t){e.dialogCheck=!0}}})],1),r("div",{staticClass:"imgDes"},[r("div",{directives:[{name:"t",rawName:"v-t",value:"Msg.10IMG",expression:"'Msg.10IMG'"}]}),r("div",{directives:[{name:"t",rawName:"v-t",value:"Msg.JPG",expression:"'Msg.JPG'"}]}),r("div",{directives:[{name:"t",rawName:"v-t",value:"Msg.ImgNumber",expression:"'Msg.ImgNumber'"}]})]),e.fileList.length?r("div",{staticClass:"fileSet"},[r("div",{staticClass:"my-form-item-label label-left"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.FilesSet",expression:"'Commodity_info.FilesSet'"}]}),e._v(":")]),e._l(e.fileList,(function(t,n){return r("div",{key:n,staticClass:"fileItem"},[r("div",{staticClass:"crm-cursor",staticStyle:{width:"100px",height:"100px",overflow:"hidden"},on:{click:function(r){return e.Preview(e.url+t.path)}}},[r("img",{attrs:{width:"100%",height:"100%",src:e.url+t.path,alt:""}})]),r("div",{staticClass:"setb"},[r("div",{staticClass:"setBox"},[r("div",{staticClass:"my-form-item-label"},[e._v("Banner:")]),r("div",{staticClass:"my-form-item-con"},[r("el-switch",{staticClass:"crm_switch",attrs:{"active-value":1,"inactive-value":0,"active-text":e.$t("Btn.Yes"),"inactive-text":e.$t("Btn.No"),"active-color":"#368FEC","inactive-color":"#EB3F57"},model:{value:t.banner,callback:function(r){e.$set(t,"banner",r)},expression:"item.banner"}})],1)]),r("div",{staticClass:"setBox"},[r("div",{staticClass:"my-form-item-label"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Commodity_info.Subindex",expression:"'Commodity_info.Subindex'"}]}),e._v(" :")]),r("div",{staticClass:"my-form-item-con"},[r("el-input",{staticClass:"m-input",staticStyle:{display:"inline-block"},attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:t.subIndex,callback:function(r){e.$set(t,"subIndex",r)},expression:"item.subIndex"}})],1)])])])}))],2):e._e(),r("el-dialog",{attrs:{visible:e.dialogVisible1},on:{"update:visible":function(t){e.dialogVisible1=t}}},[r("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1),r("el-col",{attrs:{span:24}},[r("el-form-item",[r("div",{staticClass:"dialog-footer"},["add"==e.type?r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Release",expression:"'Btn.Release'"}],staticClass:"addBtn",attrs:{type:"primary"},on:{click:e.infoAdd}}):e._e(),"update"==e.type?r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],staticClass:"addBtn",attrs:{type:"primary"},on:{click:e.infoUpdate}}):e._e(),r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:e.cancel}})],1)])],1)],1)],1),r("el-dialog",{attrs:{title:e.$t("Commodity_info.Files"),visible:e.dialogCheck,center:"","custom-class":"dialog_header_w"},on:{"update:visible":function(t){e.dialogCheck=t}}},[r("div",{staticClass:"dia-content"},[r("el-upload",{ref:"upload",attrs:{action:e.action,"list-type":"picture-card",multiple:"",limit:5,"file-list":e.fileListPar,"http-request":e.uploadFile,"auto-upload":!1,headers:e.AccessToken,"before-upload":e.beforeAvatarUpload,"on-exceed":e.exceed,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove}},[r("i",{staticClass:"el-icon-plus"})]),r("el-dialog",{attrs:{modal:!1,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})]),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],attrs:{type:"primary"},on:{click:function(t){return e.handleAvatarSuccess()}}}),r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:function(t){e.dialogCheck=!1}}})],1)],1)])],1)},a=[],i=(r("4160"),r("159b"),r("5530")),s=(r("96cf"),r("1da1")),o=r("5153"),c=r("f121"),l=r.n(c),u=r("918d"),m=r("bc3a"),p=r.n(m),d=l.a.Code,f={name:"CommodityListAdd",components:{tinymce:u["a"]},data:function(){return{context:"",disabled:!1,plugins:"",flag:!1,url:l.a.Host85,imgUrl:l.a.Host85,imageUrl1:"",action:"",params:{lang:"cn",level:null,name:"",price:"",integral:"",number:"",subIndex:"",content:"",typeId:null,show:1,recommender:0},myId:"",type:"",commodityTypeAll:[],dialogCheck:!1,dialogImageUrl:"",dialogVisible:!1,dialogVisible1:!1,fileList:[],fileListPar:[],fileData:"",rules:{level:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],name:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],price:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],integral:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],number:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],subIndex:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],content:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],typeId:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],coverImage:[{required:!0,message:this.$i18n.t("vaildate.img.empty"),trigger:"change"}]}}},computed:{AccessToken:function(){return{"Access-Token":this.Session.Get("access_token")}},lang:function(){return this.Session.Get("lang")}},methods:{tinymceHtml:function(e){this.params.content=e},getSingle:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].commoditySingle({id:e.myId});case 2:r=t.sent,r.code==d.StatusOK?(e.params=r.data,e.context=r.data.content,e.fileList=r.data.files,r.data.files.forEach((function(t){var r={url:""};r.url=e.url+t.path,e.fileListPar.push(r)})),e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess"))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},infoUpdate:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.fileList.length){e.next=3;break}return this.$pigeon.MessageWarning(this.$i18n.t("Commodity_info.ImagesMust")),e.abrupt("return");case 3:if(t=[],this.fileList.forEach((function(e){e.banner&&t.push(e)})),1==t.length){e.next=8;break}return this.$pigeon.MessageWarning(this.$i18n.t("Commodity_info.ImagesMustB")),e.abrupt("return");case 8:this.$refs["params"].validate(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=13;break}if(!r.flag){e.next=5;break}return e.abrupt("return");case 5:r.flag=!0;case 6:return r.params.files=r.fileList,e.next=9,o["a"].commodityUpdate(Object(i["a"])({},r.params));case 9:n=e.sent,n.code==d.StatusOK?(r.$pigeon.MessageOK(r.$i18n.t("Msg.ModifySuccess")),r.cancel(),r.flag=!1):(r.flag=!1,r.$pigeon.MessageError(n.msg)),e.next=14;break;case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),infoAdd:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.fileList.length){e.next=3;break}return this.$pigeon.MessageWarning(this.$i18n.t("Commodity_info.ImagesMust")),e.abrupt("return");case 3:if(t=[],this.fileList.forEach((function(e){e.banner&&t.push(e)})),1==t.length){e.next=8;break}return this.$pigeon.MessageWarning(this.$i18n.t("Commodity_info.ImagesMustB")),e.abrupt("return");case 8:this.$refs["params"].validate(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=13;break}if(!r.flag){e.next=5;break}return e.abrupt("return");case 5:r.flag=!0;case 6:return r.params.files=r.fileList,e.next=9,o["a"].commodityAdd(Object(i["a"])({},r.params));case 9:n=e.sent,n.code==d.StatusOK?(r.$pigeon.MessageOK(n.msg),r.cancel(),r.flag=!1):(r.$pigeon.MessageError(n.msg),r.flag=!1),e.next=14;break;case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),cancel:function(){this.$router.push({path:"/shop/commodity/list"}).catch((function(e){return e}))},chooseLang:function(e){this.params.lang=e},uploadFile:function(e){this.fileData.append("files",e.file)},handleAvatarSuccess:function(){var e=this;this.fileData=new FormData,this.$refs.upload.submit(),p.a.post(this.action,this.fileData).then((function(t){t.status==d.StatusOK&&200==t.data.code?(t.data.data.forEach((function(t){var r={path:"",subIndex:"0",banner:0};r.path=t,e.fileList.push(r)})),t.data.data.forEach((function(t){var r={url:""};r.url=e.url+t,e.fileListPar.push(r)}))):e.$pigeon.MessageError(e.$i18n.t("Msg.Fail"))})),this.dialogCheck=!1},beforeAvatarUpload:function(e){var t="image/jpeg"===e.type||"image/JPEG",r=e.size/1024/1024<10;return t||this.$pigeon.MessageError(this.$i18n.t("Msg.JPG")),r||this.$pigeon.MessageError(this.$i18n.t("Msg.10IMG")),t&&r},handleRemove:function(e){var t=this,r=[];this.fileList.forEach((function(n){t.url+n.path!=e.url&&r.push(n)})),this.fileList=r},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},exceed:function(){this.$pigeon.MessageWarning(this.$i18n.t("Msg.ImgNumber"))},Preview:function(e){this.dialogImageUrl=e,this.dialogVisible1=!0},searchType:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].commodityTypeAll({});case 2:r=t.sent,r.code==d.StatusOK?e.commodityTypeAll=r.data:e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){this.searchType(),this.myId=this.$route.query.id,this.type=this.$route.query.type,this.myId>=0?(this.getSingle(),this.action=this.url+"/commodity/update/upload"):this.action=this.url+"/commodity/add/upload"}},h=f,v=(r("3184"),r("011b"),r("2877")),g=Object(v["a"])(h,n,a,!1,null,"15b04694",null);t["default"]=g.exports},4970:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"InfoBox",class:{active:e.dialogInfoTradingAdd},attrs:{id:"TradingDetailedInfoAdd"}},[r("div",{staticClass:"header"},[r("div",[r("span",{directives:[{name:"t",rawName:"v-t",value:"R-Shop-Point-List",expression:"'R-Shop-Point-List'"}],staticClass:"title"})]),r("span",{staticClass:"close crm-cursor",on:{click:e.close}},[r("i",{staticClass:"el-icon-close"})])]),r("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"120PX"}},[e.editor?r("div",[r("el-form-item",{attrs:{prop:"",label:"CID:"}},[e._v(" "+e._s(e.form.cId)+" ")]),r("el-form-item",{attrs:{prop:"",label:e.$t("Point_info.Name")+":"}},[e._v(" "+e._s(e.form.firstName+" "+e.form.middle+" "+e.form.lastName)+" ")]),r("el-form-item",{attrs:{prop:"",label:e.$t("Point_info.Email")+":"}},[e._v(" "+e._s(e.form.email)+" ")])],1):e._e(),r("el-form-item",{attrs:{prop:"customId",label:e.$t("Point_info.Custom")+":"}},[r("el-select",{staticClass:"crm_search_down",attrs:{size:"small",filterable:"",clearable:"",disabled:e.editor},model:{value:e.form.customId,callback:function(t){e.$set(e.form,"customId",t)},expression:"form.customId"}},e._l(e.customList,(function(e,t){return r("el-option",{key:t,attrs:{label:(e.firstName?e.firstName+" ":"")+(e.middle?e.middle+" ":"")+(e.lastName?e.lastName:""),value:e.id}})})),1)],1),r("el-form-item",{attrs:{prop:"channelId",label:e.$t("Point_info.Channel")+":"}},[r("el-select",{staticClass:"crm_search_down",attrs:{size:"small",filterable:"",clearable:""},model:{value:e.form.channelId,callback:function(t){e.$set(e.form,"channelId",t)},expression:"form.channelId"}},e._l(e.channelList,(function(t,n){return r("el-option",{key:n,attrs:{label:"cn"==e.lang?t.name:t.nameEn,value:t.id}})})),1)],1),r("el-form-item",{attrs:{prop:"integral",label:e.$t("Point_info.Point")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.integral,callback:function(t){e.$set(e.form,"integral",t)},expression:"form.integral"}})],1),r("el-form-item",{attrs:{prop:"",label:e.$t("Point_info.Note")+":"}},[r("el-input",{attrs:{size:"small",type:"textarea",rows:2,placeholder:e.$t("Placeholder.Input")},model:{value:e.form.explain,callback:function(t){e.$set(e.form,"explain",t)},expression:"form.explain"}})],1)],1),r("span",{staticClass:"btn crm-cursor",on:{click:e.confirm}},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}]})])],1)},a=[],i=r("5530"),s=(r("96cf"),r("1da1")),o=r("4b0e"),c=r("f121"),l=r.n(c),u=l.a.Code,m={name:"PointChannelAdd",props:{dialogInfoTradingAdd:{type:Boolean,default:!1},addType:{default:""},editor:{default:""},myInfo:{default:""},formList:{default:""}},data:function(){return{flag:!1,form:{customId:null,channelId:null,integral:"",explain:""},customList:[],channelList:[],rules:{integral:[{required:!0,message:this.$i18n.t("Placeholder.Input"),trigger:"blur"}],channelId:[{required:!0,message:this.$i18n.t("Placeholder.Choose"),trigger:"change"}],customId:[{required:!0,message:this.$i18n.t("Placeholder.Choose"),trigger:"change"}]}}},computed:{lang:function(){return this.Session.Get("lang")}},methods:{selectChange:function(){this.$forceUpdate()},close:function(){this.$emit("closeAdd",!1)},confirmToReload:function(){this.$emit("confirmToReload",!0)},confirm:function(){var e=this;this.$refs["form"].validate((function(t){if(!t)return!1;e.toConfirm()}))},toConfirm:function(){this.editor?this.CommodityTypeUpdate():this.editor||this.CommodityTypeAdd()},CommodityTypeAdd:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].customPointAdd(Object(i["a"])({},e.form));case 2:r=t.sent,r.code==u.StatusOK?(e.confirmToReload(),e.close(),e.$refs["form"].resetFields(),e.$pigeon.MessageOK(e.$i18n.t("Msg.Success"))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},CommodityTypeUpdate:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].customPointUpdate(Object(i["a"])({},e.form));case 2:r=t.sent,r.code==u.StatusOK?(e.confirmToReload(),e.close(),e.$refs["form"].resetFields(),e.$pigeon.MessageOK(e.$i18n.t("Msg.Success"))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},getCustomList:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].customList({});case 2:r=t.sent,r.code==u.StatusOK?e.customList=r.data:e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},getChannelList:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].pointChannelAll({});case 2:r=t.sent,r.code==u.StatusOK?e.channelList=r.data:e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){},watch:{dialogInfoTradingAdd:function(e){0==e&&this.$refs["form"]?(this.$refs["form"].resetFields(),this.form={}):e&&(this.getCustomList(),this.getChannelList())},formList:function(e){this.form=e}}},p=m,d=r("2877"),f=Object(d["a"])(p,n,a,!1,null,"2b2c292e",null);t["default"]=f.exports},"4b0e":function(e,t,r){"use strict";r("96cf");var n=r("1da1"),a=r("d4ec"),i=r("bee2"),s=r("262e"),o=r("2caf"),c=r("ff2d"),l=r("bc3a"),u=r.n(l),m=r("f121"),p=r.n(m),d=function(e){Object(s["a"])(r,e);var t=Object(o["a"])(r);function r(){var e;return Object(a["a"])(this,r),e=t.call(this),u.a.defaults.baseURL=p.a.Host85,e}return Object(i["a"])(r,[{key:"pointChannelAll",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pointChannelList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pointChannelSingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pointChannelAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pointChannelUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"pointChannelDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/integral/channel/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointTotal",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/search/total",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointSingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customPointDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/integral/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),r}(c["a"]);t["a"]=new d},5153:function(e,t,r){"use strict";r("96cf");var n=r("1da1"),a=r("d4ec"),i=r("bee2"),s=r("262e"),o=r("2caf"),c=r("ff2d"),l=r("bc3a"),u=r.n(l),m=r("f121"),p=r.n(m),d=function(e){Object(s["a"])(r,e);var t=Object(o["a"])(r);function r(){var e;return Object(a["a"])(this,r),e=t.call(this),u.a.defaults.baseURL=p.a.Host85,e}return Object(i["a"])(r,[{key:"commodityTypeAll",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeSingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/type/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commoditySingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/commodity/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customFeedbackList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.post("/custom/feedback/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),r}(c["a"]);t["a"]=new d},"56e4":function(e,t,r){},b97a:function(e,t,r){}}]);
|