25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

applicationInfo.a2bef40e.js 8.5KB

1
  1. import{b as E}from"./index.101b6644.js";import{d as Z,C as ee,B as K,x as ae,r as U,J as Q,o as le,c as _,e as o,G as p,i as l,h as i,g as F,j as W,f as $,F as S,H as h,k as j,u as D}from"./index.2dada31c.js";const te={class:"text-right w-full mb-8"},oe={key:0},ne=["onClick"],ie={class:"text-right w-full mb-8"},pe=["onClick"],ue=Z({name:"projectCollectionEnterBasicInfo"}),re=Object.assign(ue,{props:{detail:{type:Object},basicInfoData:{type:Object},isSupplemented:{type:Boolean,default:!1}},setup(d,{expose:X}){const R=ee(K.userStore).userInfo,Y=ae(),O=d,{accountAppNameOption:G,domainBrainAccountOptions:H}=K.dictStore.globalDicts||{},q=U(),T=U(),c=U({applications:[]}),J=[{label:"\u5E8F\u53F7",type:"index",width:60},{label:"\u5173\u8054IRS\u5E94\u7528\u540D\u79F0",slot:"application",key:"application"},{label:"IRS\u5E94\u7528\u7F16\u7801",slot:"applicationCode",key:"applicationCode"},{label:"\u4E00\u672C\u8D26\u91CD\u5927\u5E94\u7528\u540D\u79F0",slot:"baseAccountAppName",key:"baseAccountAppName"},{label:'"\u9886\u57DF\u5927\u8111"\u4E00\u672C\u8D26\u540D\u79F0',slot:"baseBrainName",key:"baseBrainName"},{label:"\u64CD\u4F5C",slot:"action",key:"action"}],M=async()=>{var t;if(!((t=v.value)!=null&&t.length)){const s=await E({areaCode:R.value.regionCode});v.value=s.data}c.value.applications.push({application:void 0})},z=t=>{c.value.applications.splice(t,1)},v=U([]),b=U();return X({formRef:q,formData:c}),Q(()=>O.basicInfoData,t=>{var s;(t==null?void 0:t.baseProjIsConfidentiality)==="02"||(t==null?void 0:t.baseProjSetProg)==="00"?T.value={}:T.value={applications:[{required:!0,message:"\u8BF7\u81F3\u5C11\u5173\u8054\u4E00\u4E2A\u5E94\u7528"}]},(s=q.value)==null||s.clearValidate()},{deep:!0,immediate:!0}),le(async()=>{if(!Y.query.id){const t=await E({areaCode:R.value.regionCode});v.value=t.data}}),Q(()=>O.detail,async t=>{var s,I,f,y;if(t){O.isSupplemented&&(b.value=((I=(s=t.apply.baseProjSysCode)==null?void 0:s.split("\uFF1B"))==null?void 0:I.map((N,m)=>{var V,g,w,x,C,A,k;return{application:((V=v.value)==null?void 0:V.find(B=>B.applicationCode===N))||{applicationCode:N,applicationName:((w=(g=t.apply)==null?void 0:g.baseProjSys)==null?void 0:w.split("\uFF1B")[m])||""},baseAccountAppName:((C=(x=t.apply)==null?void 0:x.baseAccountAppName)==null?void 0:C.split("\uFF1B")[m])||"",baseBrainName:((k=(A=t.apply)==null?void 0:A.baseBrainName)==null?void 0:k.split("\uFF1B")[m])||""}}))||[],console.log(b.value));const r=await E({areaCode:R.value.regionCode});v.value=r.data,c.value={applications:((y=(f=t.apply.baseProjSysCode)==null?void 0:f.split("\uFF1B"))==null?void 0:y.map((N,m)=>{var V,g,w,x,C,A,k;return{application:((V=v.value)==null?void 0:V.find(B=>B.applicationCode===N))||{applicationCode:N,applicationName:((w=(g=t.apply)==null?void 0:g.baseProjSys)==null?void 0:w.split("\uFF1B")[m])||""},baseAccountAppName:((C=(x=t.apply)==null?void 0:x.baseAccountAppName)==null?void 0:C.split("\uFF1B")[m])||"",baseBrainName:((k=(A=t.apply)==null?void 0:A.baseBrainName)==null?void 0:k.split("\uFF1B")[m])||""}}))||[]}}}),(t,s)=>{const I=_("el-button"),f=_("el-option"),y=_("el-select"),r=_("el-form-item"),N=_("el-input"),m=_("table-list"),V=_("el-col"),g=_("el-row"),w=_("el-form");return o(),p(w,{ref_key:"formRef",ref:q,model:c.value,rules:T.value,"label-position":"top","label-suffix":":","scroll-to-error":"","validate-on-rule-change":!1},{default:l(()=>[i(g,{gutter:40},{default:l(()=>[i(V,{span:24},{default:l(()=>{var x,C,A,k,B;return[((C=(x=d.basicInfoData)==null?void 0:x.baseConstructionType)==null?void 0:C.includes("01"))&&!(((A=d.basicInfoData)==null?void 0:A.baseProjType)==="01"&&(((k=d.basicInfoData)==null?void 0:k.baseProjSetProg)==="01"||((B=d.basicInfoData)==null?void 0:B.baseProjSetProg)==="02"))?(o(),p(r,{key:"applications1",label:"\u5173\u8054IRS\u5E94\u7528\u540D\u79F0",prop:"applications"},{default:l(()=>{var P;return[F("p",te,[i(I,{type:"primary",disabled:!!((P=b.value)!=null&&P.length)&&d.isSupplemented,onClick:M},{default:l(()=>s[0]||(s[0]=[W("\u6DFB\u52A0\u5173\u8054\u5E94\u7528")])),_:1},8,["disabled"])]),i(m,{pagination:!1,style:{width:"100%"},column:J,data:c.value.applications,"empty-temp":!1},{application:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].application`,rules:[{required:!0,message:" "}]},{default:l(()=>{var a,n;return[i(y,{modelValue:c.value.applications[e.$index].application,"onUpdate:modelValue":u=>c.value.applications[e.$index].application=u,class:"w-full",placeholder:"\u8BF7\u9009\u62E9","value-key":"applicationCode",filterable:"",disabled:((n=(a=b.value)==null?void 0:a[e.$index])==null?void 0:n.application)&&d.isSupplemented},{default:l(()=>[(o(!0),$(S,null,h(v.value,(u,L)=>(o(),p(f,{key:L,label:u.applicationName,value:u},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):j("",!0)]),applicationCode:l(({scope:e})=>[i(r,null,{default:l(()=>{var a;return[i(N,{disabled:"","model-value":(a=e.row.application)==null?void 0:a.applicationCode},null,8,["model-value"])]}),_:2},1024)]),baseAccountAppName:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].baseAccountAppName`},{default:l(()=>{var a;return[i(y,{modelValue:e.row.baseAccountAppName,"onUpdate:modelValue":n=>e.row.baseAccountAppName=n,disabled:((a=b.value)==null?void 0:a[e.$index].baseAccountAppName)&&d.isSupplemented},{default:l(()=>[(o(!0),$(S,null,h(D(G),(n,u)=>(o(),p(f,{key:u,label:n,value:n},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):j("",!0)]),baseBrainName:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].baseBrainName`},{default:l(()=>{var a;return[i(y,{modelValue:e.row.baseBrainName,"onUpdate:modelValue":n=>e.row.baseBrainName=n,disabled:((a=b.value)==null?void 0:a[e.$index].baseBrainName)&&d.isSupplemented},{default:l(()=>[(o(!0),$(S,null,h(D(H),(n,u)=>(o(),p(f,{key:u,label:n,value:n},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):j("",!0)]),action:l(({scope:e})=>{var a;return[((a=b.value)==null?void 0:a.length)&&d.isSupplemented?(o(),$("span",oe,"-")):(o(),$("a",{key:1,class:"text-danger",onClick:n=>z(e.$index)},"\u5220\u9664",8,ne))]}),_:1},8,["data"])]}),_:1})):(o(),p(r,{key:"applications2",label:"\u5173\u8054IRS\u5E94\u7528\u540D\u79F0"},{default:l(()=>{var P;return[F("p",ie,[i(I,{type:"primary",disabled:!!((P=b.value)!=null&&P.length)&&d.isSupplemented,onClick:M},{default:l(()=>s[1]||(s[1]=[W("\u6DFB\u52A0\u5173\u8054\u5E94\u7528")])),_:1},8,["disabled"])]),i(m,{pagination:!1,style:{width:"100%"},column:J,data:c.value.applications,"empty-temp":!1},{application:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].application`,rules:[{required:!0,message:" "}]},{default:l(()=>{var a,n;return[i(y,{modelValue:c.value.applications[e.$index].application,"onUpdate:modelValue":u=>c.value.applications[e.$index].application=u,class:"w-full",placeholder:"\u8BF7\u9009\u62E9","value-key":"applicationCode",filterable:"",disabled:((n=(a=b.value)==null?void 0:a[e.$index])==null?void 0:n.application)&&d.isSupplemented},{default:l(()=>[(o(!0),$(S,null,h(v.value,(u,L)=>(o(),p(f,{key:L,label:u.applicationName,value:u},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):j("",!0)]),applicationCode:l(({scope:e})=>[i(r,null,{default:l(()=>{var a;return[i(N,{disabled:"","model-value":(a=e.row.application)==null?void 0:a.applicationCode},null,8,["model-value"])]}),_:2},1024)]),baseAccountAppName:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].baseAccountAppName`},{default:l(()=>[i(y,{modelValue:e.row.baseAccountAppName,"onUpdate:modelValue":a=>e.row.baseAccountAppName=a},{default:l(()=>[(o(!0),$(S,null,h(D(G),(a,n)=>(o(),p(f,{key:n,label:a,value:a},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):j("",!0)]),baseBrainName:l(({scope:e})=>[e.$index>=0?(o(),p(r,{key:0,prop:`applications[${e.$index}].baseBrainName`},{default:l(()=>[i(y,{modelValue:e.row.baseBrainName,"onUpdate:modelValue":a=>e.row.baseBrainName=a},{default:l(()=>[(o(!0),$(S,null,h(D(H),(a,n)=>(o(),p(f,{key:n,label:a,value:a},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):j("",!0)]),action:l(({scope:e})=>[F("a",{class:"text-danger",onClick:a=>z(e.$index)},"\u5220\u9664",8,pe)]),_:1},8,["data"])]}),_:1}))]}),_:1})]),_:1})]),_:1},8,["model","rules"])}}});export{re as default};