EmailRecord.2ee6c2d2.js 32 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["EmailRecord"],{1374:function(e,t,a){"use strict";a.r(t);a("b0c0"),a("ac1f"),a("841c");var n=function(){var e,t,a,n,s,i,r=this,l=r._self._c;return l("div",{directives:[{name:"loading",rawName:"v-loading",value:r.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"mail_EmailRecord","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[l("div",{staticClass:"crm_search"},[l("el-form",{ref:"form",attrs:{"label-position":"",model:r.search,"label-width":""}},[l("el-row",[l("el-col",{attrs:{span:24,md:24,lg:24}},[l("el-form-item",{staticStyle:{"margin-right":"15px"}},[l("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:r.$t("Placeholder.Choose")},model:{value:r.search.status,callback:function(e){r.$set(r.search,"status",e)},expression:"search.status"}},[l("el-option",{attrs:{label:r.$t("State.All"),value:null},nativeOn:{click:function(e){return r.toSearch.apply(null,arguments)}}}),l("el-option",{attrs:{label:r.$t("State.Sending"),value:1},nativeOn:{click:function(e){return r.toSearch.apply(null,arguments)}}}),l("el-option",{attrs:{label:r.$t("State.Success"),value:2},nativeOn:{click:function(e){return r.toSearch.apply(null,arguments)}}}),l("el-option",{attrs:{label:r.$t("State.Fail"),value:3},nativeOn:{click:function(e){return r.toSearch.apply(null,arguments)}}})],1)],1),l("el-form-item",[l("el-select",{staticClass:"crm_search_down crm-border-radius-no",attrs:{size:"small",placeholder:r.$t("Placeholder.Choose")},model:{value:r.search.tag,callback:function(e){r.$set(r.search,"tag",e)},expression:"search.tag"}},[l("el-option",{attrs:{label:r.$t("Marketing.Recipient"),value:1}})],1)],1),l("el-form-item",{staticStyle:{"margin-right":"10px"}},[1==r.search.tag?l("el-input",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",placeholder:r.$t("Placeholder.Input")},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&r._k(e.keyCode,"enter",13,e.key,"Enter")?null:r.toSearch.apply(null,arguments)}},model:{value:r.search.user,callback:function(e){r.$set(r.search,"user",e)},expression:"search.user"}}):r._e()],1),l("el-form-item",{staticStyle:{"margin-right":"10px"}},[l("el-select",{staticClass:"country crm-border-radius-no",attrs:{size:"small",filterable:"",clearable:"",placeholder:r.$t("news_add_field.Label.Country")},model:{value:r.search.country,callback:function(e){r.$set(r.search,"country",e)},expression:"search.country"}},r._l(r.mock_options,(function(e){return l("el-option",{key:e.id,attrs:{label:"cn"==r.Session.Get("lang")?e.name:e.enName,value:e.code}})})),1)],1),l("el-form-item",[l("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":r.$t("Placeholder.Start"),"end-placeholder":r.$t("Placeholder.End")},model:{value:r.search.date,callback:function(e){r.$set(r.search,"date",e)},expression:"search.date"}}),l("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:r.toSearch}})],1)],1)],1),l("el-form-item",[l("div",{staticClass:"search_action_btn"},[r.multipleSelection.length&&null!==(e=r.display["R-MassMailing-Supplement"])&&void 0!==e&&e.show&&"mass"==r.myType?l("span",{staticClass:"crm-cursor delete active",on:{click:r.SupplementSelect}},[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e(),!r.multipleSelection.length&&null!==(t=r.display["R-MassMailing-Supplement"])&&void 0!==t&&t.show&&"mass"==r.myType?l("span",{staticClass:"crm-cursor delete"},[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e(),null!==(a=r.display["R-MassMailing-Supplement"])&&void 0!==a&&a.show&&"mass"==r.myType?l("span",{staticClass:"crm-cursor delete active",on:{click:r.SupplementAll}},[l("span",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Label.SupplementAll",expression:"'news_add_field.Label.SupplementAll'"}]})]):r._e(),r.multipleSelection.length&&null!==(n=r.display["R-EmailDiscountCode-Supplement"])&&void 0!==n&&n.show&&"promo"==r.myType?l("span",{staticClass:"crm-cursor delete active",on:{click:r.SupplementSelect}},[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e(),!r.multipleSelection.length&&null!==(s=r.display["R-EmailDiscountCode-Supplement"])&&void 0!==s&&s.show&&"promo"==r.myType?l("span",{staticClass:"crm-cursor delete"},[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e(),null!==(i=r.display["R-EmailDiscountCode-Supplement"])&&void 0!==i&&i.show&&"promo"==r.myType?l("span",{staticClass:"crm-cursor delete active",on:{click:r.SupplementAll}},[l("span",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Label.SupplementAll",expression:"'news_add_field.Label.SupplementAll'"}]})]):r._e(),l("span",{staticClass:"crm-cursor",on:{click:r.back}},[l("i",{staticClass:"el-icon-arrow-left"}),l("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Bank",expression:"'Btn.Bank'"}]})])])])],1)],1),"mass"==r.myType?l("el-table",{staticStyle:{width:"100%"},attrs:{data:r.Record_tableData,stripe:""},on:{"selection-change":r.handleSelectionChange}},[l("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("news_add_field.Label.SendMailbox")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.fromAccount||"--")+" ")]}}],null,!1,1177153642)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("Marketing.Recipient")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.user||"--")+" ")]}}],null,!1,916480588)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("Label.Name")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.name||"--")+" ")]}}],null,!1,454495354)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("news_add_field.Label.Country")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s("en"==r.Session.Get("lang")?e.row.countryEnName:e.row.countryName)+" ")]}}],null,!1,2853598907)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("system_info.Label.EmailTitle")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.subject||"--")+" ")]}}],null,!1,1520071393)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("news_add_field.Label.SendDate")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.sendDate||"--")+" ")]}}],null,!1,2286895733)}),l("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:r.$i18n.t("system_info.Label.EmailContent")},scopedSlots:r._u([{key:"default",fn:function(e){return[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-VerifiedUser-Single",expression:"'R-VerifiedUser-Single'"}],staticClass:"state crm_state_blue crm-cursor",on:{click:function(t){return r.toContent(e.row.content)}}})]}}],null,!1,491625655)}),l("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:r.$i18n.t("Label.State")},scopedSlots:r._u([{key:"default",fn:function(e){return[1==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Sending",expression:"'State.Sending'"}],staticClass:"state crm_state_blue"}):r._e(),2==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Success",expression:"'State.Success'"}],staticClass:"state crm_state_green"}):r._e(),3==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Fail",expression:"'State.Fail'"}],staticClass:"state crm_state_red"}):r._e(),4==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Unsubscribed",expression:"'State.Unsubscribed'"}],staticClass:"state crm_state_gray"}):r._e()]}}],null,!1,558890923)}),l("el-table-column",{attrs:{prop:"",align:"center",label:r.$i18n.t("Label.Action")},scopedSlots:r._u([{key:"default",fn:function(e){var t;return[l("el-dropdown",{attrs:{trigger:"click"},on:{command:r.handleCommand}},[l("span",{staticClass:"el-dropdown-link crm-cursor"},[l("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[null!==(t=r.display["R-MassMailing-Supplement"])&&void 0!==t&&t.show&&3==e.row.status?l("el-dropdown-item",{attrs:{command:{type:"Supplement",id:e.row.id}}},[l("i",{staticClass:"el-icon-s-promotion"}),l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e()],1)],1)]}}],null,!1,711512336)})],1):r._e(),"promo"==r.myType?l("el-table",{staticStyle:{width:"100%"},attrs:{data:r.Record_tableData,stripe:""},on:{"selection-change":r.handleSelectionChange}},[l("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),l("el-table-column",{attrs:{prop:"cId",align:"left",label:r.$i18n.t("news_add_field.Label.SendMailbox")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.fromAccount||"--")+" ")]}}],null,!1,1177153642)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("Marketing.Recipient")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.user||"--")+" ")]}}],null,!1,916480588)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("Label.Name")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.name||"--")+" ")]}}],null,!1,454495354)}),l("el-table-column",{attrs:{prop:"title",align:"left",label:r.$i18n.t("news_add_field.Label.Country")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s("en"==r.Session.Get("lang")?e.row.countryEnName:e.row.countryName)+" ")]}}],null,!1,2853598907)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("system_info.Label.EmailTitle")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.subject||"--")+" ")]}}],null,!1,1520071393)}),l("el-table-column",{attrs:{prop:"",align:"left",label:r.$i18n.t("news_add_field.Label.SendDate")},scopedSlots:r._u([{key:"default",fn:function(e){return[r._v(" "+r._s(e.row.sendDate||"--")+" ")]}}],null,!1,2286895733)}),l("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:r.$i18n.t("system_info.Label.EmailContent")},scopedSlots:r._u([{key:"default",fn:function(e){return[l("span",{directives:[{name:"t",rawName:"v-t",value:"R-VerifiedUser-Single",expression:"'R-VerifiedUser-Single'"}],staticClass:"state crm_state_blue crm-cursor",on:{click:function(t){return r.toContent(e.row.content)}}})]}}],null,!1,491625655)}),l("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:r.$i18n.t("Label.State")},scopedSlots:r._u([{key:"default",fn:function(e){return[1==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Sending",expression:"'State.Sending'"}],staticClass:"state crm_state_blue"}):r._e(),2==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Success",expression:"'State.Success'"}],staticClass:"state crm_state_green"}):r._e(),3==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Fail",expression:"'State.Fail'"}],staticClass:"state crm_state_red"}):r._e(),4==e.row.status?l("span",{directives:[{name:"t",rawName:"v-t",value:"State.Unsubscribed",expression:"'State.Unsubscribed'"}],staticClass:"state crm_state_gray"}):r._e()]}}],null,!1,558890923)}),l("el-table-column",{attrs:{prop:"",align:"center",label:r.$i18n.t("Label.Action")},scopedSlots:r._u([{key:"default",fn:function(e){var t;return[l("el-dropdown",{attrs:{trigger:"click"},on:{command:r.handleCommand}},[l("span",{staticClass:"el-dropdown-link crm-cursor"},[l("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[null!==(t=r.display["R-EmailDiscountCode-Supplement"])&&void 0!==t&&t.show&&3==e.row.status?l("el-dropdown-item",{attrs:{command:{type:"Supplement",id:e.row.id}}},[l("i",{staticClass:"el-icon-s-promotion"}),l("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):r._e()],1)],1)]}}],null,!1,4285058057)})],1):r._e(),r.pagerInfo.rowTotal?l("div",{staticClass:"crm_pagination"},[l("div",{staticClass:"crm_page_total"},[l("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),l("span",[r._v(r._s(r.pagerInfo.rowTotal))]),l("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),l("el-pagination",{staticClass:"page",attrs:{background:"",layout:"sizes, prev, pager, next","page-sizes":[10,20,50,100],"page-size":r.pagerInfo.row,total:r.pagerInfo.rowTotal},on:{"current-change":r.handleCurrentChange,"size-change":r.handleSizeChange}})],1):r._e(),l("el-dialog",{attrs:{title:r.$t("system_info.Label.EmailContent"),visible:r.dialogCheck,center:"","custom-class":"dialog_header_w EmailRecord"},on:{"update:visible":function(e){r.dialogCheck=e}}},[l("div",{staticClass:"dia-content"},[l("div",{staticStyle:{overflow:"auto",display:"flex","justify-content":"center","min-height":"450px"},domProps:{innerHTML:r._s(r.dialogCheckContent)}}),l("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],attrs:{type:"primary"},on:{click:function(e){r.dialogCheck=!1}}}),l("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:function(e){r.dialogCheck=!1}}})],1)])])],1)},s=[],i=a("5530"),r=a("c7eb"),l=a("1da1"),o=(a("14d9"),a("e9f5"),a("7d54"),a("a9e3"),a("d3b7"),a("159b"),a("7a20")),c=a("f121"),u=a.n(c),p=u.a.Code,d={name:"EmailRecord",components:{},data:function(){return{pictLoading:!1,myType:"",search:{status:null,user:"",tag:1,country:"",emailId:null,date:[],startDate:"",endDate:""},Record_tableData:[],imgUrl:u.a.Host05,multipleSelection:[],mock_options:[],dialogCheck:!1,dialogCheckContent:"",pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},rules:{tagsMy:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],subTitle:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],deliveryTime:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],content:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],title:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],date:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],coverImage:[{required:!0,message:this.$i18n.t("vaildate.img.empty"),trigger:"change"}],loginTypesMy:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],giveAmount:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}]}}},computed:{display:function(){return this.Session.GetDisplay()}},methods:{selectChange:function(){this.$forceUpdate()},handleCommand:function(e){"Supplement"==e.type&&this.againSend(e.id)},back:function(){"mass"==this.myType?this.$router.push({path:"/marketing/mass"}).catch((function(e){return e})):"promo"==this.myType&&this.$router.push({path:"/marketing/discount"}).catch((function(e){return e}))},handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},SupplementSelect:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a,n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:"mass"==e.myType?(a=e,e.$pigeon.MessageConfirm(e.$i18n.t("news_add_field.Des.item2"),e.$i18n.t("R-MassMailing-Supplement"),e.$i18n.t("Btn.Confirm"),e.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massEmailSupplementSend({ids:a.multipleSelection,emailId:a.search.emailId});case 2:t=e.sent,t.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.Success")),a.toSearch()):a.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}))):"promo"==e.myType&&(n=e,e.$pigeon.MessageConfirm(e.$i18n.t("news_add_field.Des.item2"),e.$i18n.t("R-MassMailing-Supplement"),e.$i18n.t("Btn.Confirm"),e.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massPromoEmailSupplementSend({ids:n.multipleSelection,emailId:n.search.emailId});case 2:t=e.sent,t.code==p.StatusOK?(n.$pigeon.MessageOK(n.$i18n.t("Msg.Success")),n.toSearch()):n.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){})));case 1:case"end":return t.stop()}}),t)})))()},SupplementAll:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a,n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:"mass"==e.myType?(a=e,e.$pigeon.MessageConfirm(e.$i18n.t("news_add_field.Des.item2"),e.$i18n.t("R-MassMailing-Supplement"),e.$i18n.t("Btn.Confirm"),e.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massEmailSupplementSend({ids:null,emailId:a.search.emailId});case 2:t=e.sent,t.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.Success")),a.toSearch()):a.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}))):"promo"==e.myType&&(n=e,e.$pigeon.MessageConfirm(e.$i18n.t("news_add_field.Des.item2"),e.$i18n.t("R-MassMailing-Supplement"),e.$i18n.t("Btn.Confirm"),e.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massPromoEmailSupplementSend({ids:null,emailId:n.search.emailId});case 2:t=e.sent,t.code==p.StatusOK?(n.$pigeon.MessageOK(n.$i18n.t("Msg.Success")),n.toSearch()):n.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){})));case 1:case"end":return t.stop()}}),t)})))()},againSend:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(t){var a,n;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:"mass"==this.myType?(a=this,this.$pigeon.MessageConfirm(this.$i18n.t("news_add_field.Des.item2"),this.$i18n.t("R-MassMailing-Supplement"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var n;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massEmailSupplementSend({ids:[t],emailId:a.search.emailId});case 2:n=e.sent,n.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.Success")),a.toSearch()):a.$pigeon.MessageError(n.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}))):"promo"==this.myType&&(n=this,this.$pigeon.MessageConfirm(this.$i18n.t("news_add_field.Des.item2"),this.$i18n.t("R-MassMailing-Supplement"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].massPromoEmailSupplementSend({ids:[t],emailId:n.search.emailId});case 2:a=e.sent,a.code==p.StatusOK?(n.$pigeon.MessageOK(n.$i18n.t("Msg.Success")),n.toSearch()):n.$pigeon.MessageError(a.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){})));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),searchRecordList:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a,n,s,l;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,null==e.search.date||0==e.search.date.length?(e.search.startDate="",e.search.endDate=""):(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1]),"mass"!=e.myType){t.next=13;break}if(null!==(a=e.display["R-MassMailing-record"])&&void 0!==a&&a.show){t.next=7;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 7:return t.next=9,o["a"].massEmailRecordList(Object(i["a"])(Object(i["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 9:n=t.sent,n.code==p.StatusOK?(e.Record_tableData=n.data,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),t.next=22;break;case 13:if("promo"!=e.myType){t.next=22;break}if(null!==(s=e.display["R-EmailDiscountCode-record"])&&void 0!==s&&s.show){t.next=18;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 18:return t.next=20,o["a"].massPromoEmailRecordList(Object(i["a"])(Object(i["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 20:l=t.sent,l.code==p.StatusOK?(e.Record_tableData=l.data,null!=l.page?(e.pagerInfo.rowTotal=l.page.rowTotal,e.pagerInfo.pageTotal=l.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess"))):e.$pigeon.MessageError(l.msg);case 22:e.pictLoading=!1;case 23:case"end":return t.stop()}}),t)})))()},toSearch:function(){this.pagerInfo.current=1,this.searchRecordList()},toContent:function(e){this.dialogCheck=!0,this.dialogCheckContent=e},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchRecordList()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchRecordList()},getCountry:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o["a"].Country({});case 2:a=t.sent,a.code==p.StatusOK?e.mock_options=a.data:e.$pigeon.MessageError(a.msg);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){this.search.emailId=this.$route.query.id?Number(this.$route.query.id):null,this.myType=this.$route.query.type?this.$route.query.type:null,this.getCountry(),this.searchRecordList()}},m=d,g=(a("50fa"),a("f5ac"),a("2877")),f=Object(g["a"])(m,n,s,!1,null,"31fe11f7",null);t["default"]=f.exports},2436:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c");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:"system_EmailRecord","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"},attrs:{prop:"status"}},[t("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.status,callback:function(t){e.$set(e.search,"status",t)},expression:"search.status"}},[t("el-option",{attrs:{label:e.$t("State.All"),value:null},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Msg.Fail"),value:0},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("Msg.Success"),value:1},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}})],1)],1),t("el-form-item",{staticStyle:{"margin-right":"15px"}},[t("el-input",{staticClass:"crm-border-radius-no",staticStyle:{"margin-top":"5px"},attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},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.users,callback:function(t){e.$set(e.search,"users",t)},expression:"search.users"}},[t("template",{slot:"prepend"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Label.ReceivingMailbox",expression:"'news_add_field.Label.ReceivingMailbox'"}],staticClass:"crm-cursor"})])],2)],1),t("el-form-item",[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")},model:{value:e.search.date,callback:function(t){e.$set(e.search,"date",t)},expression:"search.date"}}),t("el-button",{attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1)],1)],1)],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""}},[t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("news_add_field.Label.SendMailbox")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.fromAccount||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("news_add_field.Label.ReceivingMailbox")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.users||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("system_info.Label.EmailTitle")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.subject||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.State")},scopedSlots:e._u([{key:"default",fn:function(a){return[1==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Success",expression:"'State.Success'"}],staticClass:"state crm_state_green"}):e._e(),0==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Fail",expression:"'State.Fail'"}],staticClass:"state crm_state_red"}):e._e(),2==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Unsubscribed",expression:"'State.Unsubscribed'"}],staticClass:"state crm_state_gray"}):e._e()]}}])}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Date")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.sendDate||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"left","show-overflow-tooltip":"",label:e.$i18n.t("Label.Note")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.errorMsg||"--")+" ")]}}])}),t("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:e.$i18n.t("system_info.Label.EmailContent")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-VerifiedUser-Single",expression:"'R-VerifiedUser-Single'"}],staticClass:"state crm_state_blue crm-cursor",on:{click:function(t){return e.toContent(a.row.content)}}})]}}])}),t("el-table-column",{attrs:{prop:"",align:"center",label:e.$i18n.t("Label.Action")},scopedSlots:e._u([{key:"default",fn:function(a){var n;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"},[null!==(n=e.display["R-System-EmailRecord-Supplement"])&&void 0!==n&&n.show&&0==a.row.status?t("el-dropdown-item",{attrs:{command:{type:"editor",row:a.row}}},[t("i",{staticClass:"el-icon-s-operation"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-System-EmailRecord-Supplement",expression:"'R-System-EmailRecord-Supplement'"}]})]):e._e()],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(),t("el-dialog",{attrs:{title:e.$t("system_info.Label.EmailContent"),visible:e.dialogCheck,center:"","custom-class":"dialog_header_w EmailRecord"},on:{"update:visible":function(t){e.dialogCheck=t}}},[t("div",{staticClass:"dia-content"},[t("div",{staticStyle:{overflow:"auto",display:"flex","justify-content":"center"},domProps:{innerHTML:e._s(e.dialogCheckContent)}}),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],attrs:{type:"primary"},on:{click:function(t){e.dialogCheck=!1}}}),t("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:function(t){e.dialogCheck=!1}}})],1)])])],1)},s=[],i=a("5530"),r=a("c7eb"),l=a("1da1"),o=a("da7c"),c=a("f121"),u=a.n(c),p=u.a.Code,d={name:"EmailRecord",components:{},data:function(){return{dialogCheck:!1,dialogCheckContent:"",pictLoading:!1,mock_tableData:[],search:{status:null,users:"",date:[],startDate:"",endDate:""},dialogInfoTradingAdd:!1,editor:"",addType:"",myInfo:{},formList:{},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{display:function(){return this.Session.GetDisplay()}},methods:{handleCommand:function(e){"editor"==e.type&&this.againSend(e.row.id)},againSend:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(t){var a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=this,this.$pigeon.MessageConfirm(this.$i18n.t("news_add_field.Des.item2"),this.$i18n.t("R-System-EmailRecord-Supplement"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var n;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].emailSupplementSend({id:t});case 2:n=e.sent,n.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.Success")),a.searchFunc()):a.$pigeon.MessageError(n.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),toContent:function(e){this.dialogCheck=!0,this.dialogCheckContent=e},searchFunc:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a,n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,null!==(a=e.display["R-System-EmailRecord-Search"])&&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 null==e.search.date||0==e.search.date.length?(e.search.startDate="",e.search.endDate=""):(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1]),t.next=8,o["a"].emailRecord(Object(i["a"])(Object(i["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:n=t.sent,n.code==p.StatusOK?(e.mock_tableData=n.data,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 11:case"end":return t.stop()}}),t)})))()},getDate:function(){var e,t,a=2,n=(new Date).getTimezoneOffset(),s=(new Date).getTime(),i=new Date(s+60*n*1e3+60*a*60*1e3),r=i.getFullYear(),l=i.getMonth()+1,o=i.getDate();l<10&&(l="0"+l),o<10&&(o="0"+o),e=r+"-"+l+"-01";var c=i.getMonth(),u=++c,p=new Date(i.getFullYear(),u,1),d=864e5,m=new Date(p-d),g=m.getDate();g<10&&(g="0"+g),t=r+"-"+l+"-"+g,this.search.date=[e,t]},getSearchDate:function(e){this.search.date=e},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()}},mounted:function(){this.getDate(),this.searchFunc()}},m=d,g=(a("90e9"),a("fc84"),a("2877")),f=Object(g["a"])(m,n,s,!1,null,"13e79625",null);t["default"]=f.exports},"4e66":function(e,t,a){},"50fa":function(e,t,a){"use strict";a("ae43")},"90e9":function(e,t,a){"use strict";a("e847")},"9b3a":function(e,t,a){},ae43:function(e,t,a){},e847:function(e,t,a){},f5ac:function(e,t,a){"use strict";a("9b3a")},fc84:function(e,t,a){"use strict";a("4e66")}}]);