You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
5.5KB

  1. import{h as I,a as S}from"./index.d688144c.js";import{d as G,D as J,A as W,b as O,a0 as M,r as h,o as K,c as d,e as _,f as Y,h as t,i as a,F as N,J as Q,u as b,I as X,g as p,j as g,k as Z}from"./index.50a8620e.js";import{u as ee}from"./useExportExc.cc74cf24.js";const te={class:"flex"},ae={class:"flex justify-between"},le=p("span",null,"\u5F85\u8C03\u6574\u7684\u9879\u76EE",-1),oe=["onClick"],ne=["onClick"],se=G({name:"projectAdjustment"}),pe=Object.assign(se,{setup(re){const{statusOptionsCascader:C,statusOptions:i,projectTypeOptions:D}=J.dictStore.globalDicts||{},j=W(),e=O({projectType:void 0,status:void 0,projectYear:void 0,projectName:void 0,createOnMin:void 0,createOnMax:void 0,times:[]}),T=O([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectTypeName",prop:"projectTypeName",width:"80"},{label:"\u7533\u62A5\u91D1\u989D(\u4E07\u5143)",key:"declaredAmount",prop:"declaredAmount",width:"150"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"220",render:n=>{var o,u,s,r;return[M("span",{class:["dot mr-4",`bg-${(o=i[n.status])==null?void 0:o.color}`]}),M("span",{class:`text-${(u=i[n.status])==null?void 0:u.color}`},n.status&&((s=i[n.stage])==null?void 0:s.name)+"-"+((r=i[n.status])==null?void 0:r.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",showOverflowTooltip:!0,width:"200"},{label:"\u64CD\u4F5C",slot:"action",width:"150px",fixed:"right"}]),x=h([]),m=h(),f=async(n=m.value.pageParams)=>{var u,s,r;const o=await I({...n,...e,createOnMin:(u=e.times)==null?void 0:u[0],createOnMax:(s=e.times)==null?void 0:s[1],projectYear:e.projectYear*1||void 0,status:(r=e.status)==null?void 0:r[e.status.length-1],times:void 0});x.value=o.data.records,k.value=o.data.total},k=h(2),A=()=>{f()},E=()=>{e.status=void 0,e.projectYear=void 0,e.projectName=void 0,e.projectType=void 0,e.createOnMin=void 0,e.createOnMax=void 0,e.times=void 0,m.value.pageParams.pageNumber=1,m.value.pageParams.pageSize=10,f()},{exportLoading:L,exportData:U}=ee(),B=()=>{U(()=>{var n,o,u;return S(4,{...e,createOnMin:(n=e.times)==null?void 0:n[0],createOnMax:(o=e.times)==null?void 0:o[1],projectYear:e.projectYear*1||void 0,status:(u=e.status)==null?void 0:u[e.status.length-1],times:void 0})})},H=n=>{n.status===20005?j.push({name:"declarationFinal",query:{id:n.id}}):j.push({name:"declarePage",query:{id:n.id}})};return K(async()=>{f()}),(n,o)=>{const u=d("el-input"),s=d("el-form-item"),r=d("el-col"),P=d("el-option"),R=d("el-select"),$=d("el-cascader"),v=d("el-row"),V=d("el-date-picker"),y=d("el-button"),q=d("el-form"),w=d("el-card"),z=d("table-list");return _(),Y(N,null,[t(w,{class:"w-full search"},{default:a(()=>[t(q,{model:e,size:"small","label-suffix":":"},{default:a(()=>[t(v,{gutter:16,class:"mb-16"},{default:a(()=>[t(r,{span:8},{default:a(()=>[t(s,{label:"\u9879\u76EE\u540D\u79F0"},{default:a(()=>[t(u,{modelValue:e.projectName,"onUpdate:modelValue":o[0]||(o[0]=l=>e.projectName=l),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(r,{span:8},{default:a(()=>[t(s,{label:"\u9879\u76EE\u7C7B\u578B"},{default:a(()=>[t(R,{modelValue:e.projectType,"onUpdate:modelValue":o[1]||(o[1]=l=>e.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:a(()=>[(_(!0),Y(N,null,Q(b(D),(l,c)=>(_(),X(P,{key:c,label:l,value:c},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(r,{span:8},{default:a(()=>[t(s,{label:"\u9879\u76EE\u72B6\u6001"},{default:a(()=>[t($,{modelValue:e.status,"onUpdate:modelValue":o[2]||(o[2]=l=>e.status=l),class:"w-full",props:{label:"name",value:"code"},options:b(C).map(l=>{var c;return{...l,children:(c=l==null?void 0:l.children)==null?void 0:c.filter(F=>F.color==="danger")}})},null,8,["modelValue","options"])]),_:1})]),_:1})]),_:1}),t(v,{gutter:20},{default:a(()=>[t(r,{span:8},{default:a(()=>[t(s,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:a(()=>[t(V,{modelValue:e.projectYear,"onUpdate:modelValue":o[3]||(o[3]=l=>e.projectYear=l),type:"year",placeholder:"\u8BF7\u9009\u62E9",format:"YYYY","value-format":"YYYY"},null,8,["modelValue"])]),_:1})]),_:1}),t(r,{span:12},{default:a(()=>[t(s,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:a(()=>[t(V,{modelValue:e.times,"onUpdate:modelValue":o[4]||(o[4]=l=>e.times=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}),t(r,{span:4},{default:a(()=>[t(s,{class:"btn"},{default:a(()=>[p("div",te,[t(y,{type:"primary",onClick:A},{default:a(()=>[g("\u67E5\u8BE2")]),_:1}),t(y,{onClick:E},{default:a(()=>[g("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(w,{class:"w-full mt-8"},{header:a(()=>[p("div",ae,[le,p("div",null,[t(y,{type:"primary",size:"small",plain:"",loading:b(L),onClick:B},{default:a(()=>[g(" \u5BFC\u51FA ")]),_:1},8,["loading"])])])]),default:a(()=>[t(z,{ref_key:"tableListRef",ref:m,column:T,data:x.value,total:k.value,onGetTableData:f},{action:a(({scope:l})=>[l.row.status!==10009?(_(),Y("a",{key:0,onClick:c=>H(l.row)},"\u91CD\u65B0\u7533\u62A5",8,oe)):Z("",!0),p("a",{onClick:c=>b(j).push({name:"projectDeclareDetail",query:{id:l.row.id}})},"\u8BE6\u60C5",8,ne)]),_:1},8,["column","data","total"])]),_:1})],64)}}});export{pe as default};