1 |
- import{ac as C,aZ as m,_ as D,d as k,a_ as P,n as A,w as T,r as f,o as F,G as g,C as b,l as i,a as x,j as S,M,ah as N,a$ as J,az as n}from"./index.js";import{u as V}from"./use-page-search.496e3eda.js";import{h as I}from"./index.3e4a56da.js";import{c as O,a as E,g as q}from"./status.0f771e9a.js";const R=[{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:t}){return C(m,{size:"small"},{default:()=>{var a;return((a=O.find(u=>u.value==t.good_type))==null?void 0:a.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:"\u7ED3\u5B58\u6570",prop:"residue_stock",width:100},{label:"\u72B6\u6001",prop:"status",width:80,cellRenderer({row:t}){var a;return C(m,{size:"small",type:((a=E.find(u=>u.value==t.status))==null?void 0:a.type)||"warning"},{default:()=>{var u;return((u=E.find(p=>p.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}],z={columns:R,companyProp:"buyer_code",apis:{httpList:(t={})=>I({...t,status:"1"})}},_={formItems:[{field:"skuCode",type:"input",placeholder:"\u5546\u54C1\u7F16\u7801"},{field:"good_type",type:"select",options:q,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"}}]},G=k({__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(t,{emit:a}){const u=t,p=a,r=P(u,"visible"),c=A(),w={pageSearchHook:()=>V(void 0,void 0,_)},s=T([]),B={content:{preview:({id:o})=>c.push("/invoiceInOut/productManagerDetail?id="+o),create:()=>c.push("/invoiceInOut/productManagerDetail")}};function v(){if(s.value.length===0){n.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}if(u.isJT){if(s.value.length>1){n.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u8BA1\u63D0\u5546\u54C1");return}}else{const e=[...new Set(s.value.map(({skuCode:l})=>l))];if(e.length!==1){n.warning("\u9009\u62E9\u7684\u5546\u54C1\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u4E00\u81F4");return}if(u.skuCode&&e[0]!==u.skuCode){n.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 o=[];s.value.forEach(e=>{e.ProductsCombind.length===0?o.push({...e,goodNum:"",isJT:u.isJT}):e.ProductsCombind.forEach(l=>{o.push({...e,isJT:u.isJT,goodNum:"",childCode:l.products.skuCode,childNum:e.child_num,childActionNum:""})})}),r.value=!1,p("submit",o)}return(o,e)=>{const l=f("PageContainer"),y=f("ElButton");return F(),g(i(J),{class:"relative",modelValue:i(r),"onUpdate:modelValue":e[1]||(e[1]=d=>N(r)?r.value=d:null),title:o.isJT?"\u6DFB\u52A0\u8BA1\u63D0\u5546\u54C1":"\u9009\u62E9\u5546\u54C1",center:"",top:"10px"},{default:b(()=>[i(r)?(F(),g(l,{key:0,"only-self":!0,hooks:w,events:B,searchConfig:i(_),contentConfig:i(z),isPageStart:!0,"other-search-parameter":o.otherSearchParameter,onContentSelectChange:e[0]||(e[0]=d=>s.value=d.map(h=>({...h,child_num:"1",child_id:h.id})))},null,8,["searchConfig","contentConfig","other-search-parameter"])):x("v-if",!0),S(y,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:v},{default:b(()=>e[2]||(e[2]=[M("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue","title"])}}});var Z=D(G,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/outManager/components/ChooseGoodModal/index.vue"]]);export{Z as default};
|