webpackJsonp([51],{RvMj:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("3E4D"),r=a("Ch4/"),n=a("PI0u"),i=a("P9l9"),l={name:"evaluate-set",props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:localStorage.getItem("userInfos")?JSON.parse(localStorage.getItem("userInfos")).wxEnterpriseId:"",myCustomData:{guideReplyFlag:0,allOrderFlag:0},activeId:"1",loading:!1}},methods:{submit:Object(n.a)(function(t){this.loading=!0,this.setData(t)},500),setData:function(t){var e=this,a=this.myCustomData,n=a.allOrderFlag,l=a.guideReplyFlag,o={enterpriseId:this.brandId,guideReplyFlag:l,allOrderFlag:n};Object(i.f)("/haoban-app-aggregation-web/order-evaluation-setting",o).then(function(t){var a=t.data;e.loading=!1,e.getCustomerSet(),1!=a.errorCode?r.a.errorMsg(a):s.a.showmsg("保存成功","success")}).catch(function(t){this.loading=!1,this.$message.error({duration:1e3,message:t.message})})},getCustomerSet:function(t){var e=this,a={enterpriseId:e.brandId,wxEnterpriseRelatedId:e.wxEnterpriseRelatedId};Object(i.a)("/haoban-app-aggregation-web/order-evaluation-find",a).then(function(t){var a=t.data;if(1!=a.errorCode)r.a.errorMsg(a);else if(a.result){var s=a.result,n=s.guideReplyFlag,i=s.allOrderFlag;e.myCustomData.guideReplyFlag=n,e.myCustomData.allOrderFlag=i}}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&this.getCustomerSet(this.brandId)}},mounted:function(){this.$emit("showTab","1"),this.brandId&&this.getCustomerSet(this.brandId)},components:{}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("span",{staticClass:"font-14 p-r-10"}),t._v(" "),a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.myCustomData.guideReplyFlag,callback:function(e){t.$set(t.myCustomData,"guideReplyFlag",e)},expression:"myCustomData.guideReplyFlag"}}),t._v(" "),a("span",{staticClass:"p-r-10 font-14 color-303133"},[t._v("禁止订单关联导购回复评价")]),a("span",{staticClass:"font-12 color-909399 p-l-10"},[t._v("注：开启后，订单关联导购不可回复评价")])],1),t._v(" "),a("div",{staticClass:"m-b-20"},[a("span",{staticClass:"font-14 p-r-10"}),t._v(" "),a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.myCustomData.allOrderFlag,callback:function(e){t.$set(t.myCustomData,"allOrderFlag",e)},expression:"myCustomData.allOrderFlag"}}),t._v(" "),a("span",{staticClass:"p-r-10 font-14 color-303133"},[t._v("允许店员查看所有订单评价")])],1),t._v(" "),a("div",{staticClass:"m-t-46"},[a("el-button",{attrs:{type:"primary",loading:t.loading,disabled:t.$store.state.wxEnterpriseType},on:{click:function(e){return t.submit("searchFlag")}}},[t._v("保 存")])],1)])])},staticRenderFns:[]};var d=a("VU/8")(l,o,!1,function(t){a("geZs")},"data-v-d1672ab8",null);e.default=d.exports},geZs:function(t,e){}});