index.c48d03.js 5.1 KB

1
  1. import{ac as s,aZ as n,_ as x,d as k,a$ as O,n as P,w as S,r as E,o as h,G as g,C as v,l as i,a as T,j as z,M,ah as R,b0 as V,az as d}from"./index.js";import{u as I}from"./use-page-search.c6b00ede.js";import{a as N}from"./index.6aacd15e.js";import{u as L,c as q}from"./status.b7512d56.js";import{r as F}from"./columnRenderHelper.ea97af9d.js";import{b as j}from"./columns.21f24441.js";import"./tootip.ea18ff9f.js";const y=[{value:"1",label:"\u5165\u5E93"},{value:"2",label:"\u51FA\u5E93"},{value:"3",label:"\u5165\u5E93\u7EA2\u51B2"},{value:"4",label:"\u51FA\u5E93\u7EA2\u51B2"}];y.reduce((u,e)=>({...u,[e.label]:e.value}),{});const U=[{value:"1",label:"\u91C7\u9500\u7ED3\u7B97"},{value:"2",label:"\u975E\u91C7\u9500\u7ED3\u7B97"}];U.reduce((u,e)=>({...u,[e.label]:e.value}),{});const B=[{value:"1",label:"\u5F85\u5904\u7406",type:"warning"},{value:"2",label:"\u5904\u7406\u5B8C\u6210",type:"success"}],G=[{width:40,type:"selection",fixed:"left"},{label:"\u786E\u8BA4\u5355\u7F16\u53F7",prop:"orderCode",width:150},{label:"\u9500\u552E\u4E3B\u5355\u53F7",prop:"cxCode",width:150},{label:"\u4E1A\u52A1\u7C7B\u578B",prop:"type",width:80,cellRenderer({row:u}){return s(n,{size:"small"},{default:()=>{var e;return((e=y.find(t=>t.value==u.type))==null?void 0:e.label)||"--"}})}},{label:"\u72B6\u6001",width:90,cellRenderer({row:u}){var e;return s(n,{size:"small",type:((e=B.find(t=>t.value==u.status))==null?void 0:e.type)||"warning"},{default:()=>{var t;return((t=B.find(p=>p.value==u.status))==null?void 0:t.label)||"--"}})}},{label:"\u5F02\u5E38\u539F\u56E0",width:120,prop:"error_remark"},{label:"\u5E73\u53F0\u8BA2\u5355\u53F7",prop:"poCode",width:100},{label:"\u5E73\u53F0\u7C7B\u578B",width:80,cellRenderer({row:u}){return s(n,{size:"small"},{default:()=>{var e;return((e=L.find(t=>t.value==u.platform_type))==null?void 0:e.label)||"--"}})}},{label:"\u5356\u51FA\u65B9\u516C\u53F8",width:160,...F("seller_code","seller_name","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u53F7\uFF1A")},{label:"\u5BA2\u6237\u516C\u53F8",width:160,...F("buyer_code","buyer_name","\u5BA2\u6237\u516C\u53F8\u7F16\u53F7:")},{label:"\u5546\u54C1\u540D\u79F0",width:160,...F("goodNo","goodName","\u5546\u54C1\u7F16\u53F7:")},{label:"\u5546\u54C1\u7C7B\u578B",width:95,cellRenderer({row:u}){return s(n,{size:"small"},{default:()=>{var e;return((e=q.find(t=>t.value==u.goodType))==null?void 0:e.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:u}){return s(n,{size:"small"},{default:()=>{var e;return((e=j.find(t=>t.value==u.source))==null?void 0:e.label)||"--"}})}},{label:"\u6570\u91CF",prop:"balance_num",width:100},{label:"\u9500\u552E\u5355\u4EF7",prop:"goodPrice",width:100},{label:"\u9500\u552E\u5408\u8BA1",prop:"totalPrice",width:100},{label:"\u51FA\u5E93\u65F6\u95F4",prop:"fz_date",width:100},{label:"\u64CD\u4F5C",fixed:"right",width:50,slot:"operation"}],H={columns:G,permissions:["007"],companyProp:"buyer_code",apis:{httpList:(u={})=>N({...u,channel:"3",status:"1"}),httpAdd:!0}},w={formItems:[{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"}}]},Z=k({__name:"index",props:{visible:{type:Boolean,required:!0},goodType:{type:String,required:!1},source:{type:String,required:!1}},emits:["submit"],setup(u,{emit:e}){const t=u,p=e,r=O(t,"visible"),f=P(),_={pageSearchHook:()=>I(void 0,void 0,w)},o=S([]),A={content:{preview:({id:c})=>f.push("/invoiceInOut/productManagerDetail?id="+c),create:()=>f.push("/invoiceInOut/productManagerDetail")}};function D(){if(o.value.length===0){d.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u8BA2\u5355");return}if([...new Set(o.value.map(({goodNo:l})=>l))].length!==1){d.warning("\u9009\u62E9\u7684\u8BA2\u5355\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u4E00\u81F4");return}const a=[...new Set(o.value.map(({goodType:l})=>l))],m=[...new Set(o.value.map(({source:l})=>l))];if(a.length!==1||m.length!==1){d.warning("\u9009\u62E9\u8BA2\u5355\u7684\u5546\u54C1\u7C7B\u578B\u548C\u5546\u54C1\u6765\u6E90\u5FC5\u987B\u4E00\u81F4");return}if(t.goodType){o.value.some(l=>l.goodType!==t.goodType||l.source!==t.source),d.warning("\u9009\u62E9\u7684\u8BA2\u5355\u5546\u54C1\u7C7B\u578B\u548C\u5546\u54C1\u6765\u6E90\u4E0E\u5DF2\u9009\u62E9\u7684\u8BA2\u5355\u4E0D\u4E00\u81F4");return}r.value=!1,p("submit",o.value)}return(c,a)=>{const m=E("PageContainer"),l=E("ElButton");return h(),g(i(V),{class:"relative",modelValue:i(r),"onUpdate:modelValue":a[1]||(a[1]=C=>R(r)?r.value=C:null),title:"\u9009\u62E9C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355",center:"",top:"10px"},{default:v(()=>[i(r)?(h(),g(m,{key:0,hooks:_,events:A,searchConfig:i(w),contentConfig:i(H),isPageStart:!0,onContentSelectChange:a[0]||(a[0]=C=>o.value=C.map(b=>({...b,child_num:"1",child_id:b.id})))},null,8,["searchConfig","contentConfig"])):T("v-if",!0),z(l,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:D},{default:v(()=>a[2]||(a[2]=[M("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var ee=x(Z,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/components/ChooseOrderModal/index.vue"]]);export{ee as default};