(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6da4bc00"],{"1f04":function(t,e,n){"use strict";n("f329")},2093:function(t,e,n){"use strict";n("e7a1")},"21d2":function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"k",(function(){return i})),n.d(e,"y",(function(){return o})),n.d(e,"G",(function(){return l})),n.d(e,"H",(function(){return s})),n.d(e,"F",(function(){return c})),n.d(e,"s",(function(){return u})),n.d(e,"C",(function(){return f})),n.d(e,"q",(function(){return m})),n.d(e,"A",(function(){return d})),n.d(e,"D",(function(){return p})),n.d(e,"E",(function(){return h})),n.d(e,"z",(function(){return b})),n.d(e,"d",(function(){return g})),n.d(e,"p",(function(){return v})),n.d(e,"i",(function(){return y})),n.d(e,"g",(function(){return w})),n.d(e,"o",(function(){return x})),n.d(e,"b",(function(){return L})),n.d(e,"r",(function(){return _})),n.d(e,"t",(function(){return S})),n.d(e,"u",(function(){return k})),n.d(e,"f",(function(){return C})),n.d(e,"h",(function(){return O})),n.d(e,"a",(function(){return E})),n.d(e,"e",(function(){return $})),n.d(e,"m",(function(){return j})),n.d(e,"n",(function(){return D})),n.d(e,"x",(function(){return N})),n.d(e,"w",(function(){return T})),n.d(e,"l",(function(){return F})),n.d(e,"B",(function(){return R})),n.d(e,"N",(function(){return P})),n.d(e,"c",(function(){return M})),n.d(e,"v",(function(){return G})),n.d(e,"I",(function(){return z})),n.d(e,"J",(function(){return A})),n.d(e,"K",(function(){return I})),n.d(e,"L",(function(){return B})),n.d(e,"M",(function(){return K}));var a=n("b775");function r(){return Object(a["a"])({url:"/admin/platform/retail/store/config/get",method:"get"})}function i(t){return Object(a["a"])({url:"/admin/platform/retail/store/config/save",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/admin/platform/retail/store/people/list",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/admin/platform/retail/store/sub/user/list",method:"get",params:t})}function s(t){return Object(a["a"])({url:"/admin/platform/retail/store/promotion/order/list",method:"get",params:t})}function c(t){return Object(a["a"])({url:"/admin/platform/retail/store/clean/spread/".concat(t),method:"get"})}function u(t){return Object(a["a"])({url:"/admin/platform/bcx/brokerage/config/product/list",method:"GET",params:t})}function f(t){return Object(a["a"])({url:"/admin/platform/bcx/brokerage/config/set/product",method:"POST",data:t})}function m(t,e){var n=1==t?"/admin/platform/bcx/performance/report/fxy/list":2==t?"/admin/platform/bcx/performance/report/fxs/list":3==t?"/admin/platform/bcx/performance/report/channel/list":4==t?"/admin/platform/bcx/performance/report/department/list":"/admin/platform/bcx/performance/report/department/member/list";return Object(a["a"])({url:n,method:"GET",params:e})}function d(t){return Object(a["a"])({url:"/admin/platform/bcx/performance/report/statistics",method:"GET",params:t})}function p(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/statistics",method:"GET",params:t})}function h(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/statistics",method:"GET",params:t})}function b(){return Object(a["a"])({url:"/admin/platform/bcx/region/tree",method:"GET"})}function g(t,e){var n=1===t?"/admin/platform/bcx/performance/report/fxy/list/excel":2===t?"/admin/platform/bcx/performance/report/fxs/list/excel":3===t?"/admin/platform/bcx/performance/report/channel/list/excel":4===t?"/admin/platform/bcx/performance/report/department/list/excel":"/admin/platform/bcx/performance/report/department/member/list/excel";return Object(a["a"])({url:n,method:"GET",params:e,responseType:"blob"})}function v(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/fxy/list",method:"GET",params:t})}function y(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/fxs/list",method:"GET",params:t})}function w(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/channel/list",method:"GET",params:t})}function x(t,e){return Object(a["a"])({url:0==t?"/admin/platform/bcx/settle/bill/department/list":"/admin/platform/bcx/settle/bill/department/member/list",method:"GET",params:e})}function L(t,e){var n=1===t?"/admin/platform/bcx/settle/bill/fxy/list/excel":2===t?"/admin/platform/bcx/settle/bill/fxs/list/excel":3===t?"/admin/platform/bcx/settle/bill/channel/list/excel":4===t?"/admin/platform/bcx/settle/bill/department/list/excel":"/admin/platform/bcx/settle/bill/department/member/list/excel";return Object(a["a"])({url:n,method:"GET",params:e,responseType:"blob"})}function _(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/generate/settle",method:"POST",data:t})}function S(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/detail/".concat(t.id),method:"GET",params:t})}function k(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/bill/get/settle/info",method:"POST",data:t})}function C(t){return Object(a["a"])({url:"/admin/platform/bcx/brokerage/config/load",method:"get",params:t})}function O(t){return Object(a["a"])({url:"/admin/platform/bcx/channel/list",method:"get",params:t})}function E(t){return Object(a["a"])({url:"/admin/platform/bcx/region/tree",method:"get",params:t})}function $(t){return Object(a["a"])({url:"/admin/platform/bcx/brokerage/config/save",method:"post",data:t})}function j(t){return Object(a["a"])({url:"/admin/platform/bcx/department/tree",method:"get",params:t})}function D(t){return Object(a["a"])({url:"/admin/platform/bcx/department/member/list",method:"GET",params:t})}function N(t,e){var n=1===t?"/admin/platform/bcx/settle/fxy/list":2===t?"/admin/platform/bcx/settle/fxs/list":3===t?"/admin/platform/bcx/settle/channel/list":4===t?"/admin/platform/bcx/settle/department/list":"/admin/platform/bcx/settle/department/member/list";return Object(a["a"])({url:n,method:"GET",params:e})}function T(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/get/settle/info",method:"POST",data:t})}function F(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/do/settle",method:"POST",data:t})}function R(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/cancel/".concat(t.id),method:"POST",params:t})}function P(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/upload/attachments",method:"POST",data:t})}function M(t,e){var n=1===t?"/admin/platform/bcx/settle/fxy/list/excel":2===t?"/admin/platform/bcx/settle/fxs/list/excel":3===t?"/admin/platform/bcx/settle/channel/list/excel":4===t?"/admin/platform/bcx/settle/department/list/excel":"/admin/platform/bcx/settle/department/member/list/excel";return Object(a["a"])({url:n,method:"GET",params:e,responseType:"blob"})}function G(t){return Object(a["a"])({url:"/admin/platform/bcx/settle/detail/".concat(t.id),method:"GET",params:t})}function z(t){return Object(a["a"])({url:"/admin/platform/bcx/performance/report/channel/list",method:"GET",params:t})}function A(t){return Object(a["a"])({url:"/admin/platform/bcx/performance/report/settle/bill/list",method:"GET",params:t})}function I(t){return Object(a["a"])({url:"/admin/platform/bcx/performance/report/settle/list",method:"GET",params:t})}function B(t){return Object(a["a"])({url:"/front/user/performance/report/list",method:"GET",params:t})}function K(t){return Object(a["a"])({url:"/front/user/performance/report/settle/bill/list",method:"GET",params:t})}},"733e":function(t,e,n){},"748a":function(t,e,n){"use strict";n("733e")},9482:function(t,e,n){},b70e:function(t,e,n){},ca28:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"dialog-width",attrs:{title:t.title,width:"1150px",visible:t.dialogFormVisible,"modal-append-to-body":!0,"append-to-body":"","close-on-click-modal":!1},on:{close:t.cancelForm}},[n("section",[n("el-form",{ref:"ruleForm",attrs:{model:t.formList,"label-width":"100px",rules:t.rules}},[t.params.productId?n("el-form-item",{attrs:{label:"佣金计算",prop:"isSub"}},[n("el-radio-group",{on:{input:t.inputradioGroup},model:{value:t.formList.isSub,callback:function(e){t.$set(t.formList,"isSub",e)},expression:"formList.isSub"}},["config"!==t.pageType?n("el-radio",{attrs:{label:0}},[t._v("默认佣金")]):t._e(),t._v(" "),n("el-radio",{attrs:{label:1}},[t._v("按比例")])],1)],1):t._e(),t._v(" "),t.productName?n("el-form-item",{staticStyle:{width:"270px"},attrs:{label:"商品名称"}},[n("el-input",{attrs:{disabled:!0},model:{value:t.productName,callback:function(e){t.productName=e},expression:"productName"}})],1):t._e(),t._v(" "),n("el-form-item",{staticStyle:{width:"270px"},attrs:{label:"最大比例",prop:"maxBrokerage"}},[n("el-input",{model:{value:t.formList.maxBrokerage,callback:function(e){t.$set(t.formList,"maxBrokerage",t._n(e))},expression:"formList.maxBrokerage"}},[n("template",{slot:"append"},[t._v("%")])],2)],1),t._v(" "),null==t.formList.isSub||1==t.formList.isSub?n("el-form-item",{staticStyle:{width:"270px"},attrs:{label:"一级返佣",prop:"retailStoreBrokerageFirstRatio"}},[n("el-input",{model:{value:t.formList.retailStoreBrokerageFirstRatio,callback:function(e){t.$set(t.formList,"retailStoreBrokerageFirstRatio",t._n(e))},expression:"formList.retailStoreBrokerageFirstRatio"}},[n("template",{slot:"append"},[t._v("%")])],2)],1):t._e(),t._v(" "),null==t.formList.isSub||1==t.formList.isSub?n("el-form-item",{staticStyle:{width:"270px"},attrs:{label:"二级返佣",prop:"retailStoreBrokerageSecondRatio"}},[n("el-input",{model:{value:t.formList.retailStoreBrokerageSecondRatio,callback:function(e){t.$set(t.formList,"retailStoreBrokerageSecondRatio",t._n(e))},expression:"formList.retailStoreBrokerageSecondRatio"}},[n("template",{slot:"append"},[t._v("%")])],2)],1):t._e(),t._v(" "),null==t.formList.isSub||1==t.formList.isSub?n("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.formList.activeName,callback:function(e){t.$set(t.formList,"activeName",e)},expression:"formList.activeName"}},[n("el-tab-pane",{attrs:{label:"渠道返佣",name:"first"}},[n("Channelrebates",{ref:"Channelref"})],1),t._v(" "),n("el-tab-pane",{attrs:{label:"部门绩效",name:"second"}},[n("Departmentperformance",{ref:"Departref"})],1),t._v(" "),n("el-tab-pane",{attrs:{label:"部门成员绩效",name:"third"}},[n("members",{ref:"Membersref"})],1)],1):t._e()],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.cancelForm()}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm()}}},[t._v("确 定")])],1)])},r=[],i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("div",{staticClass:"boxButton"},[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.addchannel()}}},[t._v("关联渠道商")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"small",disabled:t.disabledarea},on:{click:function(e){return t.addarea()}}},[t._v("关联区域")]),t._v(" "),n("el-button",{attrs:{type:"default",size:"small",disabled:t.disabledarea},on:{click:function(e){return t.deletelist()}}},[t._v("解除管理")])],1),t._v(" "),n("div",{staticClass:"boxtable"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%",overflow:"auto"},attrs:{data:t.tableData.data,"max-height":200,size:"mini","highlight-current-row":!0,"header-cell-style":{fontWeight:"bold"}},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{label:"渠道名称",prop:"name","min-width":"150"}}),t._v(" "),n("el-table-column",{attrs:{label:"渠道类型","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-select",{attrs:{placeholder:"请选择",size:"mini"},model:{value:e.row.channelType,callback:function(n){t.$set(e.row,"channelType",n)},expression:"scope.row.channelType"}},[n("el-option",{attrs:{label:"业务渠道",value:1}}),t._v(" "),n("el-option",{attrs:{label:"区域渠道",value:2}})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"类型","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-select",{attrs:{placeholder:"请选择",size:"mini"},model:{value:e.row.type,callback:function(n){t.$set(e.row,"type",n)},expression:"scope.row.type"}},[n("el-option",{attrs:{label:"比例",value:1}}),t._v(" "),n("el-option",{attrs:{label:"固定",value:2}}),t._v(" "),n("el-option",{attrs:{label:"自留",value:3}})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"佣金",prop:"ratio","min-width":"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{attrs:{size:"small",type:"number",min:0,max:1===e.row.type?100:9999999999999},model:{value:e.row.ratio,callback:function(n){t.$set(e.row,"ratio",t._n(n))},expression:"scope.row.ratio"}}),t._v(t._s(1===e.row.type?"%":"元")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"计算系数",prop:"calculateRatio","min-width":"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{attrs:{size:"small",type:"number",min:0,max:100},model:{value:e.row.calculateRatio,callback:function(n){t.$set(e.row,"calculateRatio",t._n(n))},expression:"scope.row.calculateRatio"}}),t._v("%\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"结果",prop:"calculateRatio","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s((e.row.ratio||0)*(e.row.calculateRatio||0)/100)+t._s(1===e.row.type?"%":"元")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"关联区域",prop:"regionListRegionName","min-width":"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.regionListRegionName)+"\n ")]}}])})],1)],1),t._v(" "),t.visible?n("channeldialog",{attrs:{visible:t.visible},on:{"update:visible":function(e){t.visible=e},channelpop:t.channelpop}}):t._e(),t._v(" "),t.visiblearea?n("areadialog",{attrs:{visible:t.visiblearea,multipleSelection:t.multipleSelection},on:{"update:visible":function(e){t.visiblearea=e},areaMultipleSelection:t.areaMultipleSelection}}):t._e()],1)},o=[],l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"dialog-width",attrs:{title:"选择渠道商",width:"700px",visible:t.dialogFormVisibleT,"modal-append-to-body":!0,"append-to-body":"","close-on-click-modal":!1},on:{close:t.cancelForm}},[n("section",[n("el-row",{staticClass:"searchbox"},[n("el-form",{attrs:{"label-width":"100px"}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"商户名称:",prop:"channelName"}},[n("el-input",{attrs:{size:"small",placeholder:"请输入",clearable:""},model:{value:t.tableFrom.channelName,callback:function(e){t.$set(t.tableFrom,"channelName","string"===typeof e?e.trim():e)},expression:"tableFrom.channelName"}})],1)],1),t._v(" "),n("el-col",{staticStyle:{"margin-left":"10px"},attrs:{span:4}},[n("el-button",{staticStyle:{"margin-top":"2px"},attrs:{type:"primary",size:"small"},on:{click:t.search}},[t._v("搜索")])],1)],1)],1),t._v(" "),n("div",{staticClass:"boxtable"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":!0,"header-cell-style":{fontWeight:"bold"}},on:{"row-click":t.rowclick}},[n("el-table-column",{attrs:{label:"商户名称",prop:"name","min-width":"150"}})],1),t._v(" "),n("div",{staticClass:"block mb20"},[n("el-pagination",{attrs:{"page-sizes":[10,20,30,40],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)])},s=[],c=n("21d2"),u={props:["visible"],data:function(){return{dialogFormVisibleT:this.visible,listLoading:!1,tableFrom:{page:1,limit:10,channelName:""},tableData:{data:[],total:0}}},watch:{visible:function(){this.dialogFormVisibleT=this.visible}},mounted:function(){this.getList()},methods:{search:function(){this.tableFrom.page=1,this.getList()},getList:function(t){var e=this;this.tableFrom.page=t||this.tableFrom.page,this.listLoading=!0,Object(c["h"])(this.tableFrom).then((function(t){console.log("res",t),e.tableData.data=t.list,e.tableData.total=t.total,e.listLoading=!1})).catch((function(t){e.listLoading=!1}))},handleClick:function(t,e){console.log(t,e)},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},rowclick:function(t,e,n){t.index=(new Date).getTime(),console.log(t),this.$emit("channelpop",t),this.cancelForm()},cancelForm:function(){this.$emit("update:visible",!1),this.$nextTick((function(){}))}}},f=u,m=n("2877"),d=Object(m["a"])(f,l,s,!1,null,"01935cd4",null),p=d.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"dialog-width",attrs:{title:"设置区域",width:"700px",visible:t.dialogFormVisibleT,"modal-append-to-body":!0,"append-to-body":"","close-on-click-modal":!1},on:{close:t.cancelForm}},[n("section",[n("el-tree",{ref:"tree",attrs:{data:t.data,"show-checkbox":"","node-key":"regionCode",props:t.defaultProps},on:{check:t.areaOnCheck}})],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.cancelForm()}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm()}}},[t._v("确 定")])],1)])},b=[];function g(t){return x(t)||w(t)||y(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t,e){if(t){if("string"===typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}function w(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function x(t){if(Array.isArray(t))return L(t)}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);nt.length)&&(e=t.length);for(var n=0,a=new Array(e);nt.length)&&(e=t.length);for(var n=0,a=new Array(e);n=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),$(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var a=n.completion;if("throw"===a.type){var r=a.arg;$(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,a){return this.delegate={iterator:D(e),resultName:n,nextLoc:a},"next"===this.method&&(this.arg=t),b}},e}function ht(t,e,n,a,r,i,o){try{var l=t[i](o),s=l.value}catch(c){return void n(c)}l.done?e(s):Promise.resolve(s).then(a,r)}function bt(t){return function(){var e=this,n=arguments;return new Promise((function(a,r){var i=t.apply(e,n);function o(t){ht(i,a,r,o,l,"next",t)}function l(t){ht(i,a,r,o,l,"throw",t)}o(void 0)}))}}function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function vt(t){for(var e=1;e1)"merchandise"===this.pageType&&(this.formList.isSub=1);else{var e=vt({},this.params);1===this.params.productId.length&&(e.productId=this.params.productId[0]),Object(c["f"])(e).then((function(e){t.formList=e,t.formList.activeName="first","config"===t.pageType&&(t.formList.isSub=1),e.configChannelList.length&&e.configChannelList.forEach((function(e,n){e.index||t.$set(e,"index",(new Date).getTime()+n)})),e.configDepartmentList.length&&e.configDepartmentList.forEach((function(e,n){e.index||t.$set(e,"index",(new Date).getTime()+n)})),e.configDepartmentMemberList.length&&e.configDepartmentMemberList.forEach((function(e,n){e.index||t.$set(e,"index",(new Date).getTime()+n)})),t.$refs.Channelref&&(e.configChannelList.forEach((function(t){var e="";t.regionList.forEach((function(t){"all"===t.regionCode&&(t.regionName="全国"),e+=t.regionName})),t.regionListRegionName=e})),t.$refs.Channelref.tableData.data=e.configChannelList),t.$refs.Departref&&(e.configDepartmentList.forEach((function(t){var e="";t.regionList.forEach((function(t){"all"===t.regionCode&&(t.regionName="全国"),e+=t.regionName})),t.regionListRegionName=e})),t.$refs.Departref.tableData.data=e.configDepartmentList),t.$refs.Membersref&&(e.configDepartmentMemberList.forEach((function(t){var e="";t.regionList.forEach((function(t){"all"===t.regionCode&&(t.regionName="全国"),e+=t.regionName})),t.regionListRegionName=e})),t.$refs.Membersref.tableData.data=e.configDepartmentMemberList)}))}},handleClick:function(t,e){console.log(t,e)},inputradioGroup:function(t){console.log(t)},submitForm:function(){var t=bt(pt().mark((function t(){var e=this;return pt().wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log("formList",this.formList),this.$refs["ruleForm"].validate(function(){var t=bt(pt().mark((function t(n){var a,r;return pt().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n){t.next=17;break}if(e.configChannelListArr=[],e.configDepartListArr=[],e.configMembersListArr=[],null!=e.formList.isSub&&1!=e.formList.isSub){t.next=13;break}return t.next=7,e.validateData();case 7:if(a=t.sent,a){t.next=10;break}return t.abrupt("return");case 10:e.$refs.Channelref.tableData.data.forEach((function(t){var n=[];t.regionList.forEach((function(t){n.push(t.regionCode)}));var a={belongId:t.belongId?t.belongId:t.id,belongName:t.name,ratio:t.ratio,regionCodeList:n,channelType:t.channelType,type:t.type,calculateRatio:t.calculateRatio};e.configChannelListArr.push(a)})),e.$refs.Departref.tableData.data.forEach((function(t){var n=[];t.regionList.forEach((function(t){n.push(t.regionCode)}));var a={belongId:t.belongId?t.belongId:t.id,belongName:t.name,ratio:t.ratio,regionCodeList:n,type:t.type};e.configDepartListArr.push(a)})),e.$refs.Membersref.tableData.data.forEach((function(t){var n=[];t.regionList.forEach((function(t){n.push(t.regionCode)}));var a={belongId:t.belongId?t.belongId:t.id,belongName:t.name,ratio:t.ratio,regionCodeList:n,type:t.type,serviceRatio:t.serviceRatio};e.configMembersListArr.push(a)}));case 13:r={configChannelList:e.configChannelListArr,configDepartmentList:e.configDepartListArr,configDepartmentMemberList:e.configMembersListArr,isSub:e.formList.isSub,productIdList:e.params.productId,retailStoreBrokerageFirstRatio:e.formList.retailStoreBrokerageFirstRatio||"0",retailStoreBrokerageSecondRatio:e.formList.retailStoreBrokerageSecondRatio||"0",maxBrokerage:e.formList.maxBrokerage||"0"},Object(c["e"])(r).then((function(t){console.info("save",t),!0===t?(e.$message({type:"success",message:"操作成功"}),e.cancelForm()):e.$message({type:"error",message:"操作失败"})})),t.next=19;break;case 17:return e.$message({type:"error",message:"请输入必填项"}),t.abrupt("return",!1);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),cancelForm:function(){this.$emit("update:visible",!1),this.$nextTick((function(){}))},validateData:function(){var t=bt(pt().mark((function t(){var e=this;return pt().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){var a=!1;if(e.$refs.Channelref.tableData.data.length){var r=[];e.$refs.Channelref.tableData.data.forEach((function(t){t.regionList.forEach((function(e){2===t.channelType&&r.push(e.regionCode)}))})),r.indexOf("all")>=0&&r.length>1&&(e.$message({message:"已有渠道商配置全国,一个地区只能配置一个渠道商",type:"warning",showClose:!0}),t(!1),a=!1),e.$refs.Channelref.tableData.data.some((function(t){return""===t.ratio}))?(e.$message({type:"warning",message:"请输入渠道返佣佣金",showClose:!0}),t(!1),a=!1):e.$refs.Channelref.tableData.data.some((function(t){return 0===t.regionList.length}))?(e.$message({type:"warning",message:"请选择渠道关联区域",showClose:!0}),t(!1),a=!1):a=!0}e.$refs.Departref.tableData.data.length&&(e.$refs.Departref.tableData.data.some((function(t){return""===t.ratio}))?(e.$message({type:"warning",message:"请输入部门绩效",showClose:!0}),t(!1),a=!1):e.$refs.Departref.tableData.data.some((function(t){return 0===t.regionList.length}))?(console.info("def depart"),e.$message({type:"warning",message:"请选择部门关联区域",showClose:!0}),t(!1),a=!1):a=!0),e.$refs.Membersref.tableData.data.length?e.$refs.Membersref.tableData.data.some((function(t){return""===t.ratio}))?(e.$message({type:"warning",message:"请输入部门成员绩效",showClose:!0}),t(!1),a=!1):e.$refs.Membersref.tableData.data.some((function(t){return 0===t.regionList.length}))?(e.$message({type:"warning",message:"请选择部门成员关联区域",showClose:!0}),t(!1),a=!1):a=!0:a=!0,a&&t(!0)})));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()}},_t=Lt,St=Object(m["a"])(_t,a,r,!1,null,null,null);e["a"]=St.exports},d0aa:function(t,e,n){},d563:function(t,e,n){"use strict";n("b70e")},e5f4:function(t,e,n){"use strict";n("9482")},e7a1:function(t,e,n){},f329:function(t,e,n){},ff13:function(t,e,n){"use strict";n("d0aa")}}]);