1 |
- import{a7 as n,bq as d,_ as P,d as S,bs as x,j as O,m as T,r as b,o as F,A as E,x as g,h as i,a as N,f as J,H as M,ac as V,bt as I,az as p}from"./index.js";import{u as R}from"./use-page-search.dfa27a70.js";import{h as q}from"./index.0d3e4f3d.js";import{c as z,a as C,g as L}from"./status.b7512d56.js";import{r as B}from"./columnRenderHelper.8411add2.js";import{g as v,b as y}from"./columns.74c15f1e.js";import"./tootip.c6ca5db9.js";const j=[{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:o}){return n(d,{size:"small"},{default:()=>{var t;return((t=z.find(e=>e.value==o.good_type))==null?void 0:t.label)||"--"}})}},{label:"\u7ED3\u5B58\u6570",prop:"residue_stock",width:80},{label:"\u72B6\u6001",prop:"status",width:60,cellRenderer({row:o}){var t;return n(d,{size:"small",type:((t=C.find(e=>e.value==o.status))==null?void 0:t.type)||"warning"},{default:()=>{var e;return((e=C.find(c=>c.value==o.status))==null?void 0:e.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:o}){return n(d,{size:"small"},{default:()=>{var t;return((t=v.find(e=>e.value==o.good_source))==null?void 0:t.label)||"--"}})}},{label:"\u6210\u672C\u72B6\u6001",width:75,cellRenderer({row:o}){return n(d,{size:"small"},{default:()=>{var t;return((t=y.find(e=>e.value==o.basic_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:"\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,...B("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,...B("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}],G={columns:j,companyProp:"buyer_code",apis:{httpList:(o={})=>q({...o,status:"1"})}},_={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:L,placeholder:"\u5546\u54C1\u7C7B\u578B",otherOptions:{disabled:!0}},{field:"basic_status",type:"select",options:y,placeholder:"\u6210\u672C\u7C7B\u578B"},{type:"select",placeholder:"\u5546\u54C1\u6765\u6E90",field:"good_source",options:v,otherOptions:{disabled:!0}},{field:"status",type:"select",options:C,placeholder:"\u72B6\u6001",otherOptions:{disabled:!0}},{field:"skuCode",type:"input",placeholder:"\u5546\u54C1\u7F16\u53F7"}]},H=S({__name:"index",props:{visible:{type:Boolean,required:!0},otherSearchParameter:{type:null,required:!0},skuCode:{type:String,required:!1},isJT:{type:Boolean,required:!0}},emits:["submit"],setup(o,{emit:t}){const e=o,c=t,r=x(e,"visible"),m=O(),w={pageSearchHook:()=>R(void 0,void 0,_)},s=T([]),D={content:{preview:({id:a})=>m.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>m.push("/invoiceInOut/productManagerDetail")}};function k(){if(s.value.length===0){p.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}if(e.isJT){if(s.value.length>1){p.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u8BA1\u63D0\u5546\u54C1");return}}else{const u=[...new Set(s.value.map(({skuCode:l})=>l))];if(u.length!==1){p.warning("\u9009\u62E9\u7684\u5546\u54C1\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u4E00\u81F4");return}if(e.skuCode&&u[0]!==e.skuCode){p.warning("\u9009\u62E9\u7684\u5546\u54C1\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u548C\u5F53\u524D\u9009\u62E9\u5546\u54C1\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u4E00\u81F4");return}}const a=[];s.value.forEach(u=>{u.ProductsCombind.length===0?a.push({...u,goodNum:"",isJT:e.isJT}):u.ProductsCombind.forEach(l=>{a.push({...u,isJT:e.isJT,goodNum:"",childCode:l.products.skuCode,childNum:u.child_num,childActionNum:""})})}),r.value=!1,c("submit",a)}return(a,u)=>{const l=b("PageContainer"),A=b("ElButton");return F(),E(i(I),{class:"relative",modelValue:i(r),"onUpdate:modelValue":u[1]||(u[1]=h=>V(r)?r.value=h:null),title:a.isJT?"\u6DFB\u52A0\u8BA1\u63D0\u5546\u54C1":"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:g(()=>[i(r)?(F(),E(l,{key:0,"only-self":!0,hooks:w,events:D,searchConfig:i(_),contentConfig:i(G),isPageStart:!0,"other-search-parameter":a.otherSearchParameter,onContentSelectChange:u[0]||(u[0]=h=>s.value=h.map(f=>({...f,child_num:"1",child_id:f.id})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):N("v-if",!0),J(A,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:k},{default:g(()=>u[2]||(u[2]=[M("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue","title"])}}});var $=P(H,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/outManager/components/ChooseGoodModal/index.vue"]]);export{$ as default};
|