import{aa as s,aX as i,_ as P,d as x,aZ as A,n as O,w as S,r as C,o as b,G as _,C as E,l as r,a as M,j as N,M as V,af as I,a_ as R,ax as L}from"./index.js";import{u as z}from"./use-page-search.15129a46.js";import{h as G}from"./index.d2fead55.js";import{c as T,a as h,g as j}from"./status.b7512d56.js";import{g as F,b as v}from"./columns.6ae6573b.js";import{r as g}from"./columnRenderHelper.c38ed50d.js";import"./tootip.236f17fc.js";const q=[{width:30,type:"selection",fixed:"left"},{label:"ID",prop:"id",width:80},{label:"\u5546\u54C1\u7F16\u7801",prop:"skuCode",width:150},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:150},{label:"\u5546\u54C1\u7C7B\u578B",width:100,cellRenderer({row:u}){return s(i,{size:"small"},{default:()=>{var e;return((e=T.find(o=>o.value==u.good_type))==null?void 0:e.label)||"--"}})}},{label:"\u7ED3\u5B58\u6570",prop:"residue_stock",width:80},{label:"\u72B6\u6001",prop:"status",width:60,cellRenderer({row:u}){var e;return s(i,{size:"small",type:((e=h.find(o=>o.value==u.status))==null?void 0:e.type)||"warning"},{default:()=>{var o;return((o=h.find(n=>n.value==u.status))==null?void 0:o.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:u}){return s(i,{size:"small"},{default:()=>{var e;return((e=F.find(o=>o.value==u.good_source))==null?void 0:e.label)||"--"}})}},{label:"\u6210\u672C\u72B6\u6001",width:75,cellRenderer({row:u}){return s(i,{size:"small"},{default:()=>{var e;return((e=v.find(o=>o.value==u.basic_status))==null?void 0:e.label)||"--"}})}},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"subunit_price",width:100},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"unit_price",width:100},{label:"\u5355\u4F4D",prop:"unit",width:42},{label:"\u89C4\u683C",prop:"spec",width:80},{label:"\u91CD\u91CF",prop:"unit_weight",width:80},{label:"\u9500\u552E\u65B9\u516C\u53F8",width:160,...g("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,...g("buyer_code","buyer_name","\u8D2D\u4E70\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time",width:140}],U={columns:q,companyProp:"buyer_code",apis:{httpList:(u={})=>G({...u,status:"1"})}},B={formItems:[{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u521B\u5EFA\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u521B\u5EFA\u7ED3\u675F\u65F6\u95F4"}},{field:"good_type",type:"select",options:j,placeholder:"\u5546\u54C1\u7C7B\u578B",otherOptions:{disabled:!0}},{field:"basic_status",type:"select",options:v,placeholder:"\u6210\u672C\u7C7B\u578B",otherOptions:{disabled:!0}},{type:"select",placeholder:"\u5546\u54C1\u6765\u6E90",field:"good_source",options:F,otherOptions:{disabled:!0}},{type:"input",placeholder:"\u5546\u54C1\u7F16\u7801",field:"skuCode"},{field:"status",type:"select",options:h,placeholder:"\u72B6\u6001",otherOptions:{disabled:!0}}]},H=x({__name:"index",props:{visible:{type:Boolean,required:!0},otherSearchParameter:{type:null,required:!0}},emits:["submit"],setup(u,{emit:e}){const o=u,n=e,l=A(o,"visible"),m=O(),y={pageSearchHook:()=>z(void 0,void 0,B)},d=S([]),w={content:{preview:({id:a})=>m.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>m.push("/invoiceInOut/productManagerDetail")}};function D(){if(d.value.length===0){L.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const a=[];d.value.forEach(t=>{t.ProductsCombind.length===0?a.push({...t,goodNum:1}):t.ProductsCombind.forEach(p=>{a.push({...t,goodNum:1,childCode:p.products.skuCode,childNum:t.child_num,childActionNum:t.child_num})})}),l.value=!1,n("submit",a)}return(a,t)=>{const p=C("PageContainer"),k=C("ElButton");return b(),_(r(R),{class:"relative",modelValue:r(l),"onUpdate:modelValue":t[1]||(t[1]=c=>I(l)?l.value=c:null),title:"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:E(()=>[r(l)?(b(),_(p,{key:0,"only-self":!0,hooks:y,events:w,searchConfig:r(B),contentConfig:r(U),isPageStart:!0,"other-search-parameter":a.otherSearchParameter,onContentSelectChange:t[0]||(t[0]=c=>d.value=c.map(f=>({...f,child_num:"1",child_id:f.id})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):M("v-if",!0),N(k,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:D},{default:E(()=>t[2]||(t[2]=[V("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var $=P(H,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inManager/components/ChooseGoodModal/index.vue"]]);export{$ as default};
