企微助手 ,仓库名 短剧

77.c5fc79dd1ab1d627bc19.js 6.8KB

1
  1. webpackJsonp([77],{GrUG:function(e,n){},Thtr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("Dd8w"),r=t.n(i),o=t("Xxa5"),a=t.n(o),s=t("exGp"),c=t.n(s),l=t("//Fk"),d=t.n(l),p=t("2Uyi"),u={name:"percentConfigDialog",props:{dialogVisible:{type:Boolean,default:function(){return!1}},confInfo:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",form:{android_percent:"",ios_percent:""}}},computed:{dialogTitle:function(){return"分成比例配置"}},watch:{dialogVisible:function(e){e&&this.handleInitData()}},methods:{handleInitData:function(){this.loading=!1;var e=this.confInfo,n=e.android_percent,t=e.ios_percent;this.form.android_percent=n,this.form.ios_percent=t},handleConfirm:function(){var e=this;return c()(a.a.mark(function n(){var t,i,r,o,s;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,e.loading=!0,n.next=4,e.handleFormValidate();case 4:return t=""+e.URL.BASEURL+e.URL.orderPercent_setConf,i={sys_group_id:e.sys_group_id,order_source:e.confInfo.order_source,android_percent:e.form.android_percent,ios_percent:e.form.ios_percent},n.next=8,e.$axios.post(t,i);case 8:r=n.sent,o=r.data,(s=void 0===o?{}:o)&&0==s.errno?(e.$message.success("操作成功"),e.$emit("confirm")):4002!=s.error&&e.$message.warning(s.err||"操作失败"),n.next=17;break;case 14:n.prev=14,n.t0=n.catch(0),console.log(n.t0);case 17:return n.prev=17,e.loading=!1,n.finish(17);case 20:case"end":return n.stop()}},n,e,[[0,14,17,20]])}))()},handleCancel:function(){this.$emit("cancel")},handleFormValidate:function(){var e=this;return new d.a(function(n,t){var i=e.form,r=i.ios_percent,o=i.android_percent;r?o?n("表单校验通过"):(e.$message.warning("请输入安卓端分成占比"),t("表单校验未通过")):(e.$message.warning("请输入IOS端分成占比"),t("表单校验未通过"))})},onInputIosPercent:function(e){this.form.ios_percent=Object(p.l)(e)},onInputAndroidPercent:function(e){this.form.android_percent=Object(p.l)(e)}}},f={render:function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-dialog",{staticClass:"addAccount-dialog",attrs:{visible:e.dialogVisible,"before-close":e.handleCancel,title:e.dialogTitle,width:"450px"},on:{"update:visible":function(n){e.dialogVisible=n}}},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"form-wrap"},[t("div",{staticClass:"form-item"},[t("span",{staticClass:"lable"},[e._v("平台名称")]),e._v(" "),t("span",[e._v(e._s(e.confInfo.source_name))])]),e._v(" "),t("div",{staticClass:"form-item"},[t("span",{staticClass:"lable"},[t("em",[e._v("*")]),e._v("IOS端分成占比")]),e._v(" "),t("el-input",{attrs:{size:"small",placeholder:"请输入IOS端分成占比",maxlength:"2",clearable:""},on:{input:e.onInputIosPercent},model:{value:e.form.ios_percent,callback:function(n){e.$set(e.form,"ios_percent",n)},expression:"form.ios_percent"}},[t("template",{slot:"append"},[e._v("%")])],2)],1),e._v(" "),t("div",{staticClass:"form-item"},[t("span",{staticClass:"lable"},[t("em",[e._v("*")]),e._v("安卓端分成占比")]),e._v(" "),t("el-input",{attrs:{size:"small",placeholder:"请输入安卓端分成占比",maxlength:"2",clearable:""},on:{input:e.onInputAndroidPercent},model:{value:e.form.android_percent,callback:function(n){e.$set(e.form,"android_percent",n)},expression:"form.android_percent"}},[t("template",{slot:"append"},[e._v("%")])],2)],1)]),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{size:"mini"},on:{click:e.handleCancel}},[e._v("取 消")]),e._v(" "),t("el-button",{attrs:{size:"mini",type:"primary",disabled:e.loading},on:{click:e.handleConfirm}},[e._v("确 定")])],1)])},staticRenderFns:[]};var _={name:"orderPercent",components:{percentConfigDialog:t("VU/8")(u,f,!1,function(e){t("USYR")},"data-v-03b1dd45",null).exports},data:function(){return{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",height:"",loading:!1,pagination:{page:1,page_size:20,pages:0,total:0},tableList:[],percentConfigVisible:!1,currentConf:{}}},created:function(){this.height=document.documentElement.clientHeight-80,this.handleGetList()},methods:{handleGetList:function(){var e=this;return c()(a.a.mark(function n(){var t,i,r,o,s;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,e.loading=!0,t=""+e.URL.BASEURL+e.URL.orderPercent_list,i={sys_group_id:e.sys_group_id},n.next=6,e.$axios.get(t,{params:i});case 6:r=n.sent,o=r.data,(s=void 0===o?{}:o)&&0==s.errno&&Array.isArray(s.rst)?e.tableList=s.rst:4002!=s.errno&&(e.$message.warning(s.err),e.tableList=[]),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),console.log(n.t0),e.tableList=[];case 16:return n.prev=16,e.loading=!1,n.finish(16);case 19:case"end":return n.stop()}},n,e,[[0,12,16,19]])}))()},handleCurrentChange:function(e){this.pagination.page=e,this.handleGetList()},onClickEdit:function(e){this.currentConf=r()({},e),this.percentConfigVisible=!0},onConfirmConfig:function(){this.percentConfigVisible=!1,this.handleGetList()},onCancelConfig:function(){this.percentConfigVisible=!1}}},g={render:function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"orderPercent-wrap"},[t("el-table",{staticStyle:{width:"100%"},attrs:{height:e.height,data:e.tableList,"tooltip-effect":"dark"}},[t("el-table-column",{attrs:{label:"平台名称",prop:"source_name","min-width":"200",align:"center"}}),e._v(" "),t("el-table-column",{attrs:{label:"IOS端占比",prop:"ios_percent",align:"center","min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.row;return[i.ios_percent?t("div",[e._v(e._s(i.ios_percent)+" : "+e._s(100-i.ios_percent))]):t("div",[e._v(" - ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"安卓端占比",prop:"android_percent",align:"center","min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.row;return[i.android_percent?t("div",[e._v(e._s(i.android_percent)+" : "+e._s(100-i.android_percent))]):t("div",[e._v(" - ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"操作","min-width":"200",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.row;return[t("span",{staticClass:"btn c-00b38a",on:{click:function(n){return e.onClickEdit(i)}}},[e._v("编辑")])]}}])})],1),e._v(" "),t("percentConfigDialog",{attrs:{dialogVisible:e.percentConfigVisible,confInfo:e.currentConf},on:{confirm:e.onConfirmConfig,cancel:e.onCancelConfig}})],1)},staticRenderFns:[]};var m=t("VU/8")(_,g,!1,function(e){t("GrUG")},"data-v-957886a8",null);n.default=m.exports},USYR:function(e,n){}});