1 |
- import{ar as p,d as O,i as B,r as n,f as G,o as L,x,w as d,g as l,a as t,n as g,y as J,P as M,W as R,B as W,ai as q,aj as E,G as H,D as K,J as N,_ as Q,__tla as X}from"./index-3fb48822.js";import{_ as Y,__tla as Z}from"./Dialog-7d4425a0.js";import{u as $,__tla as ee}from"./useMessage-b6c78c26.js";let P,f,S,te=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ee}catch{}})()]).then(async()=>{f={getPtProfitLogPage:async o=>await p.get({url:"/distri/pt-profit-log/page",params:o}),getPtProfitLog:async o=>await p.get({url:"/distri/pt-profit-log/get?id="+o}),createPtProfitLog:async o=>await p.post({url:"/distri/pt-profit-log/create",data:o}),updatePtProfitLog:async o=>await p.put({url:"/distri/pt-profit-log/update",data:o}),deletePtProfitLog:async o=>await p.delete({url:"/distri/pt-profit-log/delete?id="+o}),exportPtProfitLog:async o=>await p.download({url:"/distri/pt-profit-log/export-excel",params:o})},P=Q(O({name:"PtProfitLogForm",__name:"PtProfitLogForm",emits:["success"],setup(o,{expose:h,emit:T}){const{t:_}=B(),y=$(),i=n(!1),V=n(""),s=n(!1),w=n(""),a=n({id:void 0,amount:void 0,afterAmount:void 0,profitStatus:void 0,orderId:void 0,percentTemplate:void 0}),U=G({}),v=n();h({open:async(u,e)=>{if(i.value=!0,V.value=_("action."+u),w.value=u,F(),e){s.value=!0;try{a.value=await f.getPtProfitLog(e)}finally{s.value=!1}}}});const A=T,I=async()=>{await v.value.validate(),s.value=!0;try{const u=a.value;w.value==="create"?(await f.createPtProfitLog(u),y.success(_("common.createSuccess"))):(await f.updatePtProfitLog(u),y.success(_("common.updateSuccess"))),i.value=!1,A("success")}finally{s.value=!1}},F=()=>{var u;a.value={id:void 0,amount:void 0,afterAmount:void 0,profitStatus:void 0,orderId:void 0,percentTemplate:void 0},(u=v.value)==null||u.resetFields()};return(u,e)=>{const c=R,m=W,j=q,k=E,z=H,b=K,D=Y,C=N;return L(),x(D,{title:t(V),modelValue:t(i),"onUpdate:modelValue":e[6]||(e[6]=r=>M(i)?i.value=r:null)},{footer:d(()=>[l(b,{onClick:I,type:"primary",disabled:t(s)},{default:d(()=>[g("\u786E \u5B9A")]),_:1},8,["disabled"]),l(b,{onClick:e[5]||(e[5]=r=>i.value=!1)},{default:d(()=>[g("\u53D6 \u6D88")]),_:1})]),default:d(()=>[J((L(),x(z,{ref_key:"formRef",ref:v,model:t(a),rules:t(U),"label-width":"100px"},{default:d(()=>[l(m,{label:"\u589E\u52A0\u91D1\u989D",prop:"amount"},{default:d(()=>[l(c,{modelValue:t(a).amount,"onUpdate:modelValue":e[0]||(e[0]=r=>t(a).amount=r),placeholder:"\u8BF7\u8F93\u5165\u589E\u52A0\u91D1\u989D"},null,8,["modelValue"])]),_:1}),l(m,{label:"\u589E\u52A0\u540E\u91D1\u989D",prop:"afterAmount"},{default:d(()=>[l(c,{modelValue:t(a).afterAmount,"onUpdate:modelValue":e[1]||(e[1]=r=>t(a).afterAmount=r),placeholder:"\u8BF7\u8F93\u5165\u589E\u52A0\u540E\u91D1\u989D"},null,8,["modelValue"])]),_:1}),l(m,{label:"\u6536\u76CA\u7C7B\u578B 1:\u5E73\u53F0\u670D\u52A1\u5668\u8D39 2:\u5E73\u53F0\u6536\u76CA",prop:"profitStatus"},{default:d(()=>[l(k,{modelValue:t(a).profitStatus,"onUpdate:modelValue":e[2]||(e[2]=r=>t(a).profitStatus=r)},{default:d(()=>[l(j,{label:"1"},{default:d(()=>[g("\u8BF7\u9009\u62E9\u5B57\u5178\u751F\u6210")]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(m,{label:"\u8BA2\u5355\u53F7",prop:"orderId"},{default:d(()=>[l(c,{modelValue:t(a).orderId,"onUpdate:modelValue":e[3]||(e[3]=r=>t(a).orderId=r),placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),l(m,{label:"\u8BA1\u7B97\u767E\u5206\u6BD4\u6A21\u677F",prop:"percentTemplate"},{default:d(()=>[l(c,{modelValue:t(a).percentTemplate,"onUpdate:modelValue":e[4]||(e[4]=r=>t(a).percentTemplate=r),placeholder:"\u8BF7\u8F93\u5165\u8BA1\u7B97\u767E\u5206\u6BD4\u6A21\u677F"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[C,t(s)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/ptprofitlog/PtProfitLogForm.vue"]]),S=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}))});export{P,te as __tla,f as a,S as b};
|