engineering/public/admin/assets/index.19dddf14.js
2024-01-18 15:38:10 +08:00

2 lines
6.8 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.6f3f78eb.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.2b4bac20.js";import{f as de,a as me}from"./index.ad7ee5a7.js";import{u as _e}from"./usePaging.f6660143.js";import{u as ve}from"./useDictOptions.3fc9130f.js";import{d as fe,a as $,e as we}from"./InvoicingRequests.da7063ec.js";import"./lodash.1d82ee7c.js";import{a as be}from"./contract.0f75b060.js";import{b as ge}from"./custom.f270e340.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.c5be8610.js";import he from"./detail.04586a3f.js";import{d as U,a0 as A,s as P,r as b,ai as ye,o as i,c as D,V as e,M as a,O as v,u as r,L as u,S,W as N,a8 as T,a as j,k as Ee,T as m,n as B}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.8497a500.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.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.91f9577a.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"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.vue_vue_type_script_setup_true_lang.26c18ae4.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./index.b8094a03.js";import"./index.vue_vue_type_script_setup_true_lang.e02419d2.js";const Fe=m("\u67E5\u8BE2"),ke=m("\u91CD\u7F6E"),De=m(" \u65B0\u589E "),Be=m(" \u5220\u9664 "),Ve={class:"mt-4"},Re=m(" \u7F16\u8F91 "),xe=m(" \u5220\u9664 "),Ie=m(" \u8BE6\u60C5 "),qe={class:"flex justify-end mt-4"},Le=U({name:"projectLists"}),Ft=U({...Le,setup($e){A([]);const E=P(),g=P(),C=b(!1),F=b(!1),V=b([]),R=b([]),p=A({invoicing_company_name:"",contract_id:"",customer_id:""}),k=b([]),M=l=>{k.value=l.map(({id:t})=>t)},{dictData:x}=ve("pay_period,invoice_type,tax_rate"),{pager:f,getLists:h,resetParams:O,resetPage:G}=_e({fetchFun:fe,params:p}),H=async()=>{var l;C.value=!0,await B(),(l=g.value)==null||l.open("add")},W=async l=>{var c,s;let t=await $({id:l.id});C.value=!0,await B(),(c=g.value)==null||c.open("edit"),(s=g.value)==null||s.setFormData(t)},I=async l=>{await de.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await we({id:l}),h()},z=async l=>{var c,s;let t=await $({id:l.id});F.value=!0,await B(),(c=E.value)==null||c.open(),(s=E.value)==null||s.setFormData(t)},J=()=>{be().then(l=>{V.value=l.lists})},K=()=>{ge().then(l=>{R.value=l.lists})};return J(),K(),h(),(l,t)=>{const c=te,s=oe,y=ae,q=le,d=ie,Q=ne,L=se,X=me,n=ue,Y=re,Z=ce,w=ye("perms"),ee=pe;return i(),D("div",null,[e(L,{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(q,{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(y,{label:"\u5168\u90E8",value:""}),(i(!0),D(N,null,T(R.value,(o,_)=>(i(),u(y,{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(q,{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(y,{label:"\u5168\u90E8",value:""}),(i(!0),D(N,null,T(V.value,(o,_)=>(i(),u(y,{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(()=>[Fe]),_:1},8,["onClick"]),e(d,{onClick:r(O)},{default:a(()=>[ke]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),u(L,{class:"!border-none",shadow:"never"},{default:a(()=>[v((i(),u(d,{type:"primary",onClick:H},{icon:a(()=>[e(X,{name:"el-icon-Plus"})]),default:a(()=>[De]),_:1})),[[w,["InvoicingRequests.InvoicingRequests/add"]]]),v((i(),u(d,{disabled:!k.value.length,onClick:t[3]||(t[3]=o=>I(k.value))},{default:a(()=>[Be]),_:1},8,["disabled"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),j("div",Ve,[e(Y,{data:r(f).lists,onSelectionChange:M},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(n,{label:"\u5BA2\u6237",prop:"custom_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:"period","show-overflow-tooltip":""}),e(n,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type","show-overflow-tooltip":""}),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:a(({row:o})=>[v((i(),u(d,{type:"primary",link:"",onClick:_=>W(o)},{default:a(()=>[Re]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/edit"]]]),v((i(),u(d,{type:"danger",link:"",onClick:_=>I(o.id)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),v((i(),u(d,{link:"",onClick:_=>z(o)},{default:a(()=>[Ie]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),j("div",qe,[e(Z,{modelValue:r(f),"onUpdate:modelValue":t[4]||(t[4]=o=>Ee(f)?f.value=o:null),onChange:r(h)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,r(f).loading]]),C.value?(i(),u(Ce,{key:0,ref_key:"editRef",ref:g,"dict-data":r(x),onSuccess:r(h),onClose:t[5]||(t[5]=o=>C.value=!1)},null,8,["dict-data","onSuccess"])):S("",!0),F.value?(i(),u(he,{key:1,ref_key:"detailRef",ref:E,"dict-data":r(x),onClose:t[6]||(t[6]=o=>F.value=!1)},null,8,["dict-data"])):S("",!0)])}}});export{Ft as default};