index.549ca0.js 3.4 KB

1
  1. import{ac as c,aZ as h,_ as B,d as D,a$ as k,n as P,w as x,r as m,o as C,G as f,C as b,l,a as S,j as A,M,ah as V,b0 as O,az as I}from"./index.js";import{u as N}from"./use-page-search.d7df394f.js";import{h as R}from"./index.201d3c34.js";import{c as z,a as g,g as G}from"./status.b7512d56.js";const L=[{width:40,type:"selection",fixed:"left"},{label:"\u5546\u54C1ID",prop:"id",width:60},{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:e}){return c(h,{size:"small"},{default:()=>{var o;return((o=z.find(t=>t.value==e.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:e}){var o;return c(h,{size:"small",type:((o=g.find(t=>t.value==e.status))==null?void 0:o.type)||"warning"},{default:()=>{var t;return((t=g.find(s=>s.value==e.status))==null?void 0:t.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,companyProp:"buyer_code",apis:{httpList:(e={})=>R({...e,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(e,{emit:o}){const t=e,s=o,r=k(t,"visible"),p=P(),_={pageSearchHook:()=>N(void 0,void 0,F)},n=x([]),v={content:{preview:({id:a})=>p.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>p.push("/invoiceInOut/productManagerDetail")}};function w(){if(n.value.length===0){I.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const a=[];n.value.forEach(u=>{a.push({...u,goodNum:1})}),r.value=!1,s("submit",a)}return(a,u)=>{const y=m("PageContainer"),E=m("ElButton");return C(),f(l(O),{class:"relative",modelValue:l(r),"onUpdate:modelValue":u[1]||(u[1]=i=>V(r)?r.value=i:null),title:"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:b(()=>[l(r)?(C(),f(y,{key:0,onlySelf:!0,hooks:_,events:v,searchConfig:l(F),contentConfig:l(T),isPageStart:!0,"other-search-parameter":a.otherSearchParameter,onContentSelectChange:u[0]||(u[0]=i=>n.value=i.map(d=>({...d,child_num:"1",child_id:d.id,spbl:1})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):S("v-if",!0),A(E,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:w},{default:b(()=>u[2]||(u[2]=[M("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var $=B(j,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/provisionOut/components/ChooseGoodModal/index.vue"]]);export{$ as default};