index.3d23cb.js 2.4 KB

1
  1. import{_ as B,d as E,w as r,aU as P,z as w,r as f,o as u,G as N,C as b,h as o,M as _,c as i,a as h,F as V,D as S,B as R,L as T,j as c,l as U,aq as z}from"./index.js";import{M as A}from"./modal.2932b5.js";import D from"./category-tree.e19e38.js";import"./index.1b996d7e.js";const j={class:"flex cursor-pointer"},F={key:0,class:"mx-[5px]"},M=["onClick"],I={key:0,class:"mx-[5px]"},L={class:"flex justify-between pt-[20px]"},q={class:"flex gap-1"},G={class:"flex"},$={class:"flex-1"},H=E({__name:"index",setup(J){const C="grossProfit";r(null);const n=r({}),a=r([]),d=P(!1),m=r({status:"",cat_name:"",company_name:""}),l=r(null);function x(t){a.value.push(t)}function g(t){if(t===a.value.length-1)return;const e=a.value[t],p=e?e.id:"";l.value.changePid(p),l.value.onSearch(),a.value.splice(t+1)}return w(()=>a.value,()=>{const t=a.value[a.value.length-1];n.value.companyNo=t?t.companyNo:"",n.value.pid=t?t.id:"0"},{immediate:!0,deep:!0}),(t,e)=>{const p=f("ElInput"),y=f("ElButton"),k=f("PageAuth");return u(),N(k,{class:"px-[10px] h-[calc(100vh-60px)] bg-white",pageName:C,margin:!1},{default:b(()=>[o("ul",j,[o("li",{onClick:e[0]||(e[0]=()=>g())},[_("\u5168\u90E8\u4E13\u5C5E\u4E00\u7EA7\u5206\u7C7B "),a.value.length>0?(u(),i("span",F,"/")):h("v-if",!0)]),(u(!0),i(V,null,S(a.value,(s,v)=>(u(),i("li",{key:s.id,class:R({"cursor-pointer":!0,"text-[#ccc]":v===a.value.length-1}),onClick:()=>g(v)},[_(T(s.cat_name)+" ",1),v!==a.value.length-1?(u(),i("span",I,"/")):h("v-if",!0)],10,M))),128))]),o("div",L,[o("div",q,[c(p,{onChange:e[1]||(e[1]=()=>l.value.onSearch()),modelValue:m.value.cat_name,"onUpdate:modelValue":e[2]||(e[2]=s=>m.value.cat_name=s),placeholder:"\u5206\u7C7B\u540D\u79F0",size:"small",clearable:""},null,8,["modelValue"])]),o("div",G,[c(y,{size:"small",onClick:e[3]||(e[3]=()=>l.value.onSearch())},{default:b(()=>[_("\u5237\u65B0")]),_:1})])]),h(" \u6811\u8282\u70B9 "),o("div",$,[c(D,{ref_key:"categoryTreeRef",ref:l,otherParms:m.value,breadcrumb:a.value,onBreadcrumbChange:x},null,8,["otherParms","breadcrumb"])]),c(A,{pid:n.value.pid,data:n.value,"onUpdate:data":e[4]||(e[4]=s=>n.value=s),visible:U(d),"onUpdate:visible":e[5]||(e[5]=s=>z(d)?d.value=s:null),breadcrumb:a.value,onRefresh:e[6]||(e[6]=s=>l.value.onSearch())},null,8,["pid","data","visible","breadcrumb"])]),_:1})}}});var X=B(H,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/grossProfit/index.vue"]]);export{X as default};