import{I as Q,y as X,G as Y,H as Z,w as ee,D as oe,C as te,L as le,M as ae,N as ne}from"./element-plus.517d4382.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import{f as se,a as ue}from"./index.8b1962e9.js";import{u as pe}from"./usePaging.f6660143.js";import{u as me}from"./useDictOptions.b5854a9e.js";import{p as de,b as V,a as ce}from"./project_personnel.b59a00de.js";import{_ as _e}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.8fd2a8b4.js";import fe from"./detail.f56e9d6e.js";import{d as R,a0 as x,s as $,r as y,ai as ve,o as r,c as L,V as e,M as l,O as _,u as i,L as u,S as A,W as we,a8 as be,a as P,k as ke,T as c,n as g}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"./lodash.1d82ee7c.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";import"./picker.6eb62d2f.js";import"./index.b17dae19.js";import"./index.ee772d81.js";import"./index.0a0ddda3.js";import"./index.vue_vue_type_script_setup_true_lang.f8507404.js";import"./vue3-video-play.b66b1487.js";import"./vuedraggable.05ef589e.js";import"./vue.6436c619.js";import"./sortablejs.81b741d7.js";import"./index.vue_vue_type_script_setup_true_lang.ed719f67.js";import"./project.a81dff6c.js";import"./project_job_type.a34d9934.js";const Ce=c("\u67E5\u8BE2"),Ee=c("\u91CD\u7F6E"),De=c(" \u65B0\u589E "),he=c(" \u5220\u9664 "),Fe={class:"mt-4"},ye=c(" \u7F16\u8F91 "),ge=c(" \u5220\u9664 "),je=c(" \u8BE6\u60C5 "),Be={class:"flex justify-end mt-4"},Ve=R({name:"projectLists"}),xo=R({...Ve,setup(xe){x([]);const D=$(),w=$(),b=y(!1),h=y(!1),p=x({mobile:"",name:"",work_type:""}),F=y([]),S=n=>{F.value=n.map(({id:o})=>o)},{dictData:k}=me("work_type"),{pager:f,getLists:C,resetParams:I,resetPage:N}=pe({fetchFun:de,params:p}),T=async()=>{var n;b.value=!0,await g(),(n=w.value)==null||n.open("add")},U=async n=>{var m,s;console.log(n.id);let o=await V({id:n.id});b.value=!0,await g(),(m=w.value)==null||m.open("edit"),(s=w.value)==null||s.setFormData(o)},j=async n=>{await se.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:n}),C()},M=async n=>{var m,s;let o=await V({id:n.id});h.value=!0,await g(),(m=D.value)==null||m.open(),(s=D.value)==null||s.setFormData(o)};return C(),(n,o)=>{const m=Q,s=X,O=Y,q=Z,d=ee,G=oe,B=te,H=ue,a=le,W=ie,z=ae,J=re,v=ve("perms"),K=ne;return r(),L("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(G,{class:"mb-[-16px]",model:p,inline:""},{default:l(()=>[e(s,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:l(()=>[e(m,{class:"w-[280px]",modelValue:p.mobile,"onUpdate:modelValue":o[0]||(o[0]=t=>p.mobile=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u59D3\u540D",prop:"name"},{default:l(()=>[e(m,{class:"w-[280px]",modelValue:p.name,"onUpdate:modelValue":o[1]||(o[1]=t=>p.name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5DE5\u79CD",prop:"work_type"},{default:l(()=>[e(q,{modelValue:p.work_type,"onUpdate:modelValue":o[2]||(o[2]=t=>p.work_type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5DE5\u79CD"},{default:l(()=>[(r(!0),L(we,null,be(i(k).work_type,(t,E)=>(r(),u(O,{key:E,label:t.name,value:parseInt(t.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,null,{default:l(()=>[e(d,{type:"primary",onClick:i(N)},{default:l(()=>[Ce]),_:1},8,["onClick"]),e(d,{onClick:i(I)},{default:l(()=>[Ee]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((r(),u(B,{class:"!border-none",shadow:"never"},{default:l(()=>[_((r(),u(d,{type:"primary",onClick:T},{icon:l(()=>[e(H,{name:"el-icon-Plus"})]),default:l(()=>[De]),_:1})),[[v,["project.project_document/add"]]]),_((r(),u(d,{disabled:!F.value.length,onClick:o[3]||(o[3]=t=>j(F.value))},{default:l(()=>[he]),_:1},8,["disabled"])),[[v,["project.project_document/delete"]]]),P("div",Fe,[e(z,{data:i(f).lists,onSelectionChange:S},{default:l(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(a,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(a,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(a,{label:"\u59D3\u540D",prop:"name","show-overflow-tooltip":""}),e(a,{label:"\u8EAB\u4EFD\u8BC1\u53F7",prop:"idcard","show-overflow-tooltip":""}),e(a,{label:"\u5DE5\u79CD","show-overflow-tooltip":""},{default:l(({row:t})=>[e(W,{options:i(k).work_type,value:t.work_type},null,8,["options","value"])]),_:1}),e(a,{label:"\u4EBA\u5DE5\u5355\u4EF7",prop:"unit_price","show-overflow-tooltip":""}),e(a,{label:"\u94F6\u884C\u5361\u53F7",prop:"bank_no","show-overflow-tooltip":""}),e(a,{label:"\u5F00\u6237\u94F6\u884C",prop:"deposit_bank","show-overflow-tooltip":""}),e(a,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),e(a,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:l(({row:t})=>[_((r(),u(d,{type:"primary",link:"",onClick:E=>U(t)},{default:l(()=>[ye]),_:2},1032,["onClick"])),[[v,["project.project_document/edit"]]]),_((r(),u(d,{type:"danger",link:"",onClick:E=>j(t.id)},{default:l(()=>[ge]),_:2},1032,["onClick"])),[[v,["project.project_document/delete"]]]),_((r(),u(d,{link:"",onClick:E=>M(t)},{default:l(()=>[je]),_:2},1032,["onClick"])),[[v,["project.project_document/detail"]]])]),_:1})]),_:1},8,["data"])]),P("div",Be,[e(J,{modelValue:i(f),"onUpdate:modelValue":o[4]||(o[4]=t=>ke(f)?f.value=t:null),onChange:i(C)},null,8,["modelValue","onChange"])])]),_:1})),[[K,i(f).loading]]),b.value?(r(),u(_e,{key:0,ref_key:"editRef",ref:w,"dict-data":i(k),onSuccess:i(C),onClose:o[5]||(o[5]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):A("",!0),h.value?(r(),u(fe,{key:1,ref_key:"detailRef",ref:D,"dict-data":i(k),onClose:o[6]||(o[6]=t=>h.value=!1)},null,8,["dict-data"])):A("",!0)])}}});export{xo as default};