| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["positionQuery"],{"0ccb":function(e,t,a){"use strict";var r=a("e330"),n=a("50c4"),o=a("577e"),i=a("1148"),s=a("1d80"),l=r(i),c=r("".slice),p=Math.ceil,d=function(e){return function(t,a,r){var i,d,u=o(s(t)),m=n(a),h=u.length,f=void 0===r?" ":o(r);return m<=h||""===f?u:(i=m-h,d=l(f,p(i/f.length)),d.length>i&&(d=c(d,0,i)),e?u+d:d+u)}};e.exports={start:d(!1),end:d(!0)}},17096:function(e,t,a){},"4d90":function(e,t,a){"use strict";var r=a("23e7"),n=a("0ccb").start,o=a("9a0c");r({target:"String",proto:!0,forced:o},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},"7f86":function(e,t,a){"use strict";a("17096")},"9a0c":function(e,t,a){"use strict";var r=a("b5db");e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},af99:function(e,t,a){"use strict";a.r(t);a("99af"),a("4de4"),a("d81d"),a("b0c0"),a("e9f5"),a("ab43"),a("d3b7"),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:"report_PositionQuery","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[t("div",{staticClass:"crm_search"},[t("el-form",{ref:"search",attrs:{"label-position":"",model:e.search,"label-width":""}},[t("el-row",[t("el-col",{attrs:{span:24,md:24,lg:24}},[t("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{prop:"platform"}},[t("div",{staticClass:"chooseLang"},[t("span",{staticClass:"crm-cursor",class:{active:"MT4"==e.search.platform},on:{click:function(t){return e.chooseLang("MT4")}}},[e._v("MT4")]),t("span",{staticClass:"crm-cursor",class:{active:"MT5"==e.search.platform},on:{click:function(t){return e.chooseLang("MT5")}}},[e._v("MT5")])])]),t("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{prop:""}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[t("el-input",{staticClass:"crm-border-radius-no",staticStyle:{width:"160px"},attrs:{placeholder:e.$t("Placeholder.Input"),size:"small"},model:{value:e.newIb,callback:function(t){e.newIb="string"===typeof t?t.trim():t},expression:"newIb"}}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Search",expression:"'Btn.Search'"}],staticClass:"dialogCheckSearch crm-cursor crm_state_blue",on:{click:function(t){return e.searchIbTreeSearch1(e.newIb)}}}),t("el-cascader",{staticClass:"crm-border-radius-no crm_select_icon",staticStyle:{width:"200px"},attrs:{props:e.props,options:e.agentId_options,placeholder:e.$t("Enter_info.All"),size:"small"},on:{"expand-change":e.handleItemChange},scopedSlots:e._u([{key:"default",fn:function(a){a.node;var r=a.data;return[t("div",[t("span",[e._v(e._s(r.label))]),r.name?t("span",[e._v(" - "+e._s(r.name)+" ")]):e._e()])]}}]),model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)]),t("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{prop:"isShort"}},[t("el-select",{staticClass:"crm-border-radius-no crm_select_icon",staticStyle:{"min-width":"100px"},attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.isShort,callback:function(t){e.$set(e.search,"isShort",t)},expression:"search.isShort"}},[t("el-option",{attrs:{label:e.$t("State.All"),value:0}}),t("el-option",{attrs:{label:e.$t("Label.item1"),value:1}}),t("el-option",{attrs:{label:e.$t("Label.item2"),value:2}})],1)],1),t("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{prop:"groupType"}},[t("el-select",{staticClass:"crm-border-radius-no crm_select_icon",staticStyle:{"min-width":"140px"},attrs:{size:"small",placeholder:e.$t("Label.LoginType")},on:{change:e.toSearch},model:{value:e.search.groupType,callback:function(t){e.$set(e.search,"groupType",e._n(t))},expression:"search.groupType"}},[t("el-option",{attrs:{label:e.$t("State.All"),value:0}}),t("el-option",{attrs:{label:e.$t("AccountType.SeniorAccount"),value:2}}),t("el-option",{attrs:{label:e.$t("AccountType.NewSpeedAccount"),value:6}}),t("el-option",{attrs:{label:e.$t("AccountType.StandardAccount"),value:7}}),t("el-option",{attrs:{label:e.$t("AccountType.CentAccount"),value:8}})],1)],1),t("el-form-item",{attrs:{prop:"date"}},[t("el-date-picker",{staticClass:"crm_date_pick crm-border-radius-no",attrs:{type:"daterange",align:"right","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"-",size:"small","start-placeholder":e.$t("Placeholder.Start"),"end-placeholder":e.$t("Placeholder.End"),"picker-options":e.pickerOptions},model:{value:e.search.date,callback:function(t){e.$set(e.search,"date",t)},expression:"search.date"}}),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.allDate}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Web_info.All",expression:"'Web_info.All'"}]})])],1)],1)],1),t("el-form-item",[t("el-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",size:"small"},on:{click:e.toSearch}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Label.GenerateReport",expression:"'Label.GenerateReport'"}]})]),t("el-dropdown",{staticStyle:{margin:"0 8px"},attrs:{trigger:"click"},on:{command:e.handleCommand}},[t("span",{staticClass:"el-dropdown-link crm-cursor"},[t("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.display["R-Data-Details-Export"].show?t("el-dropdown-item",{attrs:{command:{type:"export"}}},[t("i",{staticClass:"el-icon-download"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Export",expression:"'Btn.Export'"}]})]):e._e()],1)],1)],1)],1)],1),t("el-table",{staticClass:"position-query-table",staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,"show-summary":"","summary-method":e.getSummaries,stripe:"",border:""},on:{"sort-change":e.handleSortChange}},[t("el-table-column",{attrs:{"min-width":"100",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.cId||"--"),placement:"top",disabled:!a.row.cId||"--"===a.row.cId}},[t("span",[e._v(e._s(a.row.cId||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$i18n.t("Label.CidAccount")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.cId,expression:"search.cId",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.cId},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"cId",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"150",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.customName||"--"),placement:"top",disabled:!a.row.customName||"--"===a.row.customName}},[t("span",[e._v(e._s(a.row.customName||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("R-Data-CustomerName")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.customName,expression:"search.customName",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.customName},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"customName",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"100",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.login||"--"),placement:"top",disabled:!a.row.login||"--"===a.row.login}},[t("span",[e._v(e._s(a.row.login||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.TradingAccount")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.login,expression:"search.login",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.login},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"login",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"100",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(e.groupTypeName(a.row.groupType)),placement:"top"}},[t("span",[e._v(e._s(e.groupTypeName(a.row.groupType)))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("system_info.Label.AccountType")))]),t("select",{directives:[{name:"model",rawName:"v-model.number",value:e.search.groupType,expression:"search.groupType",modifiers:{number:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box","background-color":"#fff"},on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(t){var a="_value"in t?t._value:t.value;return e._n(a)}));e.$set(e.search,"groupType",t.target.multiple?a:a[0])},e.toSearch]}},[t("option",{domProps:{value:0}},[e._v(e._s(e.$t("State.All")))]),t("option",{domProps:{value:2}},[e._v(e._s(e.$t("AccountType.SeniorAccount")))]),t("option",{domProps:{value:6}},[e._v(" "+e._s(e.$t("AccountType.NewSpeedAccount"))+" ")]),t("option",{domProps:{value:7}},[e._v(" "+e._s(e.$t("AccountType.StandardAccount"))+" ")]),t("option",{domProps:{value:8}},[e._v(e._s(e.$t("AccountType.CentAccount")))])])])])],2),t("el-table-column",{attrs:{"min-width":"120",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.ibNo||"--"),placement:"top",disabled:!a.row.ibNo||"--"===a.row.ibNo}},[t("span",[e._v(e._s(a.row.ibNo||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.AgentNumber")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.ibNo,expression:"search.ibNo",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.ibNo},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"ibNo",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"120",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.salesNo||"--"),placement:"top",disabled:!a.row.salesNo||"--"===a.row.salesNo}},[t("span",[e._v(e._s(a.row.salesNo||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.Encode")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.salesNo,expression:"search.salesNo",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.salesNo},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"salesNo",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"120",prop:"",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.salesName||"--"),placement:"top",disabled:!a.row.salesName||"--"===a.row.salesName}},[t("span",[e._v(e._s(a.row.salesName||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.SalesName")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.salesName,expression:"search.salesName",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.salesName},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"salesName",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"100",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.OrderNumber")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.order||"--"),placement:"top",disabled:!a.row.order||"--"===a.row.order}},[t("span",[e._v(e._s(a.row.order||"--"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"80",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.Platform")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.platform||"--"),placement:"top",disabled:!a.row.platform||"--"===a.row.platform}},[t("span",[e._v(e._s(a.row.platform||"--"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"120",prop:"cmdName",sortable:"custom",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.cmdName||"--"),placement:"top",disabled:!a.row.cmdName||"--"===a.row.cmdName}},[t("span",[e._v(e._s(a.row.cmdName||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.Type")))]),t("select",{directives:[{name:"model",rawName:"v-model.number",value:e.search.cmdName,expression:"search.cmdName",modifiers:{number:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box","background-color":"#fff"},on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(t){var a="_value"in t?t._value:t.value;return e._n(a)}));e.$set(e.search,"cmdName",t.target.multiple?a:a[0])},e.toSearch]}},[t("option",{domProps:{value:null}},[e._v(e._s(e.$t("State.All")))]),t("option",{domProps:{value:0}},[e._v("buy")]),t("option",{domProps:{value:1}},[e._v("sell")]),t("option",{domProps:{value:2}},[e._v("buy limit")]),t("option",{domProps:{value:3}},[e._v("sell limit")]),t("option",{domProps:{value:4}},[e._v("buy stop")]),t("option",{domProps:{value:5}},[e._v("sell stop")]),t("option",{domProps:{value:6}},[e._v("balance")]),t("option",{domProps:{value:7}},[e._v("credit")])])])])],2),t("el-table-column",{attrs:{"min-width":"120",prop:"symbol",sortable:"custom",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.symbol||"--"),placement:"top",disabled:!a.row.symbol||"--"===a.row.symbol}},[t("span",[e._v(e._s(a.row.symbol||"--"))])])]}}])},[t("template",{slot:"header"},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center",gap:"4px"}},[t("span",{staticStyle:{"font-weight":"500"}},[e._v(e._s(e.$t("Label.Varieties")))]),t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.search.symbol,expression:"search.symbol",modifiers:{trim:!0}}],staticStyle:{width:"100%",padding:"4px 8px","font-size":"12px",border:"1px solid #dcdfe6","border-radius":"4px","box-sizing":"border-box"},attrs:{placeholder:e.$t("Placeholder.Input")},domProps:{value:e.search.symbol},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.search,"symbol",t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})])])],2),t("el-table-column",{attrs:{"min-width":"100",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.OpenPrice")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.openPrice||"--"),placement:"top",disabled:!a.row.openPrice||"--"===a.row.openPrice}},[t("span",[e._v(e._s(a.row.openPrice||"--"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"120",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.OpenTime")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.openTime||"--"),placement:"top",disabled:!a.row.openTime||"--"===a.row.openTime}},[t("span",[e._v(e._s(a.row.openTime||"--"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"80",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.EP")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.tp||"0"),placement:"top",disabled:!a.row.tp||"0"===a.row.tp}},[t("span",[e._v(e._s(a.row.tp||"0"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"80",prop:"",align:"center","header-align":"center",label:e.$i18n.t("Label.EL")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.sl||"0"),placement:"top",disabled:!a.row.sl||"0"===a.row.sl}},[t("span",[e._v(e._s(a.row.sl||"0"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"100",prop:"commission",sortable:"custom",align:"center","header-align":"center",label:e.$i18n.t("news_add_field.Report_info.Commission")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.commission||"0"),placement:"top",disabled:!a.row.commission||"0"===a.row.commission}},[t("span",[e._v(e._s(a.row.commission||"0"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"100",prop:"volume",sortable:"custom",align:"center","header-align":"center",label:e.$i18n.t("Label.Volume")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.volume||"0","/").concat(e.$t("Dashboard.Stand.Lot")),placement:"top"}},[t("span",[e._v(e._s(a.row.volume||"0")+"/"),t("span",{directives:[{name:"t",rawName:"v-t",value:"Dashboard.Stand.Lot",expression:"'Dashboard.Stand.Lot'"}]})])])]}}])}),t("el-table-column",{attrs:{"min-width":"100",prop:"storage",sortable:"custom",align:"center","header-align":"center",label:e.$i18n.t("Label.StorageFee")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"$".concat(a.row.storage||"0"),placement:"top"}},[t("span",[e._v("$"+e._s(a.row.storage||"0"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"100",prop:"profit",sortable:"custom",align:"center","header-align":"center",label:e.$i18n.t("Label.ProfitLoss")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"$".concat(a.row.profit||"0"),placement:"top"}},[t("span",[e._v("$"+e._s(a.row.profit||"0"))])])]}}])}),t("el-table-column",{attrs:{"min-width":"120",prop:"comment",align:"center","header-align":"center",label:e.$t("Cooperative.Agent.Remarks")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tooltip",{attrs:{content:"".concat(a.row.comment||"--"),placement:"top",disabled:!a.row.comment||"--"===a.row.comment}},[t("span",[e._v(e._s(a.row.comment||"--"))])])]}}])})],1),e.pagerInfo.rowTotal?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},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1):e._e()],1)},n=[],o=a("5530"),i=a("c7eb"),s=a("1da1"),l=(a("14d9"),a("7d54"),a("a732"),a("b64b"),a("25f0"),a("3ca3"),a("4d90"),a("159b"),a("ddb0"),a("2b3d"),a("bf19"),a("9861"),a("88a7"),a("271a"),a("5494"),a("bc3a")),c=a.n(l),p=a("4477"),d=a("f121"),u=a.n(d),m=u.a.Code,h={name:"PositionQuery",data:function(){return{pictLoading:!1,mock_tableData:[],search:{reportType:3,agentId:null,groupType:null,login:"",cId:"",customName:"",ibNo:"",symbol:"",cmdName:"",platform:"MT4",salesNo:"",salesName:"",dwType:null,customType:0,rankingType:1,loginTypes:[],isShort:0,detail_type:4,date:[],startDate:"",endDate:"",orderColumn:null,orderType:null},combined:{},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},newIb:"",value:[],agentId_options:[{value:0,label:this.$i18n.t("news_add_field.IbReport.ALL")},{value:-1,label:this.$i18n.t("news_add_field.IbReport.DirectlyUnder")}],props:{value:"value",children:"children",checkStrictly:!0},child:[],flag:!1}},computed:{display:function(){return JSON.parse(this.Session.Get("display",!0))},user:function(){return JSON.parse(this.Session.Get("user",!0))},pickerOptions:function(){var e=this,t=new Date;return t.setHours(23,59,59,999),{disabledDate:function(e){var a=e.getTime();return a>t.getTime()},shortcuts:[{text:"本周",onClick:function(){e.setQuickDate("thisWeek")}},{text:"上周",onClick:function(){e.setQuickDate("lastWeek")}},{text:"本月",onClick:function(){e.setQuickDate("thisMonth")}},{text:"上月",onClick:function(){e.setQuickDate("lastMonth")}},{text:"近三个月",onClick:function(){e.setQuickDate("threeMonths")}},{text:"一年",onClick:function(){e.setQuickDate("oneYear")}}]}}},filters:{NumberFormat:function(e){if("***"==e)return"***";if(isNaN(e))return 0;var t=e.toString();if(t.indexOf("-")>-1){t=t.split("-")[1];var a=t.split("."),r=a[0].length;if(r<3)return e;for(var n=0,o="",i=r-3;i>=0;i-=3)o=a[0].substr(i,3)+(""==o?"":",")+o,n=i;return n>0&&(o=a[0].substr(0,n)+(""==o?"":",")+o),"-"+o+(1==a.length?"":"."+a[1])}var s=t.split("."),l=s[0].length;if(l<3)return e;for(var c=0,p="",d=l-3;d>=0;d-=3)p=s[0].substr(d,3)+(""==p?"":",")+p,c=d;return c>0&&(p=s[0].substr(0,c)+(""==p?"":",")+p),p+(1==s.length?"":"."+s[1])}},methods:{NumberFormatAll:function(e){if("***"==e)return"***";if(isNaN(e))return 0;var t=e.toString();if(t.indexOf("-")>-1){t=t.split("-")[1];var a=t.split("."),r=a[0].length;if(r<3)return e;for(var n=0,o="",i=r-3;i>=0;i-=3)o=a[0].substr(i,3)+(""==o?"":",")+o,n=i;return n>0&&(o=a[0].substr(0,n)+(""==o?"":",")+o),"-"+o+(1==a.length?"":"."+a[1])}var s=t.split("."),l=s[0].length;if(l<3)return e;for(var c=0,p="",d=l-3;d>=0;d-=3)p=s[0].substr(d,3)+(""==p?"":",")+p,c=d;return c>0&&(p=s[0].substr(0,c)+(""==p?"":",")+p),p+(1==s.length?"":"."+s[1])},getSummaries:function(){var e=[];return 0==Object.keys(this.combined).length||(e=[this.$i18n.t("Label.Total"),"","","","","","","","","","","","","","",this.combined.commission?this.NumberFormatAll(this.combined.commission):0,this.combined.volume?this.NumberFormatAll(this.combined.volume):0,this.combined.storage?this.NumberFormatAll(this.combined.storage):0,this.combined.profit?this.NumberFormatAll(this.combined.profit):0,""]),e},chooseLang:function(e){this.search.platform=e,this.searchFunc()},handleItemChange:function(e){this.child=this.agentId_options;for(var t=0;t<e.length;t++)this.tree(e[t],this.child)},tree:function(){var e=Object(s["a"])(Object(i["a"])().mark((function e(t,a){var r,n,o,s=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=Object(i["a"])().mark((function e(r){var n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(null!=a[r].children&&a[r].children.length>0&&a[r].value==t)){e.next=3;break}return s.child=a[r].children,e.abrupt("return",{v:void 0});case 3:if(a[r].value!=t){e.next=15;break}return e.next=6,p["a"].ibTree({pid:t});case 6:if(n=e.sent,n.code!=m.StatusOK){e.next=14;break}if(null==n.data){e.next=12;break}return n.data.forEach((function(e){if(e.ibNo){var t={};t.value=e.id,t.label=e.ibNo,t.name=e.name,t.children=[],a[r].children.push(t)}})),s.child=a[r].children,e.abrupt("return",{v:void 0});case 12:e.next=15;break;case 14:s.$pigeon.MessageError(n.msg);case 15:case"end":return e.stop()}}),e)})),o=0;case 2:if(!(o<a.length)){e.next=10;break}return e.delegateYield(r(o),"t0",4);case 4:if(n=e.t0,!n){e.next=7;break}return e.abrupt("return",n.v);case 7:o++,e.next=2;break;case 10:case"end":return e.stop()}}),e)})));function t(t,a){return e.apply(this,arguments)}return t}(),searchIbTree:function(){var e=this;return Object(s["a"])(Object(i["a"])().mark((function t(){var a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,p["a"].ibTree({pid:0});case 2:a=t.sent,a.code==m.StatusOK?null!=a.data&&a.data.forEach((function(t){if(t.ibNo){var a={};a.value=t.id,a.label=t.ibNo,a.name=t.name,a.children=[],e.agentId_options.push(a)}})):e.$pigeon.MessageError(a.msg);case 4:case"end":return t.stop()}}),t)})))()},searchIbTreeSearch1:function(e){var t=this;return Object(s["a"])(Object(i["a"])().mark((function a(){var r,n;return Object(i["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(e){a.next=2;break}return a.abrupt("return");case 2:if(r=t.agentId_options.some((function(t){return t.label==e})),!r){a.next=5;break}return a.abrupt("return");case 5:return a.next=7,p["a"].ibTreeSearch({ibNo:e});case 7:n=a.sent,n.code==m.StatusOK?(null!=n.data&&n.data.forEach((function(e){if(e.ibNo){var a={};a.value=e.id,a.label=e.ibNo,a.name=e.name,a.children=[],t.agentId_options.unshift(a)}})),t.$pigeon.MessageOK(t.$i18n.t("Msg.SearchSuccess"))):t.$pigeon.MessageError(n.msg);case 9:case"end":return a.stop()}}),a)})))()},searchFunc:function(){var e=this;return Object(s["a"])(Object(i["a"])().mark((function t(){var a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,t.prev=1,e.display["R-PositionQuery-Search"]&&e.display["R-PositionQuery-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:if(e.search.startDate&&e.search.endDate){t.next=18;break}return e.$pigeon.MessageWarning(e.$i18n.t("vaildate.date.empty")),e.pictLoading=!1,t.abrupt("return");case 18:return t.next=20,p["a"].tradePosition(Object(o["a"])(Object(o["a"])({},e.search),{},{orderColumn:e.search.orderColumn||null,orderType:e.search.orderType||null,page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 20:a=t.sent,a.code==m.StatusOK?(null!=a.sum?e.combined=a.sum:e.combined={},null!=a.data?e.mock_tableData=a.data:e.mock_tableData=[],null!=a.page?(e.pagerInfo.rowTotal=a.page.rowTotal,e.pagerInfo.pageTotal=a.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess")),e.pictLoading=!1):(e.$pigeon.MessageError(a.msg),e.pictLoading=!1),e.pictLoading=!1;case 23:case"end":return t.stop()}}),t,null,[[1,8]])})))()},toSearch:function(){null==this.search.date||0==this.search.date.length?(this.search.startDate="",this.search.endDate=""):(this.search.startDate=this.search.date[0],this.search.endDate=this.search.date[1]),this.pagerInfo.current=1,this.searchFunc()},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()},exportAgents:function(){var e=this;return Object(s["a"])(Object(i["a"])().mark((function t(){var a,r,n,o;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.flag){t.next=4;break}return t.abrupt("return");case 4:e.flag=!0;case 5:if(e.search.startDate&&e.search.endDate){t.next=9;break}return e.$pigeon.MessageWarning(e.$i18n.t("vaildate.date.empty")),e.flag=!1,t.abrupt("return");case 9:a=e.search.startDate.split("-")[0]+e.search.startDate.split("-")[1]+e.search.startDate.split("-")[2],r=e.search.endDate.split("-")[0]+e.search.endDate.split("-")[1]+e.search.endDate.split("-")[2],n=e.Session.Get("lang"),o="/trade/position/export?platform="+(e.search.platform?e.search.platform:0)+"&isShort="+e.search.isShort+"&lang="+(n||"cn")+"&agentId="+(e.search.agentId?e.search.agentId:"")+"&cId="+(e.search.cId?e.search.cId:"")+"&ibNo="+(e.search.ibNo?e.search.ibNo:"")+"&login="+(e.search.login?e.search.login:0)+"&startDate="+a+"&endDate="+r,c.a.get(o,{responseType:"blob"}).then((function(t){if(t.status==m.StatusOK)if("msSaveOrOpenBlob"in navigator)window.navigator.msSaveOrOpenBlob(t.data,"Download.xlsx"),e.flag=!1;else{var a=window.URL.createObjectURL(t.data),r=document.createElement("a");document.body.appendChild(r);var n=t.headers["content-disposition"]?t.headers["content-disposition"].split(";")[1].split("=")[1]:"Download.xlsx";r.href=a,r.download=n,r.click(),window.URL.revokeObjectURL(a),e.flag=!1}else e.$pigeon.MessageError(e.$i18n.t("Msg.Download")),e.flag=!1}));case 14:case"end":return t.stop()}}),t)})))()},handleCommand:function(e){"export"==e.type&&this.exportAgents()},allDate:function(){var e="",t=(new Date).getFullYear(),a=(new Date).getMonth()+1,r=(new Date).getDate();a<10&&(a="0"+a),r<10&&(r="0"+r),e=t+"-"+a+"-"+r,this.search.date=["1970-01-01",e]},setQuickDate:function(e){var t,a,r=2,n=(new Date).getTimezoneOffset(),o=(new Date).getTime(),i=new Date(o+60*n*1e3+60*r*60*1e3),s=i.getFullYear(),l=i.getMonth()+1;switch(e){case"thisWeek":var c=i.getDay(),p=0===c?-6:1-c,d=new Date(i);d.setDate(d.getDate()+p),t=this.formatDateForQuick(d),a=this.formatDateForQuick(i);break;case"lastWeek":var u=i.getDay(),m=0===u?-6:1-u,h=new Date(i);h.setDate(h.getDate()+m-7);var f=new Date(h);f.setDate(f.getDate()+6),t=this.formatDateForQuick(h),a=this.formatDateForQuick(f);break;case"thisMonth":t=s+"-"+(l<10?"0"+l:l)+"-01",a=this.formatDateForQuick(i);break;case"lastMonth":var g=l-1,b=s;0===g&&(g=12,b=s-1);var v=new Date(b,g-1,1),w=new Date(b,g+1,0);t=this.formatDateForQuick(v),a=this.formatDateForQuick(w);break;case"threeMonths":var y=l-2,x=s;y<=0&&(y+=12,x-=1);var _=new Date(x,y-1,1);a=this.formatDateForQuick(i),t=this.formatDateForQuick(_);break;case"oneYear":var k=new Date(i);k.setFullYear(k.getFullYear()-1),t=this.formatDateForQuick(k),a=this.formatDateForQuick(i);break}this.search.date=[t,a]},formatDateForQuick:function(e){var t=e.getFullYear(),a=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)},getDate:function(){var e=(new Date).getFullYear(),t=(new Date).getMonth()+1,a=t<10?"0"+t:t,r=e+"-"+a+"-01",n=new Date(e,t,0).getDate(),o=e+"-"+a+"-"+(n<10?"0"+n:n);this.search.date=[r,o]},groupTypeName:function(e){return"1"==e?this.$i18n.t("AccountType.ClassicAccount"):"2"==e?this.$i18n.t("AccountType.SeniorAccount"):"3"!=e?"5"==e?this.$i18n.t("AccountType.SpeedAccount"):"6"==e?this.$i18n.t("AccountType.NewSpeedAccount"):"7"==e?this.$i18n.t("AccountType.StandardAccount"):"8"==e?this.$i18n.t("AccountType.CentAccount"):"--":void 0},handleSortChange:function(e){var t=e.prop,a=e.order;if(a){var r={symbol:"1",cmdName:"2",volume:"3",storage:"4",profit:"5",commission:"7"};this.search.orderColumn=r[t]||null,this.search.orderType="ascending"===a?"asc":"desc"}else this.search.orderColumn=null,this.search.orderType=null;this.pagerInfo.current=1,this.searchFunc()}},watch:{value:function(e){if(e){var t=e[e.length-1]||"";this.search.agentId=t}}},mounted:function(){var e=this;this.searchIbTree(),this.getDate(),this.$nextTick((function(){e.search.date&&e.search.date.length>0&&(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1],e.searchFunc())}))}},f=h,g=(a("7f86"),a("2877")),b=Object(g["a"])(f,r,n,!1,null,null,null);t["default"]=b.exports}}]);
|