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

  1. var fe=Object.defineProperty,_e=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var G=(p,c,r)=>c in p?fe(p,c,{enumerable:!0,configurable:!0,writable:!0,value:r}):p[c]=r,P=(p,c)=>{for(var r in c||(c={}))ge.call(c,r)&&G(p,r,c[r]);if(W)for(var r of W(c))ve.call(c,r)&&G(p,r,c[r]);return p},L=(p,c)=>_e(p,be(c));var U=(p,c,r)=>new Promise((E,k)=>{var a=_=>{try{y(r.next(_))}catch(s){k(s)}},g=_=>{try{y(r.throw(_))}catch(s){k(s)}},y=_=>_.done?E(_.value):Promise.resolve(_.value).then(a,g);y((r=r.apply(p,c)).next())});import{_ as ye,d as je,D as he,b as q,r as v,a3 as K,A as Ye,o as ke,c as i,e as b,I as z,j as t,i as e,h as x,w as $,f as D,F as Q,J as X,u as A,v as H,g as C,k as Y,x as we}from"./index.47f2a3eb.js";import{m as Te,n as Ve,a as xe,r as De}from"./index.26831aa6.js";import{u as Ce}from"./useExportExc.d4ee92ff.js";const Ne={class:"flex"},Oe={class:"flex"},Me={class:"flex justify-between items-center"},Pe=["onClick"],Ue=["onClick"],$e=["onClick"],He=["onClick"],Ee=je({name:"projectDeclare"}),Le=Object.assign(Ee,{setup(p){const{statusOptionsCascader:c,statusOptions:r,projectConTypeOptions:E}=he.dictStore.globalDicts||{},{proxy:k}=we(),a=q({stage:void 0,status:void 0,projectName:"",projectType:void 0,projectYear:void 0,createTiming_:void 0}),g=(...n)=>U(this,[...n],function*(o=O.value.pageParams){var d,w,T;const m=L(P(P({},o),a),{createOnMin:((d=a.createTiming_)==null?void 0:d.length)&&a.createTiming_[0],createOnMax:((w=a.createTiming_)==null?void 0:w.length)&&a.createTiming_[1],projectYear:a.projectYear*1||void 0,createTiming_:void 0,status:(T=a.status)==null?void 0:T[a.status.length-1]}),u=s.value?yield Te(m):yield Ve(m);B.value=u.data.records,R.value=u.data.total}),y=v("\u5DF2\u7533\u62A5"),_=(o,n)=>{switch(o.props.name){case"\u5DF2\u7533\u62A5":s.value=!0,N();break;case"\u8349\u7A3F\u7BB1":s.value=!1,N();break}},s=v(!0),Z=q([{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:o=>{var n,m,u,d;return[K("span",{class:["dot mr-4",`bg-${o.status&&((n=r[o.status])==null?void 0:n.color)}`]}),K("span",{class:`text-${o.status&&((m=r[o.status])==null?void 0:m.color)}`},o.status&&((u=r[o.stage])==null?void 0:u.name)+"-"+((d=r[o.status])==null?void 0:d.name))]}},{label:"\u64CD\u4F5C",slot:"action",width:"200",fixed:"right"}]),ee=q([{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"}]),B=v([]),R=v(1),ae=o=>{j.push({name:"declarePage",query:{id:o.id,isDraft:1}})},te=o=>{s.value?j.push({name:"projectDeclareDetail",query:{id:o.id}}):j.push({name:"draftDetails",query:{id:o.id}})},le=o=>{o.status===20005?j.push({name:"reDeclarationFinal",query:{id:o.id}}):j.push({name:"declarePage",query:{id:o.id}})},S=()=>{g()},N=()=>{a.status=void 0,a.projectName=void 0,a.createTiming_=void 0,a.projectType=void 0,a.projectYear=void 0,O.value.pageParams.pageNumber=1,O.value.pageParams.pageSize=10,g()},j=Ye(),oe=()=>{j.push({name:"declarePage"})},O=v(),{exportLoading:ne,exportData:re}=Ce(),se=()=>{re(()=>{var o,n,m;return xe(1,L(P({},a),{createOnMin:((o=a.createTiming_)==null?void 0:o.length)&&a.createTiming_[0],createOnMax:((n=a.createTiming_)==null?void 0:n.length)&&a.createTiming_[1],projectYear:a.projectYear*1||void 0,status:(m=a.status)==null?void 0:m[a.status.length-1]}))})},ue=v([]),de=o=>{k.$messageBox.confirm(`\u786E\u5B9A\u8981\u5220\u9664${o.projectName}\u5417?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>U(this,null,function*(){yield De(o.projectCode),k.$message.success("\u5220\u9664\u6210\u529F"),g()}))};return ke(()=>U(this,null,function*(){s.value=v(!0),g()})),(o,n)=>{const m=i("el-input"),u=i("el-form-item"),d=i("el-col"),w=i("el-option"),T=i("el-select"),ce=i("el-cascader"),V=i("el-row"),M=i("el-date-picker"),h=i("el-button"),F=i("el-form"),J=i("el-card"),I=i("el-tab-pane"),ie=i("el-tabs"),pe=i("table-list");return b(),z(V,null,{default:t(()=>[e(J,{class:"w-full search"},{default:t(()=>[x(" \u5DF2\u7533\u62A5 "),$(e(F,{size:"small",model:a,"label-suffix":":"},{default:t(()=>[e(V,{gutter:16,class:"mb-16"},{default:t(()=>[e(d,{span:8},{default:t(()=>[e(u,{label:"\u9879\u76EE\u540D\u79F0",class:"w-full"},{default:t(()=>[e(m,{modelValue:a.projectName,"onUpdate:modelValue":n[0]||(n[0]=l=>a.projectName=l),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:8},{default:t(()=>[e(u,{label:"\u9879\u76EE\u7C7B\u578B"},{default:t(()=>[e(T,{modelValue:a.projectType,"onUpdate:modelValue":n[1]||(n[1]=l=>a.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:t(()=>[(b(!0),D(Q,null,X(A(E),(l,f)=>(b(),z(w,{key:f,label:l,value:f},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(d,{span:8},{default:t(()=>[$(e(u,{label:"\u9879\u76EE\u72B6\u6001"},{default:t(()=>[e(ce,{modelValue:a.status,"onUpdate:modelValue":n[2]||(n[2]=l=>a.status=l),class:"w-full",props:{label:"name",value:"code"},options:A(c)},null,8,["modelValue","options"])]),_:1},512),[[H,s.value]])]),_:1})]),_:1}),e(V,{gutter:16},{default:t(()=>[e(d,{span:8},{default:t(()=>[e(u,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:t(()=>[e(M,{modelValue:a.projectYear,"onUpdate:modelValue":n[3]||(n[3]=l=>a.projectYear=l),class:"w-full",type:"year",format:"YYYY","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(u,{label:"\u521B\u5EFA\u65F6\u95F4",class:"w-full"},{default:t(()=>[e(M,{modelValue:a.createTiming_,"onUpdate:modelValue":n[4]||(n[4]=l=>a.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(d,{span:4},{default:t(()=>[e(u,{class:"btn"},{default:t(()=>[C("div",Ne,[e(h,{type:"primary",onClick:S},{default:t(()=>[Y("\u67E5\u8BE2")]),_:1}),e(h,{onClick:N},{default:t(()=>[Y("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[H,s.value]]),x(" \u8349\u7A3F\u7BB1 "),$(e(F,{"label-suffix":":",model:a,size:"small"},{default:t(()=>[e(V,{gutter:16,class:"mb-16"},{default:t(()=>[e(d,{span:8},{default:t(()=>[e(u,{label:"\u9879\u76EE\u540D\u79F0",class:"w-full"},{default:t(()=>[e(m,{modelValue:a.projectName,"onUpdate:modelValue":n[5]||(n[5]=l=>a.projectName=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:8},{default:t(()=>[e(u,{label:"\u9879\u76EE\u7C7B\u578B"},{default:t(()=>[e(T,{modelValue:a.projectType,"onUpdate:modelValue":n[6]||(n[6]=l=>a.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:t(()=>{var l;return[(b(!0),D(Q,null,X((l=ue.value)==null?void 0:l.filter(f=>f.type==="PROJECT_TYPE"),(f,me)=>(b(),z(w,{key:me,label:f.label,value:f.value},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),e(d,{span:8},{default:t(()=>[e(u,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:t(()=>[e(M,{modelValue:a.projectYear,"onUpdate:modelValue":n[7]||(n[7]=l=>a.projectYear=l),class:"w-full",type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(V,{gutter:16},{default:t(()=>[e(d,{span:10},{default:t(()=>[e(u,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:t(()=>[e(M,{modelValue:a.createTiming_,"onUpdate:modelValue":n[8]||(n[8]=l=>a.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(d,{span:14},{default:t(()=>[e(u,{class:"btn"},{default:t(()=>[C("div",Oe,[e(h,{type:"primary",onClick:S},{default:t(()=>[Y("\u67E5\u8BE2")]),_:1}),e(h,{onClick:N},{default:t(()=>[Y("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),[[H,!s.value]])]),_:1}),e(J,{class:"w-full mt-8 tab-card"},{header:t(()=>[C("div",Me,[e(ie,{modelValue:y.value,"onUpdate:modelValue":n[9]||(n[9]=l=>y.value=l),onTabClick:_},{default:t(()=>[e(I,{label:"\u5DF2\u7533\u62A5",name:"\u5DF2\u7533\u62A5"}),e(I,{label:"\u8349\u7A3F\u7BB1",name:"\u8349\u7A3F\u7BB1"})]),_:1},8,["modelValue"]),C("div",null,[$(e(h,{type:"primary",size:"small",plain:"",loading:A(ne),onClick:se},{default:t(()=>[Y("\u5BFC\u51FA")]),_:1},8,["loading"]),[[H,s.value]]),e(h,{type:"primary",size:"small",icon:"plus",onClick:oe},{default:t(()=>[Y("\u9879\u76EE\u7533\u62A5")]),_:1})])])]),default:t(()=>[e(pe,{ref_key:"tableListRef",ref:O,column:s.value?Z:ee,data:B.value,total:R.value,onGetTableData:g},{action:t(({scope:l})=>[C("a",{onClick:f=>te(l.row)},"\u8BE6\u60C5",8,Pe),s.value?x("v-if",!0):(b(),D("a",{key:0,onClick:f=>ae(l.row)},"\u7F16\u8F91",8,Ue)),s.value&&[10002,10005,10007,10013,20005].includes(l.row.status)?(b(),D("a",{key:1,onClick:f=>le(l.row)},"\u91CD\u65B0\u7533\u62A5",8,$e)):x("v-if",!0),s.value&&[10007].includes(l.row.status)?(b(),D("a",{key:2,onClick:f=>de(l.row)},"\u5220\u9664",8,He)):x("v-if",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1})}}}),Re=ye(Le,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/declareManage/projectDeclare/index.vue"]]);export{Re as default};