1 |
- import{am as A,bM as O,aS as E,bK as ae,bL as oe,bc as le,_ as ne,d as re,x as c,W as se,ah as ie,bN as pe,aO as ce,bd as de,ai as me,p as fe,r,aD as Be,o as m,c as _e,l as a,D as t,m as s,G as B,M as _,a as y,J as Fe,H as he,h as De,be as ve,a_ as F}from"./index.js";import{b as Ce}from"./index.b2047561.js";import{a as q}from"./tragelog.9e57fc6a.js";import ge from"./capital-modal.165f1c.js";import{g as Ae,i as Ee}from"./index.a0ad4a93.js";import{h as ye}from"./export.0df08c09.js";import be from"./index.db8841.js";import{u as N,w as we}from"./xlsx.ed122d16.js";import"./sale.49d8f2ba.js";import"./execl-upload.0918c47c.js";const xe=[{type:"selection",align:"center",width:40,fixed:"left"},{label:"\u8D44\u91D1\u8BA4\u9886\u7F16\u7801",prop:"logNo",fixed:"left",width:"150px"},{label:"\u8D44\u91D1\u7F16\u7801",prop:"tradNo",width:"150px"},{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"orderCode",width:"150px"},{label:"\u9500\u552E\u4E3B\u5355\u53F7",prop:"cxCode",width:"160px"},{label:"\u8BA4\u9886\u91D1\u989D",prop:"total_fee",width:"110px"},{label:"\u5E73\u53F0\u7C7B\u578B",prop:"platform",width:"120px",cellRenderer({row:p}){return A(E,null,{default:()=>{var l;return((l=O.find(n=>n.value===p.platform_type))==null?void 0:l.label)||"--"}})}},{label:"\u8D44\u91D1\u8BA4\u9886\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:p})=>A(E,null,{default:()=>{var l;return((l=q.find(n=>n.value===p.status))==null?void 0:l.label)||"--"}})},{label:"\u8BA2\u5355\u6765\u6E90",prop:"qrdSource",width:"100px",cellRenderer({row:p}){return A(E,null,{default:()=>{var l;return(l=ae.find(n=>n.value===p.qrdSource))==null?void 0:l.label}})}},{label:"\u5546\u54C1\u7C7B\u578B",prop:"qrdType",width:"100px",cellRenderer({row:p}){return A(E,null,{default:()=>{var l;return(l=oe.find(n=>n.value===p.qrdType))==null?void 0:l.label}})}},{label:"\u5E73\u53F0\u540D\u79F0",prop:"platName",width:"120px"},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",nimWidth:"160px",...le("goodNo","goodName","\u5546\u54C1\u7F16\u7801:")},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"70px"},{label:"\u8BA4\u9886\u65F6\u95F4",prop:"addtime",width:"140px"},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],ke={title:"\u8D44\u91D1\u516C\u6D77\u6C60",columns:xe,superUserNoAction:!0,apis:{httpList:Ce,httpAdd:!0}},U={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:q},{field:"platform_type",type:"select",placeholder:"\u5E73\u53F0\u7C7B\u578B",options:O},{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:"cxCode",type:"input",placeholder:"\u9500\u552E\u4E3B\u5355\u53F7"}]},Se={\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={class:"w-full flex justify-end"},Pe=re({__name:"index",setup(p){const l="capitalPool",n=c([]),P=c(null),h=c(!1),D=c(!1),i=c({status:"",remark:""}),{currentCompany:W}=se(),M=ie(()=>({status:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",trigger:"change"}],remark:[{required:i.value.status=="3",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",trigger:"change"}]})),I=pe({success:()=>{f.value.onSearch(),h.value=!1}}),L=c(null),{hasPermissionWithCode:v}=ce("capitalPool"),f=c(null),R=c(null),{run:j}=de({success:()=>f.value.onSearch()}),H=u=>j(Ae(u)),{isSuperUser:b}=me(),T=fe(),$={pageSearchHook:()=>ve(void 0,void 0,U)},z={content:{preview:({logNo:u})=>T.push("/InvoiceSales/capitalPoolDetail?id="+u),create:()=>T.push("/InvoiceSales/capitalPoolDetail")}};function G(){const u=N.book_new(),e=N.json_to_sheet([Se]);N.book_append_sheet(u,e,"sheet"),we(u,"\u8BA2\u5355\u8BA4\u6B3E\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}function J(){if(n.value.length===0){F.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u72B6\u6001\u4E3A`\u5F85\u5BA1\u6279`\u7684\u6570\u636E");return}if(n.value.some(e=>e.status!=="1")){F.warning("\u8BF7\u9009\u62E9\u72B6\u6001\u4E3A`\u5F85\u5BA1\u6279`\u7684\u6570\u636E");return}h.value=!0}async function K(){const u=f.value.getBasicParams();if(!u.start||!u.end){F.warning("\u8BF7\u9009\u62E9\u5BFC\u51FA\u7684\u65F6\u95F4\u533A\u95F4");return}if(u.status!=2){F.warning("\u8BF7\u7B5B\u9009\u8D44\u91D1\u8BA4\u9886\u72B6\u6001\u4E3A`\u5BA1\u6838\u901A\u8FC7`\u7684\u6570\u636E");return}const{start:e,end:C,...d}=u,w={create_start:e,create_end:C,...d},g=24*60*60*1e3,x=new Date(u.start).valueOf();if((new Date(u.end).valueOf()+g-x)/g>31)return F.warning("\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC731\u5929\uFF01"),!1;await ye({url:"ope",name:"\u8D44\u91D1\u8BA4\u9886\u6570\u636E\u8868",onStart:()=>D.value=!0,onSuccess:()=>D.value=!1,onFail:()=>D.value=!1,params:{...w,company:W.value.companyNo}})}async function Q(){var u;try{await((u=P.value)==null?void 0:u.validate()),I.run(Ee({idArr:n.value.map(({id:e})=>e),status:i.value.status,remark:i.value.remark}))}catch{}}function X(){var u;(u=R.value)==null||u.onDisplay()}return(u,e)=>{const C=r("ElButton"),d=r("el-button"),w=r("el-popconfirm"),g=r("el-button-group"),x=r("PageContainer"),k=r("ElOption"),V=r("ElSelect"),S=r("ElFormItem"),Y=r("ElInput"),Z=r("ElForm"),ee=r("ElDialog"),ue=r("PageAuth"),te=Be("loading");return m(),_e("div",null,[a(ue,{pageName:l,class:"capital-claim"},{default:t(()=>[a(x,{hooks:$,events:z,contentConfig:s(ke),"search-config":s(U),"get-content-ref":o=>f.value=o,onContentSelectChange:e[1]||(e[1]=o=>n.value=o)},{content_header:t(()=>[s(v)("040")&&!s(b)?(m(),B(C,{key:0,onClick:J,type:"primary",size:"small"},{default:t(()=>[_(" \u6279\u91CF\u5BA1\u6279 ")]),_:1})):y("v-if",!0)]),content_action:t(o=>[s(v)("009")&&String(o.status)==="1"?(m(),B(w,{key:0,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u8D44\u91D1\u8BA4\u9886?",onConfirm:()=>H({logNo:o.logNo})},{reference:t(()=>[a(d,{icon:s(Fe)("refresh-right"),type:"primary",link:""},null,8,["icon"])]),_:2},1032,["onConfirm"])):y("v-if",!0)]),search_action:t(()=>[a(g,null,{default:t(()=>[!s(b)&&s(v)("034")?(m(),B(d,{key:0,type:"warning",plain:"",onClick:G},{default:t(()=>[_(" 1.\u4E0B\u8F7D\u8BA2\u5355\u8BA4\u6B3E\u5BFC\u5165\u6A21\u677F ")]),_:1})):y("v-if",!0),!s(b)&&s(v)("035")?(m(),B(d,{key:1,type:"primary",plain:"",onClick:X},{default:t(()=>[_(" 2.\u5BFC\u5165\u8BA2\u5355\u8BA4\u6B3E\u6570\u636E(\u6279\u91CF) ")]),_:1})):y("v-if",!0),a(d,{type:"success",plain:"",loading:D.value,onClick:e[0]||(e[0]=()=>K())},{default:t(()=>[_(" 3.\u5BFC\u51FA\u8D44\u91D1\u8BA4\u9886\u6570\u636E ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["contentConfig","search-config","get-content-ref"]),a(ge,{ref_key:"capitalModalRef",ref:L},null,512),a(ee,{modelValue:h.value,"onUpdate:modelValue":e[4]||(e[4]=o=>h.value=o),title:"\u6279\u91CF\u5BA1\u6279",center:"",onClose:e[5]||(e[5]=o=>i.value={status:"",remark:""})},{default:t(()=>[he((m(),B(Z,{model:i.value,rules:s(M),ref_key:"formRef",ref:P},{default:t(()=>[a(S,{prop:"status",label:"\u5BA1\u6838\u72B6\u6001"},{default:t(()=>[a(V,{placeholder:"\u5BA1\u6838\u72B6\u6001",modelValue:i.value.status,"onUpdate:modelValue":e[2]||(e[2]=o=>i.value.status=o),style:{width:"100%"}},{default:t(()=>[a(k,{value:"2",label:"\u901A\u8FC7"}),a(k,{value:"3",label:"\u9A73\u56DE"})]),_:1},8,["modelValue"])]),_:1}),a(S,{prop:"remark",label:"\u5BA1\u6838\u5907\u6CE8"},{default:t(()=>[a(Y,{modelValue:i.value.remark,"onUpdate:modelValue":e[3]||(e[3]=o=>i.value.remark=o),placeholder:"\u5BA1\u6838\u5907\u6CE8",type:"textarea"},null,8,["modelValue"])]),_:1}),a(S,null,{default:t(()=>[De("div",Ne,[a(C,{type:"primary",onClick:Q},{default:t(()=>[_(" \u4FDD\u5B58 ")]),_:1})])]),_:1})]),_:1},8,["model","rules"])),[[te,s(I).loading]])]),_:1},8,["modelValue"])]),_:1}),a(be,{ref_key:"execlCapitalUploadRef",ref:R,onOnSuccess:e[6]||(e[6]=o=>f.value.onSearch())},null,512)])}}});var je=ne(Pe,[["__file","C:/Users/63107/Desktop/mine/settle-vue3/src/views/InvoiceSales/capitalPool/index.vue"]]);export{je as default};
|