2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{I as oe,y as te,G as ae,H as le,w as ne,D as ie,C as ue,L as se,M as re,N as pe}from"./element-plus.b3353ca6.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.f8e9523f.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import{f as me,a as _e}from"./index.892155dd.js";import{u as ve}from"./usePaging.f6660143.js";import{u as fe}from"./useDictOptions.c47985a3.js";import{d as be,a as A,e as ge}from"./InvoicingRequests.62d68dae.js";import"./lodash.1d82ee7c.js";import{a as he}from"./contract.f3f9485a.js";import{b as we}from"./custom.735a8774.js";import{d as U,a0 as $,s as P,r as g,ai as ye,o as i,c as E,V as e,M as t,O as v,u as r,L as p,W as T,a8 as j,a as N,k as Ce,T as m,n as F}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";const Ee=m("\u67E5\u8BE2"),Fe=m("\u91CD\u7F6E"),ke=m(" \u65B0\u589E "),De=m(" \u5220\u9664 "),Be={class:"mt-4"},Ve=m(" \u7F16\u8F91 "),xe=m(" \u5220\u9664 "),Re=m(" \u8BE6\u60C5 "),Ie={class:"flex justify-end mt-4"},qe=U({name:"projectLists"}),yo=U({...qe,setup(Le){$([]);const k=P(),w=P(),D=g(!1),S=g(!1),B=g([]),V=g([]),s=$({invoicing_company_name:"",contract_id:"",customer_id:""}),y=g([]),M=l=>{y.value=l.map(({id:a})=>a)},{dictData:x}=fe("pay_period,invoice_type"),{pager:f,getLists:C,resetParams:O,resetPage:G}=ve({fetchFun:be,params:s}),H=async()=>{var l;D.value=!0,await F(),(l=w.value)==null||l.open("add")},W=async l=>{var c,u;let a=await A({id:l.id});D.value=!0,await F(),(c=w.value)==null||c.open("edit"),(u=w.value)==null||u.setFormData(a)},R=async l=>{await me.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ge({id:l}),C()},z=async l=>{var c,u;let a=await A({id:l.id});S.value=!0,await F(),(c=k.value)==null||c.open(),(u=k.value)==null||u.setFormData(a)},J=()=>{he().then(l=>{B.value=l.lists})},K=()=>{we().then(l=>{V.value=l.lists})};return J(),K(),C(),(l,a)=>{const c=oe,u=te,h=ae,I=le,d=ne,Q=ie,q=ue,X=_e,n=se,L=de,Y=re,Z=ce,b=ye("perms"),ee=pe;return i(),E("div",null,[e(q,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(Q,{class:"mb-[-16px]",model:s,inline:""},{default:t(()=>[e(u,{label:"\u5F00\u7968\u516C\u53F8\u540D\u79F0",prop:"invoicing_company_name"},{default:t(()=>[e(c,{class:"w-[280px]",modelValue:s.invoicing_company_name,"onUpdate:modelValue":a[0]||(a[0]=o=>s.invoicing_company_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u7968\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5BA2\u6237",prop:"customer_id"},{default:t(()=>[e(I,{class:"w-[280px]",modelValue:s.customer_id,"onUpdate:modelValue":a[1]||(a[1]=o=>s.customer_id=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},{default:t(()=>[e(h,{label:"\u5168\u90E8",value:""}),(i(!0),E(T,null,j(V.value,(o,_)=>(i(),p(h,{key:_,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,{label:"\u5408\u540C",prop:"contract_id"},{default:t(()=>[e(I,{class:"w-[280px]",modelValue:s.contract_id,"onUpdate:modelValue":a[2]||(a[2]=o=>s.contract_id=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:t(()=>[e(h,{label:"\u5168\u90E8",value:""}),(i(!0),E(T,null,j(B.value,(o,_)=>(i(),p(h,{key:_,label:o.contract_name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(d,{type:"primary",onClick:r(G)},{default:t(()=>[Ee]),_:1},8,["onClick"]),e(d,{onClick:r(O)},{default:t(()=>[Fe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),p(q,{class:"!border-none",shadow:"never"},{default:t(()=>[v((i(),p(d,{type:"primary",onClick:H},{icon:t(()=>[e(X,{name:"el-icon-Plus"})]),default:t(()=>[ke]),_:1})),[[b,["InvoicingRequests.InvoicingRequests/add"]]]),v((i(),p(d,{disabled:!y.value.length,onClick:a[3]||(a[3]=o=>R(y.value))},{default:t(()=>[De]),_:1},8,["disabled"])),[[b,["InvoicingRequests.InvoicingRequests/delete"]]]),N("div",Be,[e(Y,{data:r(f).lists,onSelectionChange:M},{default:t(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(n,{label:"\u5BA2\u6237",prop:"customer_name","show-overflow-tooltip":""}),e(n,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(n,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(n,{label:"\u5F00\u7968\u65E5\u671F",prop:"invoicing_date","show-overflow-tooltip":""}),e(n,{label:"\u671F\u6B21",prop:"industry"},{default:t(({row:o})=>[e(L,{options:r(x).pay_period,value:o.period},null,8,["options","value"])]),_:1}),e(n,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:t(({row:o})=>[e(L,{options:r(x).invoice_type,value:o.invoice_type},null,8,["options","value"])]),_:1}),e(n,{label:"\u5F00\u7968\u91D1\u989D(\u542B\u7A0E)",prop:"invoicing_amount","show-overflow-tooltip":""}),e(n,{label:"\u5F00\u7968\u91D1\u989D(\u975E\u7A0E)",prop:"amount_including_tax","show-overflow-tooltip":""}),e(n,{label:"\u7A0E\u7387",prop:"tax_rate","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:o})=>[v((i(),p(d,{type:"primary",link:"",onClick:_=>W(o)},{default:t(()=>[Ve]),_:2},1032,["onClick"])),[[b,["InvoicingRequests.InvoicingRequests/edit"]]]),v((i(),p(d,{type:"danger",link:"",onClick:_=>R(o.id)},{default:t(()=>[xe]),_:2},1032,["onClick"])),[[b,["InvoicingRequests.InvoicingRequests/delete"]]]),v((i(),p(d,{link:"",onClick:_=>z(o)},{default:t(()=>[Re]),_:2},1032,["onClick"])),[[b,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),N("div",Ie,[e(Z,{modelValue:r(f),"onUpdate:modelValue":a[4]||(a[4]=o=>Ce(f)?f.value=o:null),onChange:r(C)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,r(f).loading]])])}}});export{yo as default};
|