2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{I as U,y as z,w as O,D as G,C as H,L as J,M as K,N as Q}from"./element-plus.517d4382.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as X,a as Y}from"./index.8b1962e9.js";import{u as Z}from"./usePaging.f6660143.js";import{u as ee}from"./useDictOptions.b5854a9e.js";import{d as te,a as oe,f as ae}from"./material_classify.acd47fa4.js";import"./lodash.1d82ee7c.js";import{_ as ie}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.8a53a004.js";import ne from"./detail.58b1280d.js";import{d as V,s as b,r as k,a0 as se,ai as le,o as s,c as re,V as t,M as o,O as h,u as i,L as l,S as E,a as B,k as me,T as d,n as R}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./custom.99349afc.js";const ue=d("\u67E5\u8BE2"),de=d("\u91CD\u7F6E"),pe=d(" \u65B0\u589E "),ce=d(" \u5220\u9664 "),_e={class:"mt-4"},fe=d(" \u7F16\u8F91 "),ve={class:"flex justify-end mt-4"},Ce=V({name:"projectLists"}),rt=V({...Ce,setup(he){const x=b(),p=b(),c=k(!1),w=k(!1),_=se({name:""}),y=k([]),I=a=>{y.value=a.map(({id:e})=>e)},{dictData:D}=ee("pay_period,invoice_type"),{pager:r,getLists:f,resetParams:q,resetPage:$}=Z({fetchFun:te,params:_}),L=async()=>{var a;c.value=!0,await R(),(a=p.value)==null||a.open("add")},P=async a=>{var v,m;let e=await oe({id:a.id});c.value=!0,await R(),(v=p.value)==null||v.open("edit"),(m=p.value)==null||m.setFormData(e)},N=async a=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ae({id:a}),f()};return f(),(a,e)=>{const v=U,m=z,u=O,S=G,F=H,T=Y,C=J,j=K,A=W,g=le("perms"),M=Q;return s(),re("div",null,[t(F,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(S,{class:"mb-[-16px]",model:_,inline:""},{default:o(()=>[t(m,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:o(()=>[t(v,{class:"w-[280px]",modelValue:_.name,"onUpdate:modelValue":e[0]||(e[0]=n=>_.name=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(m,null,{default:o(()=>[t(u,{type:"primary",onClick:i($)},{default:o(()=>[ue]),_:1},8,["onClick"]),t(u,{onClick:i(q)},{default:o(()=>[de]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),h((s(),l(F,{class:"!border-none",shadow:"never"},{default:o(()=>[h((s(),l(u,{type:"primary",onClick:L},{icon:o(()=>[t(T,{name:"el-icon-Plus"})]),default:o(()=>[pe]),_:1})),[[g,["InvoicingRequests.InvoicingRequests/add"]]]),h((s(),l(u,{disabled:!y.value.length,onClick:e[1]||(e[1]=n=>N(y.value))},{default:o(()=>[ce]),_:1},8,["disabled"])),[[g,["InvoicingRequests.InvoicingRequests/delete"]]]),B("div",_e,[t(j,{data:i(r).lists,onSelectionChange:I,"row-key":"id",lazy:"","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:o(()=>[t(C,{type:"selection",width:"55"}),t(C,{label:"\u5E8F\u53F7",type:"index",width:"55"}),t(C,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(C,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:o(({row:n})=>[h((s(),l(u,{type:"primary",link:"",onClick:ye=>P(n)},{default:o(()=>[fe]),_:2},1032,["onClick"])),[[g,["InvoicingRequests.InvoicingRequests/edit"]]])]),_:1})]),_:1},8,["data"])]),B("div",ve,[t(A,{modelValue:i(r),"onUpdate:modelValue":e[2]||(e[2]=n=>me(r)?r.value=n:null),onChange:i(f)},null,8,["modelValue","onChange"])])]),_:1})),[[M,i(r).loading]]),c.value?(s(),l(ie,{key:0,ref_key:"editRef",ref:p,"dict-data":i(D),onSuccess:i(f),onClose:e[3]||(e[3]=n=>c.value=!1)},null,8,["dict-data","onSuccess"])):E("",!0),w.value?(s(),l(ne,{key:1,ref_key:"detailRef",ref:x,"dict-data":i(D),onClose:e[4]||(e[4]=n=>w.value=!1)},null,8,["dict-data"])):E("",!0)])}}});export{rt as default};
|