徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
6.0 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0c7752"],{5166:function(t,e,i){"use strict";i.r(e);var n=i("2f62"),o=i("b7be"),r=i("d708");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function u(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var l={name:"discount",data:function(){return{roterPre:r.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"活动名称",key:"name",minWidth:100},{title:"参与商品数",key:"product_count",minWidth:100},{title:"订单实付金额(元)",key:"sum_pay_price",minWidth:100},{title:"优惠总金额",key:"sum_promotions_price",minWidth:100},{title:"支付订单",key:"sum_order",minWidth:100},{title:"参与客户",key:"sum_user",minWidth:100},{title:"老成交用户数",key:"old_user",minWidth:100},{title:"新成交用户数",key:"new_user",minWidth:100},{title:"是否开启",slot:"status",minWidth:100},{title:"操作",slot:"action",fixed:"right",minWidth:120}],discountFrom:{page:1,limit:15,name:"",status:""},list:[],total:0}},computed:c(c({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{del:function(t,e,i){var n=this,o={title:e,num:i,url:"marketing/promotions/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.list.splice(i,1),n.list.length||(n.discountFrom.page=1==n.discountFrom.page?1:n.discountFrom.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;Object(o.F)(t.id,t.status).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},add:function(){this.$router.push({path:this.roterPre+"/marketing/discount/add/0"})},discountSearchs:function(){this.discountFrom.page=1,this.list=[],this.getList()},getList:function(){var t=this;this.loading=!0,Object(o.E)(1,this.discountFrom).then((function(e){var i=e.data;t.list=i.list,t.total=i.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.discountFrom.page=t,this.getList()},orderSearch:function(){this.discountFrom.page=1,this.getList()},edit:function(t){this.$router.push({path:this.roterPre+"/marketing/discount/add/"+t})}}},d=i("2877"),m=Object(d.a)(l,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"mt15 ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"discountFrom",attrs:{inline:"",model:t.discountFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"是否有效:"}},[e("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.discountSearchs},model:{value:t.discountFrom.status,callback:function(e){t.$set(t.discountFrom,"status",e)},expression:"discountFrom.status"}},[e("Option",{attrs:{value:"1"}},[t._v("是")]),e("Option",{attrs:{value:"0"}},[t._v("否")])],1)],1),e("FormItem",{attrs:{label:"活动名称:"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入活动名称"},on:{"on-search":t.discountSearchs},model:{value:t.discountFrom.name,callback:function(e){t.$set(t.discountFrom,"name",e)},expression:"discountFrom.name"}}),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.orderSearch()}}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加限时折扣")]),e("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.columns1,data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var i=t.row;return t.index,[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.icon,expression:"row.icon"}]})])])]}},{key:"status",fn:function(i){var n=i.row;return i.index,[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(i){var n=i.row,o=i.index;return[e("a",{on:{click:function(e){return t.edit(n.id)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"删除限时折扣活动",o)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.discountFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"f33bfd18",null);e.default=m.exports}}]);