| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51ec8acf"],{"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)}},"216c":function(e,t,a){"use strict";a("5e19")},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)}})},"5e19":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=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"card_Blockchain","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,"label-width":""}},[t("el-row",[t("el-col",{attrs:{span:24,md:24,lg:24}},[t("el-form-item",{staticStyle:{"margin-right":"10px"}},[t("el-input",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Ucard.BlockchainRate.addP1")},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.currency,callback:function(t){e.$set(e.search,"currency","string"===typeof t?t.trim():t)},expression:"search.currency"}})],1),t("el-form-item",{staticStyle:{"margin-right":"10px"}},[t("el-input",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Ucard.BlockchainRate.addP2")},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.convertCurrency,callback:function(t){e.$set(e.search,"convertCurrency","string"===typeof t?t.trim():t)},expression:"search.convertCurrency"}})],1),t("el-form-item",{staticStyle:{"margin-right":"10px"}},[t("el-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Ucard.BlockchainRate.pageT3")},on:{change:e.toSearch},model:{value:e.search.enableStatus,callback:function(t){e.$set(e.search,"enableStatus",t)},expression:"search.enableStatus"}},e._l(e.enableStatus,(function(a,n){return t("el-option",{key:n,attrs:{label:e.$t(a),value:n}})})),1)],1),t("el-form-item",[t("el-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Ucard.BlockchainRate.pageT5")},on:{change:e.toSearch},model:{value:e.search.type,callback:function(t){e.$set(e.search,"type",t)},expression:"search.type"}},e._l(e.typeOpts,(function(a,n){return t("el-option",{key:n,attrs:{label:e.$t(a),value:n}})})),1)],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",[e.display["R-Card-BlockchainRate-Add"].show?t("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-plus"},on:{click:e.openAddDialog}},[e._v(" "+e._s(e.$t("R-Card-BlockchainRate-Add"))+" ")]):e._e(),e.display["R-Card-BlockchainRate-Delete"].show?t("el-button",{attrs:{size:"small",disabled:!e.multipleSelection.length,type:e.multipleSelection.length?"primary":"info",icon:"el-icon-minus"},on:{click:e.toDelete}},[e._v(" "+e._s(e.$t("R-Card-Blockchain-Delete"))+" ")]):e._e()],1)],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),t("el-table-column",{attrs:{prop:"currency",align:"left",label:e.$t("Ucard.BlockchainRate.pageT1")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.currency||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"convertCurrency",align:"left",label:e.$t("Ucard.BlockchainRate.pageT2")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.convertCurrency||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"exchangeRate",align:"left",label:e.$t("Ucard.BlockchainRate.pageT4")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.exchangeRate||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"type",align:"left",label:e.$t("Ucard.BlockchainRate.pageT5")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.$t(e.typeOpts[t.row.type])||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"enableStatus",align:"left",label:e.$t("Ucard.BlockchainRate.pageT3")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-switch",{staticClass:"crm_switch crm_switch_width",attrs:{disabled:!e.display["R-Card-BlockchainRate-Edit"].show,"active-text":e.$t(e.enableStatus[1]),"active-value":1,"inactive-text":e.$t(e.enableStatus[0]),"inactive-value":0,"active-color":"#368FEC","inactive-color":"#EB3F57"},on:{change:function(t){return e.changeEnable(a.row)}},model:{value:a.row.enableStatus,callback:function(t){e.$set(a.row,"enableStatus",t)},expression:"scope.row.enableStatus"}})]}}])}),t("el-table-column",{attrs:{prop:"ctrl",align:"center",label:e.$t("Label.Action")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-dropdown",{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-Card-BlockchainRate-Edit"].show?t("el-dropdown-item",{attrs:{command:{type:"editor",row:a.row}}},[t("i",{staticClass:"el-icon-s-operation"}),t("span",[e._v(e._s(e.$t("R-Card-BlockchainRate-Edit")))])]):e._e(),e.display["R-Card-BlockchainRate-Delete"].show?t("el-dropdown-item",{attrs:{command:{type:"delete",row:a.row}}},[t("i",{staticClass:"el-icon-delete"}),t("span",[e._v(e._s(e.$t("R-Card-BlockchainRate-Delete")))])]):e._e()],1)],1)]}}])})],1),t("PagePagination",{attrs:{"pager-info":e.pagerInfo},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),t("el-dialog",{attrs:{title:e.$t(e.isEdit?"Ucard.BlockchainRate.title1":"Ucard.BlockchainRate.title2"),visible:e.addDialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(t){e.addDialogVisible=t}}},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,rules:e.addRules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"".concat(e.$t("Ucard.BlockchainRate.pageT1"),":"),prop:"currency"}},[t("el-input",{attrs:{disabled:e.isEdit,placeholder:e.$t("Ucard.BlockchainRate.addP1")},model:{value:e.addForm.currency,callback:function(t){e.$set(e.addForm,"currency",t)},expression:"addForm.currency"}})],1),t("el-form-item",{attrs:{label:"".concat(e.$t("Ucard.BlockchainRate.pageT2"),":"),prop:"convertCurrency"}},[t("el-input",{attrs:{disabled:e.isEdit,placeholder:e.$t("Ucard.BlockchainRate.addP2")},model:{value:e.addForm.convertCurrency,callback:function(t){e.$set(e.addForm,"convertCurrency",t)},expression:"addForm.convertCurrency"}})],1),t("el-form-item",{attrs:{label:"".concat(e.$t("Ucard.BlockchainRate.pageT4"),":"),prop:"exchangeRate"}},[t("el-input",{attrs:{type:"number",placeholder:e.$t("Ucard.BlockchainRate.addP4")},model:{value:e.addForm.exchangeRate,callback:function(t){e.$set(e.addForm,"exchangeRate",t)},expression:"addForm.exchangeRate"}})],1),t("el-form-item",{attrs:{label:"".concat(e.$t("Ucard.BlockchainRate.pageT5"),":"),prop:"type"}},[t("el-select",{attrs:{placeholder:e.$t("Ucard.BlockchainRate.addP5")},model:{value:e.addForm.type,callback:function(t){e.$set(e.addForm,"type",t)},expression:"addForm.type"}},e._l(e.typeOpts,(function(a,n){return t("el-option",{key:n,attrs:{label:e.$t(a),value:n}})})),1)],1),t("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"".concat(e.$t("Ucard.BlockchainRate.pageT3"),":"),prop:"enableStatus"}},[t("el-switch",{staticClass:"crm_switch crm_switch_width",attrs:{"active-text":e.$t(e.enableStatus[1]),"active-value":1,"inactive-text":e.$t(e.enableStatus[0]),"inactive-value":0,"active-color":"#368FEC","inactive-color":"#EB3F57"},model:{value:e.addForm.enableStatus,callback:function(t){e.$set(e.addForm,"enableStatus",t)},expression:"addForm.enableStatus"}})],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v(e._s(e.$t("Btn.Cancel"))+" ")]),t("el-button",{attrs:{type:"primary",loading:e.addLoading},on:{click:e.handleAddConfirm}},[e._v(e._s(e.$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("b64b"),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 JSON.parse(this.Session.Get("display",!0))}},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;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,e.display["R-Card-BlockchainRate-Page"].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:a=t.sent,a.code==f.StatusOK?(e.mock_tableData=null===(n=a.data)||void 0===n?void 0:n.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{exchangeRate:e.exchangeRate?Object(h["b"])(e.exchangeRate):""})})),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.$pigeon.MessageError(a.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("ef53"),a("216c"),a("2877")),v=Object(m["a"])(b,n,r,!1,null,"719bd9d6",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"}},cada:function(e,t,a){},ef53:function(e,t,a){"use strict";a("cada")},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(/\.$/,"")}}}]);
|