1 |
- import{_ as P,d as R,Z as N,bn as z,aU as I,w as D,z as q,r as c,aC as M,o as x,c as E,H as k,l as n,h as w,j as e,C as t,M as _,aq as j,L as V,b$ as G,J as L}from"./index.js";import{M as Q,h as S,a as $}from"./modal.cf1aec.js";import{u as B}from"./useTask.8a645393.js";const H={class:"flex bg-white gap-[10px]"},J={class:"flex-col w-[50%]"},W={class:"flex"},Z=w("span",null,null,-1),K={class:"flex-col w-[50%]"},O={class:"flex"},X=R({__name:"index",setup(Y){const u=N({data:{},visible:!1}),{hasPermissionWithCode:F}=z("paymentChannelGrossProfit"),o=I(""),h=D({channel_name:""}),v=D({cat_name:""}),i=B({initialData:{},success:d=>{const{id:a}=d.list[0]||"";o.value=a}}),f=B({initialData:[]}),C=()=>i.run(S({...h.value,page:1,size:15})),p=()=>o.value&&f.run($({...v.value,channel_id:o.value}));q(()=>o.value,p,{immediate:!0});function T(d){var a;u.visible=!0,u.data={channel_name:((a=i.data.list.find(({id:m})=>m==d.channel_id))==null?void 0:a.channel_name)||"--",...d}}return C(),(d,a)=>{const m=c("ElInput"),b=c("ElButton"),U=c("ElRadio"),s=c("ElTableColumn"),y=c("ElTable"),g=M("loading");return x(),E("div",H,[k((x(),E("div",J,[w("div",W,[e(m,{placeholder:"\u652F\u4ED8\u6E20\u9053\u540D\u79F0",class:"mr-[20px]",modelValue:h.value.channel_name,"onUpdate:modelValue":a[0]||(a[0]=l=>h.value.channel_name=l),onChange:C},null,8,["modelValue"]),e(b,{type:"primary",onClick:C},{default:t(()=>[_("\u5237\u65B0")]),_:1})]),e(y,{class:"mt-[10px]",border:"",size:"small",data:n(i).data.list},{default:t(()=>[e(s,{width:"60px",label:"\u9009\u62E9"},{default:t(({row:l})=>[e(U,{modelValue:n(o),"onUpdate:modelValue":a[1]||(a[1]=r=>j(o)?o.value=r:null),label:l.id},{default:t(()=>[Z]),_:2},1032,["modelValue","label"])]),_:1}),e(s,{label:"\u652F\u4ED8\u6E20\u9053\u540D\u79F0",prop:"channel_name","show-overflow-tooltip":""}),e(s,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[g,n(i).loading]]),k((x(),E("div",K,[w("div",O,[e(m,{placeholder:"\u4E00\u7EA7\u5206\u7C7B\u540D\u79F0",class:"mr-[20px]",modelValue:v.value.cat_name,"onUpdate:modelValue":a[2]||(a[2]=l=>v.value.cat_name=l),onChange:p},null,8,["modelValue"]),e(b,{type:"primary",onClick:p},{default:t(()=>[_("\u5237\u65B0")]),_:1})]),e(y,{class:"mt-[10px]",border:"",size:"small",data:n(f).data},{default:t(()=>[e(s,{label:"\u4E00\u7EA7\u5206\u7C7B\u540D\u79F0",prop:"cat_name","show-overflow-tooltip":""}),e(s,{label:"\u4E1A\u52A1\u516C\u53F8","show-overflow-tooltip":""},{default:t(({row:l})=>{var r;return[_(V(((r=n(i).data.list.find(({id:A})=>A==l.channel_id))==null?void 0:r.channel_name)||"--"),1)]}),_:1}),e(s,{label:"\u6BDB\u5229\u7387",width:"60px"},{default:t(({row:l})=>[_(V(Number(l.rate).toFixed(2))+"% ",1)]),_:1}),e(s,{label:"\u64CD\u4F5C",width:"60px"},G({_:2},[n(F)("005")?{name:"default",fn:t(({row:l})=>[e(b,{type:"primary",link:"",icon:n(L)("edit"),onClick:r=>T(l)},null,8,["icon","onClick"])]),key:"0"}:void 0]),1024)]),_:1},8,["data"])])),[[g,n(f).loading]]),e(Q,{visible:u.visible,"onUpdate:visible":a[3]||(a[3]=l=>u.visible=l),data:u.data,"onUpdate:data":a[4]||(a[4]=l=>u.data=l),onRefresh:p},null,8,["visible","data"])])}}});var te=P(X,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/paymentChannelGrossProfit/index.vue"]]);export{te as default};
|