index.7b2d2795.js 3.3 KB

1
  1. import{Q as k,_ as Y,d as R,m,cp as S,w as W,p as P,r as s,o as d,A as f,x as u,u as p,b as U,h as _,H as j,a as g,D as z}from"./index.bf41a5b5.js";import{b as C}from"./calc.0cdee66c.js";import{a as D,D as H}from"./demand-modify-modal.3ed27168.js";import{u as I}from"./use-page-search.fc995b50.js";import"./index.a408f48c.js";import"./createRequset.3eb6d703.js";const b={formItems:[{field:"date",type:"date_composition",trigger:"change",defaultValue:"2025"},{field:"companyNo",type:"business-query",trigger:"change"}]},$=k(new Date).format("YYYY-MM");function q(l,e){const[n,o,i]=$.split("-");return!(l<n||e<o)}const L=l=>({columns:[{prop:"year",label:"\u5E74",minWidth:"70px"},{prop:"month",label:"\u6708",minWidth:"70px"},{prop:"companyName",label:"\u516C\u53F8\u540D\u79F0",minWidth:"135px"},{prop:"total_tips",label:"\u5F00\u7968\u6307\u6807",width:"100px",cellRenderer({row:e}){return l?C(e.inv_tips):e.inv_tips}},{prop:"cost_tips",label:"\u5229\u6DA6\u6307\u6807",width:"100px",cellRenderer({row:e}){return l?C(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 q(e.year,e.month)},apis:{httpDelete:D.delete,httpList:(e={})=>{const{date:n,...o}=e;if(n&&n.length===7){const[i,c]=n.split("-");o.year=i,o.month=c}return n&&n.length===4&&(o.year=n),D.list(o)}}}),v="invCompanyTotalTips",O=R({__name:"index",setup(l){const e=m(!0),n=m(!0),o=m(null),i=m(null),{hasPermissionWithCode:c}=S(v),E=k(new Date).format("YYYY-MM");function F(r,t){const[h,y,x]=E.split("-");return!(r<h||t<y)}const M={pageSearchHook:()=>I(void 0,void 0,b)};function T(r){var t;(t=o.value)==null||t.onDisplay(r)}function w(){var t;const{companyNo:r}=i.value.getBasicParams();(t=o.value)==null||t.onDisplay({companyNo:r})}return W(()=>e.value,()=>{n.value=!1,P(()=>n.value=!0)}),(r,t)=>{const h=s("ElSwitch"),y=s("el-button"),x=s("ElButton"),B=s("ElTooltip"),A=s("page-container"),N=s("ExecModal"),V=s("page-auth");return d(),f(V,{"page-name":v},{default:u(()=>[n.value?(d(),f(A,{key:0,hooks:M,"page-name":v,"search-config":p(b),"get-content-ref":a=>i.value=a,"content-config":p(L)(e.value)},{content_header:u(()=>[t[3]||(t[3]=U("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(y,{key:0,size:"small",type:"primary",onClick:w},{default:u(()=>t[2]||(t[2]=[j(" \u6DFB\u52A0 ")])),_:1})):g("v-if",!0)]),content_action:u(a=>[p(c)("4")&&Object.keys(a).length!==0&&F(a.year,a.month)?(d(),f(B,{key:0,content:"\u7F16\u8F91",placement:"top"},{default:u(()=>[_(x,{link:"",size:"small",type:"primary",icon:p(z)("edits"),onClick:Q=>T(a)},null,8,["icon","onClick"])]),_:2},1024)):g("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"])):g("v-if",!0),_(H,{ref_key:"demandModifyModal",ref:o,onRefresh:t[1]||(t[1]=a=>i.value.onSearch())},null,512),_(N,{ref:"execModalRef"},null,512)]),_:1})}}});var te=Y(O,[["__file","C:/Users/Administrator/Desktop/projects/report-v3/src/views/tipsSetting/invCompanyTotalTips/index.vue"]]);export{te as default};