1 |
- import{al as x,aS as M,ae as P,aT as U,_ as j,d as L,w as g,aL as Y,n as z,ah as O,r as V,o as d,c as G,l as c,C as i,b as H,u,bt as W,bu as q,G as m,J as E,M as _,a as F,by as J,aY as $}from"./index.42bf163d.js";import{u as K}from"./use-page-search.d97bdd00.js";import{a as b}from"./configs.1bcf4051.js";import{h as Q}from"./index.eb3ec781.js";import{r as y}from"./columnRenderHelper.3490fdb2.js";import X from"./index.c3a0b868.js";import Z from"./index.3091b560.js";import{p as uu,t as eu}from"./xls-template.f8409f43.js";import{u as v,w as ou}from"./xlsx.ed122d16.js";import"./tootip.bb80052f.js";import"./execl-upload.e1817bbd.js";import"./index.a3e78a40.js";const k={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:"companyNo",label:"\u4E70\u65B9\u516C\u53F8\u7F16\u7801"},{value:"creater",label:"\u521B\u5EFA\u4EBA"}]}},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:b}]};function tu(n){const a=n.split(",");return x(U,{src:a[0],previewTeleported:!0,previewSrcList:[a[0]],style:{height:"20px",width:"20px"}})}const nu=[{type:"selection",width:40,align:"center"},{label:"\u5546\u54C1\u7F16\u7801",prop:"spuCode",width:150},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:175,...y("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:195,...y("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u5546\u54C1\u540D\u79F0",prop:"good_name",minWidth:195},{label:"\u4E3B\u56FE",prop:"good_img",width:55,cellRenderer:({row:n})=>tu(n.good_img)},{label:"\u91C7\u8D2D\u7C7B\u76EE\u540D\u79F0",width:120,prop:"cgd_inv_cat_name"},{label:"\u91C7\u8D2D\u5F00\u7968\u5546\u54C1\u540D\u79F0",prop:"cgd_inv_good_name",width:165},{label:"\u8D22\u52A1\u7C7B\u76EE\u540D\u79F0",width:120,prop:"inv_cat_name"},{label:"\u8D22\u52A1\u5F00\u7968\u5546\u54C1\u540D\u79F0",prop:"inv_good_name",width:165},{label:"\u72B6\u6001",prop:"status",width:150,cellRenderer:({row:n})=>x(M,{type:n.status==="2"?"success":""},{default:()=>{var a;return(a=b.find(C=>C.value===String(n.status)))==null?void 0:a.label}})},{label:"\u589E\u503C\u7A0E\u7BA1\u7406\u5185\u5BB9",prop:"addTax",width:"140px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:140,formatter:({addtime:n})=>P(n).format("YYYY-MM-DD HH:mm:ss")},{label:"\u521B\u5EFA\u4EBA",width:80,prop:"creater"},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],au={title:"\u9500\u552E\u6210\u672C\u7C7B\u76EE\u8BBE\u7F6E",superUserNoPerview:!0,companyProp:"supplierNo",columns:nu,apis:{httpList:Q}};const su={class:"main role"},lu={"w-full":""},ru=L({__name:"index",setup(n){const a=g(null),C=g(null),{permissions:A,hasPermissionWithCode:p}=Y("supplyConsultingCost"),f=g([]),{pageContentRef:B,handleResetClick:S,handleSearchClick:N}=K(void 0,void 0,k),{push:R}=z(),{isSuperUser:D}=O();function I(s){R({path:"/supplyInvoiceSaleSettings/supplyConsultingCostDetail",query:{id:s}})}function w(s=!1){if(f.value.length===0){$.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5546\u54C1");return}const e=s?uu:eu,l=s?"\u91C7\u8D2D\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F":"\u8D22\u52A1\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F",r=[];f.value.forEach(o=>{const t={...e};s?(t.\u5546\u54C1\u7F16\u7801=o.spuCode,t.\u5F00\u7968\u5546\u54C1\u540D\u79F0=o.cgd_inv_good_name):(t.\u5546\u54C1\u7F16\u7801=o.spuCode,t.\u91C7\u8D2D\u7C7B\u76EE\u7F16\u7801=o.cgd_inv_cat_code,t.\u91C7\u8D2D\u5F00\u7968\u5546\u54C1\u540D\u79F0=o.cgd_inv_good_name,t.\u91C7\u8D2D\u7A0E\u7387=o.cgd_inv_tax?(o.cgd_inv_tax.split("%")[0]/100).toFixed(2):"",t.\u8D22\u52A1\u7C7B\u76EE\u7F16\u7801=o.inv_cat_code,t.\u8D22\u52A1\u5F00\u7968\u5546\u54C1\u540D\u79F0=o.inv_good_name,t.\u8D22\u52A1\u7A0E\u7387=o.inv_tax?(o.inv_tax.split("%")[0]/100).toFixed(2):""),r.push(t)});const h=v.book_new(),T=v.json_to_sheet(r);v.book_append_sheet(h,T,"sheet"),ou(h,`${l}.xlsx`,{bookType:"xlsx"})}return(s,e)=>{const l=V("ElButton");return d(),G("div",su,[c(J,{"is-show":u(p)("001")},{default:i(()=>[H("div",lu,[c(u(W),{"form-config":u(k),onSearchBtnClick:u(N),onResetBtnClick:u(S)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),c(u(q),{ref_key:"pageContentRef",ref:B,powers:u(A),"content-config":u(au),onPreviewBtnClick:e[4]||(e[4]=({spuCode:r})=>I(r)),onSelectionChange:e[5]||(e[5]=r=>f.value=r)},{header:i(()=>[u(p)("041")?(d(),m(l,{key:0,size:"small",icon:u(E)("arrow-down-line"),onClick:e[0]||(e[0]=()=>w(!0))},{default:i(()=>[_("\u4E0B\u8F7D\u91C7\u8D2D\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F")]),_:1},8,["icon"])):F("v-if",!0),u(p)("042")&&!u(D)?(d(),m(l,{key:1,size:"small",type:"primary",icon:u(E)("arrow-up-line"),onClick:e[1]||(e[1]=()=>C.value.onDisplay())},{default:i(()=>[_("\u6279\u91CF\u5BFC\u5165\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C")]),_:1},8,["icon"])):F("v-if",!0),u(p)("036")?(d(),m(l,{key:2,size:"small",icon:u(E)("arrow-down-line"),onClick:e[2]||(e[2]=()=>w())},{default:i(()=>[_("\u4E0B\u8F7D\u6279\u91CF\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F")]),_:1},8,["icon"])):F("v-if",!0),u(p)("037")&&!u(D)?(d(),m(l,{key:3,size:"small",type:"primary",icon:u(E)("arrow-up-line"),onClick:e[3]||(e[3]=()=>a.value.onDisplay())},{default:i(()=>[_("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C")]),_:1},8,["icon"])):F("v-if",!0)]),_:1},8,["powers","content-config"]),c(X,{ref_key:"execlUploadModalRef",ref:a,onOnSuccess:e[6]||(e[6]=()=>u(B).onSearch())},null,512),c(Z,{ref_key:"procureUploadModalRef",ref:C,onOnSuccess:e[7]||(e[7]=()=>u(B).onSearch())},null,512)])]),_:1},8,["is-show"])])}}});var vu=j(ru,[["__scopeId","data-v-00a5e456"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supplyInvoiceSaleSettings/supplyConsultingCost/index.vue"]]);export{vu as default};
|