Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
7.1KB

  1. import{g as Y,a as F}from"./unitManage.09ab32c4.js";import{d as I,r as c,o as T,c as s,e as i,I as p,i as o,h as a,f as y,J as g,u as V,F as _,k as W,K as O,D as k}from"./index.5bb861d3.js";const J=I({name:"jobInfo"}),P=Object.assign(J,{setup(K,{expose:x}){const t=c({companyAttribute:void 0}),C=c(),j={company:[{required:!0,message:"\u8BF7\u4E0A\u9009\u62E9\u5DE5\u4F5C\u5355\u4F4D",trigger:"blur"}],companyUniqCode:[{required:!0,message:"\u5DE5\u4F5C\u5355\u4F4Dcode\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],legalEntityCode:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4F4D\u6CD5\u4EBA\u7F16\u53F7",trigger:"blur"}],administrativeDuties:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u653F\u804C\u52A1",trigger:"blur"}],startWorkAt:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u5DE5\u4F5C\u65E5\u671F",trigger:"blur"}],administrativeRank:[{required:!0,message:"\u8BF7\u9009\u62E9\u884C\u653F\u804C\u7EA7",trigger:"blur"}],jobStatus:[{required:!0,message:"\u8BF7\u9009\u62E9\u5728\u804C\u72B6\u6001",trigger:"blur"}],retiredAt:[{required:!0,message:"\u8BF7\u9009\u9000\u4F11\u65E5\u671F",trigger:"blur"}],companyAttribute:[{required:!0,message:"\u8BF7\u9009\u5355\u4F4D\u7C7B\u578B",trigger:"blur"}]},R=u=>{C.value.validate(e=>{u(e)})},M=u=>{var e,n,r;t.value={...u,administrativeRank:((e=u.administrativeRank)==null?void 0:e[0])||void 0,jobStatus:((n=u.jobStatus)==null?void 0:n[0])||void 0,companyAttribute:((r=u.companyAttribute)==null?void 0:r[0])||void 0}},U=c(),N=()=>{t.value.company=U.value.getCurrentNode().name},L=async(u,e)=>{var n;if(u.level===0){const r=await Y({isCompetentUnit:!0,isSuperiorLineCompetentUnit:!0});e(r.data)}else{const r=await Y({parentCode:u.data.organizationCode});(n=r.data)!=null&&n.length?e(r.data):e([])}},D=c([]),h=async()=>{const u=await O();D.value=u.data},q=c(),w=u=>{const e=[];return u.forEach(n=>{var r;e.push({name:n.title,organizationCode:n.key,children:(r=n.children)!=null&&r.lengt?w(n.children):[]})}),e},z=async u=>{const e=await F({organizationName:u});q.value=w(e.data)};return x({validForm:R,formData:t,setFormData:M}),T(async()=>{h()}),(u,e)=>{const n=s("el-tree-select"),r=s("el-form-item"),d=s("el-col"),f=s("el-input"),A=s("el-date-picker"),v=s("el-option"),b=s("el-select"),B=s("el-row"),E=s("el-form");return i(),p(E,{ref_key:"formRef",ref:C,model:t.value,rules:j,"label-position":"right","label-width":"120px","label-suffix":":","scroll-to-error":"",class:"jobInfo"},{default:o(()=>[a(B,{gutter:8},{default:o(()=>{var S;return[a(d,{span:8},{default:o(()=>[a(r,{label:"\u5DE5\u4F5C\u5355\u4F4D",prop:"company"},{default:o(()=>[a(n,{ref_key:"orgTreeRef",ref:U,modelValue:t.value.companyUniqCode,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value.companyUniqCode=l),data:q.value,class:"w-full","node-key":"organizationCode",lazy:"","check-strictly":!0,load:L,"cache-data":t.value.company&&t.value.companyUniqCode?[{organizationCode:t.value.companyUniqCode,name:t.value.company}]:[],props:{label:"name",value:"organizationCode"},filterable:"",remote:"","remote-method":z,onChange:N},null,8,["modelValue","data","cache-data"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u5DE5\u4F5C\u5355\u4F4Dcode",prop:"formData.companyUniqCode"},{default:o(()=>[a(f,{modelValue:t.value.companyUniqCode,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.companyUniqCode=l),placeholder:"\u8BF7\u9009\u62E9",disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u5355\u4F4D\u6CD5\u4EBA\u7F16\u53F7"},{default:o(()=>[a(f,{modelValue:t.value.legalEntityCode,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.legalEntityCode=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u884C\u653F\u804C\u52A1",prop:"administrativeDuties"},{default:o(()=>[a(f,{modelValue:t.value.administrativeDuties,"onUpdate:modelValue":e[3]||(e[3]=l=>t.value.administrativeDuties=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u5F00\u59CB\u5DE5\u4F5C\u65E5\u671F",prop:"startWorkAt"},{default:o(()=>[a(A,{modelValue:t.value.startWorkAt,"onUpdate:modelValue":e[4]||(e[4]=l=>t.value.startWorkAt=l),type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u884C\u653F\u804C\u7EA7",prop:"administrativeRank"},{default:o(()=>[a(b,{modelValue:t.value.administrativeRank,"onUpdate:modelValue":e[5]||(e[5]=l=>t.value.administrativeRank=l),class:"w-full",placeholder:"\u8BF7\u9009\u62E9","value-key":"dictionaryCode"},{default:o(()=>[(i(!0),y(_,null,g(V(k).dictStore.administrativeRankDict,(l,m)=>(i(),p(v,{key:m,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u5728\u804C\u72B6\u6001",prop:"jobStatus"},{default:o(()=>[a(b,{modelValue:t.value.jobStatus,"onUpdate:modelValue":e[6]||(e[6]=l=>t.value.jobStatus=l),class:"w-full",placeholder:"\u8BF7\u9009\u62E9","value-key":"dictionaryCode"},{default:o(()=>[(i(!0),y(_,null,g(V(k).dictStore.jobStatusDict,(l,m)=>(i(),p(v,{key:m,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),((S=t.value.jobStatus)==null?void 0:S.dictionaryName)==="\u9000\u4F11"?(i(),p(d,{key:0,span:8},{default:o(()=>[a(r,{label:"\u9000\u4F11\u65E5\u671F",prop:"retiredAt"},{default:o(()=>[a(A,{modelValue:t.value.retiredAt,"onUpdate:modelValue":e[7]||(e[7]=l=>t.value.retiredAt=l),type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1})):W("",!0),a(d,{span:8},{default:o(()=>[a(r,{label:"\u5355\u4F4D\u7C7B\u578B",prop:"companyAttribute"},{default:o(()=>[a(b,{modelValue:t.value.companyAttribute,"onUpdate:modelValue":e[8]||(e[8]=l=>t.value.companyAttribute=l),placeholder:"\u8BF7\u9009\u62E9",class:"w-full","value-key":"dictionaryCode"},{default:o(()=>[(i(!0),y(_,null,g(V(k).dictStore.companyAttributeDict,(l,m)=>(i(),p(v,{key:m,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(d,{span:8},{default:o(()=>[a(r,{label:"\u6761\u7EBF"},{default:o(()=>[a(b,{modelValue:t.value.businessStrips,"onUpdate:modelValue":e[9]||(e[9]=l=>t.value.businessStrips=l),multiple:"","value-key":"businessStripCode",filterable:"",class:"w-full"},{default:o(()=>[(i(!0),y(_,null,g(D.value,(l,m)=>(i(),p(v,{key:m,label:l.businessStripName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(d,{span:24},{default:o(()=>[a(r,{label:"\u5DE5\u4F5C\u5730\u5740",prop:"address"},{default:o(()=>[a(f,{modelValue:t.value.address,"onUpdate:modelValue":e[10]||(e[10]=l=>t.value.address=l),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(d,{span:24},{default:o(()=>[a(r,{label:"\u5DE5\u4F5C\u7ECF\u5386",prop:"experience"},{default:o(()=>[a(f,{modelValue:t.value.experience,"onUpdate:modelValue":e[11]||(e[11]=l=>t.value.experience=l),maxlength:"200",rows:5,type:"textarea","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]}),_:1})]),_:1},8,["model"])}}});export{P as default};