Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 рядки
8.4KB

  1. import{b as E}from"./index.7cf53a4d.js";import{d as Z,G as ee,D as K,z as ae,r as U,L as Q,o as le,c as y,e as o,I as p,i as l,h as i,g as F,j as W,f as $,F as B,J as S,k as I,u as D}from"./index.622ee9e7.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"}),ce=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:z,domainBrainAccountOptions:G}=K.dictStore.globalDicts||{},q=U(),L=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=_.value)!=null&&t.length)){const v=await E({areaCode:R.value.regionCode});_.value=v.data}c.value.applications.push({application:void 0})},H=t=>{c.value.applications.splice(t,1)},_=U([]),m=U();return X({formRef:q,formData:c}),Q(()=>O.basicInfoData,t=>{var v;(t==null?void 0:t.baseProjIsConfidentiality)==="02"||(t==null?void 0:t.baseProjSetProg)==="00"?L.value={}:L.value={applications:[{required:!0,message:"\u8BF7\u81F3\u5C11\u5173\u8054\u4E00\u4E2A\u5E94\u7528"}]},(v=q.value)==null||v.clearValidate()},{deep:!0,immediate:!0}),le(async()=>{if(!Y.query.id){const t=await E({areaCode:R.value.regionCode});_.value=t.data}}),Q(()=>O.detail,async t=>{var v,j,b,f;if(t){O.isSupplemented&&(m.value=((j=(v=t.apply.baseProjSysCode)==null?void 0:v.split("\uFF1B"))==null?void 0:j.map((N,r)=>{var V,g,w,x,C,A,k;return{application:((V=_.value)==null?void 0:V.find(h=>h.applicationCode===N))||{applicationCode:N,applicationName:((w=(g=t.apply)==null?void 0:g.baseProjSys)==null?void 0:w.split("\uFF1B")[r])||""},baseAccountAppName:((C=(x=t.apply)==null?void 0:x.baseAccountAppName)==null?void 0:C.split("\uFF1B")[r])||"",baseBrainName:((k=(A=t.apply)==null?void 0:A.baseBrainName)==null?void 0:k.split("\uFF1B")[r])||""}}))||[],console.log(m.value));const s=await E({areaCode:R.value.regionCode});_.value=s.data,c.value={applications:((f=(b=t.apply.baseProjSysCode)==null?void 0:b.split("\uFF1B"))==null?void 0:f.map((N,r)=>{var V,g,w,x,C,A,k;return{application:((V=_.value)==null?void 0:V.find(h=>h.applicationCode===N))||{applicationCode:N,applicationName:((w=(g=t.apply)==null?void 0:g.baseProjSys)==null?void 0:w.split("\uFF1B")[r])||""},baseAccountAppName:((C=(x=t.apply)==null?void 0:x.baseAccountAppName)==null?void 0:C.split("\uFF1B")[r])||"",baseBrainName:((k=(A=t.apply)==null?void 0:A.baseBrainName)==null?void 0:k.split("\uFF1B")[r])||""}}))||[]}}}),(t,v)=>{const j=y("el-button"),b=y("el-option"),f=y("el-select"),s=y("el-form-item"),N=y("el-input"),r=y("table-list"),V=y("el-col"),g=y("el-row"),w=y("el-form");return o(),p(w,{ref_key:"formRef",ref:q,model:c.value,rules:L.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,h;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"||((h=d.basicInfoData)==null?void 0:h.baseProjSetProg)==="02"))?(o(),p(s,{key:"applications1",label:"\u5173\u8054IRS\u5E94\u7528\u540D\u79F0",prop:"applications"},{default:l(()=>{var P;return[F("p",te,[i(j,{type:"primary",disabled:!!((P=m.value)!=null&&P.length)&&d.isSupplemented,onClick:M},{default:l(()=>[W("\u6DFB\u52A0\u5173\u8054\u5E94\u7528")]),_:1},8,["disabled"])]),i(r,{pagination:!1,style:{width:"100%"},column:J,data:c.value.applications,"empty-temp":!1},{application:l(({scope:e})=>[e.$index>=0?(o(),p(s,{key:0,prop:`applications[${e.$index}].application`,rules:[{required:!0,message:" "}]},{default:l(()=>{var a,n;return[i(f,{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=m.value)==null?void 0:a[e.$index])==null?void 0:n.application)&&d.isSupplemented},{default:l(()=>[(o(!0),$(B,null,S(_.value,(u,T)=>(o(),p(b,{key:T,label:u.applicationName,value:u},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):I("",!0)]),applicationCode:l(({scope:e})=>[i(s,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(s,{key:0,prop:`applications[${e.$index}].baseAccountAppName`},{default:l(()=>{var a;return[i(f,{modelValue:e.row.baseAccountAppName,"onUpdate:modelValue":n=>e.row.baseAccountAppName=n,disabled:((a=m.value)==null?void 0:a[e.$index].baseAccountAppName)&&d.isSupplemented},{default:l(()=>[(o(!0),$(B,null,S(D(z),(n,u)=>(o(),p(b,{key:u,label:n,value:n},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):I("",!0)]),baseBrainName:l(({scope:e})=>[e.$index>=0?(o(),p(s,{key:0,prop:`applications[${e.$index}].baseBrainName`},{default:l(()=>{var a;return[i(f,{modelValue:e.row.baseBrainName,"onUpdate:modelValue":n=>e.row.baseBrainName=n,disabled:((a=m.value)==null?void 0:a[e.$index].baseBrainName)&&d.isSupplemented},{default:l(()=>[(o(!0),$(B,null,S(D(G),(n,u)=>(o(),p(b,{key:u,label:n,value:n},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):I("",!0)]),action:l(({scope:e})=>{var a;return[((a=m.value)==null?void 0:a.length)&&d.isSupplemented?(o(),$("span",oe,"-")):(o(),$("a",{key:1,class:"text-danger",onClick:n=>H(e.$index)},"\u5220\u9664",8,ne))]}),_:1},8,["data"])]}),_:1})):(o(),p(s,{key:"applications2",label:"\u5173\u8054IRS\u5E94\u7528\u540D\u79F0"},{default:l(()=>{var P;return[F("p",ie,[i(j,{type:"primary",disabled:!!((P=m.value)!=null&&P.length)&&d.isSupplemented,onClick:M},{default:l(()=>[W("\u6DFB\u52A0\u5173\u8054\u5E94\u7528")]),_:1},8,["disabled"])]),i(r,{pagination:!1,style:{width:"100%"},column:J,data:c.value.applications,"empty-temp":!1},{application:l(({scope:e})=>[e.$index>=0?(o(),p(s,{key:0,prop:`applications[${e.$index}].application`,rules:[{required:!0,message:" "}]},{default:l(()=>{var a,n;return[i(f,{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=m.value)==null?void 0:a[e.$index])==null?void 0:n.application)&&d.isSupplemented},{default:l(()=>[(o(!0),$(B,null,S(_.value,(u,T)=>(o(),p(b,{key:T,label:u.applicationName,value:u},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]}),_:2},1032,["prop"])):I("",!0)]),applicationCode:l(({scope:e})=>[i(s,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(s,{key:0,prop:`applications[${e.$index}].baseAccountAppName`},{default:l(()=>[i(f,{modelValue:e.row.baseAccountAppName,"onUpdate:modelValue":a=>e.row.baseAccountAppName=a},{default:l(()=>[(o(!0),$(B,null,S(D(z),(a,n)=>(o(),p(b,{key:n,label:a,value:a},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):I("",!0)]),baseBrainName:l(({scope:e})=>[e.$index>=0?(o(),p(s,{key:0,prop:`applications[${e.$index}].baseBrainName`},{default:l(()=>[i(f,{modelValue:e.row.baseBrainName,"onUpdate:modelValue":a=>e.row.baseBrainName=a},{default:l(()=>[(o(!0),$(B,null,S(D(G),(a,n)=>(o(),p(b,{key:n,label:a,value:a},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):I("",!0)]),action:l(({scope:e})=>[F("a",{class:"text-danger",onClick:a=>H(e.$index)},"\u5220\u9664",8,pe)]),_:1},8,["data"])]}),_:1}))]}),_:1})]),_:1})]),_:1},8,["model","rules"])}}});export{ce as default};