1 |
- import{aq as p,d as z,h as D,r as c,e as R,o as g,v as b,w as r,f as s,a as t,n as h,x as q,O as H,V as I,A as M,D as X,C as B,I as E,_ as J,__tla as K}from"./index-11e4820e.js";import{_ as L,__tla as N}from"./Dialog-bbfaf85c.js";import{u as Q,__tla as W}from"./useMessage-06ddf735.js";let P,n,x,Y=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{n={getPtProfitPage:async a=>await p.get({url:"/distri/pt-profit/page",params:a}),getPtProfit:async a=>await p.get({url:"/distri/pt-profit/get?id="+a}),createPtProfit:async a=>await p.post({url:"/distri/pt-profit/create",data:a}),updatePtProfit:async a=>await p.put({url:"/distri/pt-profit/update",data:a}),deletePtProfit:async a=>await p.delete({url:"/distri/pt-profit/delete?id="+a}),exportPtProfit:async a=>await p.download({url:"/distri/pt-profit/export-excel",params:a})},P=J(z({name:"PtProfitForm",__name:"PtProfitForm",emits:["success"],setup(a,{expose:T,emit:G}){const{t:f}=D(),y=Q(),i=c(!1),w=c(""),u=c(!1),A=c(""),l=c({id:void 0,ptAdd:void 0,ptGrossAdd:void 0,ptTotalAdd:void 0}),U=R({}),m=c();T({open:async(o,e)=>{if(i.value=!0,w.value=f("action."+o),A.value=o,S(),e){u.value=!0;try{l.value=await n.getPtProfit(e)}finally{u.value=!1}}}});const k=G,F=async()=>{await m.value.validate(),u.value=!0;try{const o=l.value;A.value==="create"?(await n.createPtProfit(o),y.success(f("common.createSuccess"))):(await n.updatePtProfit(o),y.success(f("common.updateSuccess"))),i.value=!1,k("success")}finally{u.value=!1}},S=()=>{var o;l.value={id:void 0,ptAdd:void 0,ptGrossAdd:void 0,ptTotalAdd:void 0},(o=m.value)==null||o.resetFields()};return(o,e)=>{const _=I,v=M,C=X,V=B,j=L,O=E;return g(),b(j,{title:t(w),modelValue:t(i),"onUpdate:modelValue":e[4]||(e[4]=d=>H(i)?i.value=d:null)},{footer:r(()=>[s(V,{onClick:F,type:"primary",disabled:t(u)},{default:r(()=>[h("\u786E \u5B9A")]),_:1},8,["disabled"]),s(V,{onClick:e[3]||(e[3]=d=>i.value=!1)},{default:r(()=>[h("\u53D6 \u6D88")]),_:1})]),default:r(()=>[q((g(),b(C,{ref_key:"formRef",ref:m,model:t(l),rules:t(U),"label-width":"100px"},{default:r(()=>[s(v,{label:"\u5E73\u53F0\u670D\u52A1\u8D39(\u6BDB\u5229\u4E0B\u7684\u767E\u5206\u6BD4\u6536\u76CA)",prop:"ptAdd"},{default:r(()=>[s(_,{modelValue:t(l).ptAdd,"onUpdate:modelValue":e[0]||(e[0]=d=>t(l).ptAdd=d),placeholder:"\u8BF7\u8F93\u5165\u5E73\u53F0\u670D\u52A1\u8D39(\u6BDB\u5229\u4E0B\u7684\u767E\u5206\u6BD4\u6536\u76CA)"},null,8,["modelValue"])]),_:1}),s(v,{label:"\u5E73\u53F0\u6536\u76CA(0.3888 \u4E4B\u5916\u7684\u6536\u76CA)",prop:"ptGrossAdd"},{default:r(()=>[s(_,{modelValue:t(l).ptGrossAdd,"onUpdate:modelValue":e[1]||(e[1]=d=>t(l).ptGrossAdd=d),placeholder:"\u8BF7\u8F93\u5165\u5E73\u53F0\u6536\u76CA(0.3888 \u4E4B\u5916\u7684\u6536\u76CA)"},null,8,["modelValue"])]),_:1}),s(v,{label:"\u5E73\u53F0\u603B\u6536\u76CA",prop:"ptTotalAdd"},{default:r(()=>[s(_,{modelValue:t(l).ptTotalAdd,"onUpdate:modelValue":e[2]||(e[2]=d=>t(l).ptTotalAdd=d),placeholder:"\u8BF7\u8F93\u5165\u5E73\u53F0\u603B\u6536\u76CA"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[O,t(u)]])]),_:1},8,["title","modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/system/distri/ptprofit/PtProfitForm.vue"]]),x=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}))});export{P,Y as __tla,n as a,x as b};
|