IdTypeConfig.7deba831.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["IdTypeConfig"],{2937:function(e,t,a){},"81f5":function(e,t,a){},"90da":function(e,t,a){"use strict";a("2937")},a15b:function(e,t,a){"use strict";var n=a("23e7"),r=a("e330"),i=a("44ad"),o=a("fc6a"),s=a("a640"),l=r([].join),c=i!==Object,d=c||!s("join",",");n({target:"Array",proto:!0,forced:d},{join:function(e){return l(o(this),void 0===e?",":e)}})},d0cf:function(e,t,a){"use strict";a("81f5")},d848:function(e,t,a){"use strict";a.r(t);a("b0c0"),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:"review_Email","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-select",{staticClass:"crm-border-radius-no",attrs:{filterable:"",size:"small",clearable:"",placeholder:e.$t("card.vaildate.v6")},on:{change:e.toSearch},model:{value:e.search.code,callback:function(t){e.$set(e.search,"code","string"===typeof t?t.trim():t)},expression:"search.code"}},e._l(e.countryCityList,(function(a){return t("el-option",{key:a.id,attrs:{label:"cn"==e.Session.Get("lang")?a.cnName:a.enName,value:a.code}})})),1)],1),t("el-form-item",[t("el-select",{staticClass:"crm-border-radius-no",attrs:{clearable:"",size:"small",placeholder:e.$t("Placeholder.Choose")},on:{change:e.toSearch},model:{value:e.search.idType,callback:function(t){e.$set(e.search,"idType",t)},expression:"search.idType"}},[t("el-option",{attrs:{label:e.$t("card.Form.v4"),value:"PASSPORT"}}),t("el-option",{attrs:{label:e.$t("card.Form.v3"),value:"HK_HKID"}}),t("el-option",{attrs:{label:e.$t("card.Form.v5"),value:"DLN"}}),t("el-option",{attrs:{label:e.$t("card.Form.v6"),value:"GOVERNMENT_ISSUED_ID_CARD"}})],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),e.display["R-IdTypeConfig-Add"].show?t("el-form-item",[t("div",{staticClass:"search_action_btn"},[t("span",{staticClass:"crm-cursor delete active",on:{click:function(t){return e.approvalAll(1)}}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-IdTypeConfig-Add",expression:"'R-IdTypeConfig-Add'"}]})])])]):e._e(),e.display["R-IdTypeConfig-Delete"].show?t("el-form-item",[t("div",{staticClass:"search_action_btn"},[t("span",{staticClass:"crm-cursor delete active",on:{click:e.deleteAll}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-IdTypeConfig-Delete",expression:"'R-IdTypeConfig-Delete'"}]})])])]):e._e()],1),t("div",{staticClass:"card-mock-demo",staticStyle:{margin:"30px 0"}},[t("el-table",{staticStyle:{"margin-top":"20px",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:"code",align:"left",label:e.$t("card.Form.f7")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("cn"==e.Session.Get("lang")?t.row.cnName:t.row.enName)+" ")]}}])}),t("el-table-column",{attrs:{prop:"idType",align:"left",label:e.$t("card.Form.f16")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.idTypeDisplay(t.row.idType))+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"center",label:e.$i18n.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-IdTypeConfig-Update"].show?t("el-dropdown-item",{attrs:{command:{type:2,row:a.row}}},[t("i",{staticClass:"el-icon-s-operation"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-IdTypeConfig-Update",expression:"'R-IdTypeConfig-Update'"}]})]):e._e(),e.display["R-IdTypeConfig-Delete"].show?t("el-dropdown-item",{attrs:{command:{type:1,row:a.row}}},[t("i",{staticClass:"el-icon-s-operation"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-IdTypeConfig-Delete",expression:"'R-IdTypeConfig-Delete'"}]})]):e._e()],1)],1)]}}])})],1)],1)],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(),e.approvalAllDialog?t("el-dialog",{attrs:{title:e.$t("R-IdTypeConfig"),visible:e.approvalAllDialog,rules:e.rules,width:"900px"},on:{"update:visible":function(t){e.approvalAllDialog=t}}},[t("el-form",{ref:"form",staticClass:"business-edit-form",attrs:{rules:e.rules,model:e.form,"label-width":"130px","label-position":"right"}},[t("el-form-item",{attrs:{prop:"country",label:e.$t("card.Form.f7")}},[t("el-select",{attrs:{multiple:"",disabled:2==e.type,placeholder:e.$t("card.vaildate.v6")},model:{value:e.form.country,callback:function(t){e.$set(e.form,"country",t)},expression:"form.country"}},e._l(e.countryCityList,(function(a){return t("el-option",{key:a.id,attrs:{label:"cn"==e.Session.Get("lang")?a.cnName:a.enName,value:a.code}})})),1)],1),t("el-form-item",{attrs:{prop:"idType",label:e.$t("card.Form.f16")}},[t("el-select",{attrs:{multiple:"",placeholder:e.$t("card.vaildate.v14")},model:{value:e.form.idType,callback:function(t){e.$set(e.form,"idType",t)},expression:"form.idType"}},e._l(e.idTypeList,(function(a,n){return t("el-option",{key:n,attrs:{label:e.$t(a.name),value:a.value}})})),1)],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.approvalAllDialog=!1}}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Ucard.Business.p32",expression:"'Ucard.Business.p32'"}]})]),t("el-button",{directives:[{name:"t",rawName:"v-t",value:"card.Btn.Confirm",expression:"'card.Btn.Confirm'"}],attrs:{type:"primary"},on:{click:e.idTypesConfigAdd}})],1)],1):e._e()],1)},r=[],i=a("5530"),o=a("c7eb"),s=a("1da1"),l=(a("4de4"),a("caad"),a("a15b"),a("d81d"),a("14d9"),a("e9f5"),a("910d"),a("7d54"),a("ab43"),a("b64b"),a("d3b7"),a("2532"),a("159b"),a("c6e4")),c=a("f121"),d=a.n(c),p=d.a.Code,u={name:"IdTypeConfig",data:function(){return{pictLoading:!1,approvalAllDialog:!1,type:1,multipleSelection:[],countryCityList:[],search:{tag:1,idType:"",code:""},mock_tableData:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},form:{country:null,idType:null},reasons:{},rules:{idType:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"blur"}],country:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"blur"}]},idTypeList:[{name:"card.Form.v4",value:"PASSPORT"},{name:"card.Form.v3",value:"HK_HKID"},{name:"card.Form.v5",value:"DLN"},{name:"card.Form.v6",value:"GOVERNMENT_ISSUED_ID_CARD"}]}},computed:{display:function(){return JSON.parse(this.Session.Get("display",!0))},user:function(){return JSON.parse(this.Session.Get("user",!0))}},methods:{getCountryListForSelect:function(){var e=this;return Object(s["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:return t.next=2,l["a"].ucardCountryCity({code:""});case 2:a=t.sent,200!==a.code&&0!==a.code||(e.countryCityList=a.data||[]);case 4:case"end":return t.stop()}}),t)})))()},idTypeDisplay:function(e){var t=this,a=e.split(",").map((function(e){return e.trim()}));return this.idTypeList.filter((function(e){return a.includes(e.value)})).map((function(e){return t.$i18n.t(e.name)})).join(",")},handleCommand:function(e){switch(e.type){case 1:this.multipleSelection=[e.row.id],this.deleteAll();break;case 2:var t=e.row.idType.split(",").map((function(e){return e.trim()})),a=[e.row.code],n=Object(i["a"])(Object(i["a"])({},e.row),{},{country:a,idType:t});this.form=n,this.approvalAll(2);break}},handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},approvalAll:function(e){this.type=e,1==e&&(this.form={country:null,idType:null}),this.approvalAllDialog=!0},deleteAll:function(){var e=Object(s["a"])(Object(o["a"])().mark((function e(){var t;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.multipleSelection.length){e.next=2;break}return e.abrupt("return");case 2:t=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(s["a"])(Object(o["a"])().mark((function e(){var a;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l["a"].idTypesConfigDelete({ids:t.multipleSelection});case 2:a=e.sent,a.code==p.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.DeleteSuccess")),t.searchFunc()):t.$pigeon.MessageError(a.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),idTypesConfigAdd:function(){var e=this;return Object(s["a"])(Object(o["a"])().mark((function t(){var a,n,r;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$refs.form.validate();case 3:if(a=t.sent,a){t.next=6;break}return t.abrupt("return");case 6:return n=e.countryCityList.filter((function(t){return e.form.country.includes(t.code)})).map((function(t){return{enName:t.enName,cnName:t.cnName,code:t.code,idType:e.form.idType.join(",")}})),t.next=9,l["a"].idTypesConfigAdd(n);case 9:r=t.sent,200==r.code?(e.form={country:null,idType:null},e.approvalAllDialog=!1,e.toSearch()):e.$pigeon.MessageError(r.msg),t.next=16;break;case 13:t.prev=13,t.t0=t["catch"](0),console.log(t.t0);case 16:case"end":return t.stop()}}),t,null,[[0,13]])})))()},toSearch:function(){this.pagerInfo.current=1,this.searchFunc()},searchFunc:function(){var e=this;return Object(s["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,e.display["R-IdTypeConfig-Search"].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"].idTypesConfigList(Object(i["a"])(Object(i["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 7:a=t.sent,a.code==p.StatusOK?(e.mock_tableData=a.data,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)})))()},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.searchFunc(),this.getCountryListForSelect()},watch:{"search.tag":function(){this.search.code="",this.search.idType=""}}},m=u,f=(a("90da"),a("d0cf"),a("2877")),g=Object(f["a"])(m,n,r,!1,null,"3383349e",null);t["default"]=g.exports}}]);