1 |
- import{Q as C,_ as V,d as W,m as u,cp as Y,w as R,p as S,r as s,o as m,A as f,x as p,u as c,b as P,h as _,H as U,a as y,D as j}from"./index.bf41a5b5.js";import{b}from"./calc.0cdee66c.js";import{a as q,D as z}from"./demand-modify-modal.82703f78.js";import{u as H}from"./use-page-search.fc995b50.js";import"./index.a408f48c.js";import"./createRequset.3eb6d703.js";const I=C(new Date).format("YYYY-MM"),x={defaultMode:"month",formItems:[{field:"date",type:"date_composition",trigger:"change",defaultValue:I},{field:"companyNo",type:"business-query",trigger:"change",noRest:!0},{field:"depart_id",type:"depart-query",trigger:"change"}]},$=h=>({columns:[{prop:"year",label:"\u5E74",minWidth:"70px"},{prop:"month",label:"\u6708",minWidth:"70px"},{prop:"companyName",label:"\u516C\u53F8\u540D\u79F0",minWidth:"135px"},{prop:"depart_item",label:"\u90E8\u95E8",minWidth:"135px"},{prop:"total_tips",label:"\u8425\u6536\u76EE\u6807",width:"100px",cellRenderer({row:t}){return h?b(t.total_tips):t.total_tips}},{prop:"cost_tips",label:"\u6BDB\u5229\u76EE\u6807",width:"100px",cellRenderer({row:t}){return h?b(t.cost_tips):t.cost_tips}},{prop:"updatetime",label:"\u6700\u65B0\u4E00\u6B21\u4FEE\u6539\u65F6\u95F4",minWidth:"155px"},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"115px"},{prop:"creater",label:"\u521B\u5EFA\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],showTitle:!1,superUserNoAction:!1,apis:{httpList:(t={})=>{const{date:n,...a}=t;if(n&&n.length===7){const[r,d]=n.split("-");a.year=r,a.month=d}return n&&n.length===4&&(a.year=n),q.list(a)}}}),v="departmentTotalTips",L=W({__name:"index",setup(h){u(x);const t=u(!0),n=u(!0),a=u(null),r=u(null),{hasPermissionWithCode:d}=Y(v),D=C(new Date).format("YYYY-MM");function k(i,e){const[l,g,E]=D.split("-");return!(i<l||e<g)}const F={pageSearchHook:()=>H(void 0,void 0,x)};function B(i){var e;(e=a.value)==null||e.onDisplay(i)}function M(){var l;const{companyNo:i,depart_id:e}=r.value.getBasicParams();(l=a.value)==null||l.onDisplay({companyNo:i,depart_id:e})}return R(()=>t.value,()=>{n.value=!1,S(()=>n.value=!0)}),(i,e)=>{const l=s("ElSwitch"),g=s("el-button"),E=s("ElButton"),T=s("ElTooltip"),w=s("page-container"),N=s("ExecModal"),A=s("page-auth");return m(),f(A,{"page-name":v},{default:p(()=>[n.value?(m(),f(w,{key:0,hooks:F,"page-name":v,"search-config":c(x),"get-content-ref":o=>r.value=o,"content-config":c($)(t.value)},{content_header:p(()=>[e[3]||(e[3]=P("span",{class:"mr-[5px]",style:{"font-weight":"700"}},"\u663E\u793A\u5355\u4F4D:",-1)),_(l,{class:"mr-[15px]",modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=o=>t.value=o),"active-text":"\u4E07\u5143","inactive-text":"\u5143"},null,8,["modelValue"]),c(d)("2")?(m(),f(g,{key:0,size:"small",type:"primary",onClick:M},{default:p(()=>e[2]||(e[2]=[U(" \u6DFB\u52A0 ")])),_:1})):y("v-if",!0)]),content_action:p(o=>[c(d)("4")&&Object.keys(o).length!==0&&k(o.year,o.month)?(m(),f(T,{key:0,content:"\u7F16\u8F91",placement:"top"},{default:p(()=>[_(E,{link:"",size:"small",type:"primary",icon:c(j)("edits"),onClick:O=>B(o)},null,8,["icon","onClick"])]),_:2},1024)):y("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"])):y("v-if",!0),_(z,{ref_key:"demandModifyModal",ref:a,onRefresh:e[1]||(e[1]=o=>r.value.onSearch())},null,512),_(N,{ref:"execModalRef"},null,512)]),_:1})}}});var ee=V(L,[["__file","C:/Users/Administrator/Desktop/projects/report-v3/src/views/tipsSetting/departmentTotalTips/index.vue"]]);export{ee as default};
|