index.ff51ce.js 4.2 KB

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