(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-417ad9bb","chunk-4b00d73e"],{"20ca":function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s=(e,t)=>{let a,s=t||300;return function(){let t=arguments;a&&clearTimeout(a);let i=!a;a=setTimeout(()=>{a=null},s),i&&e.apply(this,t)}}},"448e":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mod-etf-indexImg"},[a("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.dataList,option:e.tableOption},on:{"update:page":function(t){e.page=t},"search-change":e.searchChange,"selection-change":e.selectionChange,"on-load":e.getDataList},scopedSlots:e._u([{key:"menu",fn:function(t){return[e.isAuth("sys:user:update")?a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"small"},on:{click:function(a){return a.stopPropagation(),e.addOrUpdateHandle(e.options,t.row)}}},[e._v("编辑")]):e._e(),e.isAuth("sys:user:delete")?a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"small"},on:{click:function(a){return a.stopPropagation(),e.deleteHandle(t.row.uuid,t.row.userName)}}},[e._v("删除")]):e._e()]}}])},[a("template",{slot:"menuLeft"},[e.isAuth("sys:user:save")?a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(t){return t.stopPropagation(),e.addOrUpdateHandle(e.options)}}},[e._v("新增")]):e._e()],1)],2),e.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:e.getDataList}}):e._e(),e.UpdateGogle?a("add-or-gogle",{ref:"UpdateGogle",on:{refreshDataList:e.getDataList}}):e._e()],1)},i=[],r=(a("14d9"),a("7ca9")),o=a("72eb"),n={data(){return{dataList:[],options:[],dataListLoading:!1,dataListSelections:[],addOrUpdateVisible:!1,UpdateGogle:!1,tableOption:o["a"],searchParams:{},page:{total:0,currentPage:1,pageSize:10}}},components:{AddOrUpdate:r["default"]},created(){this.getConfig()},methods:{getDataList(e,t){const a={current:null==e?this.page.currentPage:e.currentPage,size:null==e?this.page.pageSize:e.pageSize,...this.searchParams};this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/normal/adminProfitAndLossConfigAction!/list.action"),method:"get",params:this.$http.adornParams(Object.assign({type:"indices",current:null==e?this.page.currentPage:e.currentPage,size:null==e?this.page.pageSize:e.pageSize},a))}).then(({data:e})=>{this.dataList=e.data.records,this.page.total=e.data.total,this.dataListLoading=!1,t&&t()})},getConfig(e,t){this.$http({url:this.$http.adornUrl("/normal/adminProfitAndLossConfigAction!/config.action"),method:"get",params:this.$http.adornParams(Object.assign({},e),!1)}).then(({data:e})=>{if(0==e.code){let t=Object.keys(e.data),a=Object.values(e.data);for(let e=0;e<t.length;e++){let s={};s.label=a[e],s.value=t[e],this.options.push(s)}}console.log(this.options),t&&t()})},searchChange(e,t){this.page.currentPage=1,this.searchParams=e,this.getDataList(this.page,t)},selectionChange(e){this.dataListSelections=e},addOrUpdateHandle(e,t){this.addOrUpdateVisible=!0,this.$nextTick(()=>{this.$refs.addOrUpdate.init(e,t)})},deleteHandle(e,t){this.$confirm(`确定对[用户${t}]进行[${e?"删除":"批量删除"}]操作?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$http({url:this.$http.adornUrl("/normal/adminProfitAndLossConfigAction!/toDelete.action"),method:"get",params:this.$http.adornParams(Object.assign({uuid:e}))}).then(({data:e})=>{0==e.code?this.$message({message:"操作成功",type:"success",duration:1500,onClose:()=>{this.getDataList()}}):this.$message({message:e.msg,type:"error",duration:1500,onClose:()=>{}})})}).catch(()=>{})}}},l=n,d=a("2877"),c=Object(d["a"])(l,s,i,!1,null,null,null);t["default"]=c.exports},"72eb":function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s={searchMenuSpan:6,columnBtn:!1,border:!0,selection:!1,index:!1,indexLabel:"序号",stripe:!0,menuAlign:"center",menuWidth:250,align:"center",refreshBtn:!0,searchSize:"mini",addBtn:!1,editBtn:!1,delBtn:!1,viewBtn:!1,props:{label:"label",value:"value"},column:[{label:"用户名",placeholder:"用户名、UID",prop:"userName",search:!0},{label:"UID",prop:"userCode"},{label:"账号类型",prop:"roleName",type:"select",dicData:[{label:"所有账号",value:""},{label:"正式账号",value:"MEMBER"},{label:"演示账号",value:"GUEST"},{label:"试用账号",value:"TEST"}]},{label:"类型",prop:"typeName"},{label:"备注",prop:"remark"}]}},"7ca9":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mod-index-img"},[a("el-dialog",{attrs:{title:e.dataForm.imgId?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t},close:e.handClose}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"100px"}},[e.row?a("el-form-item",{attrs:{label:"用户名",prop:"userName"}},[a("el-input",{attrs:{disabled:"",placeholder:"用户名"},model:{value:e.dataForm.userName,callback:function(t){e.$set(e.dataForm,"userName",t)},expression:"dataForm.userName"}})],1):e._e(),a("el-form-item",{attrs:{label:"用户UID",prop:"userCode"}},[a("el-input",{attrs:{disabled:!!e.row,placeholder:"用户UID"},model:{value:e.dataForm.userCode,callback:function(t){e.$set(e.dataForm,"userCode",t)},expression:"dataForm.userCode"}})],1),a("el-form-item",{attrs:{label:"类型"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeVal},model:{value:e.options.value,callback:function(t){e.$set(e.options,"value",t)},expression:"options.value"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容",maxlength:"500",autosize:{minRows:8,maxRows:8},"show-word-limit":""},model:{value:e.dataForm.remark,callback:function(t){e.$set(e.dataForm,"remark",t)},expression:"dataForm.remark"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.dataFormSubmit()}}},[e._v("确定")])],1)],1),e.prodsSelectVisible?a("prods-select",{ref:"prodsSelect",attrs:{isSingle:!0},on:{refreshSelectProds:e.selectCouponProds}}):e._e()],1)},i=[],r=a("cf95"),o=a("17c9"),n=a("20ca"),l={data(){return{dataForm:{userCode:"",userName:"",remark:"",uuid:""},row:"",options:[],dataRule:{userCode:[{required:!0,message:"UID不能为空",trigger:"blur"}],remark:[{required:!0,message:"备注不能为空",trigger:"blur"}]},card:{id:0,pic:"",name:"",realData:{prod:[],shop:[],activity:[]}},page:{total:0,currentPage:1,pageSize:10},prodsSelectVisible:!1,visible:!1}},components:{PicUpload:r["a"],ProdsSelect:o["a"]},methods:{init(e,t){this.options=e,this.row=t||"",t?(this.dataForm.remark=t.remark,this.dataForm.uuid=t.uuid,this.dataForm.userCode=t.userCode,this.dataForm.userName=t.userName,this.options.value=t.type):this.options.value=this.options[0].value,this.visible=!0},dataFormSubmit:Object(n["a"])((function(){this.row?this.$refs["dataForm"].validate(e=>{e&&this.$http({url:this.$http.adornUrl("/normal/adminProfitAndLossConfigAction!/update.action"),method:"post",data:this.$http.adornData({remark:this.dataForm.remark,type:this.options.value,uuid:this.dataForm.uuid})}).then(({data:e})=>{0==e.code?this.$message({message:"操作成功",type:"success",duration:1500,onClose:()=>{this.visible=!1,this.$emit("refreshDataList",this.page)}}):this.$message({message:e.msg,type:"error",duration:1500,onClose:()=>{}})})}):this.$refs["dataForm"].validate(e=>{e&&this.$http({url:this.$http.adornUrl("/normal/adminProfitAndLossConfigAction!/add.action"),method:"post",data:this.$http.adornData({remark:this.dataForm.remark,type:this.options.value,userCode:this.dataForm.userCode})}).then(({data:e})=>{0==e.code?this.$message({message:"操作成功",type:"success",duration:1500,onClose:()=>{this.visible=!1,this.$emit("refreshDataList",this.page)}}):this.$message({message:e.msg,type:"error",duration:1500,onClose:()=>{}})})})})),handClose(){this.$data.dataForm=JSON.parse(JSON.stringify(this.$options.data().dataForm)),this.$nextTick(()=>{this.$refs["dataForm"].clearValidate()})},deleteRelation(){this.dataForm.relation=null},addProd(){this.prodsSelectVisible=!0,this.$nextTick(()=>{this.$refs.prodsSelect.init(this.card.realData.prod)})},changeVal(e){this.$forceUpdate()},selectCouponProds(e){if(this.card.realData.prods=e,e.length){let t=e[0];this.dataForm.relation=t.prodId,this.card.pic=t.pic,this.card.name=t.prodName,this.card.id=t.prodId}else this.card={},this.relation=null},addShop(){alert("选择店铺")},addActivity(){alert("选择活动")}}},d=l,c=(a("9ed5"),a("2877")),u=Object(c["a"])(d,s,i,!1,null,"2dc09f58",null);t["default"]=u.exports},"9ed5":function(e,t,a){"use strict";a("a16c")},a16c:function(e,t,a){}}]);
|