import{cA as c,af as l,ce as w,a7 as y,cf as D,_ as x,d as b,n as p,c9 as A,cC as R,k,ab as S,o as P,c as I,h as r,y as m,e as N,i as u,d1 as U,d2 as M,a as n,dj as T}from"./index.js";import{a as f}from"./configs.e9836768.js";import{h as W}from"./index.79a59456.js";import Y from"./index.ba8fa4.js";import L from"./index.25e02c.js";import"./execl-upload.d28cb458.js";import"./xlsx.ed122d16.js";import"./index.49bb9470.js";const C={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:"creater",label:"\u521B\u5EFA\u4EBA"}]}},{field:"companyNo",type:"business-query"},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:f}]};function z(e){const t=e.split(",");return l(D,{src:t[0],previewTeleported:!0,previewSrcList:[t[0]],style:{height:"20px",width:"20px"},"text-key":"91110113MA028K5Y7Y"})}const O=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u5546\u54C1\u7F16\u7801",prop:"spuCode",width:150},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:175,...c("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:195,...c("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:e})=>z(e.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:"\u91C7\u8D2D\u5F00\u7968\u7C7B\u76EE\u7A0E\u7387",prop:"cgd_inv_tax",width:165,cellRenderer({row:e}){return l("div",{},{default:()=>e.cgd_inv_tax?e.cgd_inv_tax:"--"})}},{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:"\u8D22\u52A1\u5F00\u7968\u7C7B\u76EE\u7A0E\u7387",prop:"inv_tax",width:165,cellRenderer({row:e}){return l("div",{},{default:()=>e.inv_tax?e.inv_tax:"--"})}},{label:"\u72B6\u6001",prop:"status",width:150,cellRenderer:({row:e})=>l(w,{type:e.status==="2"?"success":""},{default:()=>{var t;return(t=f.find(a=>a.value===String(e.status)))==null?void 0:t.label}})},{label:"\u589E\u503C\u7A0E\u7BA1\u7406\u5185\u5BB9",prop:"addTax",width:"140px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:140,formatter:({addtime:e})=>y(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u521B\u5EFA\u4EBA",width:80,prop:"creater"},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],j={title:"\u9500\u552E\u6210\u672C\u7C7B\u76EE\u8BBE\u7F6E",superUserNoPerview:!0,companyProp:"supplierNo",columns:O,apis:{httpList:(e={})=>W({...e,isChild:0})}};const V={class:"main role"},q={"w-full":""},G=b({__name:"index",setup(e){const t=p(null),a=p(null),{permissions:E,hasPermissionWithCode:B}=A("supplyConsultingCost"),_=p([]),{pageContentRef:i,handleResetClick:h,handleSearchClick:g}=R(void 0,void 0,C),{push:F}=k();S();function v(d){F({path:"/supplyInvoiceSaleSettings/supplyConsultingCostDetail",query:{id:d}})}return(d,o)=>(P(),I("div",V,[r(T,{"is-show":u(B)("001")},{default:m(()=>[N("div",q,[r(u(U),{"form-config":u(C),onSearchBtnClick:u(g),onResetBtnClick:u(h)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),r(u(M),{ref_key:"pageContentRef",ref:i,powers:u(E),"content-config":u(j),onPreviewBtnClick:o[0]||(o[0]=({spuCode:s})=>v(s)),onSelectionChange:o[1]||(o[1]=s=>_.value=s)},{header:m(()=>[n(` <ElButton\r
              size="small"\r
              v-if="hasPermissionWithCode('041')"\r
              :icon="useRenderIcon('arrow-down-line')"\r
              @click="() => onDownloadTemplate(true)"\r
              >\u4E0B\u8F7D\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F</ElButton\r
            > `),n(` <ElButton\r
              size="small"\r
              type="primary"\r
              v-if="hasPermissionWithCode('042') && !isSuperUser"\r
              :icon="useRenderIcon('arrow-up-line')"\r
              @click="() => procureUploadModalRef.onDisplay()"\r
              >\u6279\u91CF\u5BFC\u5165\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C</ElButton\r
            > `),n(` <ElButton\r
              size="small"\r
              v-if="hasPermissionWithCode('036')"\r
              :icon="useRenderIcon('arrow-down-line')"\r
              @click="() => onDownloadTemplate()"\r
              >\u4E0B\u8F7D\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F</ElButton\r
            > `),n(` <ElButton\r
              size="small"\r
              type="primary"\r
              :icon="useRenderIcon('arrow-up-line')"\r
              v-if="hasPermissionWithCode('037') && !isSuperUser"\r
              @click="() => execlUploadModalRef.onDisplay()"\r
              >\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C</ElButton\r
            > `)]),_:1},8,["powers","content-config"]),r(Y,{ref_key:"execlUploadModalRef",ref:t,onOnSuccess:o[2]||(o[2]=()=>u(i).onSearch())},null,512),r(L,{ref_key:"procureUploadModalRef",ref:a,onOnSuccess:o[3]||(o[3]=()=>u(i).onSearch())},null,512)])]),_:1},8,["is-show"])]))}});var ue=x(G,[["__scopeId","data-v-00a5e456"],["__file","D:/work/jiesuan/settle-vue3/src/views/supplyInvoiceSaleSettings/supplyConsultingCost/index.vue"]]);export{ue as default};
