import{a1 as h,aP as m,_ as B,d as D,aQ as P,n as k,w as x,r as C,o as f,G as b,C as g,l as s,a as A,j as M,M as N,a6 as S,aR as V,aq as O}from"./index.js";import{u as R}from"./use-page-search.98f4d8c5.js";import{h as I}from"./index.56c71262.js";import{c as q,a as _,g as G}from"./status.d3ab78fb.js";const L=[{width:40,type:"selection",fixed:"left"},{label:"\u5546\u54C1\u7F16\u7801",prop:"skuCode",width:150},{label:"\u9500\u552E\u65B9\u516C\u53F8",prop:"seller_name",width:160},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",prop:"buyer_name",width:160},{label:"\u5546\u54C1\u7C7B\u578B",width:100,cellRenderer({row:t}){return h(m,{size:"small"},{default:()=>{var o;return((o=q.find(u=>u.value==t.good_type))==null?void 0:o.label)||"--"}})}},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:150},{label:"\u89C4\u683C",prop:"spec",width:80},{label:"\u5355\u4F4D",prop:"unit",width:80},{label:"\u72B6\u6001",prop:"status",width:80,cellRenderer({row:t}){var o;return h(m,{size:"small",type:((o=_.find(u=>u.value==t.status))==null?void 0:o.type)||"warning"},{default:()=>{var u;return((u=_.find(l=>l.value==t.status))==null?void 0:u.label)||"--"}})}},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"subunit_price",width:100},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"unit_price",width:100},{label:"\u91CD\u91CF",prop:"unit_weight",width:80},{label:"\u5206\u5149",prop:"spectral",width:80},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time",width:140}],T={columns:L,apis:{httpList:(t={})=>I({...t,status:"1"})}},F={formItems:[{field:"skuCode",type:"input",placeholder:"\u5546\u54C1\u7F16\u7801"},{field:"good_type",type:"select",options:G,placeholder:"\u5546\u54C1\u7C7B\u578B"},{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"}}]},j=D({__name:"index",props:{visible:{type:Boolean,required:!0},otherSearchParameter:{type:null,required:!0}},emits:["submit"],setup(t,{emit:o}){const u=t,l=o,r=P(u,"visible"),d=k(),v={pageSearchHook:()=>R(void 0,void 0,F)},n=x([]),E={content:{preview:({id:a})=>d.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>d.push("/invoiceInOut/productManagerDetail")}};function w(){if(n.value.length===0){O.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const a=[];n.value.forEach(e=>{e.ProductsCombind.length===0?a.push({...e,goodNum:1}):e.ProductsCombind.forEach(i=>{a.push({...e,goodNum:1,childCode:i.products.skuCode,childNum:e.child_num,childActionNum:e.child_num})})}),r.value=!1,l("submit",a)}return(a,e)=>{const i=C("PageContainer"),y=C("ElButton");return f(),b(s(V),{class:"relative",modelValue:s(r),"onUpdate:modelValue":e[1]||(e[1]=p=>S(r)?r.value=p:null),title:"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:g(()=>[s(r)?(f(),b(i,{key:0,hooks:v,events:E,searchConfig:s(F),contentConfig:s(T),isPageStart:!0,"other-search-parameter":a.otherSearchParameter,onContentSelectChange:e[0]||(e[0]=p=>n.value=p.map(c=>({...c,child_num:"1",child_id:c.id})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):A("v-if",!0),M(y,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:w},{default:g(()=>e[2]||(e[2]=[N("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var J=B(j,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inOutManager/components/ChooseGoodModal/index.vue"]]);export{J as default};
