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