index.9c612d.js 4.4 KB

1
  1. import{a7 as l,bq as n,_ as S,d as I,j as N,m as _,V as O,r as p,o as b,A as g,x as i,f as d,h as c,H as F,a as R}from"./index.js";import{u as z}from"./use-page-search.dfa27a70.js";import{h as M,d as T}from"./index.0d3e4f3d.js";import{c as U,a as f,g as L}from"./status.b7512d56.js";import{g as w,b as E}from"./columns.74c15f1e.js";import{r as B}from"./columnRenderHelper.8411add2.js";import{B as V,p as j}from"./index.beb5ed.js";import{u as m,w as H}from"./execl-upload.8692a4ce.js";import"./tootip.c6ca5db9.js";import"./index.004a0bb2.js";import"./index.71c29d4d.js";import"./index.e25db4d1.js";import"./shared.129caa24.js";const $=[{label:"ID",prop:"id",width:80},{label:"\u5546\u54C1\u7F16\u7801",prop:"skuCode",width:150},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:150},{label:"\u5546\u54C1\u7C7B\u578B",width:100,cellRenderer({row:o}){return l(n,{size:"small"},{default:()=>{var e;return((e=U.find(t=>t.value==o.good_type))==null?void 0:e.label)||"--"}})}},{label:"\u7ED3\u5B58\u6570",prop:"residue_stock",width:80},{label:"\u72B6\u6001",prop:"status",width:60,cellRenderer({row:o}){var e;return l(n,{size:"small",type:((e=f.find(t=>t.value==o.status))==null?void 0:e.type)||"warning"},{default:()=>{var t;return((t=f.find(r=>r.value==o.status))==null?void 0:t.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:o}){return l(n,{size:"small"},{default:()=>{var e;return((e=w.find(t=>t.value==o.good_source))==null?void 0:e.label)||"--"}})}},{label:"\u6210\u672C\u72B6\u6001",width:75,cellRenderer({row:o}){return l(n,{size:"small"},{default:()=>{var e;return((e=E.find(t=>t.value==o.basic_status))==null?void 0:e.label)||"--"}})}},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"subunit_price",width:100},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"unit_price",width:100},{label:"\u5355\u4F4D",prop:"unit",width:42},{label:"\u89C4\u683C",prop:"spec",width:80},{label:"\u91CD\u91CF",prop:"unit_weight",width:80},{label:"\u9500\u552E\u65B9\u516C\u53F8",width:160,...B("seller_code","seller_name","\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u8D2D\u4E70\u65B9\u516C\u53F8",width:160,...B("buyer_code","buyer_name","\u8D2D\u4E70\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time",width:140},{label:"\u64CD\u4F5C",fixed:"right",width:70,slot:"operation"}],q={columns:$,title:"\u5546\u54C1\u7BA1\u7406",permissions:["003","004","007"],companyProp:"buyer_code",superUserNoAction:!0,apis:{httpList:M,httpStatus:T,httpAdd:!0}},v={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:"good_type",type:"select",options:L,placeholder:"\u5546\u54C1\u7C7B\u578B"},{type:"select",placeholder:"\u6210\u672C\u7C7B\u578B",field:"basic_status",options:E},{type:"select",placeholder:"\u5546\u54C1\u6765\u6E90",field:"good_source",options:w},{field:"skuCode",type:"input",placeholder:"\u5546\u54C1\u7F16\u7801"},{field:"status",type:"select",options:f,placeholder:"\u72B6\u6001"}]},G="productManager",J=I({__name:"index",setup(o){const e=N(),t=_(!1),r=_(null),{isSuperUser:y}=O(),k={pageSearchHook:()=>z(void 0,void 0,v)};function A(){const a=m.book_new(),u=m.json_to_sheet(j);m.book_append_sheet(a,u,"sheet1"),H(a,"\u5546\u54C1\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}const D={content:{preview:({id:a})=>e.push("/invoiceInOut/productManagerDetail?id="+a),create:()=>e.push("/invoiceInOut/productManagerDetail")}};return(a,u)=>{const C=p("ElButton"),x=p("PageContainer"),P=p("PageAuth");return b(),g(P,{pageName:G},{default:i(()=>[d(x,{hooks:k,events:D,searchConfig:c(v),contentConfig:c(q),"get-content-ref":s=>r.value=s},{content_header:i(()=>[c(y)?R("v-if",!0):(b(),g(C,{key:0,size:"small",type:"primary",onClick:u[0]||(u[0]=s=>t.value=!0)},{default:i(()=>u[3]||(u[3]=[F("\u6279\u91CF\u521B\u5EFA")])),_:1})),d(C,{size:"small",onClick:A},{default:i(()=>u[4]||(u[4]=[F("\u6A21\u677F\u4E0B\u8F7D")])),_:1})]),_:1},8,["searchConfig","contentConfig","get-content-ref"]),d(V,{visible:t.value,"onUpdate:visible":u[1]||(u[1]=s=>t.value=s),onRefresh:u[2]||(u[2]=s=>{var h;return(h=r.value)==null?void 0:h.onSearch()})},null,8,["visible"])]),_:1})}}});var le=S(J,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/productManager/index.vue"]]);export{le as default};