index.bba794.js 5.9 KB

1
  1. import{ac as v,aZ as B,_,d as R,n as $,W as M,w as x,aY as U,az as w,a4 as L,r as A,o as g,G as c,C as o,j as l,l as r,b2 as I,M as i,aR as C,J as O,a as N}from"./index.js";import{u as j}from"./use-page-search.25684bb5.js";import{O as G,o as H}from"./index.514c52.js";import{N as J,n as W}from"./index.4a3473.js";import{a as Y}from"./index.a90a6537.js";import{t as Z,a as P}from"./shared.98a4b50b.js";import{u as q}from"./status.b7512d56.js";import{r as y}from"./columnRenderHelper.eaa2d7d7.js";import{u as k,w as K}from"./execl-upload.80c3b163.js";import{a as Q}from"./index.90a91da8.js";const X=[{type:"selection",width:40},{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 v(B,{size:"small"},{default:()=>{var n;return((n=Z.find(u=>u.value==s.type))==null?void 0:n.label)||"--"}})}},{label:"\u72B6\u6001",width:80,cellRenderer({row:s}){var n;return v(B,{size:"small",type:((n=P.find(u=>u.value==s.status))==null?void 0:n.type)||"warning"},{default:()=>{var u;return((u=P.find(E=>E.value==s.status))==null?void 0:u.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 v(B,{size:"small"},{default:()=>{var n;return((n=q.find(u=>u.value==s.platform_type))==null?void 0:n.label)||"--"}})}},{label:"\u9500\u552E\u65B9\u516C\u53F8",width:160,...y("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7F16\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,...y("buyer_code","buyer_name","\u8D2D\u4E70\u65B9\u516C\u53F8\u7F16\u53F7:")},{label:"\u5546\u54C1\u540D\u79F0",width:160,...y("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"}],ee={columns:X,title:"\u5546\u54C1\u7BA1\u7406",permissions:["007"],apis:{httpList:(s={})=>Y({...s,channel:[3]}),httpAdd:!0}},S={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"}},{field:"orderCode",placeholder:"\u9500\u552E\u5355\u7F16\u53F7",type:"input"},{field:"goodNo",placeholder:"\u8BA2\u5355\u5546\u54C1\u7F16\u53F7",type:"input"}]},ue="inOutManager",te=R({__name:"index",setup(s){const n=$(),u=M({orderImportVisible:!1,notOrderImportVisible:!1}),E={pageSearchHook:()=>j(void 0,void 0,S)},a=x(null),F=x([]),V=U({success(){w.success("\u53D6\u6D88\u6210\u529F"),a==null||a.value.onSearch()}}),{isSuperUser:D}=L(),z={content:{create:()=>n.push("/invoiceInOut/clinetCDetail"),preview:({id:p})=>n.push("/invoiceInOut/clinetCDetail?id="+p)}};function h(p=!1){const e=p?H:W,d=p?"C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93\u6A21\u677F.xlsx":"C\u7AEF\u65E0\u53D1\u7968\u975E\u8BA2\u5355\u51FA\u5E93\u6A21\u677F.xlsx",f=k.book_new(),b=k.json_to_sheet(e);k.book_append_sheet(f,b,"sheet"),K(f,d,{bookType:"xlsx"})}function T(){if(F.value.length===0){w.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")){w.warning('\u53EA\u80FD\u9009\u62E9\u72B6\u6001\u4E3A "\u5F85\u5BA1\u6838" \u6216 "\u5F02\u5E38" \u7684\u6570\u636E');return}V.run(Q({id:F.value.map(({id:e})=>e)}))}return(p,e)=>{const d=A("ElDropdownItem"),f=A("PageContainer"),b=A("PageAuth");return g(),c(b,{pageName:ue},{default:o(()=>[l(f,{hooks:E,events:z,searchConfig:r(S),contentConfig:r(ee),"get-content-ref":t=>a.value=t,onContentSelectChange:e[5]||(e[5]=t=>F.value=t)},{content_header:o(()=>[l(r(I),null,{dropdown:o(()=>[l(d,{onClick:e[0]||(e[0]=t=>u.orderImportVisible=!0)},{default:o(()=>e[11]||(e[11]=[i("\u8BA2\u5355\u5BFC\u5165")])),_:1}),l(d,{onClick:e[1]||(e[1]=t=>u.notOrderImportVisible=!0)},{default:o(()=>e[12]||(e[12]=[i("\u975E\u8BA2\u5355\u5BFC\u5165")])),_:1})]),default:o(()=>[r(D)?N("v-if",!0):(g(),c(r(C),{key:0,size:"small",type:"primary",style:{"margin-right":"10px","margin-top":"1px"},icon:r(O)("arrow-up-line")},{default:o(()=>e[10]||(e[10]=[i("C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93\u5BFC\u5165 ")])),_:1},8,["icon"]))]),_:1}),l(r(I),null,{dropdown:o(()=>[l(d,{onClick:e[2]||(e[2]=t=>h(!0))},{default:o(()=>e[14]||(e[14]=[i("\u8BA2\u5355\u5BFC\u5165")])),_:1}),l(d,{onClick:e[3]||(e[3]=t=>h(!1))},{default:o(()=>e[15]||(e[15]=[i("\u975E\u8BA2\u5355\u5BFC\u5165")])),_:1})]),default:o(()=>[l(r(C),{size:"small",style:{"margin-right":"10px","margin-top":"1px"},icon:r(O)("arrow-down-line")},{default:o(()=>e[13]||(e[13]=[i(" C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93\u6A21\u677F ")])),_:1},8,["icon"])]),_:1}),l(r(C),{size:"small",type:"primary",onClick:T},{default:o(()=>e[16]||(e[16]=[i("\u6279\u91CF\u53D6\u6D88")])),_:1}),r(D)?N("v-if",!0):(g(),c(r(C),{key:0,size:"small",type:"primary",onClick:e[4]||(e[4]=t=>r(n).push("/invoiceInOut/clinetCDetail"))},{default:o(()=>e[17]||(e[17]=[i(" \u6279\u91CF\u5904\u7406 ")])),_:1}))]),_:1},8,["searchConfig","contentConfig","get-content-ref"]),l(G,{visible:u.orderImportVisible,"onUpdate:visible":e[6]||(e[6]=t=>u.orderImportVisible=t),onRefresh:e[7]||(e[7]=t=>{var m;return(m=a.value)==null?void 0:m.onSearch()})},null,8,["visible"]),l(J,{visible:u.notOrderImportVisible,"onUpdate:visible":e[8]||(e[8]=t=>u.notOrderImportVisible=t),onRefresh:e[9]||(e[9]=t=>{var m;return(m=a.value)==null?void 0:m.onSearch()})},null,8,["visible"])]),_:1})}}});var Fe=_(te,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/index.vue"]]);export{Fe as default};