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