import{aa as y,aX as E,_ as x,d as A,n as P,a0 as I,w as h,r as l,o as F,G as _,C as r,j as i,l as p,M as b,a as R}from"./index.js";import{u as S}from"./use-page-search.15129a46.js";import{c as N,d as O}from"./index.0bffb9a0.js";import{a as c}from"./columnRenderHelper.c38ed50d.js";import{t as W}from"./shared.f80a8b25.js";import{B as T,o as U}from"./index.a9eb7f.js";import{u as d,w as V}from"./execl-upload.6b79e9c3.js";import"./index.f05cfa47.js";import"./index.ec530cdb.js";const j=[{label:"\u76D8\u70B9\u7F16\u53F7",prop:"checkCode",width:170},{label:"\u76D8\u70B9\u7C7B\u578B",minWidth:120,cellRenderer({row:e}){var u;return y(E,{size:"small"},{default:((u=W.find(a=>a.value==e.check_type))==null?void 0:u.label)||"--"})}},{label:"\u5546\u54C1ID",minWidth:60,prop:"product_id"},{label:"\u5546\u54C1\u540D\u79F0",minWidth:160,...c(e=>e.product.skuCode,e=>e.product.goodName,"\u5546\u54C1\u7F16\u53F7:")},{label:"\u5355\u4EF7",width:80,cellRenderer({row:e}){return e.product.subunit_price}},{label:"\u8D26\u9762\u6570\u91CF",prop:"stock_num",width:80},{label:"\u76D8\u70B9\u6570\u91CF",prop:"check_num",width:120},{label:"\u76D8\u4E8F\u6570\u91CF",prop:"diff_num",width:120},{label:"\u89C4\u683C",prop:"spec",width:80,cellRenderer({row:e}){return e.product.spec}},{label:"\u5355\u4F4D",width:60,cellRenderer({row:e}){return e.product.unit}},{label:"\u9500\u552E\u65B9\u516C\u53F8",minWidth:160,...c(e=>e.product.seller_code,e=>e.product.seller_name,"\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",minWidth:160,...c(e=>e.product.buyer_code,e=>e.product.buyer_name,"\u8D2D\u4E70\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u64CD\u4F5C\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time",width:120},{label:"\u64CD\u4F5C",fixed:"right",width:50,slot:"operation"}],z={columns:j,title:"\u5546\u54C1\u7BA1\u7406",permissions:["003","007"],companyProp:"buyer_code",apis:{httpList:N,httpStatus:O,httpAdd:!0}},v={formItems:[{field:"timer",type:"date_picker",span:7,label:"\u521B\u5EFA\u65F6\u95F4",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{field:"skuCode",type:"input",placeholder:"\u5546\u54C1\u7F16\u7801"}]},L="productManager",M=A({__name:"index",setup(e){const u=P(),{isSuperUser:a}=I(),s=h(!1),m=h(null),k={pageSearchHook:()=>S(void 0,void 0,v)},B={content:{preview:({id:o})=>u.push("/invoiceInOut/inventoryCheckDetail?id="+o),create:()=>u.push("/invoiceInOut/inventoryCheckDetail")}};async function g(){const o=d.book_new(),t=d.json_to_sheet(U);d.book_append_sheet(o,t,"sheet"),V(o,"\u76D8\u70B9\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(o,t)=>{const C=l("ElButton"),D=l("PageContainer"),w=l("PageAuth");return F(),_(w,{pageName:L},{default:r(()=>[i(D,{hooks:k,events:B,searchConfig:p(v),contentConfig:p(z),"get-content-ref":n=>m.value=n},{content_header:r(()=>[p(a)?R("v-if",!0):(F(),_(C,{key:0,type:"primary",size:"small",onClick:t[0]||(t[0]=n=>s.value=!0)},{default:r(()=>t[3]||(t[3]=[b(" \u6279\u91CF\u521B\u5EFA ")])),_:1})),i(C,{size:"small",onClick:g},{default:r(()=>t[4]||(t[4]=[b(" \u4E0B\u8F7D\u6A21\u677F ")])),_:1})]),_:1},8,["searchConfig","contentConfig","get-content-ref"]),i(T,{visible:s.value,"onUpdate:visible":t[1]||(t[1]=n=>s.value=n),onRefresh:t[2]||(t[2]=n=>{var f;return(f=m.value)==null?void 0:f.onSearch()})},null,8,["visible"])]),_:1})}}});var Z=x(M,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inventoryCheck/index.vue"]]);export{Z as default};
