| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Retrieval-actingList"],{"0ccb":function(e,t,a){"use strict";var r=a("e330"),n=a("50c4"),s=a("577e"),o=a("1148"),i=a("1d80"),c=r(o),l=r("".slice),u=Math.ceil,p=function(e){return function(t,a,r){var o,p,d=s(i(t)),h=n(a),m=d.length,f=void 0===r?" ":s(r);return h<=m||""===f?d:(o=h-m,p=c(f,u(o/f.length)),p.length>o&&(p=l(p,0,o)),e?d+p:p+d)}};e.exports={start:p(!1),end:p(!0)}},3160:function(e,t,a){"use strict";var r=a("c7eb"),n=a("1da1"),s=a("d4ec"),o=a("bee2"),i=a("8f33"),c=a("262e"),l=a("ff2d"),u=a("bc3a"),p=a.n(u),d=a("f121"),h=a.n(d),m=function(e){function t(){var e;return Object(s["a"])(this,t),e=Object(i["a"])(this,t),p.a.defaults.baseURL=h.a.Host85,e}return Object(c["a"])(t,e),Object(o["a"])(t,[{key:"rewardStatisticsList",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/sales/reward/statistics",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"rewardSearchList",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/sales/reward/search/list",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"rewardDeduction",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/sales/reward/deduction",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commissionSearchList",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/agent/balance/commission/search/list",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"salesLeaderAllList",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/sales/leader/all/list",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"salesPerformanceList",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/trade/sales/performance/list",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"sendPerformanceManagerReport",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/trade/sales/performance/manager/send",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"sendPerformanceReport",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/trade/sales/performance/send",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"statisticsPerformance",value:function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(){var t,a,n=arguments;return Object(r["a"])().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("/trade/sales/performance/statistics",t);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}])}(l["a"]);t["a"]=new m},"4cc8":function(e,t,a){"use strict";a.r(t);a("b0c0"),a("ac1f"),a("841c"),a("498a");var r=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"system_ConfigChanges","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[t("div",{staticClass:"crm_search"},[t("el-form",{ref:"form",attrs:{"label-position":"",model:e.search.search,"label-width":""}},[t("el-row",[t("el-col",{attrs:{span:24,md:24,lg:24}},[t("el-form-item",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[t("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Dashboard.Commission.Name")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)}},model:{value:e.search.name,callback:function(t){e.$set(e.search,"name","string"===typeof t?t.trim():t)},expression:"search.name"}},[t("template",{slot:"prepend"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Dashboard.Commission.Name",expression:"'Dashboard.Commission.Name'"}],staticClass:"crm-cursor"})])],2)],1),t("el-form-item",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[t("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Dashboard.Commission.CId")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)}},model:{value:e.search.cId,callback:function(t){e.$set(e.search,"cId","string"===typeof t?t.trim():t)},expression:"search.cId"}},[t("template",{slot:"prepend"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Dashboard.Commission.CId",expression:"'Dashboard.Commission.CId'"}],staticClass:"crm-cursor"})])],2)],1),t("el-form-item",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[t("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Dashboard.Commission.WithdrawIbNo")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)}},model:{value:e.search.withdrawIbNo,callback:function(t){e.$set(e.search,"withdrawIbNo","string"===typeof t?t.trim():t)},expression:"search.withdrawIbNo"}},[t("template",{slot:"prepend"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Dashboard.Commission.WithdrawIbNo",expression:"'Dashboard.Commission.WithdrawIbNo'"}],staticClass:"crm-cursor"})])],2)],1),t("el-form-item",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[t("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Dashboard.Commission.DepositIbNo")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)}},model:{value:e.search.depositIbNo,callback:function(t){e.$set(e.search,"depositIbNo","string"===typeof t?t.trim():t)},expression:"search.depositIbNo"}},[t("template",{slot:"prepend"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Dashboard.Commission.DepositIbNo",expression:"'Dashboard.Commission.DepositIbNo'"}],staticClass:"crm-cursor"})])],2)],1),t("el-form-item",[t("el-date-picker",{staticClass:"crm-border-radius-no",attrs:{type:"daterange",size:"small","start-placeholder":e.$t("Dashboard.Commission.AddTime"),"end-placeholder":e.$t("Dashboard.Commission.AddTime"),"unlink-panels":""},on:{change:e.handleDateChange},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1),t("el-form-item",[t("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1)],1)],1),t("el-form-item",{staticStyle:{float:"right"}},[e.display["DataRetrieval.R-actingList-Export"].show?t("el-button",{staticClass:"crm-border-radius-no",attrs:{size:"small",type:"primary",icon:"el-icon-download",loading:e.exportLoading},on:{click:e.exportData}},[e._v(e._s(e.$t("Btn.Export")))]):e._e()],1)],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.displayTableData,stripe:"","row-class-name":e.getRowClassName}},[t("el-table-column",{attrs:{prop:"cId",align:"left",label:e.$t("Dashboard.Commission.CId")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.cId||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"pIbNo",align:"left",label:e.$t("Dashboard.Commission.PIbNo")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.pIbNo||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"withdrawIbNo",align:"left",label:e.$t("Dashboard.Commission.WithdrawIbNo")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.withdrawIbNo||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"name",align:"left",label:e.$t("Dashboard.Commission.Name")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.name||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"withdrawAmount",align:"left",label:e.$t("Dashboard.Commission.WithdrawAmount")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatNumber(t.row.withdrawAmount)||"0")+" ")]}}])}),t("el-table-column",{attrs:{prop:"withdrawCurrency",align:"left",label:e.$t("Dashboard.Commission.WithdrawCurrency")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.withdrawCurrency||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"depositIbNo",align:"left",label:e.$t("Dashboard.Commission.DepositIbNo")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.depositIbNo||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"depositAmount",align:"left",label:e.$t("Dashboard.Commission.DepositAmount")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatNumber(t.row.depositAmount)||"0")+" ")]}}])}),t("el-table-column",{attrs:{prop:"depositCurrency",align:"left",label:e.$t("Dashboard.Commission.DepositCurrency")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.depositCurrency||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"addTime",align:"left",label:e.$t("Dashboard.Commission.AddTime")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.addTime||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"status",align:"left",label:e.$t("Dashboard.Commission.Status")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:e.getStatusClass(a.row.status)},[e._v(" "+e._s(e.getStatusText(a.row.status))+" ")])]}}])})],1),e.mock_tableData.length>0&&e.status?t("div",{staticClass:"crm_pagination"},[t("div",{staticClass:"crm_page_total"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),t("span",[e._v(e._s(e.pagerInfo.rowTotal))]),t("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),t("el-pagination",{staticClass:"page",attrs:{background:"",layout:"sizes, prev, pager, next","page-sizes":[10,20,50,100],"page-size":e.pagerInfo.row,total:e.pagerInfo.rowTotal,"current-page":e.pagerInfo.current},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1):e._e()],1)},n=[],s=a("5530"),o=a("c7eb"),i=a("1da1"),c=(a("99af"),a("14d9"),a("a9e3"),a("b64b"),a("d3b7"),a("3ca3"),a("466d"),a("4d90"),a("5319"),a("ddb0"),a("2b3d"),a("bf19"),a("9861"),a("88a7"),a("271a"),a("5494"),a("bc3a")),l=a.n(c),u=a("3160"),p=a("f121"),d=a.n(p),h=d.a.Code,m={name:"SalesRewardStatistics",props:{status:{type:Boolean,default:!0}},components:{},data:function(){return{info:{},exportLoading:!1,pictLoading:!1,week:"",dateRange:[],mock_tableData:[],search:{name:"",cId:"",withdrawIbNo:"",depositIbNo:"",startDate:"",endDate:""},yearOptions:[],pagerInfo:{row:15,current:1,pageTotal:0,rowTotal:0}}},computed:{display:function(){return this.Session.GetDisplay()},displayTableData:function(){return this.mock_tableData}},methods:{exportData:function(){var e=this;return Object(i["a"])(Object(o["a"])().mark((function t(){var a,r,n,s,i,c,u,p;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.exportLoading=!0,t.prev=1,(e.search.startDate||e.search.endDate)&&(e.search.startDate&&(e.search.startDate=e.search.startDate.split("-")[0]+e.search.startDate.split("-")[1]+e.search.startDate.split("-")[2]),e.search.endDate&&(e.search.endDate=e.search.endDate.split("-")[0]+e.search.endDate.split("-")[1]+e.search.endDate.split("-")[2])),a={name:e.search.name||"",cId:e.search.cId||"",startDate:e.search.startDate||"",endDate:e.search.endDate||"",withdrawIbNo:e.search.withdrawIbNo||"",depositIbNo:e.search.depositIbNo||""},t.next=6,l.a.get("/agent/balance/commission/search/list/export",{params:a,responseType:"blob",baseURL:d.a.Host85,headers:{"Access-Token":sessionStorage.getItem("access_token"),Language:sessionStorage.getItem("lang"),CLIENT:sessionStorage.getItem("CLIENT"),"Content-Type":"application/json"}});case 6:r=t.sent,n=new Blob([r.data],{type:r.headers["content-type"]||"application/octet-stream"}),s=window.URL.createObjectURL(n),i=document.createElement("a"),i.href=s,c=r.headers&&r.headers["content-disposition"],u="commission_list_export.xlsx",c&&(p=c.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),p&&p[1]&&(u=p[1].replace(/['"]/g,""))),i.download=u,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(s),t.next=24;break;case 21:t.prev=21,t.t0=t["catch"](1),console.error("Export error:",t.t0);case 24:return t.prev=24,e.exportLoading=!1,t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[1,21,24,27]])})))()},initYearOptions:function(){var e=(new Date).getFullYear();this.yearOptions=[];for(var t=e-5;t<=e+2;t++)this.yearOptions.push(t)},searchFunc:function(){var e=this;return Object(i["a"])(Object(o["a"])().mark((function t(){var a;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,t.prev=1,e.display["DataRetrieval.R-actingList-Search"]&&e.display["DataRetrieval.R-actingList-Search"].show){t.next=6;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 6:t.next=14;break;case 8:return t.prev=8,t.t0=t["catch"](1),console.error("Error checking display permissions:",t.t0),e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 14:return t.next=16,u["a"].commissionSearchList(Object(s["a"])(Object(s["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 16:a=t.sent,a.code==h.StatusOK?(e.mock_tableData=a.data,null!=a.page?(e.pagerInfo.rowTotal=a.page.rowTotal,e.pagerInfo.pageTotal=a.page.pageTotal):(e.pagerInfo.rowTotal=a.data?a.data.length:0,e.pagerInfo.pageTotal=1),e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess"))):e.$pigeon.MessageError(a.msg),e.pictLoading=!1;case 19:case"end":return t.stop()}}),t,null,[[1,8]])})))()},hasSearchCondition:function(){return this.search.name&&this.search.name.trim()||this.search.cId&&this.search.cId.trim()||this.search.withdrawIbNo&&this.search.withdrawIbNo.trim()||this.search.depositIbNo&&this.search.depositIbNo.trim()||this.search.startDate&&this.search.endDate},toSearch:function(){this.hasSearchCondition()?(this.pagerInfo.current=1,this.searchFunc()):this.$pigeon.MessageWarning(this.$i18n.t("Msg.searchCriteria"))},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()},formatDate:function(e){var t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)},formatNumber:function(e){return null===e||void 0===e||""===e?"0":Number(e).toLocaleString()},getRowClassName:function(){return""},getStatusText:function(e){switch(e){case 1:return this.$t("Dashboard.Commission.Status-Processing");case 2:return this.$t("Dashboard.Commission.Status-Approved");case 3:return this.$t("Dashboard.Commission.Status-Rejected");default:return"--"}},getStatusClass:function(e){switch(e){case 1:return"status-processing";case 2:return"status-approved";case 3:return"status-rejected";default:return""}},handleDateChange:function(e){e&&2===e.length?(this.search.startDate=this.formatDate(e[0]),this.search.endDate=this.formatDate(e[1])):(this.search.startDate="",this.search.endDate="")}},mounted:function(){this.initYearOptions()},created:function(){this.info=JSON.parse(sessionStorage.getItem("info"))}},f=m,b=(a("e8ea"),a("8166"),a("2877")),g=Object(b["a"])(f,r,n,!1,null,"782d3f3b",null);t["default"]=g.exports},"4d90":function(e,t,a){"use strict";var r=a("23e7"),n=a("0ccb").start,s=a("9a0c");r({target:"String",proto:!0,forced:s},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},"6b08":function(e,t,a){},8166:function(e,t,a){"use strict";a("d60d")},"9a0c":function(e,t,a){"use strict";var r=a("b5db");e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},d60d:function(e,t,a){},e8ea:function(e,t,a){"use strict";a("6b08")}}]);
|