index-dd30f9b8.js 4.0 KB

1
  1. import{aq as f,d as q,h as I,r as s,K as j,e as A,l as W,o as y,v,w as a,x as b,a as r,f as e,a4 as F,n as o,O as K,V as O,A as R,d9 as S,bb as X,W as B,X as H,C as J,D as L,I as N,_ as Q,__tla as Y}from"./index-bd9277a1.js";import{_ as Z,__tla as $}from"./ContentWrap-7c73ab26.js";import{E as ee,__tla as ae}from"./el-text-97725720.js";import{u as le,__tla as te}from"./useMessage-274788d4.js";import{__tla as re}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5f6a2d0d.js";import{__tla as ne}from"./el-card-bc8cec83.js";let T,ue=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return re}catch{}})(),(()=>{try{return ne}catch{}})()]).then(async()=>{T=Q(q({name:"MemberConfig",__name:"index",setup(de){const{t:V}=I(),h=le(),D=s(!1),c=s(!1),l=s({id:void 0,pointTradeDeductEnable:!0,pointTradeDeductUnitPrice:0,pointTradeDeductMaxPrice:0,pointTradeGivePoint:0}),_=j({get:()=>(l.value.pointTradeDeductUnitPrice/100).toFixed(2),set:u=>{l.value.pointTradeDeductUnitPrice=Math.round(100*u)}}),w=A({}),p=s(),P=async()=>{if(p&&await p.value.validate()){c.value=!0;try{const u=l.value;await(async t=>await f.put({url:"/member/config/save",data:t}))(u),h.success(V("common.updateSuccess")),D.value=!1}finally{c.value=!1}}},x=async()=>{try{const u=await(async()=>await f.get({url:"/member/config/get"}))();if(u===null)return;l.value=u}finally{}};return W(()=>{x()}),(u,t)=>{const g=O,d=R,U=S,i=ee,m=X,M=B,z=H,E=J,G=L,C=Z,k=N;return y(),v(C,null,{default:a(()=>[b((y(),v(G,{ref_key:"formRef",ref:p,model:r(l),rules:r(w),"label-width":"120px"},{default:a(()=>[b(e(d,{label:"hideId"},{default:a(()=>[e(g,{modelValue:r(l).id,"onUpdate:modelValue":t[0]||(t[0]=n=>r(l).id=n)},null,8,["modelValue"])]),_:1},512),[[F,!1]]),e(z,null,{default:a(()=>[e(M,{label:"\u79EF\u5206"},{default:a(()=>[e(d,{label:"\u79EF\u5206\u62B5\u6263",prop:"pointTradeDeductEnable"},{default:a(()=>[e(U,{modelValue:r(l).pointTradeDeductEnable,"onUpdate:modelValue":t[1]||(t[1]=n=>r(l).pointTradeDeductEnable=n),style:{"user-select":"none"}},null,8,["modelValue"]),e(i,{class:"w-full",size:"small",type:"info"},{default:a(()=>[o("\u4E0B\u5355\u79EF\u5206\u662F\u5426\u62B5\u7528\u8BA2\u5355\u91D1\u989D")]),_:1})]),_:1}),e(d,{label:"\u79EF\u5206\u62B5\u6263",prop:"pointTradeDeductUnitPrice"},{default:a(()=>[e(m,{modelValue:r(_),"onUpdate:modelValue":t[2]||(t[2]=n=>K(_)?_.value=n:null),placeholder:"\u8BF7\u8F93\u5165\u79EF\u5206\u62B5\u6263\u91D1\u989D",precision:2},null,8,["modelValue"]),e(i,{class:"w-full",size:"small",type:"info"},{default:a(()=>[o(" \u79EF\u5206\u62B5\u7528\u6BD4\u4F8B(1 \u79EF\u5206\u62B5\u591A\u5C11\u91D1\u989D)\uFF0C\u5355\u4F4D\uFF1A\u5143 ")]),_:1})]),_:1}),e(d,{label:"\u79EF\u5206\u62B5\u6263\u6700\u5927\u503C",prop:"pointTradeDeductMaxPrice"},{default:a(()=>[e(m,{modelValue:r(l).pointTradeDeductMaxPrice,"onUpdate:modelValue":t[3]||(t[3]=n=>r(l).pointTradeDeductMaxPrice=n),placeholder:"\u8BF7\u8F93\u5165\u79EF\u5206\u62B5\u6263\u6700\u5927\u503C"},null,8,["modelValue"]),e(i,{class:"w-full",size:"small",type:"info"},{default:a(()=>[o(" \u5355\u6B21\u4E0B\u5355\u79EF\u5206\u4F7F\u7528\u4E0A\u9650\uFF0C0 \u4E0D\u9650\u5236 ")]),_:1})]),_:1}),e(d,{label:"1 \u5143\u8D60\u9001\u591A\u5C11\u5206",prop:"pointTradeGivePoint"},{default:a(()=>[e(m,{modelValue:r(l).pointTradeGivePoint,"onUpdate:modelValue":t[4]||(t[4]=n=>r(l).pointTradeGivePoint=n),placeholder:"\u8BF7\u8F93\u5165 1 \u5143\u8D60\u9001\u591A\u5C11\u79EF\u5206"},null,8,["modelValue"]),e(i,{class:"w-full",size:"small",type:"info"},{default:a(()=>[o(" \u4E0B\u5355\u652F\u4ED8\u91D1\u989D\u6309\u6BD4\u4F8B\u8D60\u9001\u79EF\u5206\uFF08\u5B9E\u9645\u652F\u4ED8 1 \u5143\u8D60\u9001\u591A\u5C11\u79EF\u5206\uFF09 ")]),_:1})]),_:1})]),_:1})]),_:1}),e(d,null,{default:a(()=>[e(E,{type:"primary",onClick:P},{default:a(()=>[o("\u4FDD\u5B58")]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[k,r(c)]])]),_:1})}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/member/config/index.vue"]])});export{ue as __tla,T as default};