index.45c8af.js 4.2 KB

1
  1. import{ac as r,aZ as i,_ as k,d as O,a$ as P,n as x,w as A,r as f,o as b,G as C,C as g,l,a as S,j as M,M as V,ah as I,b0 as R,az as z}from"./index.js";import{u as L}from"./use-page-search.a028be27.js";import{h as N}from"./index.f05c090c.js";import{c as G,a as c,g as T}from"./status.b7512d56.js";import{r as _}from"./columnRenderHelper.7693fc90.js";import{g as j,b as B}from"./columns.a2f2fd27.js";import"./tootip.4f2871df.js";const q=[{width:40,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:t}){return r(i,{size:"small"},{default:()=>{var e;return((e=G.find(u=>u.value==t.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:t}){var e;return r(i,{size:"small",type:((e=c.find(u=>u.value==t.status))==null?void 0:e.type)||"warning"},{default:()=>{var u;return((u=c.find(n=>n.value==t.status))==null?void 0:u.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:t}){return r(i,{size:"small"},{default:()=>{var e;return((e=j.find(u=>u.value==t.good_source))==null?void 0:e.label)||"--"}})}},{label:"\u6210\u672C\u72B6\u6001",width:75,cellRenderer({row:t}){return r(i,{size:"small"},{default:()=>{var e;return((e=B.find(u=>u.value==t.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,..._("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,..._("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:(t={})=>N({...t,status:"1"})}},E={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:T,placeholder:"\u5546\u54C1\u7C7B\u578B",otherOptions:{disabled:!0}},{field:"status",type:"select",options:c,placeholder:"\u72B6\u6001",otherOptions:{disabled:!0}},{type:"select",placeholder:"\u6210\u672C\u7C7B\u578B",field:"basic_status",options:B,otherOptions:{disabled:!0}}]},H=O({__name:"index",props:{visible:{type:Boolean,required:!0},otherSearchParameter:{type:null,required:!0}},emits:["submit"],setup(t,{emit:e}){const u=t,n=e,s=P(u,"visible"),h=x(),F={pageSearchHook:()=>L(void 0,void 0,E)},p=A([]),v={content:{preview:({id:a})=>h.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>h.push("/invoiceInOut/productManagerDetail")}};function w(){if(p.value.length===0){z.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const a=[];p.value.forEach(o=>{a.push({...o,goodNum:1})}),s.value=!1,n("submit",a)}return(a,o)=>{const y=f("PageContainer"),D=f("ElButton");return b(),C(l(R),{class:"relative",modelValue:l(s),"onUpdate:modelValue":o[1]||(o[1]=d=>I(s)?s.value=d:null),title:"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:g(()=>[l(s)?(b(),C(y,{key:0,onlySelf:!0,hooks:F,events:v,searchConfig:l(E),contentConfig:l(U),isPageStart:!0,"other-search-parameter":a.otherSearchParameter,onContentSelectChange:o[0]||(o[0]=d=>p.value=d.map(m=>({...m,child_num:"1",child_id:m.id,spbl:1})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):S("v-if",!0),M(D,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:w},{default:g(()=>o[2]||(o[2]=[V("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var Y=k(H,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/provisionOut/components/ChooseGoodModal/index.vue"]]);export{Y as default};