index.f9cde5.js 8.1 KB

1
  1. import{ac as b,aZ as f,_ as M,d as z,n as T,W as $,w as g,aY as U,az as D,a4 as L,r as d,o as y,G as x,C as o,j as n,l as F,M as a,J as k,a as j}from"./index.js";import{u as q}from"./use-page-search.c6b00ede.js";import{N as G,n as H}from"./index.56252d.js";import{O as J,o as W}from"./index.4df499.js";import{d as Y,a as Z}from"./index.61485ef8.js";import{t as K,s as Q,a as B}from"./shared.c745d8d9.js";import{x as X}from"./status.b7512d56.js";import{r as C}from"./columnRenderHelper.ea97af9d.js";import{u as _,w as uu}from"./execl-upload.359c6423.js";import"./index.6716434d.js";import"./index.214c1f62.js";const eu=[{type:"selection",width:40},{prop:"id",label:"ID",width:"40px"},{label:"\u4E1A\u52A1\u7F16\u53F7",prop:"invoiceCode",width:150},{label:"\u7C7B\u578B",width:80,cellRenderer({row:e}){return b(f,{type:"primary",size:"small"},{default:()=>{var l;return(l=K.find(t=>t.value==e.type))==null?void 0:l.label}})}},{label:"\u6570\u636E\u6765\u6E90",width:90,cellRenderer({row:e}){return b(f,{type:"primary",size:"small"},{default:()=>{var l;return(l=Q.find(t=>t.value==e.source))==null?void 0:l.label}})}},{label:"\u72B6\u6001",width:90,cellRenderer({row:e}){var l;return b(f,{type:(l=B.find(t=>t.value==e.status))==null?void 0:l.type,size:"small"},{default:()=>{var t;return(t=B.find(v=>v.value==e.status))==null?void 0:t.label}})}},{label:"\u5F02\u5E38\u539F\u56E0",width:120,prop:"error_remark"},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:150,...C("buyer_code","buyer_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u9500\u552E\u65B9\u516C\u53F8",prop:"seller_code",width:150,...C("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8BA2\u5355\u7F16\u53F7",prop:"orderCode",width:160},{label:"\u8BA2\u5355\u4E3B\u7F16\u53F7",prop:"cxCode",width:160},{label:"\u5546\u54C1\u7F16\u53F7",prop:"goodNo",width:120},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:120},{label:"\u5355\u4F4D",prop:"unit",width:60},{label:"\u5546\u54C1\u6570\u91CF",prop:"num",width:100},{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice",width:100},{label:"\u8BA2\u5355\u603B\u91D1\u989D",prop:"totalPrice",width:120},{label:"\u7A0E\u76EE",prop:"cat_code",width:120},{label:"\u7A0E\u7387",width:60,cellRenderer({row:e}){return e.tax+"%"}},{label:"\u5173\u8054\u91D1\u989D",prop:"inv_fee",width:120},{label:"\u53D1\u7968\u8D2D\u4E70\u65B9\u516C\u53F8",width:120,...C("inv_buyer_code","inv_buyer_name","\u8D2D\u4E70\u65B9\u516C\u53F8\u540D\u79F0\u7EB3\u7A0E\u53F7:")},{label:"\u53D1\u7968\u9500\u552E\u65B9\u516C\u53F8",width:180,...C("inv_seller_code","inv_seller_name","\u53D1\u7968\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u53D1\u7968\u53F7\u7801",prop:"inv_number",width:100},{label:"\u53D1\u7968\u7C7B\u578B",width:180,cellRenderer({row:e}){var l;return(l=X.find(t=>t.value===e.inv_type))==null?void 0:l.label}},{label:"\u53D1\u7968\u660E\u7EC6ID",prop:"inv_item_id",width:100},{label:"\u8D27\u7269\u6216\u5E94\u7A0E\u52B3\u52A1\u3001\u670D\u52A1\u540D\u79F0",prop:"inv_good_name",width:170},{label:"\u7C7B\u76EE\u7F16\u53F7",prop:"cat_code",width:100},{label:"\u89C4\u683C\u578B\u53F7",prop:"inv_spec",width:80},{label:"\u53D1\u7968\u5546\u54C1\u5355\u4F4D",prop:"inv_unit",width:100},{label:"\u53D1\u7968\u5546\u54C1\u6570\u91CF",prop:"inv_num",width:100},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"inv_subprice",width:100},{label:"\u7A0E\u524D\u603B\u4EF7",prop:"inv_subtotal",width:100},{label:"\u53D1\u7968\u7A0E\u7387",prop:"inv_tax",width:80},{label:"\u53D1\u7968\u7A0E\u989D",prop:"inv_tax_total",width:80},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"inv_price",width:100},{label:"\u7A0E\u540E\u603B\u989D",prop:"inv_total",width:100},{label:"\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001",width:100,cellRenderer({row:e}){return b(f,{size:"small",type:e.cat_diff=="0"?"danger":"success"},{default:()=>e.cat_diff=="0"?"\u4E0D\u4E00\u81F4":"\u4E00\u81F4"})}},{label:"\u7A0E\u7387\u72B6\u6001",prop:"TODO",width:100,cellRenderer({row:e}){return b(f,{size:"small",type:e.tax_diff=="0"?"danger":"success"},{default:()=>e.tax_diff=="0"?"\u4E0D\u4E00\u81F4":"\u4E00\u81F4"})}},{label:"\u5907\u6CE8",prop:"remark",width:100},{label:"\u5173\u8054\u5546\u54C1ID",prop:"goodNo",width:80,cellRenderer({row:e}){return e.ProductRela.length===0?null:e.ProductRela[0].id}},{label:"\u5173\u8054\u5546\u54C1\u540D\u79F0",prop:"goodName",width:100,cellRenderer({row:e}){return e.ProductRela.length===0?null:e.ProductRela[0].goodName}},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name",width:"100px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time",width:"140px"},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],tu={columns:eu,title:"\u5546\u54C1\u7BA1\u7406",permissions:["007"],companyProp:"inv_seller_code",apis:{httpList:(e={})=>Y({...e,channel:[1,2],type:[2,4]}),httpAdd:!0}},O={formItems:[{field:"inv_buyer_code",type:"inv-in-query",placeholder:"\u53D1\u7968\u8D2D\u4E70\u65B9\u516C\u53F8"},{field:"status",placeholder:"\u72B6\u6001",options:B,type:"select"}]},ou="inOutManager",lu=z({__name:"index",setup(e){const l=T(),t=$({orderImportVisible:!1,notOrderImportVisible:!1}),v={pageSearchHook:()=>q(void 0,void 0,O)},s=g(null),I=U({success(){D.success("\u53D6\u6D88\u6210\u529F"),s==null||s.value.onSearch()}}),{isSuperUser:R}=L(),c=g([]),N={content:{create:()=>l.push("/invoiceInOut/outManagerDetail"),preview:({id:p})=>l.push("/invoiceInOut/outManagerDetail?id="+p)}};function h(p="notOrder"){const u=p==="notOrder"?H:W,m=p==="notOrder"?"\u51FA\u5E93\u6A21\u677F-\u975E\u8BA2\u5355\u5546\u54C1.xlsx":"\u51FA\u5E93\u6A21\u677F-\u8BA2\u5355\u5546\u54C1.xlsx",i=_.book_new(),w=_.json_to_sheet(u);_.book_append_sheet(i,w,"sheet"),uu(i,m,{bookType:"xlsx"})}function P(){if(c.value.length===0){D.warning('\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u72B6\u6001\u4E3A "\u5F85\u5BA1\u6838" \u6216 "\u5F02\u5E38" \u7684\u6570\u636E');return}if(c.value.some(({status:u})=>u!="1"&&u!="4")){D.warning('\u53EA\u80FD\u9009\u62E9\u72B6\u6001\u4E3A "\u5F85\u5BA1\u6838" \u6216 "\u5F02\u5E38" \u7684\u6570\u636E');return}I.run(Z({id:c.value.map(({id:u})=>u)}))}return(p,u)=>{const m=d("ElButton"),i=d("ElDropdownItem"),w=d("ElDropdownMenu"),A=d("ElDropdown"),S=d("PageContainer"),V=d("PageAuth");return y(),x(V,{pageName:ou},{default:o(()=>[n(S,{hooks:v,events:N,searchConfig:F(O),contentConfig:F(tu),onContentSelectChange:u[4]||(u[4]=r=>c.value=r),"get-content-ref":r=>s.value=r},{content_header:o(()=>[n(m,{style:{"margin-right":"10px"},size:"small",type:"primary",onClick:P},{default:o(()=>u[9]||(u[9]=[a("\u6279\u91CF\u53D6\u6D88")])),_:1}),F(R)?j("v-if",!0):(y(),x(A,{key:0},{dropdown:o(()=>[n(w,null,{default:o(()=>[n(i,{onClick:u[0]||(u[0]=r=>t.orderImportVisible=!0)},{default:o(()=>u[11]||(u[11]=[a("\u8BA2\u5355\u5546\u54C1")])),_:1}),n(i,{onClick:u[1]||(u[1]=r=>t.notOrderImportVisible=!0)},{default:o(()=>u[12]||(u[12]=[a("\u975E\u8BA2\u5355\u5546\u54C1")])),_:1})]),_:1})]),default:o(()=>[n(m,{size:"small",type:"primary",style:{"margin-right":"10px","margin-top":"1px"},icon:F(k)("arrow-up-line")},{default:o(()=>u[10]||(u[10]=[a("\u51FA\u5E93\u6570\u636E\u5BFC\u5165 ")])),_:1},8,["icon"])]),_:1})),n(A,null,{dropdown:o(()=>[n(w,null,{default:o(()=>[n(i,{onClick:u[2]||(u[2]=r=>h("order"))},{default:o(()=>u[14]||(u[14]=[a("\u8BA2\u5355\u5546\u54C1")])),_:1}),n(i,{onClick:u[3]||(u[3]=r=>h("notOrder"))},{default:o(()=>u[15]||(u[15]=[a("\u975E\u8BA2\u5355\u5546\u54C1")])),_:1})]),_:1})]),default:o(()=>[n(m,{size:"small",style:{"margin-right":"10px","margin-top":"1px"},icon:F(k)("arrow-down-line")},{default:o(()=>u[13]||(u[13]=[a(" \u51FA\u5E93\u6A21\u677F\u4E0B\u8F7D")])),_:1},8,["icon"])]),_:1})]),_:1},8,["searchConfig","contentConfig","get-content-ref"]),n(J,{visible:t.orderImportVisible,"onUpdate:visible":u[5]||(u[5]=r=>t.orderImportVisible=r),onRefresh:u[6]||(u[6]=r=>{var E;return(E=s.value)==null?void 0:E.onSearch()})},null,8,["visible"]),n(G,{visible:t.notOrderImportVisible,"onUpdate:visible":u[7]||(u[7]=r=>t.notOrderImportVisible=r),onRefresh:u[8]||(u[8]=r=>{var E;return(E=s.value)==null?void 0:E.onSearch()})},null,8,["visible"])]),_:1})}}});var Fu=M(lu,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/outManager/index.vue"]]);export{Fu as default};