1 |
- import{_ as q,d as z,w as f,n as M,ah as U,aL as $,b3 as j,r as p,o as l,G as c,C as a,l as g,u as o,M as y,a as h,J as v,aY as F}from"./index.88f7d256.js";import{s as k}from"./constants.59c8f8ef.js";import{e as G}from"./index.942b383b.js";import{a as A,r as x}from"./columnRenderHelper.1232bcd4.js";import{h as H}from"./status.2df4810d.js";import{u as J}from"./use-page-search.63ad89ed.js";import{u as B,w as W}from"./xlsx.ed122d16.js";import{h as Y}from"./export.0b02da0f.js";import{d as K}from"./index.69815c3e.js";const Q=[{type:"selection",width:40,align:"center"},{prop:"payNo","min-width":"150px",label:"\u5BF9\u8D26\u7F16\u53F7"},{prop:"total_fee","min-width":"100px",label:"\u5BF9\u8D26\u603B\u91D1\u989D"},{"min-width":"140px",label:"\u72B6\u6001",...A(k)},{"min-width":"80px",label:"\u4F9B\u5E94\u5546\u7AEF",...A(H,"has_account")},{prop:"supplierName","min-width":"150px",label:"\u7269\u6D41\u4F9B\u5E94\u5546",...x("supplierNo","supplierName","\u7269\u6D41\u4F9B\u5E94\u5546\u7F16\u53F7:")},{label:"\u4E1A\u52A1\u516C\u53F8","min-width":"150px",...x("companyNo","companyName","\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7:")},{prop:"apply_name",label:"\u521B\u5EFA\u4EBA","min-width":"80px"},{prop:"addtime",label:"\u7533\u8BF7\u65F6\u95F4","min-width":"120px"},{label:"\u64CD\u4F5C","min-width":"100px",fixed:"right",slot:"operation"}],X={columns:Q,companyProp:"supplierNo",apis:{httpList:(C={})=>G({...C,pay_type:"2"}),httpAdd:!0}},N={formItems:[{field:"create_time",type:"date_picker",otherOptions:{type:"daterange",startProp:"create_start",endProp:"create_end",startPlaceholder:"\u521B\u5EFA\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u521B\u5EFA\u7ED3\u675F\u65F6\u95F4"}},{field:"companyNo",type:"business-query",placeholder:"\u4E1A\u52A1\u516C\u53F8"},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:k},{type:"input",field:"payNo",placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{type:"input",field:"payNo",placeholder:"\u5BF9\u8D26\u4ED8\u6B3E\u7F16\u53F7"}]},Z={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u4E70\u65B9\u516C\u53F8\u540D\u79F0:"",\u5356\u65B9\u516C\u53F8\u7F16\u7801:"",\u5356\u65B9\u516C\u53F8\u540D\u79F0:"",\u5BF9\u8D26\u7F16\u7801:"",\u53D1\u7968\u7C7B\u578B:"",\u53D1\u7968\u4EE3\u7801:"",\u53D1\u7968\u53F7\u7801:"",\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"",\u5F00\u7968\u65E5\u671F:"",\u6821\u9A8C\u7801:""},uu=z({__name:"index",setup(C){const w="supSendOrderRecord",E=f(null),{push:D}=M(),n=f([]),{isSuperUser:S}=U(),{hasPermissionWithCode:_}=$("supSendOrderRecord"),b={content:{preview:t=>D(`/supplierOrder/supSendOrderRecordDetail?id=${t.payNo}`),create:()=>D("/supplierOrder/supSendOrderRecordDetail")}},P={pageSearchHook:()=>J(void 0,void 0,N)},{run:O}=j({success:()=>E.value.onSearch()});function R(){if(n.value.length===0){F.error("\u81F3\u5C11\u52FE\u9009\u4E00\u6761\u5BF9\u8D26\u5355");return}const t=[];for(const{status:d,payNo:i,supplierNo:m,supplierName:u,companyNo:T,companyName:V}of n.value)if(String(d)!=="2"){F.error(`\u5BF9\u8D26\u5355 ${i},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else t.push({...Z,\u5BF9\u8D26\u7F16\u53F7:i,\u4E70\u65B9\u516C\u53F8\u7F16\u7801:T,\u5356\u65B9\u516C\u53F8\u7F16\u7801:m,\u4E70\u65B9\u516C\u53F8\u540D\u79F0:V,\u5356\u65B9\u516C\u53F8\u540D\u79F0:u});const e=B.book_new(),r=B.json_to_sheet(t);B.book_append_sheet(e,r,"sheet"),W(e,"\u6279\u91CF\u7533\u8BF7\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}const s=f(!1);async function I(){if(n.value.length===0){F.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(n.value.length>1){F.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await Y({url:"paytrackxport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>s.value=!0,onSuccess:()=>s.value=!1,onFail:()=>s.value=!1,params:{payNo:n.value[0].payNo}})}const L=t=>{O(K({payNo:t,status:"4"}))};return(t,e)=>{const r=p("ElButton"),d=p("ElTooltip"),i=p("PageContainer"),m=p("PageAuth");return l(),c(m,{pageName:w},{default:a(()=>[g(i,{onContentSelectChange:e[2]||(e[2]=u=>n.value=u),hooks:P,events:b,"content-config":o(X),searchConfig:o(N),"get-content-ref":u=>E.value=u},{content_header:a(()=>[o(_)("038")?(l(),c(r,{key:0,loading:s.value,onClick:e[0]||(e[0]=()=>I()),size:"small"},{default:a(()=>[y(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):h("v-if",!0),o(_)("031")?(l(),c(r,{key:1,size:"small",icon:o(v)("arrow-down-line"),onClick:e[1]||(e[1]=()=>R())},{default:a(()=>[y(" \u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F ")]),_:1},8,["icon"])):h("v-if",!0)]),content_action:a(u=>[g(d,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:a(()=>[(String(u.status)==="1"||String(u.status)==="2")&&String(u.is_comon)==="0"&&!o(S)&&String(u.has_account)==="1"?(l(),c(r,{key:0,type:"primary",link:"",text:"",icon:o(v)("refresh-right"),onClick:()=>L(u.payNo)},null,8,["icon","onClick"])):h("v-if",!0)]),_:2},1024)]),_:1},8,["content-config","searchConfig","get-content-ref"])]),_:1})}}});var lu=q(uu,[["__file","D:/work/accout-vue3-ui2/settle-vue3/src/views/supplierOrder/sendOrderRecord/index.vue"]]);export{lu as default};
|