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
13 KiB
1 lines
13 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e12fa4b4"],{9406:function(e,t,r){"use strict";r.r(t);var n=r("c24f"),u={name:"list",data:function(){return{thead:[{title:"ID",key:"id",maxWidth:60},{title:"会员名",key:"title"},{title:"有限期(天)",key:"vip_day",render:function(e,t){return e("span",-1===t.row.vip_day?"永久":t.row.vip_day)}},{title:"原价",key:"price"},{title:"优惠价",key:"pre_price"},{title:"排序",key:"sort"},{title:"是否开启",slot:"is_del"},{title:"会员礼包",slot:"is_libao"},{title:"操作",slot:"action"}],tbody:[],loading:!1,modal:!1,rowEdit:{},rowModelType:"编辑",rule:[{type:"hidden",field:"id",value:""},{type:"hidden",field:"type",value:""},{type:"input",field:"title",title:"会员名",value:"",props:{disabled:!1,required:!0},validate:[{type:"string",max:5,min:1,message:"请输入长度为1-5的名称",requred:!0}]},{type:"InputNumber",field:"vip_day",title:"有限期(天)",value:null,props:{precision:0,disabled:!1,type:"text",required:!0},validate:[{type:"number",max:1e6,min:0,message:"最大只能输入1000000,最小为0",requred:!0}]},{type:"InputNumber",field:"price",title:"原价",value:null,props:{min:0,disabled:!1,required:!0},validate:[{type:"number",max:1e6,min:0,message:"最大只能输入1000000,最小为0",requred:!0}]},{type:"InputNumber",field:"pre_price",title:"优惠价",value:null,props:{min:0,disabled:!1,required:!0},validate:[{type:"number",max:1e6,min:.01,message:"最大只能输入1000000,最小为0.01",requred:!0}]},{type:"InputNumber",field:"sort",title:"排序",value:0,props:{precision:0,min:1,max:1e6,disabled:!1},validate:[{type:"number",max:1e6,min:0,message:"最大只能输入1000000,最小为0",requred:!0}]},{type:"radio",field:"is_label",title:"特惠标签",value:0,options:[{value:1,label:"是"},{value:0,label:"否"}]}],fapi:{id:"",pre_price:null,price:null,sort:null,title:"",type:"owner",vip_day:null}}},created:function(){this.getMemberShip()},mounted:function(){},methods:{onchangeIsShow:function(e,t){var r=this,u=[];u=1==t?{id:e.id,type:t,is_del:e.is_del}:{id:e.id,type:t,is_libao:e.is_libao},Object(n.x)(u).then((function(e){r.$Message.success(e.msg),r.getMemberShip()})).catch((function(e){r.$Message.error(e.msg)}))},cancel:function(){this.fapi.resetFields()},getMemberShip:function(){var e=this;this.loading=!0,Object(n.bb)().then((function(t){e.loading=!1;var r=t.data,n=r.count,u=r.list;e.total=n,e.tbody=u})).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},addType:function(){this.rowEdit.id=0,this.rowModelType="新增",this.rule[1].value="owner",this.rule[3].props.disabled=!1,this.rule[5].props.disabled=!1,this.rowEdit.title="",this.modal=!0},del:function(e,t,r){var n=this,u={title:t,num:r,url:"user/member_ship/delete/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(u).then((function(e){n.$Message.success(e.msg),n.getMemberShip()})).catch((function(e){n.$Message.error(e.msg)}))},editType:function(e){this.rule.forEach((function(t){for(var r in e)e.hasOwnProperty(r)&&t.field===r&&("vip_day"===r&&(-1===e[r]||"永久"==e[r]?(t.type="Input",t.props.disabled=!0,t.validate=[{type:"string",message:"",requred:!0}],e[r]="永久"):(t.type="InputNumber",t.props.disabled=!1,t.props.min=1,t.validate=[{type:"number",max:1e6,min:0,message:"最大只能输入1000000,最小为0",requred:!0}])),["price"].includes(r)&&(e[r]=parseFloat(e[r])),["pre_price"].includes(r)&&(e[r]=parseFloat(e[r]),"free"==e.type?(t.props.disabled=!0,t.validate=[]):(t.props.disabled=!1,t.validate=[{type:"number",max:1e6,min:.01,message:"最大只能输入1000000,最小为0.01",requred:!0}])),t.value=e[r])})),this.rowModelType="编辑",this.rowEdit=JSON.parse(JSON.stringify(e)),this.modal=!0},onSubmit:function(e){var t=this;Object(n.C)(this.rowEdit.id,e).then((function(e){t.modal=!1,t.$Message.success(e.msg),t.getMemberShip(),t.cancel()})).catch((function(e){t.$Message.error(e.msg)}))}}},a=(r("f10d"),r("2877")),o=Object(a.a)(u,(function(){var e=this,t=e._self._c;return t("div",[t("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[t("Button",{attrs:{type:"primary"},on:{click:e.addType}},[e._v("添加类型")]),t("Table",{staticClass:"mt25",attrs:{columns:e.thead,data:e.tbody,loading:e.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:e._u([{key:"is_del",fn:function(r){var n=r.row;return[t("i-switch",{attrs:{value:n.is_del,"true-value":0,"false-value":1,size:"large"},on:{"on-change":function(t){return e.onchangeIsShow(n,"1")}},model:{value:n.is_del,callback:function(t){e.$set(n,"is_del",t)},expression:"row.is_del"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("禁用")])])]}},{key:"is_libao",fn:function(r){var n=r.row;return[t("i-switch",{attrs:{value:n.is_libao,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(t){return e.onchangeIsShow(n,"2")}},model:{value:n.is_libao,callback:function(t){e.$set(n,"is_libao",t)},expression:"row.is_libao"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("开启")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("关闭")])])]}},{key:"action",fn:function(r){var n=r.row,u=r.index;return[t("a",{attrs:{href:"javascript:"},on:{click:function(t){return e.editType(n)}}},[e._v("编辑")]),"free"!==n.type&&"ever"!==n.type?t("Divider",{attrs:{type:"vertical"}}):e._e(),"free"!==n.type&&"ever"!==n.type?t("a",{attrs:{href:"javascript:"},on:{click:function(t){return e.del(n,"删除类型",u)}}},[e._v("删除")]):e._e()]}}])})],1),t("Modal",{attrs:{title:"".concat(e.rowModelType).concat(e.rowEdit&&e.rowEdit.title,"会员"),"footer-hide":""},on:{"on-cancel":e.cancel},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("form-create",{attrs:{rule:e.rule},on:{"on-submit":e.onSubmit},model:{value:e.fapi,callback:function(t){e.fapi=t},expression:"fapi"}})],1)],1)}),[],!1,null,"bfc29216",null);t.default=o.exports},c24f:function(e,t,r){"use strict";r.d(t,"X",(function(){return u})),r.d(t,"N",(function(){return a})),r.d(t,"M",(function(){return o})),r.d(t,"k",(function(){return i})),r.d(t,"r",(function(){return c})),r.d(t,"d",(function(){return s})),r.d(t,"h",(function(){return d})),r.d(t,"g",(function(){return l})),r.d(t,"q",(function(){return m})),r.d(t,"s",(function(){return f})),r.d(t,"J",(function(){return p})),r.d(t,"P",(function(){return b})),r.d(t,"L",(function(){return h})),r.d(t,"K",(function(){return g})),r.d(t,"f",(function(){return _})),r.d(t,"e",(function(){return v})),r.d(t,"n",(function(){return O})),r.d(t,"R",(function(){return j})),r.d(t,"p",(function(){return y})),r.d(t,"Q",(function(){return w})),r.d(t,"cb",(function(){return k})),r.d(t,"U",(function(){return x})),r.d(t,"S",(function(){return M})),r.d(t,"T",(function(){return S})),r.d(t,"W",(function(){return T})),r.d(t,"V",(function(){return q})),r.d(t,"Y",(function(){return E})),r.d(t,"v",(function(){return I})),r.d(t,"w",(function(){return $})),r.d(t,"Z",(function(){return N})),r.d(t,"i",(function(){return C})),r.d(t,"bb",(function(){return F})),r.d(t,"C",(function(){return P})),r.d(t,"db",(function(){return U})),r.d(t,"m",(function(){return J})),r.d(t,"ab",(function(){return D})),r.d(t,"F",(function(){return z})),r.d(t,"B",(function(){return B})),r.d(t,"A",(function(){return L})),r.d(t,"z",(function(){return W})),r.d(t,"D",(function(){return A})),r.d(t,"y",(function(){return G})),r.d(t,"x",(function(){return H})),r.d(t,"u",(function(){return K})),r.d(t,"t",(function(){return Q})),r.d(t,"o",(function(){return R})),r.d(t,"l",(function(){return V})),r.d(t,"G",(function(){return X})),r.d(t,"I",(function(){return Y})),r.d(t,"eb",(function(){return Z})),r.d(t,"O",(function(){return ee})),r.d(t,"E",(function(){return te})),r.d(t,"b",(function(){return re})),r.d(t,"a",(function(){return ne})),r.d(t,"fb",(function(){return ue})),r.d(t,"j",(function(){return ae})),r.d(t,"c",(function(){return oe})),r.d(t,"H",(function(){return ie}));var n=r("b6bd");function u(e){return Object(n.a)({url:"user/user",method:"get",params:e})}function a(e){return Object(n.a)({url:"setting/config/user/".concat(e),method:"get"})}function o(e,t){return Object(n.a)({url:"setting/config/user/".concat(e),method:"post",data:t})}function i(e){return Object(n.a)({url:"user/user/".concat(e,"/edit"),method:"get"})}function c(e){return Object(n.a)({url:"user/set_status/".concat(e.status,"/").concat(e.id),method:"put"})}function s(e){return Object(n.a)({url:"marketing/coupon/grant",method:"get",params:e})}function d(e){return Object(n.a)({url:"user/edit_other/".concat(e),method:"get"})}function l(e){return Object(n.a)({url:"user/user/".concat(e),method:"get"})}function m(e){return Object(n.a)({url:"user/one_info/".concat(e.id),method:"get",params:e.datas})}function f(e){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:e})}function p(e){return Object(n.a)({url:"user/user_level/set_show/".concat(e.id,"/").concat(e.is_show),method:"PUT"})}function b(e,t){return Object(n.a)({url:"user/user_level/task/".concat(e),method:"get",params:t})}function h(e){return Object(n.a)({url:"user/user_level/set_task_show/".concat(e.id,"/").concat(e.is_show),method:"PUT"})}function g(e){return Object(n.a)({url:"user/user_level/set_task_must/".concat(e.id,"/").concat(e.is_must),method:"PUT"})}function _(e){return Object(n.a)({url:"/user/user_level/create_task",method:"get",params:e})}function v(e){return Object(n.a)({url:"user/user_level/create",method:"get",params:e})}function O(e){return Object(n.a)({url:"user/give_level/".concat(e),method:"get"})}function j(e){return Object(n.a)({url:"user/user_group/list",method:"get",params:e})}function y(e){return Object(n.a)({url:"user/user_group/add/".concat(e),method:"get"})}function w(e){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:e})}function k(e){return Object(n.a)({url:"user/set_group",method:"post",data:e})}function x(e){return Object(n.a)({url:"user/user_label",method:"get",params:e})}function M(e,t){return Object(n.a)({url:"user/user_label/add/".concat(e),method:"get",params:t})}function S(e){return Object(n.a)({url:"user/user_label_cate/all",method:"get",params:e})}function T(e){return Object(n.a)({url:"user/user_label_cate/".concat(e,"/edit"),method:"get"})}function q(e){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function E(e){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:e})}function I(e,t){return Object(n.a)({url:"/user/member_batch/save/".concat(e),method:"post",data:t})}function $(e,t){return Object(n.a)({url:"/user/member_batch/set_value/".concat(e),method:"get",params:t})}function N(e,t){return Object(n.a)({url:"/user/member_card/index/".concat(e),method:"get",params:t})}function C(e,t){return Object(n.a)({url:"/export/memberCard/".concat(e),method:"get",params:t})}function F(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function P(e,t){return Object(n.a)({url:"/user/member_ship/save/".concat(e),method:"post",data:t})}function U(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function J(){return Object(n.a)({url:"/user/user/create",method:"get"})}function D(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function z(e,t){return Object(n.a)({url:"user/label/".concat(e),method:"post",data:t})}function B(e){return Object(n.a)({url:"user/member_right/save/".concat(e.id),method:"post",data:e})}function L(){return Object(n.a)({url:"user/member/right",method:"get"})}function W(e){return Object(n.a)({url:"/user/member/record",method:"get",params:e})}function A(){return Object(n.a)({url:"user/member/ship_select",method:"get"})}function G(e){return Object(n.a)({url:"user/member_card/set_status",method:"get",params:e})}function H(e){return Object(n.a)({url:"user/member_ship/set_ship_status",method:"get",params:e})}function K(e,t){return Object(n.a)({url:"user/member_agreement/save/".concat(e),method:"post",data:t})}function Q(){return Object(n.a)({url:"user/member/agreement",method:"get"})}function R(e){return Object(n.a)({url:"user/give_level_time/".concat(e),method:"get"})}function V(e){return Object(n.a)({url:"user/label/".concat(e),method:"get"})}function X(e){return Object(n.a)({url:"user/save_set_label",method:"put",data:e})}function Y(e){return Object(n.a)({url:"setting/info",method:"get"})}function Z(e){return Object(n.a)({url:"user/visit_list/".concat(e.id),method:"get",params:e.datas})}function ee(e){return Object(n.a)({url:"user/spread_list/".concat(e.id),method:"get",params:e.datas})}function te(e){return Object(n.a)({url:"user/user/".concat(e.uid),method:"put",data:e})}function re(e,t){return Object(n.a)({url:"agent/set_agent_agreement/".concat(e),method:"post",data:t})}function ne(){return Object(n.a)({url:"agent/get_agent_agreement",method:"get"})}function ue(){return Object(n.a)({url:"user/synchro/work/label",method:"get"})}function ae(e){return Object(n.a)({url:"user/user/extend_info/".concat(e),method:"get"})}function oe(e){return Object(n.a)({url:"user/batch_process",method:"post",data:e})}function ie(e,t){return Object(n.a)({url:"/user/member/save/content/".concat(e),method:"post",data:t})}},d674:function(e,t,r){},f10d:function(e,t,r){"use strict";r("d674")}}]); |