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

2 lines
7.3 KiB
JavaScript

import{I as oe,y as te,G as ae,H as le,w as ie,D as ne,C as ue,L as se,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 L,e as we}from"./InvoicingRequests.d0beaefc.js";import"./lodash.86334a69.js";import{a as Ce}from"./contract.c52fff37.js";import{b as ge}from"./custom.ec06ae29.js";import{_ as be}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.7f30832e.js";import{_ as he}from"./detail.vue_vue_type_style_index_0_lang.4f1f515b.js";import{d as U,a0 as S,s as A,r as C,ai as Fe,o as n,c as D,V as e,M as a,O as v,u as r,L as s,S as N,W as P,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.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"),De=m(" \u65B0\u589E "),Be=m(" \u5220\u9664 "),Ve={class:"mt-4"},Re=m(" \u7F16\u8F91 "),Ie=m(" \u5220\u9664 "),xe=m(" \u8BE6\u60C5 "),qe={class:"flex justify-end mt-4"},$e=U({name:"projectLists"}),Vo=U({...$e,setup(Le){S([]);const E=A(),g=A(),b=C(!1),y=C(!1),V=C([]),R=C([]),p=S({invoicing_company_name:"",contract_id:"",customer_id:""}),k=C([]),M=i=>{k.value=i.map(({id:o})=>o)},{dictData:I}=ve("pay_period,invoice_type"),{pager:f,getLists:h,resetParams:O,resetPage:G}=_e({fetchFun:fe,params:p}),H=async()=>{var i;b.value=!0,await B(),(i=g.value)==null||i.open("add")},W=async i=>{var c,u;let o=await L({id:i.id});b.value=!0,await B(),(c=g.value)==null||c.open("edit"),(u=g.value)==null||u.setFormData(o)},x=async i=>{await de.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await we({id:i}),h()},z=async i=>{var c,u;let o=await L({id:i.id});y.value=!0,await B(),(c=E.value)==null||c.open(),(u=E.value)==null||u.setFormData(o)},J=()=>{Ce().then(i=>{V.value=i.lists})},K=()=>{ge().then(i=>{R.value=i.lists})};return J(),K(),h(),(i,o)=>{const c=oe,u=te,F=ae,q=le,d=ie,Q=ne,$=ue,X=me,l=se,Y=re,Z=ce,w=Fe("perms"),ee=pe;return n(),D("div",null,[e($,{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(q,{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(F,{label:"\u5168\u90E8",value:""}),(n(!0),D(P,null,T(R.value,(t,_)=>(n(),s(F,{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(q,{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(F,{label:"\u5168\u90E8",value:""}),(n(!0),D(P,null,T(V.value,(t,_)=>(n(),s(F,{key:_,label:t.contract_name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,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(),s($,{class:"!border-none",shadow:"never"},{default:a(()=>[v((n(),s(d,{type:"primary",onClick:H},{icon:a(()=>[e(X,{name:"el-icon-Plus"})]),default:a(()=>[De]),_:1})),[[w,["InvoicingRequests.InvoicingRequests/add"]]]),v((n(),s(d,{disabled:!k.value.length,onClick:o[3]||(o[3]=t=>x(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(l,{type:"selection",width:"55"}),e(l,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(l,{label:"\u5E8F\u5217\u53F7",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u51FA\u5E93\u65E5\u671F",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u4ED3\u5E93",prop:"customer_name","show-overflow-tooltip":""}),e(l,{label:"\u4ED3\u5E93\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(l,{label:"\u6750\u6599\u7C7B\u522B",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u6750\u6599\u4E2D\u7C7B",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u6750\u6599\u5C0F\u7C7B",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u6750\u6599\u540D\u79F0",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u6750\u6599\u7F16\u7801",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u89C4\u683C\u578B\u53F7",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u54C1\u724C",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u53C2\u6570\u8BF4\u660E",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u5355\u4F4D",prop:"invoicing_date","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:t})=>[v((n(),s(d,{type:"primary",link:"",onClick:_=>W(t)},{default:a(()=>[Re]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/edit"]]]),v((n(),s(d,{type:"danger",link:"",onClick:_=>x(t.id)},{default:a(()=>[Ie]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/delete"]]]),v((n(),s(d,{link:"",onClick:_=>z(t)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[w,["InvoicingRequests.InvoicingRequests/detail"]]])]),_:1})]),_:1},8,["data"])]),j("div",qe,[e(Z,{modelValue:r(f),"onUpdate:modelValue":o[4]||(o[4]=t=>Ee(f)?f.value=t:null),onChange:r(h)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,r(f).loading]]),b.value?(n(),s(be,{key:0,ref_key:"editRef",ref:g,"dict-data":r(I),onSuccess:r(h),onClose:o[5]||(o[5]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):N("",!0),y.value?(n(),s(he,{key:1,ref_key:"detailRef",ref:E,"dict-data":r(I),onClose:o[6]||(o[6]=t=>y.value=!1)},null,8,["dict-data"])):N("",!0)])}}});export{Vo as default};