shop-point-history.dd690f4d.js 7.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["shop-point-history"],{"0ffe":function(t,e,a){"use strict";var s=a("ff2d"),o=a("bc3a"),r=a.n(o),n=a("f121"),i=a.n(n);class l extends s["a"]{constructor(){super(),r.a.defaults.baseURL=i.a.HostShop}async getShopToken(t={}){let e=await this.postAll("Host80","/shop/custom/info/loginByCId",t);return e}async customBalance(t={}){let e=await this.postAll("HostShop","/custom/balance",t);return e}async customLntegralList(t={}){let e=await this.postAll("HostShop","/custom/integral/search/list",t);return e}async commodityTypeList(t={}){let e=await this.postAll("HostShop","/commodity/type/search/list",t);return e}async commodityList(t={}){let e=await this.postAll("HostShop","/commodity/search/list",t);return e}async commoditySingle(t={}){let e=await this.postAll("HostShop","/commodity/search/single",t);return e}async orderAdd(t={}){let e=await this.postAll("HostShop","/order/add",t);return e}async orderUpdate(t={}){let e=await this.postAll("HostShop","/order/update",t);return e}async orderCancel(t={}){let e=await this.postAll("HostShop","/order/cancel",t);return e}async orderComplete(t={}){let e=await this.postAll("HostShop","/order/complete",t);return e}async orderList(t={}){let e=await this.postAll("HostShop","/order/search/list",t);return e}async orderSingle(t={}){let e=await this.postAll("HostShop","/order/search/single",t);return e}async addressAdd(t={}){let e=await this.postAll("HostShop","/custom/address/add",t);return e}async addressDelete(t={}){let e=await this.postAll("HostShop","/custom/address/delete",t);return e}async addressUpdate(t={}){let e=await this.postAll("HostShop","/custom/address/update",t);return e}async addressList(t={}){let e=await this.postAll("HostShop","/custom/address/search/list",t);return e}}e["a"]=new l},"5c12":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],attrs:{id:"PointHistory","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[e("div",{staticClass:"crm-title-box"},[e("div",{staticClass:"header"},[e("span",{staticClass:"user"},[e("i",{staticClass:"iconfont iconyonghu1"}),e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Global.CID",expression:"'Shop.Global.CID'"}]}),t._v(": "+t._s(t.user)+" ")]),e("span",{staticClass:"point"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Global.Points",expression:"'Shop.Global.Points'"}]}),t._v(": "+t._s(t._f("NumberFormat1")(t.point)))])])]),e("div",{staticClass:"main-content"},[e("el-row",{staticClass:"title-box",attrs:{gutter:10}},[e("el-col",{staticClass:"title",attrs:{xs:8,sm:24,md:24,lg:6}},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Points.IntegralHistory",expression:"'Shop.Points.IntegralHistory'"}],staticClass:"content"})]),e("el-col",{staticClass:"search",attrs:{xs:16,sm:24,md:24,lg:18}},[e("el-date-picker",{staticClass:"crm_date_pick crm-border-radius-no",staticStyle:{"padding-top":"2px"},attrs:{type:"daterange",align:"right","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"-",size:"small","start-placeholder":t.$t("placeholder.Start"),"end-placeholder":t.$t("placeholder.End")},model:{value:t.search.date,callback:function(e){t.$set(t.search,"date",e)},expression:"search.date"}}),e("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:t.toSearch}})],1)],1),e("el-row",[e("el-table",{staticClass:"table",staticStyle:{width:"100%"},attrs:{stripe:"","show-summary":"","summary-method":t.getSummaries,data:t.mock_data}},[e("el-table-column",{attrs:{label:t.$t("Shop.Points.SourceOfPoints"),width:"200",prop:"source"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.source||"--")+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("Shop.Points.Type"),width:"180"},scopedSlots:t._u([{key:"default",fn:function(a){return[1==a.row.type?e("div",{staticClass:"content"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Points.NewlyAdded",expression:"'Shop.Points.NewlyAdded'"}]})]):t._e(),2==a.row.type?e("div",{staticClass:"content"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Points.Deduction",expression:"'Shop.Points.Deduction'"}]})]):t._e()]}}])}),e("el-table-column",{attrs:{label:t.$t("Shop.Points.DateTime"),width:"180"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"content"},[t._v(t._s(a.row.date||"--"))])]}}])}),e("el-table-column",{attrs:{label:t.$t("Shop.Points.ProductFraction"),width:"180",prop:"integral"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.integral||"0")+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("Shop.Points.Remarks"),prop:"note"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("cn"==t.lang?e.row.channelName||"--":e.row.channelNameEn||"--")+" ")]}}])})],1)],1),t.pagerInfo.rowTotal?e("el-pagination",{staticClass:"pagination",attrs:{background:"",layout:"prev, pager, next","page-size":t.pagerInfo.row,total:t.pagerInfo.rowTotal},on:{"current-change":t.handleCurrentChange}}):t._e()],1)])},o=[],r=a("0ffe"),n=a("f121"),i=a.n(n);let{Code:l}=i.a;var c={name:"PointHistory",data(){return{pictLoading:!1,user:"--",point:"--",option:-3,options:[{value:-3,label:"全部"},{value:-2,label:"后台取消"},{value:-1,label:"客户取消"},{value:0,label:"已支付"},{value:1,label:"已发货"},{value:2,label:"订单完成"}],daterange:"",mock_data:[],search:{date:[],startDate:"",endDate:""},combined:{},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{lang(){return this.Session.Get("lang")}},methods:{NumberFormatAll(t){if("***"==t)return"***";if(isNaN(t))return 0;let e=t.toString();if(e.indexOf("-")>-1){e=e.split("-")[1];let a=e.split("."),s=a[0].length;if(s<3)return t;let o=0,r="";for(let t=s-3;t>=0;t-=3)r=a[0].substr(t,3)+(""==r?"":",")+r,o=t;return o>0&&(r=a[0].substr(0,o)+(""==r?"":",")+r),"-"+r+(1==a.length?"":"."+a[1])}{let a=e.split("."),s=a[0].length;if(s<3)return t;let o=0,r="";for(let t=s-3;t>=0;t-=3)r=a[0].substr(t,3)+(""==r?"":",")+r,o=t;return o>0&&(r=a[0].substr(0,o)+(""==r?"":",")+r),r+(1==a.length?"":"."+a[1])}},getSummaries(){let t=[this.$i18n.t("Label.Total"),"","",this.combined.integral?this.NumberFormatAll(this.combined.integral):0,""];return t},toSearch(){this.pagerInfo.current=1,this.searchFunc()},handleSizeChange(t){this.pagerInfo.row=t,this.searchFunc()},handleCurrentChange(t){this.pagerInfo.current=t,this.searchFunc()},async getPoint(){let t=await r["a"].customBalance();t.code==l.StatusOK?this.point=t.data:this.$pigeon.MessageError(t.msg)},async searchFunc(){this.pictLoading=!0,null==this.search.date||0==this.search.date.length?(this.search.startDate="",this.search.endDate=""):(this.search.startDate=this.search.date[0],this.search.endDate=this.search.date[1]);let t=await r["a"].customLntegralList({...this.search,page:{current:this.pagerInfo.current,row:this.pagerInfo.row}});t.code==l.StatusOK?(this.mock_data=t.data,null!=t.page?(this.pagerInfo.rowTotal=t.page.rowTotal,this.pagerInfo.pageTotal=t.page.pageTotal):this.pagerInfo.rowTotal=0,null!=t.sum?this.combined=t.sum:this.combined={},this.$pigeon.MessageOK(this.$i18n.t("Msg.SearchSuccess")),this.pictLoading=!1):(this.$pigeon.MessageError(t.msg),this.pictLoading=!1)}},mounted(){this.user=JSON.parse(this.Session.Get("user",!0)).customInfo.cId,this.getPoint(),this.searchFunc()}},d=c,h=(a("7d7f"),a("2877")),p=Object(h["a"])(d,s,o,!1,null,"0b3d5d48",null);e["default"]=p.exports},"7d7f":function(t,e,a){"use strict";a("e94d")},e94d:function(t,e,a){}}]);