1 |
- import{Q as b,_ as N,d as R,m,cp as S,w as W,p as j,r as s,o as d,A as f,x as u,u as p,b as P,h as _,H as U,a as v,D as z}from"./index.b5c844d0.js";import{b as D}from"./calc.0cdee66c.js";import{a as C,D as H}from"./demand-modify-modal.322fb90a.js";import{u as I}from"./use-page-search.c59d5041.js";import"./index.ef737d72.js";import"./createRequset.6b7f85e0.js";const E={formItems:[{field:"date",type:"date_composition",trigger:"change",defaultValue:"2025"}]},$=b(new Date).format("YYYY-MM");function L(r,e){const[n,o,l]=$.split("-");return!(r<n||e<o)}const O=r=>({columns:[{prop:"year",label:"\u5E74",minWidth:"70px"},{prop:"month",label:"\u6708",minWidth:"70px"},{prop:"uname",label:"\u4E1A\u52A1\u7ECF\u7406",minWidth:"135px"},{prop:"total_tips",label:"\u5F00\u7968\u6307\u6807",width:"100px",cellRenderer({row:e}){return r?D(e.inv_tips):e.inv_tips}},{prop:"cost_tips",label:"\u6BDB\u5229\u6307\u6807",width:"100px",cellRenderer({row:e}){return r?D(e.cost_tips):e.cost_tips}},{prop:"createTime",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,showDelete(e){return L(e.year,e.month)},apis:{httpDelete:C.delete,httpList:(e={})=>{const{date:n,...o}=e;if(n&&n.length===7){const[l,c]=n.split("-");o.year=l,o.month=c}return n&&n.length===4&&(o.year=n),C.list(o)}}}),y="invManagerTotalTips",Q=R({__name:"index",setup(r){const e=m(!0),n=m(!0),o=m(null),l=m(null),{hasPermissionWithCode:c}=S(y),k=b(new Date).format("YYYY-MM");function M(i,t){const[h,g,x]=k.split("-");return!(i<h||t<g)}const T={pageSearchHook:()=>I(void 0,void 0,E)};function B(i){var t;(t=o.value)==null||t.onDisplay(i)}function F(){var t;const{companyNo:i}=l.value.getBasicParams();(t=o.value)==null||t.onDisplay({companyNo:i})}return W(()=>e.value,()=>{n.value=!1,j(()=>n.value=!0)}),(i,t)=>{const h=s("ElSwitch"),g=s("el-button"),x=s("ElButton"),w=s("ElTooltip"),A=s("page-container"),V=s("ExecModal"),Y=s("page-auth");return d(),f(Y,{"page-name":y},{default:u(()=>[n.value?(d(),f(A,{key:0,hooks:T,"page-name":y,"search-config":p(E),"get-content-ref":a=>l.value=a,"content-config":p(O)(e.value)},{content_header:u(()=>[t[3]||(t[3]=P("span",{class:"mr-[5px]",style:{"font-weight":"700"}},"\u663E\u793A\u5355\u4F4D:",-1)),_(h,{class:"mr-[15px]",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=a=>e.value=a),"active-text":"\u4E07\u5143","inactive-text":"\u5143"},null,8,["modelValue"]),p(c)("2")?(d(),f(g,{key:0,size:"small",type:"primary",onClick:F},{default:u(()=>t[2]||(t[2]=[U(" \u6DFB\u52A0 ")])),_:1})):v("v-if",!0)]),content_action:u(a=>[p(c)("4")&&Object.keys(a).length!==0&&M(a.year,a.month)?(d(),f(w,{key:0,content:"\u7F16\u8F91",placement:"top"},{default:u(()=>[_(x,{link:"",size:"small",type:"primary",icon:p(z)("edits"),onClick:q=>B(a)},null,8,["icon","onClick"])]),_:2},1024)):v("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"])):v("v-if",!0),_(H,{ref_key:"demandModifyModal",ref:o,onRefresh:t[1]||(t[1]=a=>l.value.onSearch())},null,512),_(V,{ref:"execModalRef"},null,512)]),_:1})}}});var te=N(Q,[["__file","D:/work/sjtj/report-v3/src/views/tipsSetting/invManagerTotalTips/index.vue"]]);export{te as default};
|