index.a3cfc6.js 8.8 KB

1
  1. import{a7 as P,bq as O,_ as Y,d as Z,j as ee,Q as ue,m as k,aH as D,az as c,V as te,O as oe,r as _,ao as le,o as p,A as F,x as l,f as a,h as u,bm as C,H as i,a as v,bx as R,D as U,bt as $,B as L,c as M}from"./index.js";import{u as ae}from"./use-page-search.dfa27a70.js";import{O as re,o as ne}from"./index.b1d127.js";import{N as ie,n as se}from"./index.6d3d49.js";import{a as de}from"./index.3a2f6f6a.js";import{t as pe,a as N}from"./shared.e8e6f3b6.js";import{u as me}from"./status.b7512d56.js";import{r as S}from"./columnRenderHelper.8411add2.js";import{u as A,w as fe}from"./execl-upload.8692a4ce.js";import{h as Fe,a as Ee,b as ce}from"./index.004a0bb2.js";import{B as Ce}from"./basic-descriptions.e6b0a528.js";import{o as ve}from"./columns.633d859e.js";import{h as Be}from"./index.4109350c.js";import{P as be}from"./index.1ed73e65.js";import{h as Ae}from"./export.d1a777b9.js";import"./index.71c29d4d.js";import"./index.e25db4d1.js";import"./tootip.c6ca5db9.js";import"./columns.74c15f1e.js";const ge=[{type:"selection",width:40},{prop:"id",label:"ID",width:"40px"},{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:s}){return P(O,{size:"small"},{default:()=>{var r;return((r=pe.find(t=>t.value==s.type))==null?void 0:r.label)||"--"}})}},{label:"\u72B6\u6001",width:80,cellRenderer({row:s}){var r;return P(O,{size:"small",type:((r=N.find(t=>t.value==s.status))==null?void 0:r.type)||"warning"},{default:()=>{var t;return((t=N.find(x=>x.value==s.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:s}){return P(O,{size:"small"},{default:()=>{var r;return((r=me.find(t=>t.value==s.platform_type))==null?void 0:r.label)||"--"}})}},{label:"\u9500\u552E\u65B9\u516C\u53F8",width:160,...S("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7F16\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,...S("buyer_code","buyer_name","\u8D2D\u4E70\u65B9\u516C\u53F8\u7F16\u53F7:")},{label:"\u5546\u54C1\u540D\u79F0",width:160,...S("goodNo","goodName","\u5546\u54C1\u7F16\u53F7:")},{label:"\u4E0B\u5355\u6570\u91CF",prop:"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"}],ye={columns:ge,title:"\u5546\u54C1\u7BA1\u7406",companyProp:"seller_code",permissions:["007"],apis:{httpList:(s={})=>de({...s,channel:[3]}),httpAdd:!0}},j={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:"orderCode",placeholder:"\u9500\u552E\u5355\u7F16\u53F7",type:"input"},{field:"goodNo",placeholder:"\u8BA2\u5355\u5546\u54C1\u7F16\u53F7",type:"input"},{field:"status",placeholder:"\u72B6\u6001",options:N,type:"select"}]},we={style:{overflow:"hidden","margin-bottom":"30px"}},he="inOutManager",ke=Z({__name:"index",setup(s){const r=ee(),t=ue({orderImportVisible:!1,notOrderImportVisible:!1,detailVisible:!1,productVisible:!1}),x={pageSearchHook:()=>ae(void 0,void 0,j)},g=k(),m=D(),y=D(),n=k(null),f=k([]),H=D({success(){c.success("\u5220\u9664\u6210\u529F"),n==null||n.value.onSearch(!0)}}),q=D({success(){c.success("\u53D6\u6D88\u6210\u529F"),n==null||n.value.onSearch(!0)}}),{isSuperUser:w}=te(),G={content:{create:()=>r.push("/invoiceInOut/clinetCDetail"),preview:({id:d})=>{t.detailVisible=!0,m.run(Fe({id:d}))}}},{getCurrentLicense:T,currentCompany:Q}=oe();function z(d=!1){const e=d?ne:se,E=d?"\u51FA\u5E93\u6A21\u677F-\u8BA2\u5355\u5546\u54C1(C\u7AEF\u8BA2\u5355).xlsx":"\u51FA\u5E93\u6A21\u677F-\u975E\u8BA2\u5355\u5546\u54C1(C\u7AEF\u8BA2\u5355).xlsx",B=A.book_new(),I=A.json_to_sheet(e),h=A.json_to_sheet([{\u8BA2\u5355\u9500\u552E\u65B9\u7EB3\u7A0E\u53F7:T(),\u8BA2\u5355\u9500\u552E\u65B9\u516C\u53F8\u540D\u79F0:Q.value.companyName}]);A.book_append_sheet(B,I,"sheet1"),A.book_append_sheet(B,h,"sheet2"),fe(B,E,{bookType:"xlsx"})}function J(){if(f.value.length===0){c.warning('\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u72B6\u6001\u4E3A "\u5F85\u5BA1\u6838" \u6216 "\u5F02\u5E38" \u7684\u6570\u636E');return}if(f.value.some(({status:e})=>e!="1"&&e!="4")){c.warning('\u53EA\u80FD\u9009\u62E9\u72B6\u6001\u4E3A "\u5F85\u5BA1\u6838" \u6216 "\u5F02\u5E38" \u7684\u6570\u636E');return}H.run(Ee({id:f.value.map(({id:e})=>e)}))}function K(){if(f.value.length===0){c.warning('\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u72B6\u6001\u4E3A "\u6B63\u5E38" \u6216 "\u8BA1\u63D0" \u7684\u6570\u636E');return}if(f.value.some(({status:e})=>e!="2"&&e!="3")){c.warning('\u53EA\u80FD\u9009\u62E9\u72B6\u6001\u4E3A "\u6B63\u5E38" \u6216 "\u8BA1\u63D0" \u7684\u6570\u636E');return}q.run(ce({type:"1",item_ids:f.value.map(({id:e})=>e),remark:""}))}function W(d,e){t.productVisible=!0,g.value=e,y.run(Be({id:d}))}const V=k(!1);async function X(){await Ae({url:"/cxinv/FinancialManager/export",name:"C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93",onStart:()=>V.value=!0,onSuccess:()=>V.value=!1,onFail:()=>V.value=!1,params:{type:["2","4"],channel:["3"],inv_seller_code:T(),...n.value.getBasicParams()}})}return(d,e)=>{const E=_("ElDropdownItem"),B=_("PageContainer"),I=_("PageAuth"),h=le("loading");return p(),F(I,{pageName:he},{default:l(()=>[a(B,{hooks:x,events:G,searchConfig:u(j),contentConfig:u(ye),"get-content-ref":o=>n.value=o,onContentSelectChange:e[5]||(e[5]=o=>f.value=o)},{content_header:l(()=>[a(u(C),{size:"small",type:"primary",onClick:X},{default:l(()=>e[12]||(e[12]=[i(" \u5BFC\u51FA ")])),_:1}),u(w)?v("v-if",!0):(p(),F(u(C),{key:0,size:"small",type:"primary",onClick:K},{default:l(()=>e[13]||(e[13]=[i(" \u6279\u91CF\u53D6\u6D88 ")])),_:1})),u(w)?v("v-if",!0):(p(),F(u(C),{key:1,style:{"margin-right":"10px"},size:"small",type:"danger",onClick:J},{default:l(()=>e[14]||(e[14]=[i(" \u6279\u91CF\u5220\u9664 ")])),_:1})),u(w)?v("v-if",!0):(p(),F(u(R),{key:2},{dropdown:l(()=>[a(E,{onClick:e[0]||(e[0]=o=>t.orderImportVisible=!0)},{default:l(()=>e[16]||(e[16]=[i("\u8BA2\u5355\u5BFC\u5165")])),_:1}),a(E,{onClick:e[1]||(e[1]=o=>t.notOrderImportVisible=!0)},{default:l(()=>e[17]||(e[17]=[i("\u975E\u8BA2\u5355\u5BFC\u5165")])),_:1})]),default:l(()=>[a(u(C),{size:"small",type:"primary",style:{"margin-right":"10px","margin-top":"1px"},icon:u(U)("arrow-up-line")},{default:l(()=>e[15]||(e[15]=[i("\u51FA\u5E93\u6570\u636E\u5BFC\u5165(C\u7AEF\u8BA2\u5355) ")])),_:1},8,["icon"])]),_:1})),a(u(R),null,{dropdown:l(()=>[a(E,{onClick:e[2]||(e[2]=o=>z(!0))},{default:l(()=>e[19]||(e[19]=[i("\u8BA2\u5355\u5BFC\u5165")])),_:1}),a(E,{onClick:e[3]||(e[3]=o=>z(!1))},{default:l(()=>e[20]||(e[20]=[i("\u975E\u8BA2\u5355\u5BFC\u5165")])),_:1})]),default:l(()=>[a(u(C),{size:"small",style:{"margin-right":"10px","margin-top":"1px"},icon:u(U)("arrow-down-line")},{default:l(()=>e[18]||(e[18]=[i(" \u51FA\u5E93\u6A21\u677F\u4E0B\u8F7D(C\u7AEF\u8BA2\u5355) ")])),_:1},8,["icon"])]),_:1}),u(w)?v("v-if",!0):(p(),F(u(C),{key:3,size:"small",type:"primary",onClick:e[4]||(e[4]=o=>u(r).push("/invoiceInOut/clinetCDetail"))},{default:l(()=>e[21]||(e[21]=[i(" \u6279\u91CF\u5904\u7406 ")])),_:1}))]),_:1},8,["searchConfig","contentConfig","get-content-ref"]),a(re,{visible:t.orderImportVisible,"onUpdate:visible":e[6]||(e[6]=o=>t.orderImportVisible=o),onRefresh:e[7]||(e[7]=o=>{var b;return(b=n.value)==null?void 0:b.onSearch()})},null,8,["visible"]),a(ie,{visible:t.notOrderImportVisible,"onUpdate:visible":e[8]||(e[8]=o=>t.notOrderImportVisible=o),onRefresh:e[9]||(e[9]=o=>{var b;return(b=n.value)==null?void 0:b.onSearch()})},null,8,["visible"]),a(u($),{modelValue:t.detailVisible,"onUpdate:modelValue":e[10]||(e[10]=o=>t.detailVisible=o),title:"C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93\u8BE6\u60C5",center:""},{default:l(()=>[L((p(),M("div",we,[u(m).data?(p(),F(u(Ce),{key:0,columns:u(ve)(W,u(m).data.ProductRela.length!==0),data:u(m).data},null,8,["columns","data"])):v("v-if",!0)])),[[h,u(m).loading]])]),_:1},8,["modelValue"]),a(u($),{center:"",title:"\u5546\u54C1\u8BE6\u60C5",modelValue:t.productVisible,"onUpdate:modelValue":e[11]||(e[11]=o=>t.productVisible=o),style:{overflow:"hidden"},"append-to-body":!0},{default:l(()=>[L((p(),M("div",null,[u(y).data?(p(),F(be,{key:0,style:{overflow:"hidden"},data:u(y).data,num:u(m).data.ProductRela[g.value].num,time:u(m).data.ProductRela[g.value].create_time,name:u(m).data.ProductRela[g.value].apply_name},null,8,["data","num","time","name"])):v("v-if",!0)])),[[h,u(y).loading]])]),_:1},8,["modelValue"])]),_:1})}}});var Ge=Y(ke,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/index.vue"]]);export{Ge as default};