| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f974519"],{"01b48":function(e,t,a){"use strict";a("7eba")},"0ccb":function(e,t,a){"use strict";var n=a("e330"),r=a("50c4"),c=a("577e"),o=a("1148"),i=a("1d80"),l=n(o),s=n("".slice),d=Math.ceil,u=function(e){return function(t,a,n){var o,u,p=c(i(t)),h=r(a),f=p.length,g=void 0===n?" ":c(n);return h<=f||""===g?p:(o=h-f,u=l(g,d(o/g.length)),u.length>o&&(u=s(u,0,o)),e?p+u:u+p)}};e.exports={start:u(!1),end:u(!0)}},1465:function(e,t,a){"use strict";a("72d3")},3835:function(e,t,a){"use strict";function n(e){if(Array.isArray(e))return e}a.d(t,"a",(function(){return i}));a("a4d3"),a("e01a"),a("d28b"),a("14d9"),a("d3b7"),a("3ca3"),a("ddb0");function r(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,c,o,i=[],l=!0,s=!1;try{if(c=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=c.call(a)).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a["return"]&&(o=a["return"](),Object(o)!==o))return}finally{if(s)throw r}}return i}}var c=a("06c5");a("d9e2");function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){return n(e)||r(e,t)||Object(c["a"])(e,t)||o()}},"3bc1":function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return e.pageInfo.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.pageInfo.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.pageInfo.row,total:e.pageInfo.rowTotal},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1):e._e()},r=[],c={name:"PagePagination",components:{},props:{pagerInfo:{type:Object,required:!0}},computed:{pageInfo:function(){return this.pagerInfo}},methods:{handleCurrentChange:function(e){this.$emit("current-change",e)},handleSizeChange:function(e){this.$emit("size-change",e)}}},o=c,i=a("2877"),l=Object(i["a"])(o,n,r,!1,null,"3121aa56",null);t["a"]=l.exports},"4d90":function(e,t,a){"use strict";var n=a("23e7"),r=a("0ccb").start,c=a("9a0c");n({target:"String",proto:!0,forced:c},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},"72d3":function(e,t,a){},"7eba":function(e,t,a){},"9a0c":function(e,t,a){"use strict";var n=a("b5db");e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},"9fdb":function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c"),a("498a");var n=function(){var e,t,a=this,n=a._self._c;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:a.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"card_Blockchain","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[n("div",{staticClass:"crm_search"},[n("el-form",{ref:"form",attrs:{"label-position":"",model:a.search,"label-width":""}},[n("el-row",[n("el-col",{attrs:{span:24,md:24,lg:24}},[n("el-form-item",{staticStyle:{"margin-right":"10px"}},[n("el-input",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:a.$t("Ucard.BlockchainRate.addP1")},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&a._k(e.keyCode,"enter",13,e.key,"Enter")?null:a.toSearch.apply(null,arguments)}},model:{value:a.search.currency,callback:function(e){a.$set(a.search,"currency","string"===typeof e?e.trim():e)},expression:"search.currency"}})],1),n("el-form-item",{staticStyle:{"margin-right":"10px"}},[n("el-input",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:a.$t("Ucard.BlockchainRate.addP2")},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&a._k(e.keyCode,"enter",13,e.key,"Enter")?null:a.toSearch.apply(null,arguments)}},model:{value:a.search.convertCurrency,callback:function(e){a.$set(a.search,"convertCurrency","string"===typeof e?e.trim():e)},expression:"search.convertCurrency"}})],1),n("el-form-item",{staticStyle:{"margin-right":"10px"}},[n("el-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:a.$t("Ucard.BlockchainRate.pageT3")},on:{change:a.toSearch},model:{value:a.search.enableStatus,callback:function(e){a.$set(a.search,"enableStatus",e)},expression:"search.enableStatus"}},a._l(a.enableStatus,(function(e,t){return n("el-option",{key:t,attrs:{label:a.$t(e),value:t}})})),1)],1),n("el-form-item",[n("el-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:a.$t("Ucard.BlockchainRate.pageT5")},on:{change:a.toSearch},model:{value:a.search.type,callback:function(e){a.$set(a.search,"type",e)},expression:"search.type"}},a._l(a.typeOpts,(function(e,t){return n("el-option",{key:t,attrs:{label:a.$t(e),value:t}})})),1)],1),n("el-form-item",[n("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:a.toSearch}})],1)],1)],1),n("el-form-item",[null!==(e=a.display["R-Card-BlockchainRate-Add"])&&void 0!==e&&e.show?n("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-plus"},on:{click:a.openAddDialog}},[a._v(" "+a._s(a.$t("R-Card-BlockchainRate-Add"))+" ")]):a._e(),null!==(t=a.display["R-Card-BlockchainRate-Delete"])&&void 0!==t&&t.show?n("el-button",{attrs:{size:"small",disabled:!a.multipleSelection.length,type:a.multipleSelection.length?"primary":"info",icon:"el-icon-minus"},on:{click:a.toDelete}},[a._v(" "+a._s(a.$t("R-Card-Blockchain-Delete"))+" ")]):a._e()],1)],1)],1),n("el-table",{staticStyle:{width:"100%"},attrs:{data:a.mock_tableData,stripe:""},on:{"selection-change":a.handleSelectionChange}},[n("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"currency",align:"left",label:a.$t("Ucard.BlockchainRate.pageT1")},scopedSlots:a._u([{key:"default",fn:function(e){return[a._v(" "+a._s(e.row.currency||"--")+" ")]}}])}),n("el-table-column",{attrs:{prop:"convertCurrency",align:"left",label:a.$t("Ucard.BlockchainRate.pageT2")},scopedSlots:a._u([{key:"default",fn:function(e){return[a._v(" "+a._s(e.row.convertCurrency||"--")+" ")]}}])}),n("el-table-column",{attrs:{prop:"exchangeRate",align:"left",label:a.$t("Ucard.BlockchainRate.pageT4")},scopedSlots:a._u([{key:"default",fn:function(e){return[a._v(" "+a._s(e.row.exchangeRate||"--")+" ")]}}])}),n("el-table-column",{attrs:{prop:"type",align:"left",label:a.$t("Ucard.BlockchainRate.pageT5")},scopedSlots:a._u([{key:"default",fn:function(e){return[a._v(" "+a._s(a.$t(a.typeOpts[e.row.type])||"--")+" ")]}}])}),n("el-table-column",{attrs:{prop:"enableStatus",align:"left",label:a.$t("Ucard.BlockchainRate.pageT3")},scopedSlots:a._u([{key:"default",fn:function(e){var t;return[n("el-switch",{staticClass:"crm_switch crm_switch_width",attrs:{disabled:!(null!==(t=a.display["R-Card-BlockchainRate-Edit"])&&void 0!==t&&t.show),"active-text":a.$t(a.enableStatus[1]),"active-value":1,"inactive-text":a.$t(a.enableStatus[0]),"inactive-value":0,"active-color":"#368FEC","inactive-color":"#EB3F57"},on:{change:function(t){return a.changeEnable(e.row)}},model:{value:e.row.enableStatus,callback:function(t){a.$set(e.row,"enableStatus",t)},expression:"scope.row.enableStatus"}})]}}])}),n("el-table-column",{attrs:{prop:"ctrl",align:"center",label:a.$t("Label.Action")},scopedSlots:a._u([{key:"default",fn:function(e){var t,r;return[n("el-dropdown",{attrs:{trigger:"click"},on:{command:a.handleCommand}},[n("span",{staticClass:"el-dropdown-link crm-cursor"},[n("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[null!==(t=a.display["R-Card-BlockchainRate-Edit"])&&void 0!==t&&t.show?n("el-dropdown-item",{attrs:{command:{type:"editor",row:e.row}}},[n("i",{staticClass:"el-icon-s-operation"}),n("span",[a._v(a._s(a.$t("R-Card-BlockchainRate-Edit")))])]):a._e(),null!==(r=a.display["R-Card-BlockchainRate-Delete"])&&void 0!==r&&r.show?n("el-dropdown-item",{attrs:{command:{type:"delete",row:e.row}}},[n("i",{staticClass:"el-icon-delete"}),n("span",[a._v(a._s(a.$t("R-Card-BlockchainRate-Delete")))])]):a._e()],1)],1)]}}])})],1),n("PagePagination",{attrs:{"pager-info":a.pagerInfo},on:{"current-change":a.handleCurrentChange,"size-change":a.handleSizeChange}}),n("el-dialog",{attrs:{title:a.$t(a.isEdit?"Ucard.BlockchainRate.title1":"Ucard.BlockchainRate.title2"),visible:a.addDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(e){a.addDialogVisible=e}}},[n("el-form",{ref:"addForm",attrs:{model:a.addForm,rules:a.addRules,"label-width":"120px"}},[n("el-form-item",{attrs:{label:"".concat(a.$t("Ucard.BlockchainRate.pageT1"),":"),prop:"currency"}},[n("el-input",{attrs:{disabled:a.isEdit,placeholder:a.$t("Ucard.BlockchainRate.addP1")},model:{value:a.addForm.currency,callback:function(e){a.$set(a.addForm,"currency",e)},expression:"addForm.currency"}})],1),n("el-form-item",{attrs:{label:"".concat(a.$t("Ucard.BlockchainRate.pageT2"),":"),prop:"convertCurrency"}},[n("el-input",{attrs:{disabled:a.isEdit,placeholder:a.$t("Ucard.BlockchainRate.addP2")},model:{value:a.addForm.convertCurrency,callback:function(e){a.$set(a.addForm,"convertCurrency",e)},expression:"addForm.convertCurrency"}})],1),n("el-form-item",{attrs:{label:"".concat(a.$t("Ucard.BlockchainRate.pageT4"),":"),prop:"exchangeRate"}},[n("el-input",{attrs:{type:"number",placeholder:a.$t("Ucard.BlockchainRate.addP4")},model:{value:a.addForm.exchangeRate,callback:function(e){a.$set(a.addForm,"exchangeRate",e)},expression:"addForm.exchangeRate"}})],1),n("el-form-item",{attrs:{label:"".concat(a.$t("Ucard.BlockchainRate.pageT5"),":"),prop:"type"}},[n("el-select",{attrs:{placeholder:a.$t("Ucard.BlockchainRate.addP5")},model:{value:a.addForm.type,callback:function(e){a.$set(a.addForm,"type",e)},expression:"addForm.type"}},a._l(a.typeOpts,(function(e,t){return n("el-option",{key:t,attrs:{label:a.$t(e),value:t}})})),1)],1),n("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"".concat(a.$t("Ucard.BlockchainRate.pageT3"),":"),prop:"enableStatus"}},[n("el-switch",{staticClass:"crm_switch crm_switch_width",attrs:{"active-text":a.$t(a.enableStatus[1]),"active-value":1,"inactive-text":a.$t(a.enableStatus[0]),"inactive-value":0,"active-color":"#368FEC","inactive-color":"#EB3F57"},model:{value:a.addForm.enableStatus,callback:function(e){a.$set(a.addForm,"enableStatus",e)},expression:"addForm.enableStatus"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){a.addDialogVisible=!1}}},[a._v(a._s(a.$t("Btn.Cancel"))+" ")]),n("el-button",{attrs:{type:"primary",loading:a.addLoading},on:{click:a.handleAddConfirm}},[a._v(a._s(a.$t("Btn.Confirm"))+" ")])],1)],1)],1)},r=[],c=a("c7eb"),o=a("5530"),i=a("1da1"),l=(a("d9e2"),a("d81d"),a("14d9"),a("e9f5"),a("7d54"),a("ab43"),a("d3b7"),a("00b4"),a("25f0"),a("159b"),a("c6e4")),s=a("f121"),d=a.n(s),u=a("c5fa"),p=a("3bc1"),h=a("fa7d"),f=d.a.Code,g={name:"BlockchainRate",components:{PagePagination:p["a"]},data:function(){var e=this;return{opts:[],userList:[],enableStatus:u["a"],pictLoading:!1,mock_tableData:[],search:{currency:"",convertCurrency:"",enableStatus:""},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},isEdit:!1,addDialogVisible:!1,addForm:{currency:"",convertCurrency:"",enableStatus:0,exchangeRate:""},floatReg:/^(?!0\d)(?![0.]*$)\d+(\.\d{1,10})?$/,multipleSelection:[],addRules:{currency:[{required:!0,message:this.$i18n.t("Ucard.BlockchainRate.addP1"),trigger:"blur"}],convertCurrency:[{required:!0,message:this.$i18n.t("Ucard.BlockchainRate.addP2"),trigger:"blur"}],exchangeRate:[{required:!0,validator:function(t,a,n){if(a){var r=e.floatReg.test(a);return r?n():n(new Error(e.$i18n.t("global.validator.v13")))}return n(new Error(e.$i18n.t("Ucard.BlockchainRate.addP4")))},trigger:["change","blur"]}],enableStatus:[{required:!0,message:this.$i18n.t("Ucard.BlockchainRate.addP3"),trigger:"blur"}],type:[{required:!0,message:this.$i18n.t("Ucard.BlockchainRate.addP5"),trigger:"change"}]},addLoading:!1,typeOpts:{1:"Ucard.BlockchainRate.e1",2:"Ucard.BlockchainRate.e2"}}},computed:{display:function(){return this.Session.GetDisplay()}},watch:{addDialogVisible:function(e){e||(this.addForm={currency:"",convertCurrency:"",enableStatus:0,exchangeRate:""})}},methods:{keyDown:function(e){console.log(e)},searchFunc:function(){var e=this;return Object(i["a"])(Object(c["a"])().mark((function t(){var a,n,r;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,null!==(a=e.display["R-Card-BlockchainRate-Page"])&&void 0!==a&&a.show){t.next=5;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 5:return t.next=7,l["a"].getBlockchainRatePage(Object(o["a"])(Object(o["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 7:n=t.sent,n.code==f.StatusOK?(e.mock_tableData=null===(r=n.data)||void 0===r?void 0:r.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{exchangeRate:e.exchangeRate?Object(h["b"])(e.exchangeRate):""})})),null!=n.page?(e.pagerInfo.rowTotal=n.page.rowTotal,e.pagerInfo.pageTotal=n.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess"))):e.$pigeon.MessageError(n.msg),e.pictLoading=!1;case 10:case"end":return t.stop()}}),t)})))()},handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},toDelete:function(){this.handleDelete(this.multipleSelection)},toSearch:function(){this.pagerInfo.current=1,this.searchFunc()},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()},handleCommand:function(e){var t;"editor"===e.type?(this.addForm=Object(o["a"])(Object(o["a"])({},e.row),{},{type:null===(t=e.row.type)||void 0===t?void 0:t.toString()}),this.isEdit=!0,this.addDialogVisible=!0):"delete"===e.type&&this.handleDelete([e.row.id])},openAddDialog:function(){var e=this;this.addForm={currency:"",convertCurrency:"",enableStatus:0,exchangeRate:"",type:""},this.isEdit=!1,this.addDialogVisible=!0,this.$nextTick((function(){e.$refs.addForm&&e.$refs.addForm.clearValidate()}))},changeEnable:function(e){var t=this;return Object(i["a"])(Object(c["a"])().mark((function a(){var n;return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l["a"].updateBlockchainRate(Object(o["a"])({},e));case 3:n=a.sent,200==n.code?(t.$pigeon.MessageOK(t.$i18n.t("card.Info.t27")),t.searchFunc()):t.$pigeon.MessageError(n.msg),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$pigeon.MessageError(t.$i18n.t("Msg.SystemError"));case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},handleAddConfirm:function(){var e=this;return Object(i["a"])(Object(c["a"])().mark((function t(){return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.addForm.validate(function(){var t=Object(i["a"])(Object(c["a"])().mark((function t(a){var n,r;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=23;break}if(e.addLoading=!0,t.prev=2,n=Object(o["a"])({},e.addForm),!e.isEdit){t.next=10;break}return t.next=7,l["a"].updateBlockchainRate(n);case 7:t.t0=t.sent,t.next=13;break;case 10:return t.next=12,l["a"].addBlockchainRate(n);case 12:t.t0=t.sent;case 13:r=t.t0,r.code==f.StatusOK?(e.$pigeon.MessageOK(e.$i18n.t("Msg.SaveSuccess")),e.addDialogVisible=!1,e.searchFunc()):e.$pigeon.MessageError(r.msg),t.next=20;break;case 17:t.prev=17,t.t1=t["catch"](2),e.$pigeon.MessageError(e.$i18n.t("Msg.SaveFail"));case 20:return t.prev=20,e.addLoading=!1,t.finish(20);case 23:case"end":return t.stop()}}),t,null,[[2,17,20,23]])})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()},handleDelete:function(e){var t=this;return Object(i["a"])(Object(c["a"])().mark((function a(){return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.$confirm(t.$t("Ucard.Blockchain.deleteConfirm"),t.$t("Ucard.Blockchain.deleteTitle"),{confirmButtonText:t.$t("Btn.Confirm"),cancelButtonText:t.$t("Btn.Cancel"),type:"warning"}).then(Object(i["a"])(Object(c["a"])().mark((function a(){var n;return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l["a"].deleteBlockchainRate({ids:e});case 3:n=a.sent,n.code==f.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.DeleteSuccess")),t.searchFunc()):t.$pigeon.MessageError(n.msg),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$pigeon.MessageError(t.$i18n.t("Msg.DeleteFail"));case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))).catch((function(){}));case 1:case"end":return a.stop()}}),a)})))()}},mounted:function(){this.searchFunc()}},b=g,m=(a("01b48"),a("1465"),a("2877")),v=Object(m["a"])(b,n,r,!1,null,"01a1ce98",null);t["default"]=v.exports},c5fa:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return c})),a.d(t,"b",(function(){return o}));var n={0:"Ucard.Blockchain.unEnable",1:"Ucard.Blockchain.enabled"},r={0:"Ucard.DepositAddress.noRest",1:"Ucard.DepositAddress.isRest"},c={wait_process:"State.ToBeProcessed",processing:"State.InTheProcessing",success:"State.Success",fail:"State.Fail"},o={cn:"Web_info.cn",zhHant:"Web_info.zhHant",en:"Web_info.en",vn:"Web_info.vn",th:"Web_info.th",ar:"Web_info.ar",de:"Web_info.de",es:"Web_info.es",id:"Web_info.id",ms:"Web_info.ms",ko:"Web_info.ko",pt:"Web_info.pt",fa:"Web_info.fa",tr:"Web_info.tr"}},fa7d:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}));a("3835"),a("99af"),a("d81d"),a("e9f5"),a("ab43"),a("a9e3"),a("d3b7"),a("ac1f"),a("4d90"),a("5319");function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(navigator.clipboard)navigator.clipboard.writeText(e);else{var t=document.createElement("textarea");document.body.appendChild(t),t.style.position="fixed",t.style.clip="rect(0 0 0 0)",t.style.top="10px",t.value=e,t.select(),document.execCommand("copy",!0),document.body.removeChild(t)}}var r=function(e){return e.replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"").replace(/\.$/,"")}}}]);
|