import{bb as c,am as l,aR as y,ae as D,aS as w,_ as b,d as x,x as p,aM as R,bd as S,p as A,ai as k,o as P,c as I,l as r,D as m,h as N,m as u,bE as U,bF as M,a,bV as T}from"./index.js";import W from"./index.97429c.js";import z from"./index.d2d2ca.js";import{a as E}from"./configs.477b4dbb.js";import{d as L}from"./index.ab253282.js";import"./execl-upload.ab941f73.js";import"./xlsx.ed122d16.js";import"./verification.611d3025.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:E}]};function O(e){const t=e.split(",");return l(w,{src:t[0],previewTeleported:!0,previewSrcList:[t[0]],style:{height:"20px",width:"20px"}})}const V=[{width:40,type:"selection",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})=>O(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(y,{type:e.status==="2"?"success":""},{default:()=>{var t;return(t=E.find(n=>n.value===String(e.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:e})=>D(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],Y={title:"\u9500\u552E\u6210\u672C\u7C7B\u76EE\u8BBE\u7F6E",superUserNoPerview:!0,columns:V,companyProp:"supplierNo",apis:{httpList:L}};const j={class:"main role"},q={"w-full":""},G=x({__name:"index",setup(e){const t=p(null),n=p(null),{permissions:f,hasPermissionWithCode:B}=R("supplyCommodityCost"),_=p([]),{pageContentRef:s,handleResetClick:h,handleSearchClick:F}=S(void 0,void 0,C),{push:g}=A();k();function v(d){g({path:"/supplyInvoiceSaleSettings/supplyCommodityCostDetail",query:{id:d}})}return(d,o)=>(P(),I("div",j,[r(T,{"is-show":u(B)("001")},{default:m(()=>[N("div",q,[r(u(U),{"form-config":u(C),onSearchBtnClick:u(F),onResetBtnClick:u(h)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),r(u(M),{ref_key:"pageContentRef",ref:s,powers:u(f),"content-config":u(Y),onPreviewBtnClick:o[0]||(o[0]=({spuCode:i})=>v(i)),onSelectionChange:o[1]||(o[1]=i=>_.value=i)},{header:m(()=>[a(` <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
            > `),a(` <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
            > `),a(` \r
            <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
            > `),a(` <ElButton\r
              size="small"\r
              type="primary"\r
              v-if="hasPermissionWithCode('037') && !isSuperUser"\r
              :icon="useRenderIcon('arrow-up-line')"\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(W,{isZx:"0",ref_key:"execlUploadModalRef",ref:t,onOnSuccess:o[2]||(o[2]=()=>u(s).onSearch())},null,512),r(z,{isZx:"0",ref_key:"procureUploadModalRef",ref:n,onOnSuccess:o[3]||(o[3]=()=>u(s).onSearch())},null,512)])]),_:1},8,["is-show"])]))}});var ue=b(G,[["__scopeId","data-v-4d36d89d"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplyInvoiceSaleSettings/supplyCommodityCost/index.vue"]]);export{ue as default};
