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 line
6.1 KiB
1 line
6.1 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0e13be"],{"7a20":function(t,e,n){"use strict";n.r(e);var i=n("2f62"),s=n("b7be"),o=n("d708");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={name:"piecesDiscount",data:function(){return{roterPre:o.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:"活动类型",slot:"n_piece_n_discount",minWidth:100},{title:"支付订单",key:"sum_order",minWidth:100},{title:"参与客户",key:"sum_user",minWidth:100},{title:"实付金额",key:"sum_pay_price",minWidth:100},{title:"是否开启",slot:"status",width:120},{title:"操作",slot:"action",fixed:"right",minWidth:120}],discountFrom:{page:1,limit:15,name:"",status:"",n_piece_n_discount:""},list:[],total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},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()},methods:{del:function(t,e,n){var i=this,s={title:e,num:n,url:"marketing/promotions/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(s).then((function(t){i.$Message.success(t.msg),i.list.splice(n,1),i.list.length||(i.discountFrom.page=1==i.discountFrom.page?1:i.discountFrom.page-1),i.getList()})).catch((function(t){i.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;Object(s.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_pieces/0"})},discountSearchs:function(){this.discountFrom.page=1,this.list=[],this.getList()},getList:function(){var t=this;this.loading=!0,Object(s.E)(2,this.discountFrom).then((function(e){var n=e.data;t.list=n.list,t.total=n.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.discountFrom.page=t,this.getList()},edit:function(t){this.$router.push({path:this.roterPre+"/marketing/discount/add_pieces/"+t})}}},u=n("2877"),l=Object(u.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Form",{ref:"discountFrom",attrs:{inline:"",model:t.discountFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"是否有效:"}},[n("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"}},[n("Option",{attrs:{value:"1"}},[t._v("是")]),n("Option",{attrs:{value:"0"}},[t._v("否")])],1)],1),n("FormItem",{attrs:{label:"活动类型:"}},[n("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.discountSearchs},model:{value:t.discountFrom.n_piece_n_discount,callback:function(e){t.$set(t.discountFrom,"n_piece_n_discount",e)},expression:"discountFrom.n_piece_n_discount"}},[n("Option",{attrs:{value:"1"}},[t._v("第2件半价")]),n("Option",{attrs:{value:"2"}},[t._v("买1送1")]),n("Option",{attrs:{value:"3"}},[t._v("自定义优惠")])],1)],1),n("FormItem",{attrs:{lab
|