2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{G as ce,H as _e,I as fe,y as Fe,A as Ee,J as ve,P as be,Q as Ve,w as ge,K as ye,B as Be,F as De,D as xe,k as ke}from"./element-plus.258bf9e7.js";import{u as Ce,c as O,t as Ae}from"./index.ec401e3b.js";import{P as Ue}from"./index.9492d03b.js";import{_ as we}from"./index.vue_vue_type_script_setup_true_lang.46577b40.js";import{a as he,b as Re,c as je}from"./administrativePayments.9ced8d75.js";import{d as P}from"./department.1c914e1a.js";import{g as Ie}from"./organization.f0387125.js";import{d as Y,r as p,a0 as F,s as M,e as Se,o as s,c as f,V as l,M as t,u as N,a as E,W as D,a8 as x,T as $,L as w,U as T}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.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./usePaging.f6660143.js";import"./useDictOptions.c644f395.js";import"./administrative.3d66a323.js";const Oe={class:"edit-popup"},Pe={style:{display:"flex","flex-direction":"row-reverse","justify-content":"flex-start","margin-bottom":"30px"}},Me=$(" \u4E0A\u4F20 "),Ne={style:{"margin-left":"5px",display:"block"}},Te=["href"],Ye=["onClick"],$e=E("div",{class:"tit"},"\u6536\u6B3E\u4EBA\u4FE1\u606F",-1),qe=Y({name:"projectEdit"}),Il=Y({...qe,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(q,{expose:G,emit:h}){const L=O.baseUrl+O.urlPrefix,R=Ce();p(0);const _=F([]),v=p(""),k=p(""),b=p(""),V=p(""),g=p(""),j=F([]),y=F([]),z=R.userInfo;console.log(z,"222222");const H=(a,e)=>{if(a.code==0){ke.error(a.msg);return}_.push({uri:a.data.uri,name:a.data.name})},J=a=>{_.splice(a,1)},C=M(),A=M(),U=p("add");p("");const B=p(!1),K=a=>{o.administrative_contract_id=a.id,v.value=a.contract_name,b.value=a.contract_no,V.value=a.contract_name,g.value=a.contract_no,B.value=!1},Q=()=>{Ie().then(a=>{Object.assign(j,a),a.length>0&&!o.org_id&&(o.org_id=a[0].id,P({org_id:a[0].id}).then(e=>{e.length>0&&(Object.assign(y,e),o.dept_id=e[0].id)}))})},W=a=>{o.dept_id="",X(a)},X=a=>{P({org_id:a}).then(e=>{y.splice(0,y.length,...e)})},Z=a=>{a&&a>0&&(k.value=Ae(a))},ee=Se(()=>U.value=="edit"?"\u7F16\u8F91\u884C\u653F\u4ED8\u6B3E\u8868":"\u65B0\u589E\u884C\u653F\u4ED8\u6B3E\u8868"),o=F({id:"",org_id:0,dept_id:0,approve_id:0,administrative_contract_id:0,applier:"",apply_date:"",pay_type:0,payment_rate:"",payment_amount:"",deposit_bank:"",account_name:"",account:"",remark:"",annex:""}),le=F({}),I=async a=>{if(a.return_desc&&a.return_desc.length>0){const e=a.return_desc.map((i,m)=>({name:`\u6587\u4EF6${m+1}`,uri:i}));Object.assign(_,e)}for(const e in o)a[e]!=null&&a[e]!=null&&(o[e]=a[e]);V.value=a.contract.contract_name,g.value=a.contract.contract_no,v.value=a.contract.contract_no,b.value=a.contract.contract_no},ue=async a=>{const e=await he({id:a.id});I(e)},ae=async()=>{var e,i,m;_.length>0&&(o.return_desc=_.map(d=>d.uri).toString()),console.log((e=C.value)==null?void 0:e.validate(),"22222222"),await((i=C.value)==null?void 0:i.validate());const a={...o};U.value=="edit"?await Re(a):await je(a),(m=A.value)==null||m.close(),h("success")},te=(a="add")=>{var e;U.value=a,(e=A.value)==null||e.open(),Q()},oe=()=>{h("close")};return G({open:te,setFormData:I,getDetail:ue}),(a,e)=>{const i=ce,m=_e,d=fe,n=Fe,r=Ee,ne=ve,re=be,de=Ve,pe=ge,se=ye,S=Be,ie=De,me=xe;return s(),f("div",Oe,[l(Ue,{ref_key:"popupRef",ref:A,title:N(ee),async:!0,width:"80%",onConfirm:ae,onClose:oe},{default:t(()=>[l(me,{ref_key:"formRef",ref:C,model:o,"label-width":"auto",rules:le},{default:t(()=>[E("div",Pe,[l(m,{class:"w-[180px]",modelValue:o.dept_id,"onUpdate:modelValue":e[0]||(e[0]=u=>o.dept_id=u),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u90E8\u95E8"},{default:t(()=>[(s(!0),f(D,null,x(y,(u,c)=>(s(),w(i,{key:c,label:u.name,value:u.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(m,{class:"w-[180px]",modelValue:o.org_id,"onUpdate:modelValue":e[1]||(e[1]=u=>o.org_id=u),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7EC4\u7EC7",onChange:W},{default:t(()=>[(s(!0),f(D,null,x(j,(u,c)=>(s(),w(i,{key:c,label:u.name,value:u.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),l(S,{gutter:10},{default:t(()=>[l(r,{span:8},{default:t(()=>[l(n,{label:"\u5408\u540C\u7F16\u53F7",prop:"administrative_contract_id",onClick:e[3]||(e[3]=u=>B.value=!0),rules:[{required:!0,message:"\u4E0D\u53EF\u4E3A\u7A7A",trigger:"blur"}]},{default:t(()=>[l(d,{modelValue:b.value,"onUpdate:modelValue":e[2]||(e[2]=u=>b.value=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u5408\u540C\u540D\u79F0",prop:"administrative_contract_id"},{default:t(()=>[l(d,{modelValue:v.value,"onUpdate:modelValue":e[4]||(e[4]=u=>v.value=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",rop:"administrative_contract_id",rules:[{required:!0,message:"\u4E0D\u53EF\u4E3A\u7A7A",trigger:"blur"}]},{default:t(()=>[l(d,{modelValue:V.value,"onUpdate:modelValue":e[5]||(e[5]=u=>V.value=u),readonly:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u4F9B\u5E94\u5546\u7F16\u7801",rop:"administrative_contract_id"},{default:t(()=>[l(d,{modelValue:g.value,"onUpdate:modelValue":e[6]||(e[6]=u=>g.value=u),readonly:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u7533\u8BF7\u4EBA",prop:"applier"},{default:t(()=>[l(d,{modelValue:o.applier,"onUpdate:modelValue":e[7]||(e[7]=u=>o.applier=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4EBA"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u7533\u8BF7\u65E5\u671F",prop:"apply_date"},{default:t(()=>[l(ne,{class:"flex-1 !flex",modelValue:o.apply_date,"onUpdate:modelValue":e[8]||(e[8]=u=>o.apply_date=u),clearable:"","value-format":"YYYY-MM-DD ",placeholder:"\u9009\u62E9\u5F00\u7968\u65E5\u671F"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:24},{default:t(()=>[l(n,{label:"\u4ED8\u6B3E\u65B9\u5F0F",prop:"pay_type",rules:[{required:!0,message:"\u4E0D\u53EF\u4E3A\u7A7A",trigger:"change"}]},{default:t(()=>[l(de,{modelValue:o.pay_type,"onUpdate:modelValue":e[9]||(e[9]=u=>o.pay_type=u),placeholder:"\u8BF7\u9009\u62E9\u4ED8\u6B3E\u65B9\u5F0F"},{default:t(()=>[(s(!0),f(D,null,x(q.dictData.pay_type,(u,c)=>(s(),w(re,{key:c,label:parseInt(u.value)},{default:t(()=>[$(T(u.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u5408\u8BA1\u5DF2\u4ED8\u6B3E",prop:"invoice_sn"},{default:t(()=>[l(d,{modelValue:o.invoice_sn,"onUpdate:modelValue":e[10]||(e[10]=u=>o.invoice_sn=u),readonly:"",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u8BA1\u5DF2\u4ED8\u6B3E"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u672C\u6B21\u652F\u4ED8\u6BD4\u4F8B\uFF08%\uFF09",prop:"payment_rate"},{default:t(()=>[l(d,{modelValue:o.payment_rate,"onUpdate:modelValue":e[11]||(e[11]=u=>o.payment_rate=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u652F\u4ED8\u6BD4\u4F8B\uFF08%\uFF09"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u672C\u6B21\u652F\u4ED8\u91D1\u989D",prop:"payment_amount"},{default:t(()=>[l(d,{modelValue:o.payment_amount,"onUpdate:modelValue":e[12]||(e[12]=u=>o.payment_amount=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u652F\u4ED8\u91D1\u989D",onInput:Z},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u91D1\u989D\u5927\u5199",prop:"invoice_amount_daxie"},{default:t(()=>[l(d,{modelValue:k.value,"onUpdate:modelValue":e[13]||(e[13]=u=>k.value=u),readonly:"",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D\u5927\u5199"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:24},{default:t(()=>[l(n,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[l(d,{modelValue:o.remark,"onUpdate:modelValue":e[14]||(e[14]=u=>o.remark=u),type:"textarea",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:24},{default:t(()=>[l(n,{label:"\u9644\u4EF6",prop:"field87"},{default:t(()=>[l(se,{accept:"doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv",class:"upload-demo","show-file-list":!1,"aria-hidden":"true",headers:{Token:N(R).token},action:L+"/upload/file","on-success":H,ref:"upload"},{default:t(()=>[l(pe,{type:"primary"},{default:t(()=>[Me]),_:1})]),_:1},8,["headers","action"]),E("div",null,[(s(!0),f(D,null,x(_,(u,c)=>(s(),f("div",Ne,[E("a",{style:{"margin-left":"10px",color:"#4a5dff","align-self":"flex-start"},href:u.uri,target:"_blank"},T(u.name),9,Te),E("span",{style:{cursor:"pointer","margin-left":"5px"},onClick:Ge=>J(c)},"x",8,Ye)]))),256))])]),_:1})]),_:1})]),_:1}),$e,l(S,null,{default:t(()=>[l(r,{span:8},{default:t(()=>[l(n,{label:"\u5F00\u6237\u540D\u79F0",prop:"account_name"},{default:t(()=>[l(d,{modelValue:o.account_name,"onUpdate:modelValue":e[15]||(e[15]=u=>o.account_name=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u5F00\u6237\u94F6\u884C",prop:"deposit_bank"},{default:t(()=>[l(d,{modelValue:o.deposit_bank,"onUpdate:modelValue":e[16]||(e[16]=u=>o.deposit_bank=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u6237\u94F6\u884C"},null,8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(n,{label:"\u8D26\u53F7",prop:"account"},{default:t(()=>[l(d,{modelValue:o.account,"onUpdate:modelValue":e[17]||(e[17]=u=>o.account=u),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(ie,{modelValue:B.value,"onUpdate:modelValue":e[18]||(e[18]=u=>B.value=u),title:"\u9009\u62E9\u5408\u540C",width:"70%"},{default:t(()=>[l(we,{onCustomEvent:K})]),_:1},8,["modelValue"])]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{Il as default};
|