Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
9.9KB

  1. import{d as ce,D as T,r as p,b as N,a0 as I,A as pe,o as me,c as u,e as m,f as b,h as e,i as a,w as C,F as O,J as q,u as P,I as z,v as x,g as v,j as g,k as E,a1 as fe,x as _e}from"./index.b4f1c826.js";import{l as be,m as ge,n as ve,a as ye,r as he}from"./index.b0a2b1cd.js";import{u as je}from"./useExportExc.02c3bd82.js";const we={class:"flex"},Ye={class:"flex"},ke={class:"flex justify-between items-center"},Ve=["onClick"],Te=["onClick"],Ce=["onClick"],xe=["onClick"],De=v("video",{src:"http://www.heletech.com.cn/img/%E5%AE%98%E7%BD%91%E4%BB%8B%E7%BB%8D.mp4",controls:""},null,-1),Ne=ce({name:"projectDeclare"}),Be=Object.assign(Ne,{setup(Oe){const{statusOptionsCascader:R,statusOptions:w,projectConTypeOptions:J}=T.dictStore.globalDicts||{},{proxy:M}=_e(),D=p(!1),t=N({stage:void 0,status:void 0,projectName:"",projectType:void 0,projectYear:void 0,createTiming_:void 0}),y=async(r=k.value.pageParams)=>{var n,s,h;const o={...r,...t,createOnMin:((n=t.createTiming_)==null?void 0:n.length)&&t.createTiming_[0],createOnMax:((s=t.createTiming_)==null?void 0:s.length)&&t.createTiming_[1],projectYear:t.projectYear*1||void 0,createTiming_:void 0,status:(h=t.status)==null?void 0:h[t.status.length-1]},i=d.value?await be(o):await ge(o);U.value=i.data.records,$.value=i.data.total},B=p("\u5DF2\u7533\u62A5"),W=(r,o)=>{switch(r.props.name){case"\u5DF2\u7533\u62A5":d.value=!0,Y();break;case"\u8349\u7A3F\u7BB1":d.value=!1,Y();break}},d=p(!0),G=N([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"250",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectTypeName",prop:"projectTypeName",width:"100"},{label:"\u7533\u62A5\u91D1\u989D(\u4E07\u5143)",key:"declaredAmount",prop:"declaredAmount",width:"120"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:"100"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",showOverflowTooltip:!0,width:"180"},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"220",render:r=>{var o,i,n,s;return[I("span",{class:["dot mr-4",`bg-${r.status&&((o=w[r.status])==null?void 0:o.color)}`]}),I("span",{class:`text-${r.status&&((i=w[r.status])==null?void 0:i.color)}`},r.status&&((n=w[r.stage])==null?void 0:n.name)+"-"+((s=w[r.status])==null?void 0:s.name))]}},{label:"\u64CD\u4F5C",slot:"action",width:"200",fixed:"right"}]),K=N([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"250",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectTypeName",prop:"projectTypeName",width:"100"},{label:"\u7533\u62A5\u91D1\u989D(\u4E07\u5143)",key:"declareAmount",prop:"declareAmount",width:"120"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:"80"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",showOverflowTooltip:!0,width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"160",fixed:"right"}]),U=p([]),$=p(1),Q=r=>{f.push({name:"declarePage",query:{id:r.id,isDraft:1}})},X=r=>{d.value?f.push({name:"projectDeclareDetail",query:{id:r.id}}):f.push({name:"draftDetails",query:{id:r.id}})},Z=r=>{r.status===20005?f.push({name:"reDeclarationFinal",query:{id:r.id}}):f.push({name:"declarePage",query:{id:r.id}})},H=()=>{y()},Y=()=>{t.status=void 0,t.projectName=void 0,t.createTiming_=void 0,t.projectType=void 0,t.projectYear=void 0,k.value.pageParams.pageNumber=1,k.value.pageParams.pageSize=10,y()},f=pe(),ee=()=>{if(T.userStore.userInfo.isFirstCreateProject===0){f.push({name:"declarePage"});return}fe.alert("\u60A8\u662F\u7B2C\u4E00\u6B21\u4F7F\u7528\u9879\u76EE\u7533\u62A5\uFF0C\u8BF7\u5148\u89C2\u770B\u6559\u5B66\u89C6\u9891",{showCancelButton:!1}).then(()=>{D.value=!0,ve(T.userStore.userInfo.userId),T.userStore.userInfo.isFirstCreateProject=0})},k=p(),{exportLoading:ae,exportData:te}=je(),le=()=>{te(()=>{var r,o,i;return ye(1,{...t,createOnMin:((r=t.createTiming_)==null?void 0:r.length)&&t.createTiming_[0],createOnMax:((o=t.createTiming_)==null?void 0:o.length)&&t.createTiming_[1],projectYear:t.projectYear*1||void 0,status:(i=t.status)==null?void 0:i[t.status.length-1]})})},oe=p([]),re=r=>{M.$messageBox.confirm(`\u786E\u5B9A\u8981\u5220\u9664${r.projectName}\u5417?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await he(r.projectCode),M.$message.success("\u5220\u9664\u6210\u529F"),y()})};return me(async()=>{d.value=p(!0),y()}),(r,o)=>{const i=u("el-input"),n=u("el-form-item"),s=u("el-col"),h=u("el-option"),S=u("el-select"),ne=u("el-cascader"),j=u("el-row"),V=u("el-date-picker"),_=u("el-button"),L=u("el-form"),A=u("el-card"),F=u("el-tab-pane"),se=u("el-tabs"),ue=u("table-list"),de=u("el-dialog");return m(),b(O,null,[e(j,null,{default:a(()=>[e(A,{class:"w-full search"},{default:a(()=>[C(e(L,{size:"small",model:t,"label-suffix":":"},{default:a(()=>[e(j,{gutter:16,class:"mb-16"},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"\u9879\u76EE\u540D\u79F0",class:"w-full"},{default:a(()=>[e(i,{modelValue:t.projectName,"onUpdate:modelValue":o[0]||(o[0]=l=>t.projectName=l),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"\u9879\u76EE\u7C7B\u578B"},{default:a(()=>[e(S,{modelValue:t.projectType,"onUpdate:modelValue":o[1]||(o[1]=l=>t.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:a(()=>[(m(!0),b(O,null,q(P(J),(l,c)=>(m(),z(h,{key:c,label:l,value:c},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[C(e(n,{label:"\u9879\u76EE\u72B6\u6001"},{default:a(()=>[e(ne,{modelValue:t.status,"onUpdate:modelValue":o[2]||(o[2]=l=>t.status=l),class:"w-full",props:{label:"name",value:"code"},options:P(R)},null,8,["modelValue","options"])]),_:1},512),[[x,d.value]])]),_:1})]),_:1}),e(j,{gutter:16},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:a(()=>[e(V,{modelValue:t.projectYear,"onUpdate:modelValue":o[3]||(o[3]=l=>t.projectYear=l),class:"w-full",type:"year",format:"YYYY","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(n,{label:"\u521B\u5EFA\u65F6\u95F4",class:"w-full"},{default:a(()=>[e(V,{modelValue:t.createTiming_,"onUpdate:modelValue":o[4]||(o[4]=l=>t.createTiming_=l),type:"datetimerange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:4},{default:a(()=>[e(n,{class:"btn"},{default:a(()=>[v("div",we,[e(_,{type:"primary",onClick:H},{default:a(()=>[g("\u67E5\u8BE2")]),_:1}),e(_,{onClick:Y},{default:a(()=>[g("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[x,d.value]]),C(e(L,{"label-suffix":":",model:t,size:"small"},{default:a(()=>[e(j,{gutter:16,class:"mb-16"},{default:a(()=>[e(s,{span:8},{default:a(()=>[e(n,{label:"\u9879\u76EE\u540D\u79F0",class:"w-full"},{default:a(()=>[e(i,{modelValue:t.projectName,"onUpdate:modelValue":o[5]||(o[5]=l=>t.projectName=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"\u9879\u76EE\u7C7B\u578B"},{default:a(()=>[e(S,{modelValue:t.projectType,"onUpdate:modelValue":o[6]||(o[6]=l=>t.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:a(()=>{var l;return[(m(!0),b(O,null,q((l=oe.value)==null?void 0:l.filter(c=>c.type==="PROJECT_TYPE"),(c,ie)=>(m(),z(h,{key:ie,label:c.label,value:c.value},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(n,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:a(()=>[e(V,{modelValue:t.projectYear,"onUpdate:modelValue":o[7]||(o[7]=l=>t.projectYear=l),class:"w-full",type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(j,{gutter:16},{default:a(()=>[e(s,{span:10},{default:a(()=>[e(n,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:a(()=>[e(V,{modelValue:t.createTiming_,"onUpdate:modelValue":o[8]||(o[8]=l=>t.createTiming_=l),type:"datetimerange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:14},{default:a(()=>[e(n,{class:"btn"},{default:a(()=>[v("div",Ye,[e(_,{type:"primary",onClick:H},{default:a(()=>[g("\u67E5\u8BE2")]),_:1}),e(_,{onClick:Y},{default:a(()=>[g("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[x,!d.value]])]),_:1}),e(A,{class:"w-full mt-8 tab-card"},{header:a(()=>[v("div",ke,[e(se,{modelValue:B.value,"onUpdate:modelValue":o[9]||(o[9]=l=>B.value=l),onTabClick:W},{default:a(()=>[e(F,{label:"\u5DF2\u7533\u62A5",name:"\u5DF2\u7533\u62A5"}),e(F,{label:"\u8349\u7A3F\u7BB1",name:"\u8349\u7A3F\u7BB1"})]),_:1},8,["modelValue"]),v("div",null,[C(e(_,{type:"primary",size:"small",plain:"",loading:P(ae),onClick:le},{default:a(()=>[g("\u5BFC\u51FA ")]),_:1},8,["loading"]),[[x,d.value]]),e(_,{type:"primary",size:"small",icon:"plus",onClick:ee},{default:a(()=>[g("\u9879\u76EE\u7533\u62A5 ")]),_:1})])])]),default:a(()=>[e(ue,{ref_key:"tableListRef",ref:k,column:d.value?G:K,data:U.value,total:$.value,onGetTableData:y},{action:a(({scope:l})=>[v("a",{onClick:c=>X(l.row)},"\u8BE6\u60C5",8,Ve),d.value?E("",!0):(m(),b("a",{key:0,onClick:c=>Q(l.row)},"\u7F16\u8F91",8,Te)),d.value&&[10002,10005,10007,10013,20005].includes(l.row.status)?(m(),b("a",{key:1,onClick:c=>Z(l.row)},"\u91CD\u65B0\u7533\u62A5",8,Ce)):E("",!0),d.value&&[10007].includes(l.row.status)?(m(),b("a",{key:2,onClick:c=>re(l.row)},"\u5220\u9664",8,xe)):E("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1}),e(de,{modelValue:D.value,"onUpdate:modelValue":o[10]||(o[10]=l=>D.value=l),title:"\u9879\u76EE\u7533\u62A5\u6559\u5B66\u89C6\u9891",width:"800"},{default:a(()=>[De]),_:1},8,["modelValue"])],64)}}});export{Be as default};