1234567 |
- import{al as c,aX as S,ae as E,aY as I,_ as N,d as M,w as d,aN as U,n as W,ah as T,W as z,r as O,o as f,c as Y,j as r,C,h as L,l as o,bt as V,bu as j,a as s,G as q,M as G,bz as H,aS as B}from"./index.js";import{u as X}from"./use-page-search.0502cd9b.js";import Z from"./index.356975.js";import J from"./index.8c2cb5.js";import{a as _}from"./configs.cb26b8fe.js";import{e as K}from"./index.5d6da330.js";import{r as h}from"./columnRenderHelper.7d881f3e.js";import{h as Q}from"./export.5eee8496.js";import"./execl-upload.ccef2153.js";import"./xlsx.ed122d16.js";import"./tootip.bd8d3dab.js";import"./verification.611d3025.js";const F={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:"timer",type:"date_picker",trigger:"change",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u7ED3\u675F\u65E5\u671F"}},{field:"supplierNo",type:"supplier-query"},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:_}]};function $(e){const a=e.split(",");return c(I,{src:a[0],previewTeleported:!0,previewSrcList:[a[0]],style:{height:"20px",width:"20px"}})}const ee=[{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,...h("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:195,...h("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})=>$(e.good_img)},{label:"\u91C7\u8D2D\u7C7B\u76EE\u7F16\u7801",width:155,prop:"cgd_inv_cat_code"},{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 c("div",{},{default:()=>e.cgd_inv_tax?e.cgd_inv_tax:"--"})}},{label:"\u8D22\u52A1\u7C7B\u76EE\u7F16\u7801",width:155,prop:"inv_cat_code"},{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 c("div",{},{default:()=>e.inv_tax?e.inv_tax:"--"})}},{label:"\u72B6\u6001",prop:"status",width:150,cellRenderer:({row:e})=>c(S,{type:e.status==="2"?"success":""},{default:()=>{var a;return(a=_.find(m=>m.value===String(e.status)))==null?void 0:a.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})=>E(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],ue={title:"\u9500\u552E\u6210\u672C\u7C7B\u76EE\u8BBE\u7F6E",superUserNoPerview:!0,columns:ee,apis:{httpList:K}};const oe={class:"main role"},te={"w-full":""},ae=M({__name:"index",setup(e){const a=d(null),m=d(null),{permissions:g,hasPermissionWithCode:v}=U("commodityCost"),y=d([]),{pageContentRef:i,handleResetClick:D,handleSearchClick:w}=X(void 0,void 0,F),{push:x}=W();T();const{currentCompany:b}=z();function A(t){x({path:"/InvoiceSaleSettings/commodityCostDetail",query:{id:t}})}const l=d(!1);async function k(){const t=i.value.getBasicParams();if(!t.start||!t.end){B.warning("\u8BF7\u9009\u62E9\u5BFC\u51FA\u7684\u65F6\u95F4\u533A\u95F4");return}const u=E(t.start),p=E(t.end),n=u.diff(p,"days"),P=u.daysInMonth(),R=p.daysInMonth();if(Math.abs(n)>P+R){B.warning("\u5BFC\u51FA\u7684\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC7\u4E24\u4E2A\u6708");return}await Q({url:"/admin/good/export",name:"\u9500\u552E\u6210\u672C\u7C7B\u76EE",onStart:()=>l.value=!0,onSuccess:()=>l.value=!1,onFail:()=>l.value=!1,params:{isZx:0,...t,companyNo:b.value.companyNo,isChild:0},admin:!1})}return(t,u)=>{const p=O("ElButton");return f(),Y("div",oe,[r(H,{"is-show":o(v)("001")},{default:C(()=>[L("div",te,[r(o(V),{"form-config":o(F),onSearchBtnClick:o(w),onResetBtnClick:o(D)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),r(o(j),{ref_key:"pageContentRef",ref:i,powers:o(g),"content-config":o(ue),onPreviewBtnClick:u[0]||(u[0]=({spuCode:n})=>A(n)),onSelectionChange:u[1]||(u[1]=n=>y.value=n)},{header:C(()=>[s(` <ElButton size="small" v-if="hasPermissionWithCode('041')" :icon="useRenderIcon('arrow-down-line')"\r
- @click="() => onDownloadTemplate(true)">\u4E0B\u8F7D\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F</ElButton> `),s(` <ElButton size="small" type="primary" v-if="hasPermissionWithCode('042') && !isSuperUser"\r
- :icon="useRenderIcon('arrow-up-line')" @click="() => procureUploadModalRef.onDisplay()">\u6279\u91CF\u5BFC\u5165\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C\r
- </ElButton> `),s(` <ElButton size="small" v-if="hasPermissionWithCode('036')" :icon="useRenderIcon('arrow-down-line')"\r
- @click="() => onDownloadTemplate()">\u4E0B\u8F7D\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F</ElButton> `),s(` <ElButton size="small" type="primary" v-if="hasPermissionWithCode('037') && !isSuperUser"\r
- :icon="useRenderIcon('arrow-up-line')" @click="() => execlUploadModalRef.onDisplay()">\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C\r
- </ElButton> `),t.hasPermissionWithcaiCode("048")?(f(),q(p,{key:0,type:"primary",onClick:k,size:"small",loading:l.value},{default:C(()=>[G("\u5BFC\u51FA ")]),_:1},8,["loading"])):s("v-if",!0)]),_:1},8,["powers","content-config"]),r(Z,{ref_key:"execlUploadModalRef",ref:a,onOnSuccess:u[2]||(u[2]=()=>o(i).onSearch())},null,512),r(J,{ref_key:"procureUploadModalRef",ref:m,onOnSuccess:u[3]||(u[3]=()=>o(i).onSearch())},null,512)])]),_:1},8,["is-show"])])}}});var Be=N(ae,[["__scopeId","data-v-0fa4429b"],["__file","C:/Users/63107/Desktop/projects/settle-vue3/src/views/InvoiceSaleSettings/commodityCost/index.vue"]]);export{Be as default};
|