chunk-517ba3dc.3d692417.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-517ba3dc"],{1184:function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return c})),r.d(t,"e",(function(){return u}));var n=r("b6bd");function a(e){return Object(n.a)({url:"lottery/list",method:"get",params:e})}function i(e){return Object(n.a)({url:"lottery/add",method:"post",data:e})}function o(e,t){return Object(n.a)({url:"lottery/edit/".concat(e),method:"put",data:t})}function s(e){return Object(n.a)({url:"lottery/factor_info/".concat(e),method:"get"})}function l(e){return Object(n.a)({url:"lottery/set_status/".concat(e.id,"/").concat(e.status),method:"post"})}function c(e){return Object(n.a)({url:"lottery/record/list",method:"get",params:e})}function u(e){return Object(n.a)({url:"lottery/record/deliver",method:"post",data:e})}},"61f7":function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(t)){var a=r[n]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?a:s(a))}return t}function s(e){return("00"+e).substr(e.length)}r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return u})),r.d(t,"b",(function(){return m}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=function(e,t){e.message=function(e){return t.replace("%s",e||"")}};function u(e){return a({required:!0,message:e,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function m(e){return d.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,e)}c(u,"请输入%s"),c(m,"%s格式不正确");var d=Object.keys(l).reduce((function(e,t){return e[t]=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===t?{min:e[0],max:e[1]}:i({},t,e);return a({message:r.replace(":".concat(t),"range"===t?"".concat(e[0],"-").concat(e[1]):e),type:"string"},o,{},n)},c(e[t],l[t]),e}),{})},8562:function(e,t,r){"use strict";var n=r("9c39");r.n(n).a},"9c39":function(e,t,r){},ca99:function(e,t,r){"use strict";r.r(t);var n=r("a34a"),a=r.n(n),i=r("2f62"),o=r("1184"),s=r("61f7"),l=r("f8b7"),c={deliver_name:[{required:!0,type:"string",message:"请选择快递公司",trigger:"select"}],deliver_number:[{required:!0,message:"请输入快递单号",trigger:"blur"}]},u={mark:[{required:!0,message:"请输入备注信息",trigger:"blur"}]};function m(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){m(i,n,a,o,s,"next",e)}function s(e){m(i,n,a,o,s,"throw",e)}o(void 0)}))}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h={name:"lotteryRecordList",filters:{formatDate:function(e){if(0!==e){var t=new Date(1e3*e);return Object(s.a)(t,"yyyy-MM-dd hh:mm")}}},data:function(){return{modals:!1,shipModel:!1,loading:!1,locationList:[],shipForm:{id:"",deliver_name:"",deliver_number:null},markForm:{id:"",mark:""},ruleShip:c,ruleMark:u,lotteryList:[{text:"全部",val:"0"},{text:"积分抽奖",val:"1"},{text:"订单支付",val:"3"},{text:"订单评价",val:"4"},{text:"关注公众号",val:"5"}],typeList:[{text:"全部",val:"0"},{text:"积分",val:"2"},{text:"余额",val:"3"},{text:"红包",val:"4"},{text:"优惠券",val:"5"},{text:"商品",val:"6"}],columns1:[{title:"ID",key:"id",width:80},{title:"用户信息",slot:"user",minWidth:90},{title:"奖品信息",slot:"prize",minWidth:130},{title:"抽奖时间",key:"add_time",minWidth:100},{title:"收货信息",slot:"receive_info",minWidth:100},{title:"备注",slot:"mark",minWidth:100},{title:"操作",slot:"action",minWidth:130}],tableList:[],grid:{xl:6,lg:10,md:12,sm:24,xs:24},tableFrom:{type:"",factor:"",keyword:"",date:[],page:1,limit:15},total:0,timeVal:[],modelType:1,lottery_id:"",modelTitle:"",options:{shortcuts:[{text:"今天",value:function(){var e=new Date,t=new Date;return t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[t,e]}},{text:"昨天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[t,e]}},{text:"最近7天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[t,e]}},{text:"最近30天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[t,e]}},{text:"上月",value:function(){var e=new Date,t=new Date,r=new Date(t.getFullYear(),t.getMonth(),0).getDate();return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,r))),[t,e]}},{text:"本月",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[t,e]}},{text:"本年",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),0,1))),[t,e]}}]}}},computed:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(r,!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList(),this.getExpressData()},methods:{clear:function(){this.markForm={id:"",mark:""},this.shipForm={id:"",deliver_name:"",deliver_number:null},this.modelTitle=""},tapMark:function(e){this.markForm.id=e.id,this.markForm.mark=e.deliver_info.mark,this.modals=!0},closeRemark:function(){this.modals=!1,this.clear()},putRemark:function(){var e=this;Object(o.e)(this.markForm).then((function(){e.$Message.success("操作成功"),e.modals=!1,e.getList(),e.clear()})).catch((function(t){e.$Message.error(t.msg)}))},deliver:function(e,t){this.shipForm.id=e.id,this.shipForm.deliver_name="",this.shipForm.deliver_number="",this.modelType=t,this.shipModel=!0},isDeliver:function(e){this.shipForm.id=e.id,this.modelType=1,this.modelTitle="配送信息",this.shipModel=!0,this.shipForm.deliver_name=e.deliver_info.deliver_name,this.shipForm.deliver_number=e.deliver_info.deliver_number},ok:function(e){var t=this;this.$refs[e].validate((function(r){r&&Object(o.e)(t.shipForm).then((function(){t.$Message.success("操作成功"),t.shipModel=!1,t.getList(),t.clear(),t.$refs[e].resetFields()})).catch((function(e){t.$Message.error(e.msg)}))}))},cancel:function(e){this.modelType=1,this.shipModel=!1,this.clear(),this.$refs[e].resetFields()},getExpressData:function(){var e=this;Object(l.j)("").then(function(){var t=d(a.a.mark((function t(r){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.locationList=r.data;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},onchangeTime:function(e){this.timeVal=e,this.tableFrom.data=this.timeVal[0]?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList()},getList:function(){var e=this;this.loading=!0,Object(o.g)(this.tableFrom).then(function(){var t=d(a.a.mark((function t(r){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.data,e.tableList=n.list,e.total=r.data.count,e.loading=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},pageChange:function(e){this.tableFrom.page=e,this.getList()},userSearchs:function(){this.tableFrom.page=1,this.getList()}}},v=(r("8562"),r("2877")),g=Object(v.a)(h,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[r("div",{staticClass:"new_card_pd"},[r("Form",{ref:"tableFrom",attrs:{inline:"",model:e.tableFrom,"label-width":e.labelWidth,"label-position":e.labelPosition},nativeOn:{submit:function(e){e.preventDefault()}}},[r("FormItem",{attrs:{label:"活动类型:"}},[r("Select",{staticClass:"input-add",model:{value:e.tableFrom.factor,callback:function(t){e.$set(e.tableFrom,"factor",t)},expression:"tableFrom.factor"}},e._l(e.lotteryList,(function(t){return r("Option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.text))])})),1)],1),r("FormItem",{attrs:{label:"时间选择:"}},[r("DatePicker",{staticClass:"input-add",attrs:{editable:!1,value:e.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:e.options},on:{"on-change":e.onchangeTime}})],1),r("FormItem",{attrs:{label:"奖品类型:"}},[r("Select",{staticClass:"input-add",model:{value:e.tableFrom.type,callback:function(t){e.$set(e.tableFrom,"type",t)},expression:"tableFrom.type"}},e._l(e.typeList,(function(t){return r("Option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.text))])})),1)],1),r("FormItem",{attrs:{label:"搜索用户:","label-for":"store_name"}},[r("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入用户信息"},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}}),r("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:function(t){return e.userSearchs()}}},[e._v("查询")])],1)],1)],1)]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Table",{attrs:{columns:e.columns1,data:e.tableList,loading:e.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:e._u([{key:"is_fail",fn:function(e){return[1===e.row.is_fail?r("Icon",{attrs:{type:"md-checkmark",color:"#0092DC",size:"14"}}):r("Icon",{attrs:{type:"md-close",color:"#ed5565",size:"14"}})]}},{key:"user",fn:function(t){var n=t.row;return[n.user?r("span",[e._v(e._s(n.user.nickname)+" ")]):e._e(),n.user&&null!=n.user.delete_time?r("span",{staticStyle:{color:"#ed4014"}},[e._v(" (已注销)")]):e._e()]}},{key:"mark",fn:function(t){var n=t.row;return[r("span",[e._v(e._s(n.deliver_info.mark))])]}},{key:"receive_info",fn:function(t){var n=t.row;return[n.receive_info.name?r("div",[r("div",[e._v("姓名:"+e._s(n.receive_info.name))]),r("div",[e._v("电话:"+e._s(n.receive_info.phone))]),r("div",[e._v("地址:"+e._s(n.receive_info.address))]),n.receive_info.mark?r("div",[e._v("\n 备注:"+e._s(n.receive_info.mark)+"\n ")]):e._e()]):e._e()]}},{key:"prize",fn:function(t){var n=t.row;return[r("div",{staticClass:"prize"},[r("img",{attrs:{src:n.prize.image,alt:""}}),r("span",[e._v(e._s(n.prize.name))])])]}},{key:"action",fn:function(t){var n=t.row;return[r("a",{on:{click:function(t){return e.tapMark(n)}}},[e._v("备注")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:e.total,current:e.tableFrom.page,"show-elevator":"","show-total":"","page-size":e.tableFrom.limit},on:{"on-change":e.pageChange}})],1)],1),r("Modal",{attrs:{scrollable:"",title:"备注",closable:!1},model:{value:e.modals,callback:function(t){e.modals=t},expression:"modals"}},[r("Form",{ref:"formValidate",attrs:{model:e.markForm,"label-width":80},nativeOn:{submit:function(e){e.preventDefault()}}},[r("FormItem",{attrs:{label:"备注:",prop:"remark"}},[r("Input",{attrs:{maxlength:"200","show-word-limit":"",type:"textarea",placeholder:"请输入备注"},model:{value:e.markForm.mark,callback:function(t){e.$set(e.markForm,"mark",t)},expression:"markForm.mark"}})],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"primary"},on:{click:e.putRemark}},[e._v("提交")]),r("Button",{on:{click:e.closeRemark}},[e._v("关闭")])],1)],1),r("Modal",{attrs:{width:"40%",scrollable:"",closable:"","footer-hide":"",title:e.modelTitle?e.modelTitle:"发货","mask-closable":!1,"z-index":1},on:{"on-cancel":function(t){return e.cancel("shipForm")}},model:{value:e.shipModel,callback:function(t){e.shipModel=t},expression:"shipModel"}},[r("Form",{ref:"shipForm",attrs:{model:e.shipForm,rules:e.ruleShip,"label-width":80}},[r("FormItem",{attrs:{label:"快递公司",prop:"deliver_name"}},[r("Select",{model:{value:e.shipForm.deliver_name,callback:function(t){e.$set(e.shipForm,"deliver_name",t)},expression:"shipForm.deliver_name"}},e._l(e.locationList,(function(t){return r("Option",{key:t.id,attrs:{value:t.value}},[e._v(e._s(t.value))])})),1)],1),r("FormItem",{attrs:{label:"快递单号",prop:"deliver_number"}},[r("Input",{attrs:{placeholder:"请输入快递单号"},model:{value:e.shipForm.deliver_number,callback:function(t){e.$set(e.shipForm,"deliver_number",t)},expression:"shipForm.deliver_number"}}),"顺丰速运"==e.shipForm.deliver_name?r("div",{staticClass:"trips"},[r("p",[e._v("顺丰请输入单号 :收件人或寄件人手机号后四位")]),r("p",[e._v("例如:SF000000000000:3941")])]):e._e()],1),r("FormItem",[r("Button",{attrs:{type:"primary"},on:{click:function(t){return e.ok("shipForm")}}},[e._v("提交")]),r("Button",{staticStyle:{"margin-left":"8px"},on:{click:function(t){return e.cancel("shipForm")}}},[e._v("关闭")])],1)],1)],1)],1)}),[],!1,null,"8675605a",null);t.default=g.exports}}]);