Files
zyt/server/public/admin/assets/index-V2AxPNQU.js
T
2026-05-06 18:22:24 +08:00

2 lines
6.7 KiB
JavaScript

import{J as q,D as z,B as G,P as H,Q as W,W as X,C as Y,i as Z,M as ee,N as te,L as ae}from"./element-plus-B7Dx6hR2.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang-Clh1LnRz.js";import{c as ne,i as le}from"./index-CMjmnkXt.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang-VPgff5s6.js";import{w as se}from"./@vue/runtime-dom-CEiKlVMn.js";import{e as de,f as re}from"./finance-CNEIDHTg.js";import{u as me}from"./usePaging-BIG1oWvJ.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_lang-BehFHz63.js";import{f as S,as as ce,ak as m,I as E,a as t,aN as n,J as r,F as _e,ap as ue,G as c,O as _,aP as k,H as fe,A as g,n as T}from"./@vue/runtime-core-tF_2qJHK.js";import{Q as x}from"./@vue/shared-mAAVTE9n.js";import{y as a,a as ve,u as be,n as we,r as ke}from"./@vue/reactivity-BmZ-20sQ.js";import"./@element-plus/icons-vue-C25ce6PD.js";import"./lodash-es-C2A-Pj28.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./lodash-D3kF6u-c.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-BjeWxBI0.js";import"./pinia-CTWOnonq.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-Da2f2eD_.js";import"./@vueuse/shared-Bl-RnC0s.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-yVHyDRAS.js";import"./tslib-BDyQ-Jie.js";import"./zrender-C0YiHEZX.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-Bm7NQW9r.js";import"./index-DyFM9CZ3.js";const ye={class:"account-cost-list"},he={class:"flex flex-wrap"},ge={class:"w-1/2 md:w-1/3"},xe={class:"text-4xl"},Ce={class:"w-1/2 md:w-1/3"},Ve={class:"text-4xl"},Ee={class:"flex justify-end mt-4"},Te=S({name:"accountCostList"}),wt=S({...Te,setup(Se){const v=be(),b=we(!1),l=ke({start_date:"",end_date:"",media_channel_code:"",dept_id:"",remark:""}),{pager:s,getLists:w,resetPage:y}=me({fetchFun:de,params:l}),C=g(()=>{const i=s.extend.media_channel_options;return Array.isArray(i)?i.map(e=>({code:String(e.code||""),name:String(e.name||"")})):[]}),V=g(()=>{const i=s.extend.dept_options;return Array.isArray(i)?i:[]}),D=g(()=>String(s.extend.default_media_channel_code||"")),P={value:"id",label:"name",children:"children"},$=async()=>{var i;b.value=!0,await T(),(i=v.value)==null||i.open("add")},A=async i=>{var e,p;b.value=!0,await T(),(e=v.value)==null||e.open("edit"),(p=v.value)==null||p.getDetail(i)},B=async i=>{await le.confirm("确定要删除这条账户消耗记录吗?"),await re({id:i}),w()},L=()=>{l.start_date="",l.end_date="",l.media_channel_code="",l.dept_id="",l.remark="",y()};return w(),(i,e)=>{const p=q,N=ie,u=G,U=W,F=H,R=X,O=Y,f=Z,I=z,K=ne,d=te,J=ee,M=oe,h=ce("perms"),Q=ae;return m(),E("div",ye,[t(p,{class:"!border-none mb-4",shadow:"never"},{default:n(()=>[r("div",he,[r("div",ge,[e[7]||(e[7]=r("div",{class:"leading-10"},"当前筛选天数",-1)),r("div",xe,x(a(s).extend.days_count??0),1)]),r("div",Ce,[e[8]||(e[8]=r("div",{class:"leading-10"},"累计账户消耗 (元)",-1)),r("div",Ve,"¥"+x(a(s).extend.total_amount??"0.00"),1)])])]),_:1}),t(p,{class:"!border-none",shadow:"never"},{default:n(()=>[t(I,{class:"mb-[-16px]",model:a(l),inline:""},{default:n(()=>[t(u,{label:"日期范围"},{default:n(()=>[t(N,{startTime:a(l).start_date,"onUpdate:startTime":e[0]||(e[0]=o=>a(l).start_date=o),endTime:a(l).end_date,"onUpdate:endTime":e[1]||(e[1]=o=>a(l).end_date=o)},null,8,["startTime","endTime"])]),_:1}),t(u,{label:"自媒体渠道"},{default:n(()=>[t(F,{modelValue:a(l).media_channel_code,"onUpdate:modelValue":e[2]||(e[2]=o=>a(l).media_channel_code=o),placeholder:"筛选全部渠道",clearable:"",filterable:"",class:"w-[220px]"},{default:n(()=>[(m(!0),E(_e,null,ue(a(C),o=>(m(),c(U,{key:o.code,label:o.name,value:o.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(u,{label:"部门"},{default:n(()=>[t(R,{modelValue:a(l).dept_id,"onUpdate:modelValue":e[3]||(e[3]=o=>a(l).dept_id=o),data:a(V),"node-key":"id",props:P,"default-expand-all":!0,"check-strictly":"",placeholder:"筛选全部部门",clearable:"",filterable:"",class:"w-[220px]"},null,8,["modelValue","data"])]),_:1}),t(u,{class:"w-[280px]",label:"备注/维护人"},{default:n(()=>[t(O,{modelValue:a(l).remark,"onUpdate:modelValue":e[4]||(e[4]=o=>a(l).remark=o),placeholder:"备注 / 创建人 / 修改人",clearable:"",onKeyup:se(a(y),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(u,null,{default:n(()=>[t(f,{type:"primary",onClick:a(y)},{default:n(()=>[...e[9]||(e[9]=[_("查询",-1)])]),_:1},8,["onClick"]),t(f,{onClick:L},{default:n(()=>[...e[10]||(e[10]=[_("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(p,{class:"!border-none mt-4",shadow:"never"},{default:n(()=>[r("div",null,[k((m(),c(f,{type:"primary",onClick:$},{icon:n(()=>[t(K,{name:"el-icon-Plus"})]),default:n(()=>[e[11]||(e[11]=_(" 新增 ",-1))]),_:1})),[[h,["finance.account_cost/add"]]])]),k((m(),c(J,{class:"mt-4",size:"large",data:a(s).lists},{default:n(()=>[t(d,{label:"日期",prop:"cost_date","min-width":"120"}),t(d,{label:"自媒体渠道",prop:"media_channel_name","min-width":"120"}),t(d,{label:"部门",prop:"dept_name","min-width":"140"}),t(d,{label:"账户消耗","min-width":"120"},{default:n(({row:o})=>[_("¥"+x(o.amount),1)]),_:1}),t(d,{label:"备注",prop:"remark","min-width":"260","show-overflow-tooltip":""}),t(d,{label:"创建人",prop:"creator_name","min-width":"100"}),t(d,{label:"最后修改人",prop:"updater_name","min-width":"100"}),t(d,{label:"更新时间",prop:"update_time","min-width":"180"}),t(d,{label:"操作",width:"160",fixed:"right"},{default:n(({row:o})=>[k((m(),c(f,{type:"primary",link:"",onClick:j=>A(o)},{default:n(()=>[...e[12]||(e[12]=[_(" 编辑 ",-1)])]),_:1},8,["onClick"])),[[h,["finance.account_cost/edit"]]]),k((m(),c(f,{type:"danger",link:"",onClick:j=>B(o.id)},{default:n(()=>[...e[13]||(e[13]=[_(" 删除 ",-1)])]),_:1},8,["onClick"])),[[h,["finance.account_cost/delete"]]])]),_:1})]),_:1},8,["data"])),[[Q,a(s).loading]]),r("div",Ee,[t(M,{modelValue:a(s),"onUpdate:modelValue":e[5]||(e[5]=o=>ve(s)?s.value=o:null),onChange:a(w)},null,8,["modelValue","onChange"])])]),_:1}),a(b)?(m(),c(pe,{key:0,ref_key:"editRef",ref:v,"media-channel-options":a(C),"dept-options":a(V),"default-media-channel-code":a(D),onSuccess:a(w),onClose:e[6]||(e[6]=o=>b.value=!1)},null,8,["media-channel-options","dept-options","default-media-channel-code","onSuccess"])):fe("",!0)])}}});export{wt as default};