engineering/public/admin/assets/index.c984c365.js
2024-02-27 10:28:16 +08:00

2 lines
7.2 KiB
JavaScript

import{I as ie,y as ne,G as se,H as ue,w as re,D as pe,C as ce,L as de,M as me,N as _e}from"./element-plus.517d4382.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as ve,a as ge}from"./index.8b1962e9.js";import{_ as we}from"./index.vue_vue_type_style_index_0_lang.9f4b6930.js";import{u as be}from"./usePaging.f6660143.js";import{u as Ce}from"./useDictOptions.b5854a9e.js";import{a as S,d as N,e as he}from"./InvoicingRequests.194880ba.js";import"./lodash.1d82ee7c.js";import{a as ye}from"./contract.2d0c2079.js";import{b as Fe}from"./custom.99349afc.js";import{_ as Ee}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.da5a871e.js";import ke from"./detail.7a83415a.js";import{u as De}from"./vue-router.87ebc608.js";import{d as G,a0 as T,s as j,r as w,ai as Be,o as i,c as D,V as e,M as a,O as v,u as s,L as r,S as U,n as B,W as z,a8 as M,a as O,k as Re,T as m}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"./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";import"./index.b17dae19.js";import"./index.vue_vue_type_script_setup_true_lang.51f10eaa.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./index.vue_vue_type_script_setup_true_lang.b3047aa5.js";const Ve=m("\u67E5\u8BE2"),xe=m("\u91CD\u7F6E"),Ie=m(" \u65B0\u589E "),qe=m(" \u5220\u9664 "),$e={class:"mt-4"},Le=m(" \u7F16\u8F91 "),Ae=m(" \u5220\u9664 "),Pe=m(" \u8BE6\u60C5 "),Se={class:"flex justify-end mt-4"},Ne=G({name:"projectLists"}),qt=G({...Ne,setup(Te){var L;T([]);const R=De(),F=j(),b=j(),C=w(!1),E=w(!1),V=w([]),x=w([]),p=T({invoicing_company_name:"",contract_id:"",customer_id:""}),k=w([]),H=l=>{k.value=l.map(({id:t})=>t)},{dictData:I}=Ce("pay_period,invoice_type,tax_rate"),{pager:_,getLists:h,resetParams:W,resetPage:J}=be({fetchFun:N,params:p}),K=async()=>{var l;C.value=!0,await B(),(l=b.value)==null||l.open("add")},Q=async l=>{var c,u;let t=await S({id:l.id});C.value=!0,await B(),(c=b.value)==null||c.open("edit"),(u=b.value)==null||u.setFormData(t)},q=async l=>{await ve.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:l}),h()},$=async l=>{var c,u;let t=await S({id:l.id});E.value=!0,await B(),(c=F.value)==null||c.open(),(u=F.value)==null||u.setFormData(t)},X=()=>{ye().then(l=>{V.value=l.lists})},Y=()=>{Fe().then(l=>{x.value=l.lists})};return X(),Y(),(L=R.query)!=null&&L.listId&&$({id:R.query.listId}),h(),(l,t)=>{const c=ie,u=ne,y=se,A=ue,d=re,Z=we,ee=pe,P=ce,te=ge,n=de,oe=me,ae=fe,g=Be("perms"),le=_e;return i(),D("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(ee,{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":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(u,{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(y,{label:"\u5168\u90E8",value:""}),(i(!0),D(z,null,M(x.value,(o,f)=>(i(),r(y,{key:f,label:o.name,value:o.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":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(z,null,M(V.value,(o,f)=>(i(),r(y,{key:f,label:o.contract_name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:a(()=>[e(d,{type:"primary",onClick:s(J)},{default:a(()=>[Ve]),_:1},8,["onClick"]),e(d,{onClick:s(W)},{default:a(()=>[xe]),_:1},8,["onClick"]),e(Z,{class:"ml-2.5","fetch-fun":s(N),params:p,"page-size":s(_).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),r(P,{class:"!border-none",shadow:"never"},{default:a(()=>[v((i(),r(d,{type:"primary",onClick:K},{icon:a(()=>[e(te,{name:"el-icon-Plus"})]),default:a(()=>[Ie]),_:1})),[[g,["InvoicingRequests.InvoicingRequests/add"]]]),v((i(),r(d,{disabled:!k.value.length,onClick:t[3]||(t[3]=o=>q(k.value))},{default:a(()=>[qe]),_:1},8,["disabled"])),[[g,["InvoicingRequests.InvoicingRequests/delete"]]]),O("div",$e,[e(oe,{data:s(_).lists,onSelectionChange:H},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(n,{label:"\u5BA2\u6237\u540D\u79F0",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(),r(d,{type:"primary",link:"",onClick:f=>Q(o)},{default:a(()=>[Le]),_:2},1032,["onClick"])),[[g,["InvoicingRequests.InvoicingRequests/edit"]]]),v((i(),r(d,{type:"danger",link:"",onClick:f=>q(o.id)},{default:a(()=>[Ae]),_:2},1032,["onClick"])),[[g,["InvoicingRequests.InvoicingRequests/delete"]]]),v((i(),r(d,{link:"",onClick:f=>$(o)},{default:a(()=>[Pe]),_:2},1032,["onClick"])),[[g,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),O("div",Se,[e(ae,{modelValue:s(_),"onUpdate:modelValue":t[4]||(t[4]=o=>Re(_)?_.value=o:null),onChange:s(h)},null,8,["modelValue","onChange"])])]),_:1})),[[le,s(_).loading]]),C.value?(i(),r(Ee,{key:0,ref_key:"editRef",ref:b,"dict-data":s(I),onSuccess:s(h),onClose:t[5]||(t[5]=o=>C.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),E.value?(i(),r(ke,{key:1,ref_key:"detailRef",ref:F,"dict-data":s(I),onClose:t[6]||(t[6]=o=>E.value=!1)},null,8,["dict-data"])):U("",!0)])}}});export{qt as default};