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

2 lines
7.2 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.25ac1d37.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.5a7e3ebe.js";import{f as me,a as de}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 j,e as we}from"./InvoicingRequests.ed1ce342.js";import"./lodash.86334a69.js";import{a as be}from"./contract.76fbc395.js";import{b as Ee}from"./custom.c0ef026d.js";import{_ as he}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.81dd9d20.js";import Fe from"./detail.085d28b7.js";import{d as U,a0 as L,s as $,r as b,ai as ge,o as i,c as D,V as e,M as a,O as v,u as r,L as s,S as P,W as S,a8 as N,a as T,k as Ce,T as d,n as B}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"./projecttype.8510929b.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";const ye=d("\u67E5\u8BE2"),ke=d("\u91CD\u7F6E"),De=d(" \u65B0\u589E "),Be=d(" \u5220\u9664 "),Ve={class:"mt-4"},Re=d(" \u7F16\u8F91 "),Ie=d(" \u5220\u9664 "),xe=d(" \u8BE6\u60C5 "),Ae={class:"flex justify-end mt-4"},qe=U({name:"projectLists"}),Vo=U({...qe,setup(je){L([]);const C=$(),E=$(),h=b(!1),y=b(!1),V=b([]),R=b([]),p=L({invoicing_company_name:"",contract_id:"",customer_id:""}),k=b([]),M=n=>{k.value=n.map(({id:o})=>o)},{dictData:I}=ve("pay_period,invoice_type"),{pager:f,getLists:F,resetParams:O,resetPage:G}=_e({fetchFun:fe,params:p}),H=async()=>{var n;h.value=!0,await B(),(n=E.value)==null||n.open("add")},W=async n=>{var c,u;let o=await j({id:n.id});h.value=!0,await B(),(c=E.value)==null||c.open("edit"),(u=E.value)==null||u.setFormData(o)},x=async n=>{await me.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await we({id:n}),F()},z=async n=>{var c,u;let o=await j({id:n.id});y.value=!0,await B(),(c=C.value)==null||c.open(),(u=C.value)==null||u.setFormData(o)},J=()=>{be().then(n=>{V.value=n.lists})},K=()=>{Ee().then(n=>{R.value=n.lists})};return J(),K(),F(),(n,o)=>{const c=oe,u=te,g=ae,A=le,m=ne,Q=ie,q=ue,X=de,l=se,Y=re,Z=ce,w=ge("perms"),ee=pe;return i(),D("div",null,[e(q,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(Q,{class:"mb-[-16px]",model:p,inline:""},{default:a(()=>[e(u,{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":o[0]||(o[0]=t=>p.invoicing_company_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u7968\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5BA2\u6237",prop:"customer_id"},{default:a(()=>[e(A,{class:"w-[280px]",modelValue:p.customer_id,"onUpdate:modelValue":o[1]||(o[1]=t=>p.customer_id=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},{default:a(()=>[e(g,{label:"\u5168\u90E8",value:""}),(i(!0),D(S,null,N(R.value,(t,_)=>(i(),s(g,{key:_,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,{label:"\u5408\u540C",prop:"contract_id"},{default:a(()=>[e(A,{class:"w-[280px]",modelValue:p.contract_id,"onUpdate:modelValue":o[2]||(o[2]=t=>p.contract_id=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:a(()=>[e(g,{label:"\u5168\u90E8",value:""}),(i(!0),D(S,null,N(V.value,(t,_)=>(i(),s(g,{key:_,label:t.contract_name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:a(()=>[e(m,{type:"primary",onClick:r(G)},{default:a(()=>[ye]),_:1},8,["onClick"]),e(m,{onClick:r(O)},{default:a(()=>[ke]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),s(q,{class:"!border-none",shadow:"never"},{default:a(()=>[v((i(),s(m,{type:"primary",onClick:H},{icon:a(()=>[e(X,{name:"el-icon-Plus"})]),default:a(()=>[De]),_:1})),[[w,["InvoicingRequests.InvoicingRequests/add"]]]),v((i(),s(m,{disabled:!k.value.length,onClick:o[3]||(o[3]=t=>x(k.value))},{default:a(()=>[Be]),_:1},8,["disabled"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),T("div",Ve,[e(Y,{data:r(f).lists,onSelectionChange:M},{default:a(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(l,{label:"\u5904\u7406\u6D41\u7A0B",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u6D41\u7A0B\u6B65\u9AA4",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u9000\u5E93\u5355\u53F7",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u51FA\u5E93\u5355\u53F7",prop:"project_code","show-overflow-tooltip":""}),e(l,{label:"\u4ED3\u5E93\u7F16\u7801",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u8BA2\u5355\u7F16\u53F7",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u5BA2\u6237\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9000\u5E93\u65E5\u671F",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u9000\u5E93\u4EBA",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u5907\u6CE8",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:t})=>[v((i(),s(m,{type:"primary",link:"",onClick:_=>W(t)},{default:a(()=>[Re]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/edit"]]]),v((i(),s(m,{type:"danger",link:"",onClick:_=>x(t.id)},{default:a(()=>[Ie]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),v((i(),s(m,{link:"",onClick:_=>z(t)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),T("div",Ae,[e(Z,{modelValue:r(f),"onUpdate:modelValue":o[4]||(o[4]=t=>Ce(f)?f.value=t:null),onChange:r(F)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,r(f).loading]]),h.value?(i(),s(he,{key:0,ref_key:"editRef",ref:E,"dict-data":r(I),onSuccess:r(F),onClose:o[5]||(o[5]=t=>h.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),y.value?(i(),s(Fe,{key:1,ref_key:"detailRef",ref:C,"dict-data":r(I),onClose:o[6]||(o[6]=t=>y.value=!1)},null,8,["dict-data"])):P("",!0)])}}});export{Vo as default};