index.1a93d8.js 12 KB

1
  1. import{am as t,aR as S,bP as M,_ as se,d as re,x as d,W as ie,ah as pe,bU as ce,aM as de,bc as fe,ai as me,p as xe,r,aD as he,o as B,c as ge,l as o,D as a,m as i,c0 as _e,G as y,M as F,a as k,J as Be,h as n,L as w,H as ve,bd as ye,aZ as N}from"./index.js";import{g as Fe,i as be}from"./index.4e61d38f.js";import De from"./index.c727a1.js";import Ae from"./capital-modal.8ff866.js";import{b as Ce}from"./index.f01a7198.js";import{a as W}from"./tragelog.647eeacd.js";import{h as Ee}from"./export.fc82d641.js";import{u as T,w as ke}from"./xlsx.ed122d16.js";import"./execl-upload.7c83427b.js";import"./sale.ca731a82.js";const we={\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u7801:"",\u6536\u6B3E\u65B9\u516C\u53F8\u540D\u79F0:"",\u8D44\u91D1\u7F16\u7801:"",\u8BA2\u5355\u7F16\u7801:"",\u8BA4\u9886\u8D44\u91D1:""},Ne=[{value:"0",label:"\u624B\u52A8\u521B\u5EFA"},{value:"1",label:"\u7CFB\u7EDF\u521B\u5EFA"}],Pe=[{type:"selection",align:"center",width:40,fixed:"left"},{label:"\u8D44\u91D1\u8BA4\u9886\u7F16\u7801",prop:"logNo",fixed:"left",width:"150px"},{label:"\u8D44\u91D1\u6279\u6B21\u53F7/\u8D44\u91D1\u7F16\u7801",prop:"pcCode",width:"150px",cellRenderer({row:e}){return t("div",{class:"flex flex-col"},{default:()=>[t("p",null,e.pcCode+"/"),t("p",null,e.tradNo)]})}},{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801/\u9500\u552E\u4E3B\u5355\u53F7",width:"160px",cellRenderer({row:e}){return t("div",{class:"flex flex-col"},{default:()=>[t("p",null,e.orderCode+"/"),t("p",null,e.cxCode)]})}},{label:"\u72B6\u6001",prop:"status",width:90,cellRenderer:({row:e})=>t(S,null,{default:()=>{var p;return((p=W.find(c=>c.value==e.status))==null?void 0:p.label)||"--"}})},{label:"PO\u7F16\u53F7",width:"150px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{class:"px-[10px]",style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.order_poCode),t("p",{class:"px-[10px]",style:{"min-height":"24px",padding:"0 10px"}},e.poCode)]})}},{label:"\u5546\u54C1\u7F16\u53F7",width:"150px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.lib_goodNo),t("p",{style:{"min-height":"24px",padding:"0 10px"}},e.goodNo)]})}},{label:"\u5546\u54C1\u540D\u79F0",width:"150px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.lib_goodName),t("p",{style:{"min-height":"24px",padding:"0 10px"}},e.goodName)]})}},{label:"\u5355\u4EF7",width:"90px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.lib_price),t("p",{style:{"min-height":"24px",padding:"0 10px"}},e.goodPrice)]})}},{label:"\u603B\u4EF7",width:"90px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.lib_total),t("p",{style:{"min-height":"24px",padding:"0 10px"}},e.totalPrice)]})}},{label:"\u6570\u91CF",width:"80px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{style:{"border-bottom":"1px solid #ebeef5","min-height":"24px",padding:"0 10px"}},e.lib_goodNum),t("p",{style:{"min-height":"24px",padding:"0 10px"}},e.goodNum)]})}},{label:"\u8BA4\u9886\u91D1\u989D",prop:"total_fee",width:"110px"},{label:"\u64CD\u4F5C\u6765\u6E90",width:150,cellRenderer:({row:e})=>t("div",{class:"flex"},{default:()=>[t(S,{type:e.tag_type=="0"?"info":"",class:"mr-[5px]"},{default:()=>{var p;return((p=Ne.find(c=>c.value==e.tag_type))==null?void 0:p.label)||"--"}}),e.relaNo]})},{label:"\u5E73\u53F0\u540D\u79F0",prop:"platName",width:"140px",cellRenderer({row:e}){return t("div",{class:"flex w-full"},{default:()=>[t(S,{class:"mr-[5px]"},{default:()=>{var p;return((p=M.find(c=>c.value==e.platform_type))==null?void 0:p.label)||"--"}}),e.platName]})}},{label:"\u8BA4\u9886\u4EBA/\u65F6\u95F4",prop:"addtime",width:"140px",cellRenderer({row:e}){return t("div",{class:"flex flex-col",style:{margin:"0px -10px"}},{default:()=>[t("p",{class:"px-[10px]",style:{"min-height":"24px",padding:"0 10px"}},e.apply_name+"/"),t("p",{class:"px-[10px]",style:{"min-height":"24px",padding:"0 10px"}},e.addtime)]})}},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],Re={title:"",showTitle:!0,columns:Pe,superUserNoAction:!0,apis:{httpList:Ce,httpAdd:!0}},O={formItems:[{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u8D44\u91D1\u8BA4\u9886\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u8D44\u91D1\u8BA4\u9886\u7ED3\u675F\u65F6\u95F4"}},{field:"status",type:"select",placeholder:"\u8D44\u91D1\u8BA4\u9886\u72B6\u6001",options:W},{field:"platform_type",type:"select",placeholder:"\u5E73\u53F0\u7C7B\u578B",options:M},{field:"logNo",type:"input",placeholder:"\u8D44\u91D1\u8BA4\u9886\u7F16\u7801"},{field:"tradNo",type:"input",placeholder:"\u8D44\u91D1\u7F16\u7801"},{field:"orderCode",type:"input",placeholder:"\u9500\u552E\u8BA2\u5355\u7F16\u7801"},{field:"relaNo",type:"input",placeholder:"\u5173\u8054\u8D44\u91D1\u8BA4\u9886\u7F16\u53F7"},{field:"cxCode",type:"input",placeholder:"\u9500\u552E\u4E3B\u5355\u53F7"},{field:"pcCode",type:"input",placeholder:"\u8D44\u91D1\u6279\u6B21\u53F7"}]},Se={class:"flex mb-[10px]"},Te={class:"flex flex-col border-r-1 border-[#dcdfe6] justify-center pr-[10px]"},Ie=n("span",{class:"text-center font-bold",style:{"font-size":"14px"}},"\u6279\u6B21\u53F7\u603B\u91D1\u989D",-1),Ve={class:"text-center text-[12px]",style:{"font-size":"14px"}},Ue={class:"flex flex-col ml-[10px]"},ze={class:"flex"},Oe={class:"flex flex-col mr-[25px]"},Me=n("span",{class:"text-center font-bold",style:{"font-size":"14px"}},"\u8BA2\u5355\u5DF2\u8BA4\u9886",-1),We={class:"text-center",style:{"font-size":"14px"}},je={class:"flex flex-col mr-[25px]"},qe=n("span",{class:"text-center font-bold",style:{"font-size":"14px"}},"\u8BA2\u5355\u8BA4\u9886\u4E2D",-1),Le={class:"text-center",style:{"font-size":"14px"}},He={class:"flex flex-col"},$e=n("span",{class:"text-center font-bold",style:{"font-size":"14px"}},"\u8BA2\u5355\u672A\u8BA4\u9886",-1),Ge={class:"text-center",style:{"font-size":"14px"}},Je={class:"w-full flex justify-end"},Ze=re({__name:"index",setup(e){const p="capitalPool",c=d([]),b=d(!1),I=d(null),D=d(!1),{currentCompany:j}=ie(),f=d({status:"",remark:""}),q=d(Re),L=pe(()=>({status:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",trigger:"change"}],remark:[{required:f.value.status=="3",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",trigger:"change"}]})),V=ce({success:()=>{h.value.onSearch(),b.value=!1}}),H=d(null),{hasPermissionWithCode:A}=de("capitalPool"),h=d(null),U=d(null),{run:$}=fe({success:()=>h.value.onSearch()}),G=l=>$(Fe(l)),{isSuperUser:P}=me(),z=xe(),J={pageSearchHook:()=>ye(void 0,void 0,O)},x=d(null),Z={content:{preview:({logNo:l})=>z.push("/InvoiceSales/capitalPoolDetail?id="+l),create:()=>z.push("/InvoiceSales/capitalPoolDetail"),result(l={},u={}){const{pcData:g={}}=l,{balancePrce:m,totalPrice:C,tradPrice:_,usedPrice:E}=g,v=Number(m)+Number(_)+Number(E);v!=0?x.value={batchTotal:v,aTotal:E,total:_,wTotal:m}:x.value=null}}};function K(){const l=T.book_new(),u=T.json_to_sheet([we]);T.book_append_sheet(l,u,"sheet"),ke(l,"\u8BA2\u5355\u8BA4\u6B3E\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}function Q(){if(c.value.length===0){N.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u72B6\u6001\u4E3A`\u5F85\u5BA1\u6279`\u7684\u6570\u636E");return}if(c.value.some(u=>u.status!=="1")){N.warning("\u8BF7\u9009\u62E9\u72B6\u6001\u4E3A`\u5F85\u5BA1\u6279`\u7684\u6570\u636E");return}b.value=!0}async function X(){const l=h.value.getBasicParams();if(l.status!=2&&l.status!=1){N.warning("\u8BF7\u7B5B\u9009\u8D44\u91D1\u8BA4\u9886\u72B6\u6001\u4E3A `\u5BA1\u6838\u901A\u8FC7` \u6216 `\u5F85\u5BA1\u6838` \u7684\u6570\u636E");return}const{total:u}=h.value.getPagination();if(u>500){N.warning("\u5BFC\u51FA\u9875\u9762\u6570\u636E\u4E0D\u80FD\u8D85\u8FC7500\u6761");return}const{start:g,end:m,...C}=l,_={create_start:g,create_end:m,...C};await Ee({url:"ope",name:"\u8D44\u91D1\u8BA4\u9886\u6570\u636E\u8868",onSuccess:()=>D.value=!1,onStart:()=>D.value=!0,onFail:()=>D.value=!1,params:{..._,company:j.value.companyNo}})}async function Y(){var l;try{await((l=I.value)==null?void 0:l.validate()),V.run(be({idArr:c.value.map(({id:u})=>u),status:f.value.status,remark:f.value.remark}))}catch{}}function ee(){var l;(l=U.value)==null||l.onDisplay()}return(l,u)=>{const g=r("ElButton"),m=r("el-button"),C=r("el-popconfirm"),_=r("el-button-group"),E=r("PageContainer"),v=r("ElOption"),te=r("ElSelect"),R=r("ElFormItem"),ue=r("ElInput"),le=r("ElForm"),ae=r("ElDialog"),oe=r("PageAuth"),ne=he("loading");return B(),ge("div",null,[o(oe,{pageName:p,class:"capital-claim"},{default:a(()=>[o(E,{hooks:J,events:Z,"search-config":i(O),"content-config":q.value,"get-content-ref":s=>h.value=s,onContentSelectChange:u[1]||(u[1]=s=>c.value=s)},_e({content_header:a(()=>[i(A)("040")&&!i(P)?(B(),y(g,{key:0,onClick:Q,type:"primary",size:"small"},{default:a(()=>[F(" \u6279\u91CF\u5BA1\u6279 ")]),_:1})):k("v-if",!0)]),content_action:a(s=>[i(A)("009")&&String(s.status)==="1"?(B(),y(C,{key:0,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u8D44\u91D1\u8BA4\u9886?",onConfirm:()=>G({logNo:s.logNo})},{reference:a(()=>[o(m,{icon:i(Be)("refresh-right"),type:"primary",link:""},null,8,["icon"])]),_:2},1032,["onConfirm"])):k("v-if",!0)]),search_action:a(()=>[o(_,null,{default:a(()=>[!i(P)&&i(A)("034")?(B(),y(m,{key:0,type:"warning",plain:"",onClick:K},{default:a(()=>[F(" 1.\u4E0B\u8F7D\u8BA2\u5355\u8BA4\u6B3E\u5BFC\u5165\u6A21\u677F ")]),_:1})):k("v-if",!0),!i(P)&&i(A)("035")?(B(),y(m,{key:1,type:"primary",plain:"",onClick:ee},{default:a(()=>[F(" 2.\u5BFC\u5165\u8BA2\u5355\u8BA4\u6B3E\u6570\u636E(\u6279\u91CF) ")]),_:1})):k("v-if",!0),o(m,{type:"success",plain:"",loading:D.value,onClick:u[0]||(u[0]=()=>X())},{default:a(()=>[F(" 3.\u5BFC\u51FA\u8D44\u91D1\u8BA4\u9886\u6570\u636E ")]),_:1},8,["loading"])]),_:1})]),_:2},[x.value?{name:"content_title",fn:a(()=>[n("div",Se,[n("div",Te,[Ie,n("span",Ve,w(x.value.batchTotal),1)]),n("div",Ue,[n("div",ze,[n("div",Oe,[Me,n("span",We,w(x.value.aTotal),1)]),n("div",je,[qe,n("span",Le,w(x.value.total),1)]),n("div",He,[$e,n("span",Ge,w(x.value.wTotal),1)])])])])]),key:"0"}:void 0]),1032,["search-config","content-config","get-content-ref"]),o(Ae,{ref_key:"capitalModalRef",ref:H},null,512),o(ae,{modelValue:b.value,"onUpdate:modelValue":u[4]||(u[4]=s=>b.value=s),title:"\u6279\u91CF\u5BA1\u6279",center:"",onClose:u[5]||(u[5]=s=>f.value={status:"",remark:""})},{default:a(()=>[ve((B(),y(le,{model:f.value,rules:i(L),ref_key:"formRef",ref:I},{default:a(()=>[o(R,{prop:"status",label:"\u5BA1\u6838\u72B6\u6001"},{default:a(()=>[o(te,{placeholder:"\u5BA1\u6838\u72B6\u6001",modelValue:f.value.status,"onUpdate:modelValue":u[2]||(u[2]=s=>f.value.status=s),style:{width:"100%"}},{default:a(()=>[o(v,{value:"2",label:"\u901A\u8FC7"}),o(v,{value:"3",label:"\u9A73\u56DE"})]),_:1},8,["modelValue"])]),_:1}),o(R,{prop:"remark",label:"\u5BA1\u6838\u5907\u6CE8"},{default:a(()=>[o(ue,{modelValue:f.value.remark,"onUpdate:modelValue":u[3]||(u[3]=s=>f.value.remark=s),placeholder:"\u5BA1\u6838\u5907\u6CE8",type:"textarea"},null,8,["modelValue"])]),_:1}),o(R,null,{default:a(()=>[n("div",Je,[o(g,{type:"primary",onClick:Y},{default:a(()=>[F(" \u4FDD\u5B58 ")]),_:1})])]),_:1})]),_:1},8,["model","rules"])),[[ne,i(V).loading]])]),_:1},8,["modelValue"])]),_:1}),o(De,{ref_key:"execlCapitalUploadRef",ref:U,onOnSuccess:u[6]||(u[6]=s=>h.value.onSearch())},null,512)])}}});var nt=se(Ze,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/capitalPool/index.vue"]]);export{nt as default};