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

2 lines
6.9 KiB
JavaScript

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