engineering/public/admin/assets/index.1779af28.js
2024-01-12 16:37:09 +08:00

2 lines
7.7 KiB
JavaScript

import{I as oe,y as te,G as le,H as ae,w as ue,D as ie,C as ne,L as se,M as re,N as pe}from"./element-plus.25ac1d37.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.5a7e3ebe.js";import{f as de,a as me}from"./index.2456ddbc.js";import{u as _e}from"./usePaging.f6660143.js";import{u as ve}from"./useDictOptions.37bb8f6d.js";import{d as fe,a as L,e as we}from"./InvoicingRequests.ed1ce342.js";import"./lodash.86334a69.js";import{a as be}from"./contract.76fbc395.js";import{b as he}from"./custom.c0ef026d.js";import{_ as Ee}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.f9939c67.js";import Fe from"./detail.dd9fa3bf.js";import{d as U,a0 as $,s as P,r as b,ai as Ce,o as i,c as k,V as e,M as a,O as v,u as r,L as s,S,W as N,a8 as T,a as j,k as De,T as m,n as x}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.8497a500.js";import"./lodash-es.49f4af13.js";import"./dayjs.5571e62a.js";import"./axios.9ce976cc.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.156d1593.js";import"./color.4188bfef.js";import"./clone.a0efef30.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ca37accd.js";import"./ms.a9ae1d6d.js";import"./nprogress.30953505.js";import"./vue-clipboard3.4e4a29c9.js";import"./clipboard.1a812829.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.8071f294.js";import"./index.vue_vue_type_script_setup_true_lang.fb1f3018.js";import"./project.2232de81.js";import"./department.0e8903b3.js";import"./organization.1d95b309.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";const ge=m("\u67E5\u8BE2"),ye=m("\u91CD\u7F6E"),ke=m(" \u65B0\u589E "),xe=m(" \u5220\u9664 "),Be={class:"mt-4"},Ve=m(" \u7F16\u8F91 "),Re=m(" \u5220\u9664 "),Ae=m(" \u8BE6\u60C5 "),Ie={class:"flex justify-end mt-4"},qe=U({name:"projectLists"}),Vo=U({...qe,setup(Le){$([]);const D=P(),h=P(),E=b(!1),g=b(!1),B=b([]),V=b([]),p=$({invoicing_company_name:"",contract_id:"",customer_id:""}),y=b([]),M=u=>{y.value=u.map(({id:t})=>t)},{dictData:R}=ve("pay_period,invoice_type"),{pager:f,getLists:F,resetParams:O,resetPage:G}=_e({fetchFun:fe,params:p}),H=async()=>{var u;E.value=!0,await x(),(u=h.value)==null||u.open("add")},W=async u=>{var c,n;let t=await L({id:u.id});E.value=!0,await x(),(c=h.value)==null||c.open("edit"),(n=h.value)==null||n.setFormData(t)},A=async u=>{await de.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await we({id:u}),F()},z=async u=>{var c,n;let t=await L({id:u.id});g.value=!0,await x(),(c=D.value)==null||c.open(),(n=D.value)==null||n.setFormData(t)},J=()=>{be().then(u=>{B.value=u.lists})},K=()=>{he().then(u=>{V.value=u.lists})};return J(),K(),F(),(u,t)=>{const c=oe,n=te,C=le,I=ae,d=ue,Q=ie,q=ne,X=me,o=se,Y=re,Z=ce,w=Ce("perms"),ee=pe;return i(),k("div",null,[e(q,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(Q,{class:"mb-[-16px]",model:p,inline:""},{default:a(()=>[e(n,{label:"\u5F00\u7968\u516C\u53F8\u540D\u79F0",prop:"invoicing_company_name"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:p.invoicing_company_name,"onUpdate:modelValue":t[0]||(t[0]=l=>p.invoicing_company_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u7968\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u5BA2\u6237",prop:"customer_id"},{default:a(()=>[e(I,{class:"w-[280px]",modelValue:p.customer_id,"onUpdate:modelValue":t[1]||(t[1]=l=>p.customer_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},{default:a(()=>[e(C,{label:"\u5168\u90E8",value:""}),(i(!0),k(N,null,T(V.value,(l,_)=>(i(),s(C,{key:_,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"\u5408\u540C",prop:"contract_id"},{default:a(()=>[e(I,{class:"w-[280px]",modelValue:p.contract_id,"onUpdate:modelValue":t[2]||(t[2]=l=>p.contract_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:a(()=>[e(C,{label:"\u5168\u90E8",value:""}),(i(!0),k(N,null,T(B.value,(l,_)=>(i(),s(C,{key:_,label:l.contract_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(n,null,{default:a(()=>[e(d,{type:"primary",onClick:r(G)},{default:a(()=>[ge]),_:1},8,["onClick"]),e(d,{onClick:r(O)},{default:a(()=>[ye]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),s(q,{class:"!border-none",shadow:"never"},{default:a(()=>[v((i(),s(d,{type:"primary",onClick:H},{icon:a(()=>[e(X,{name:"el-icon-Plus"})]),default:a(()=>[ke]),_:1})),[[w,["InvoicingRequests.InvoicingRequests/add"]]]),v((i(),s(d,{disabled:!y.value.length,onClick:t[3]||(t[3]=l=>A(y.value))},{default:a(()=>[xe]),_:1},8,["disabled"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),j("div",Be,[e(Y,{data:r(f).lists,onSelectionChange:M},{default:a(()=>[e(o,{type:"selection",width:"55"}),e(o,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(o,{label:"\u8D44\u4EA7\u5E8F\u5217\u53F7",prop:"customer_name","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u7F16\u53F7",prop:"customer_name","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u540D\u79F0",prop:"project_code","show-overflow-tooltip":""}),e(o,{label:"\u89C4\u683C\u578B\u53F7",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u7C7B\u522B",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u8BA1\u91CF\u5355\u4F4D ",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u751F\u4EA7\u5382\u5BB6",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u5165\u8D26\u65E5\u671F",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u8D2D\u5165\u65E5\u671F ",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u51FA\u5382\u65E5\u671F",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u6765\u6E90",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u5B58\u653E\u5730\u5740 ",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u72B6\u6001",prop:"project_name","show-overflow-tooltip":""}),e(o,{label:"\u5355\u65E5\u6210\u672C\u4EF7",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u8D44\u4EA7\u91D1\u989D",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u671F\u521D\u6298\u65E7",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u7D2F\u8BA1\u6298\u65E7 ",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u5904\u7F6E\u91D1\u989D",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u51C0\u503C\u91D1\u989D",prop:"tax","show-overflow-tooltip":""}),e(o,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:l})=>[v((i(),s(d,{type:"primary",link:"",onClick:_=>W(l)},{default:a(()=>[Ve]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/edit"]]]),v((i(),s(d,{type:"danger",link:"",onClick:_=>A(l.id)},{default:a(()=>[Re]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),v((i(),s(d,{link:"",onClick:_=>z(l)},{default:a(()=>[Ae]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),j("div",Ie,[e(Z,{modelValue:r(f),"onUpdate:modelValue":t[4]||(t[4]=l=>De(f)?f.value=l:null),onChange:r(F)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,r(f).loading]]),E.value?(i(),s(Ee,{key:0,ref_key:"editRef",ref:h,"dict-data":r(R),onSuccess:r(F),onClose:t[5]||(t[5]=l=>E.value=!1)},null,8,["dict-data","onSuccess"])):S("",!0),g.value?(i(),s(Fe,{key:1,ref_key:"detailRef",ref:D,"dict-data":r(R),onClose:t[6]||(t[6]=l=>g.value=!1)},null,8,["dict-data"])):S("",!0)])}}});export{Vo as default};