| 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=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"mail_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":"15px"}},[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("State.Sending"),value:1},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("State.Success"),value:2},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}}),t("el-option",{attrs:{label:e.$t("State.Fail"),value:3},nativeOn:{click:function(t){return e.toSearch.apply(null,arguments)}}})],1)],1),t("el-form-item",[t("el-select",{staticClass:"crm_search_down crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.tag,callback:function(t){e.$set(e.search,"tag",t)},expression:"search.tag"}},[t("el-option",{attrs:{label:e.$t("Marketing.Recipient"),value:1}})],1)],1),t("el-form-item",{staticStyle:{"margin-right":"10px"}},[1==e.search.tag?t("el-input",{staticClass:"crm-border-radius-no crm-border-left-no",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.user,callback:function(t){e.$set(e.search,"user",t)},expression:"search.user"}}):e._e()],1),t("el-form-item",{staticStyle:{"margin-right":"10px"}},[t("el-select",{staticClass:"country crm-border-radius-no",attrs:{size:"small",filterable:"",clearable:"",placeholder:e.$t("news_add_field.Label.Country")},model:{value:e.search.country,callback:function(t){e.$set(e.search,"country",t)},expression:"search.country"}},e._l(e.mock_options,(function(a){return t("el-option",{key:a.id,attrs:{label:"cn"==e.Session.Get("lang")?a.name:a.enName,value:a.code}})})),1)],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",{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",[t("div",{staticClass:"search_action_btn"},[e.multipleSelection.length&&e.display["R-MassMailing-Supplement"].show&&"mass"==e.myType?t("span",{staticClass:"crm-cursor delete active",on:{click:e.SupplementSelect}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e(),!e.multipleSelection.length&&e.display["R-MassMailing-Supplement"].show&&"mass"==e.myType?t("span",{staticClass:"crm-cursor delete"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e(),e.display["R-MassMailing-Supplement"].show&&"mass"==e.myType?t("span",{staticClass:"crm-cursor delete active",on:{click:e.SupplementAll}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Label.SupplementAll",expression:"'news_add_field.Label.SupplementAll'"}]})]):e._e(),e.multipleSelection.length&&e.display["R-EmailDiscountCode-Supplement"].show&&"promo"==e.myType?t("span",{staticClass:"crm-cursor delete active",on:{click:e.SupplementSelect}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e(),!e.multipleSelection.length&&e.display["R-EmailDiscountCode-Supplement"].show&&"promo"==e.myType?t("span",{staticClass:"crm-cursor delete"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e(),e.display["R-EmailDiscountCode-Supplement"].show&&"promo"==e.myType?t("span",{staticClass:"crm-cursor delete active",on:{click:e.SupplementAll}},[t("span",{directives:[{name:"t",rawName:"v-t",value:"news_add_field.Label.SupplementAll",expression:"'news_add_field.Label.SupplementAll'"}]})]):e._e(),t("span",{staticClass:"crm-cursor",on:{click:e.back}},[t("i",{staticClass:"el-icon-arrow-left"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Bank",expression:"'Btn.Bank'"}]})])])])],1)],1),"mass"==e.myType?t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.Record_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),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||"--")+" ")]}}],null,!1,1177153642)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Marketing.Recipient")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.user||"--")+" ")]}}],null,!1,916480588)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Name")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.name||"--")+" ")]}}],null,!1,454495354)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("news_add_field.Label.Country")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("en"==e.Session.Get("lang")?t.row.countryEnName:t.row.countryName)+" ")]}}],null,!1,2853598907)}),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||"--")+" ")]}}],null,!1,1520071393)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("news_add_field.Label.SendDate")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.sendDate||"--")+" ")]}}],null,!1,2286895733)}),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)}}})]}}],null,!1,491625655)}),t("el-table-column",{attrs:{prop:"",align:"center",width:"120",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.Sending",expression:"'State.Sending'"}],staticClass:"state crm_state_blue"}):e._e(),2==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Success",expression:"'State.Success'"}],staticClass:"state crm_state_green"}):e._e(),3==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Fail",expression:"'State.Fail'"}],staticClass:"state crm_state_red"}):e._e(),4==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Unsubscribed",expression:"'State.Unsubscribed'"}],staticClass:"state crm_state_gray"}):e._e()]}}],null,!1,558890923)}),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-MassMailing-Supplement"].show&&3==a.row.status?t("el-dropdown-item",{attrs:{command:{type:"Supplement",id:a.row.id}}},[t("i",{staticClass:"el-icon-s-promotion"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e()],1)],1)]}}],null,!1,3492158991)})],1):e._e(),"promo"==e.myType?t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.Record_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),t("el-table-column",{attrs:{prop:"cId",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||"--")+" ")]}}],null,!1,1177153642)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Marketing.Recipient")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.user||"--")+" ")]}}],null,!1,916480588)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.Name")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.name||"--")+" ")]}}],null,!1,454495354)}),t("el-table-column",{attrs:{prop:"title",align:"left",label:e.$i18n.t("news_add_field.Label.Country")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("en"==e.Session.Get("lang")?t.row.countryEnName:t.row.countryName)+" ")]}}],null,!1,2853598907)}),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||"--")+" ")]}}],null,!1,1520071393)}),t("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("news_add_field.Label.SendDate")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.sendDate||"--")+" ")]}}],null,!1,2286895733)}),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)}}})]}}],null,!1,491625655)}),t("el-table-column",{attrs:{prop:"",align:"center",width:"120",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.Sending",expression:"'State.Sending'"}],staticClass:"state crm_state_blue"}):e._e(),2==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Success",expression:"'State.Success'"}],staticClass:"state crm_state_green"}):e._e(),3==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Fail",expression:"'State.Fail'"}],staticClass:"state crm_state_red"}):e._e(),4==a.row.status?t("span",{directives:[{name:"t",rawName:"v-t",value:"State.Unsubscribed",expression:"'State.Unsubscribed'"}],staticClass:"state crm_state_gray"}):e._e()]}}],null,!1,558890923)}),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-EmailDiscountCode-Supplement"].show&&3==a.row.status?t("el-dropdown-item",{attrs:{command:{type:"Supplement",id:a.row.id}}},[t("i",{staticClass:"el-icon-s-promotion"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"R-MassMailing-Supplement",expression:"'R-MassMailing-Supplement'"}]})]):e._e()],1)],1)]}}],null,!1,4064829846)})],1):e._e(),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","min-height":"450px"},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=[],r=a("5530"),i=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(i["a"])().mark((function t(){var a,n;return Object(i["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(i["a"])().mark((function e(){var t;return Object(i["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(i["a"])().mark((function e(){var t;return Object(i["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(i["a"])().mark((function t(){var a,n;return Object(i["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(i["a"])().mark((function e(){var t;return Object(i["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(i["a"])().mark((function e(){var t;return Object(i["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(i["a"])().mark((function e(t){var a,n;return Object(i["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(i["a"])().mark((function e(){var n;return Object(i["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(i["a"])().mark((function e(){var a;return Object(i["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(i["a"])().mark((function t(){var a,n;return Object(i["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(e.display["R-MassMailing-record"].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(r["a"])(Object(r["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 9:a=t.sent,a.code==p.StatusOK?(e.Record_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),t.next=22;break;case 13:if("promo"!=e.myType){t.next=22;break}if(e.display["R-EmailDiscountCode-record"].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(r["a"])(Object(r["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 20: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);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(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,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("e20d"),a("2fce"),a("2877")),f=Object(g["a"])(m,n,s,!1,null,"4ad4dcff",null);t["default"]=f.exports},"1bc3":function(e,t,a){},"1faa":function(e,t,a){},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){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-System-EmailRecord-Supplement"].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=[],r=a("5530"),i=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(i["a"])().mark((function e(t){var a;return Object(i["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(i["a"])().mark((function e(){var n;return Object(i["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(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,e.display["R-System-EmailRecord-Search"].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(r["a"])(Object(r["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8: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 11:case"end":return t.stop()}}),t)})))()},getDate:function(){var e,t,a=2,n=(new Date).getTimezoneOffset(),s=(new Date).getTime(),r=new Date(s+60*n*1e3+60*a*60*1e3),i=r.getFullYear(),l=r.getMonth()+1,o=r.getDate();l<10&&(l="0"+l),o<10&&(o="0"+o),e=i+"-"+l+"-01";var c=r.getMonth(),u=++c,p=new Date(r.getFullYear(),u,1),d=864e5,m=new Date(p-d),g=m.getDate();g<10&&(g="0"+g),t=i+"-"+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("39ab"),a("a713"),a("2877")),f=Object(g["a"])(m,n,s,!1,null,"7d4a6ab7",null);t["default"]=f.exports},"2fce":function(e,t,a){"use strict";a("1bc3")},"39ab":function(e,t,a){"use strict";a("8ef4")},"8ef4":function(e,t,a){},a713:function(e,t,a){"use strict";a("1faa")},cbba:function(e,t,a){},e20d:function(e,t,a){"use strict";a("cbba")}}]);
|