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

2 lines
7.6 KiB
JavaScript

import{I as ae,y as ie,G as ne,H as ue,w as se,D as pe,C as re,L as ce,M as de,N as me}from"./element-plus.517d4382.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as ve,a as fe}from"./index.8b1962e9.js";import{u as we}from"./usePaging.f6660143.js";import{u as ge}from"./useDictOptions.b5854a9e.js";import{d as be,a as $,e as Ce}from"./InvoicingRequests.194880ba.js";import"./lodash.1d82ee7c.js";import{a as Fe}from"./contract.2d0c2079.js";import{b as he}from"./custom.99349afc.js";import{d as M,a0 as S,s as A,r as g,a5 as N,ai as Ee,o as n,c as D,V as e,M as a,O as v,u as p,L as s,S as P,W as T,a8 as j,a as U,k as ye,T as m,n as B}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 ke=m("\u67E5\u8BE2"),De=m("\u91CD\u7F6E"),Be=m(" \u65B0\u589E "),Ve=m(" \u5220\u9664 "),Re={class:"mt-4"},Ie=m(" \u7F16\u8F91 "),xe=m(" \u5220\u9664 "),qe=m(" \u8BE6\u60C5 "),Le={class:"flex justify-end mt-4"},$e=M({name:"projectLists"}),ho=M({...$e,setup(Se){S([]);const E=A(),b=A(),C=g(!1),y=g(!1),V=g([]),R=g([]),r=S({invoicing_company_name:"",contract_id:"",customer_id:""}),k=g([]),O=i=>{k.value=i.map(({id:t})=>t)},{dictData:I}=ge("pay_period,invoice_type"),{pager:f,getLists:F,resetParams:G,resetPage:H}=we({fetchFun:be,params:r}),W=async()=>{var i;C.value=!0,await B(),(i=b.value)==null||i.open("add")},z=async i=>{var c,u;let t=await $({id:i.id});C.value=!0,await B(),(c=b.value)==null||c.open("edit"),(u=b.value)==null||u.setFormData(t)},x=async i=>{await ve.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ce({id:i}),F()},J=async i=>{var c,u;let t=await $({id:i.id});y.value=!0,await B(),(c=E.value)==null||c.open(),(u=E.value)==null||u.setFormData(t)},K=()=>{Fe().then(i=>{V.value=i.lists})},Q=()=>{he().then(i=>{R.value=i.lists})};return K(),Q(),F(),(i,t)=>{const c=ae,u=ie,h=ne,q=ue,d=se,X=pe,L=re,Y=fe,o=ce,Z=de,ee=_e,oe=N("edit-popup"),te=N("detail-popup"),w=Ee("perms"),le=me;return n(),D("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(X,{class:"mb-[-16px]",model:r,inline:""},{default:a(()=>[e(u,{label:"\u5F00\u7968\u516C\u53F8\u540D\u79F0",prop:"invoicing_company_name"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:r.invoicing_company_name,"onUpdate:modelValue":t[0]||(t[0]=l=>r.invoicing_company_name=l),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(q,{class:"w-[280px]",modelValue:r.customer_id,"onUpdate:modelValue":t[1]||(t[1]=l=>r.customer_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},{default:a(()=>[e(h,{label:"\u5168\u90E8",value:""}),(n(!0),D(T,null,j(R.value,(l,_)=>(n(),s(h,{key:_,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,{label:"\u5408\u540C",prop:"contract_id"},{default:a(()=>[e(q,{class:"w-[280px]",modelValue:r.contract_id,"onUpdate:modelValue":t[2]||(t[2]=l=>r.contract_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:a(()=>[e(h,{label:"\u5168\u90E8",value:""}),(n(!0),D(T,null,j(V.value,(l,_)=>(n(),s(h,{key:_,label:l.contract_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:a(()=>[e(d,{type:"primary",onClick:p(H)},{default:a(()=>[ke]),_:1},8,["onClick"]),e(d,{onClick:p(G)},{default:a(()=>[De]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((n(),s(L,{class:"!border-none",shadow:"never"},{default:a(()=>[v((n(),s(d,{type:"primary",onClick:W},{icon:a(()=>[e(Y,{name:"el-icon-Plus"})]),default:a(()=>[Be]),_:1})),[[w,["InvoicingRequests.InvoicingRequests/add"]]]),v((n(),s(d,{disabled:!k.value.length,onClick:t[3]||(t[3]=l=>x(k.value))},{default:a(()=>[Ve]),_:1},8,["disabled"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),U("div",Re,[e(Z,{data:p(f).lists,onSelectionChange:O},{default:a(()=>[e(o,{type:"selection",width:"55"}),e(o,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(o,{label:"ID",prop:"customer_name","show-overflow-tooltip":""}),e(o,{label:"\u4F59\u6599\u5904\u7406\u5355\u53F7",prop:"customer_name","show-overflow-tooltip":""}),e(o,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(o,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(o,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u4ED3\u5E93\u7F16\u7801",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u8BA2\u5355\u7F16\u53F7",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u5904\u7406\u65E5\u671F",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u4F9B\u5E94\u65B9\u5F0F",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u7C7B\u522B",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u4E2D\u7C7B",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u5C0F\u7C7B",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u540D\u79F0",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u7F16\u7801",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u54C1\u724C",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u89C4\u683C\u578B\u53F7",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u53C2\u6570\u8BF4\u660E",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u5355\u4F4D",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u5E93\u5B58\u6570\u91CF",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u5904\u7406\u5355\u4EF7",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u5904\u7406\u91D1\u989D",prop:"invoicing_date","show-overflow-tooltip":""}),e(o,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:l})=>[v((n(),s(d,{type:"primary",link:"",onClick:_=>z(l)},{default:a(()=>[Ie]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/edit"]]]),v((n(),s(d,{type:"danger",link:"",onClick:_=>x(l.id)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),v((n(),s(d,{link:"",onClick:_=>J(l)},{default:a(()=>[qe]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),U("div",Le,[e(ee,{modelValue:p(f),"onUpdate:modelValue":t[4]||(t[4]=l=>ye(f)?f.value=l:null),onChange:p(F)},null,8,["modelValue","onChange"])])]),_:1})),[[le,p(f).loading]]),C.value?(n(),s(oe,{key:0,ref_key:"editRef",ref:b,"dict-data":p(I),onSuccess:p(F),onClose:t[5]||(t[5]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),y.value?(n(),s(te,{key:1,ref_key:"detailRef",ref:E,"dict-data":p(I),onClose:t[6]||(t[6]=l=>y.value=!1)},null,8,["dict-data"])):P("",!0)])}}});export{ho as default};