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
4.8KB

  1. import{a as I}from"./index.850e1543.js";import{d as L,D as U,A as z,b as g,r as b,o as F,c as n,e as y,f as V,h as t,i as a,F as M,J as q,u as f,I as S,g as d,j}from"./index.20c8d60f.js";import{u as $}from"./useExportExc.c1034862.js";import{l as G}from"./initialInspectionRecord.158e51db.js";const J={class:"flex"},W={class:"flex justify-between"},K=d("span",null,"\u5217\u8868",-1),Q=["onClick"],X=["onClick"],Z=L({name:"initialInspectionRecord"}),ne=Object.assign(Z,{setup(ee){const{projectTypeOptions:O}=U.dictStore.globalDicts||{},Y=z(),e=g({projectType:void 0,status:void 0,projectYear:void 0,projectName:void 0,createOnMin:void 0,createOnMax:void 0,times:[]}),T=g([{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:"\u5E74\u5EA6\u9884\u7B97\uFF08\u4E07\u5143\uFF09",key:"annualPlanAmount",prop:"annualPlanAmount",width:"150"},{label:"\u6210\u4EA4\u91D1\u989D\uFF08\u4E07\u5143\uFF09",key:"transactionAmount",prop:"transactionAmount",width:"150"},{label:"\u5408\u540C\u91D1\u989D\uFF08\u4E07\u5143\uFF09",key:"contractAmount",prop:"contractAmount",width:"150"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u4EA4\u8D27\u65E5\u671F",key:"deliveryTime",prop:"deliveryTime",width:"200"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"200"},{label:"\u64CD\u4F5C",slot:"action",width:"180",fixed:"right"}]),h=b([]),c=b(),p=async(s=c.value.pageParams)=>{var u,r;const l=await G({...s,...e,createOnMin:(u=e.times)==null?void 0:u[0],createOnMax:(r=e.times)==null?void 0:r[1],projectYear:e.projectYear*1||void 0,times:void 0});h.value=l.data.records,k.value=l.data.total},k=b(2),N=()=>{p()},C=()=>{e.projectYear=void 0,e.projectName=void 0,e.projectType=void 0,e.createOnMin=void 0,e.createOnMax=void 0,e.times=void 0,c.value.pageParams.pageNumber=1,c.value.pageParams.pageSize=10,p()},{exportLoading:D,exportData:A}=$(),R=()=>{A(()=>{var s,l;return I(8,{...e,createOnMin:(s=e.times)==null?void 0:s[0],createOnMax:(l=e.times)==null?void 0:l[1],projectYear:e.projectYear*1||void 0,times:void 0})})};return F(async()=>{p()}),(s,l)=>{const u=n("el-input"),r=n("el-form-item"),i=n("el-col"),E=n("el-option"),P=n("el-select"),v=n("el-date-picker"),w=n("el-row"),_=n("el-button"),B=n("el-form"),x=n("el-card"),H=n("table-list");return y(),V(M,null,[t(x,{class:"w-full search"},{default:a(()=>[t(B,{model:e,size:"small","label-suffix":":"},{default:a(()=>[t(w,{gutter:16,class:"mb-16"},{default:a(()=>[t(i,{span:8},{default:a(()=>[t(r,{label:"\u9879\u76EE\u540D\u79F0"},{default:a(()=>[t(u,{modelValue:e.projectName,"onUpdate:modelValue":l[0]||(l[0]=o=>e.projectName=o),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(i,{span:8},{default:a(()=>[t(r,{label:"\u9879\u76EE\u7C7B\u578B"},{default:a(()=>[t(P,{modelValue:e.projectType,"onUpdate:modelValue":l[1]||(l[1]=o=>e.projectType=o),placeholder:"\u5168\u90E8",class:"w-full"},{default:a(()=>[(y(!0),V(M,null,q(f(O),(o,m)=>(y(),S(E,{key:m,label:o,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(i,{span:8},{default:a(()=>[t(r,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:a(()=>[t(v,{modelValue:e.projectYear,"onUpdate:modelValue":l[2]||(l[2]=o=>e.projectYear=o),type:"year",placeholder:"\u8BF7\u9009\u62E9",format:"YYYY","value-format":"YYYY"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(w,{gutter:24},{default:a(()=>[t(i,{span:12},{default:a(()=>[t(r,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:a(()=>[t(v,{modelValue:e.times,"onUpdate:modelValue":l[3]||(l[3]=o=>e.times=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}),t(i,{span:12},{default:a(()=>[t(r,{class:"btn"},{default:a(()=>[d("div",J,[t(_,{type:"primary",onClick:N},{default:a(()=>[j("\u67E5\u8BE2")]),_:1}),t(_,{onClick:C},{default:a(()=>[j("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(x,{class:"w-full mt-8"},{header:a(()=>[d("div",W,[K,d("div",null,[t(_,{type:"primary",size:"small",plain:"",loading:f(D),onClick:R},{default:a(()=>[j(" \u5BFC\u51FA ")]),_:1},8,["loading"])])])]),default:a(()=>[t(H,{ref_key:"tableListRef",ref:c,column:T,data:h.value,total:k.value,onGetTableData:p},{action:a(({scope:o})=>[d("a",{onClick:m=>f(Y).push({name:"uploadInitMaterials",query:{id:o.row.id}})},"\u4E0A\u4F20\u521D\u9A8C\u6750\u6599",8,Q),d("a",{onClick:m=>f(Y).push({name:"initialInspectionRecordDetail",query:{id:o.row.id}})},"\u8BE6\u60C5",8,X)]),_:1},8,["column","data","total"])]),_:1})],64)}}});export{ne as default};