您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 行
10.0KB

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