1 |
- import{aj as w,aL as A,ah as N,aM as P,_ as I,d as M,E as _,bo as T,A as U,ai as V,x as Y,o as m,c as j,y as l,K as i,b as L,u as e,bp as O,bq as q,N as F,R as h,a as B,bw as z,W as g,aS as G}from"./index.743f0c80.js";import{u as H}from"./use-page-search.a895acdb.js";import{a as v}from"./configs.5457d001.js";import{c as W}from"./index.86c5ab98.js";import K from"./index.1c988ebd.js";import{t as J}from"./xls-template.99c8f1f0.js";import{u as C,w as Q}from"./xlsx.ed122d16.js";import"./configs.da7a34da.js";import"./execl-upload.acc3acaa.js";const E={formItems:[{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"spuCode",label:"\u5546\u54C1\u7F16\u7801"},{value:"good_name",label:"\u5546\u54C1\u540D\u79F0"},{value:"supplierNo",label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7"},{value:"creater",label:"\u521B\u5EFA\u4EBA"}]}},{field:"status",type:"select",placeholder:"\u5173\u8054\u72B6\u6001",options:v}]};function X(o){const t=o.split(",");return w(P,{src:t[0],previewTeleported:!0,previewSrcList:[t[0]],style:{height:"20px",width:"20px"}})}const Z=[{type:"selection",width:55},{label:"\u5546\u54C1\u7F16\u7801",prop:"spuCode",width:185},{label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7",prop:"supplierNo",width:175},{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",width:175},{label:"\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",prop:"companyNo",width:175},{label:"\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",width:195},{label:"\u5546\u54C1\u540D\u79F0",prop:"good_name",width:195},{label:"\u4E3B\u56FE",prop:"good_img",width:55,cellRenderer:({row:o})=>X(o.good_img)},{label:"\u7C7B\u76EE\u540D\u79F0",width:120,prop:"inv_cat_name"},{label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0",prop:"inv_good_name",width:165},{label:"\u72B6\u6001",prop:"status",width:85,cellRenderer:({row:o})=>w(A,null,{default:()=>{var t;return(t=v.find(r=>r.value===String(o.status)))==null?void 0:t.label}})},{label:"\u589E\u503C\u7A0E\u7BA1\u7406\u5185\u5BB9",prop:"addTax",width:"140px"},{label:"\u521B\u5EFA\u4EBA",width:80,prop:"creater"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:140,formatter:({addtime:o})=>N(o).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],$={title:"\u9500\u552E\u6210\u672C\u7C7B\u76EE\u8BBE\u7F6E",superUserNoPerview:!0,columns:Z,apis:{httpList:W}};const ee={class:"main role"},ue={"w-full":""},oe=g("\u4E0B\u8F7D\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F"),te=g("\u6279\u91CF\u5BFC\u5165\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C"),ae=M({__name:"index",setup(o){const t=_(null),{permissions:r,hasPermissionWithCode:p}=T("commodityCost"),d=_([]),{pageContentRef:f,handleResetClick:b,handleSearchClick:y}=H(void 0,void 0,E),{push:k}=U(),{isSuperUser:x}=V();function S(a){k({path:"/InvoiceSaleSettings/commodityCostDetail",query:{id:a}})}function D(){if(d.value.length===0){G.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const a=[];d.value.forEach(({spuCode:s,good_name:R})=>{const c={...J};c.\u5546\u54C1\u7F16\u53F7=s,c.\u5F00\u7968\u5546\u54C1\u540D\u79F0=R,a.push(c)});const u=C.book_new(),n=C.json_to_sheet(a);C.book_append_sheet(u,n,"sheet"),Q(u,"\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(a,u)=>{const n=Y("ElButton");return m(),j("div",ee,[l(z,{"is-show":e(p)("001")},{default:i(()=>[L("div",ue,[l(e(O),{"form-config":e(E),onSearchBtnClick:e(y),onResetBtnClick:e(b)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),l(e(q),{ref_key:"pageContentRef",ref:f,powers:e(r),"content-config":e($),onPreviewBtnClick:u[2]||(u[2]=({spuCode:s})=>S(s)),onSelectionChange:u[3]||(u[3]=s=>d.value=s)},{header:i(()=>[e(p)("036")?(m(),F(n,{key:0,size:"small",icon:e(h)("arrow-down-line"),onClick:u[0]||(u[0]=()=>D())},{default:i(()=>[oe]),_:1},8,["icon"])):B("v-if",!0),e(p)("037")&&!e(x)?(m(),F(n,{key:1,size:"small",icon:e(h)("arrow-up-line"),onClick:u[1]||(u[1]=()=>t.value.onDisplay())},{default:i(()=>[te]),_:1},8,["icon"])):B("v-if",!0)]),_:1},8,["powers","content-config"]),l(K,{ref_key:"execlUploadModalRef",ref:t,onOnSuccess:u[4]||(u[4]=()=>e(f).onSearch())},null,512)])]),_:1},8,["is-show"])])}}});var Ce=I(ae,[["__scopeId","data-v-0fa4429b"],["__file","D:/work/accout-vue3-ui/src/views/InvoiceSaleSettings/commodityCost/index.vue"]]);export{Ce as default};
|