index.6309e8.js 4.8 KB

1
  1. import{cs as g,bb as y,ct as U,_ as V,d as j,x as f,p as q,ai as z,aM as $,bc as G,r as p,o as l,G as c,D as a,l as x,m as o,M as v,a as h,J as A,bd as H,aZ as F,cx as J}from"./index.js";import{s as N}from"./constants.59c8f8ef.js";import{e as W}from"./index.46b8bf10.js";import{u as B,w as Z}from"./xlsx.ed122d16.js";import{h as K}from"./export.fc82d641.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",...g(N)},{"min-width":"80px",label:"\u4F9B\u5E94\u5546\u7AEF",...g(U,"has_account")},{prop:"supplierName","min-width":"150px",label:"\u7269\u6D41\u4F9B\u5E94\u5546",...y("supplierNo","supplierName","\u7269\u6D41\u4F9B\u5E94\u5546\u7F16\u53F7:")},{label:"\u4E1A\u52A1\u516C\u53F8","min-width":"150px",...y("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={})=>W({...C,pay_type:"2"}),httpAdd:!0}},k={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:N},{type:"input",field:"payNo",placeholder:"\u5BF9\u8D26\u7F16\u53F7"}]},Y={\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=j({__name:"index",setup(C){const w="supSendOrderRecord",D=f(null),{push:E}=q(),n=f([]),{isSuperUser:S}=z(),{hasPermissionWithCode:_}=$("supSendOrderRecord"),b={content:{preview:t=>E(`/supplierOrder/supSendOrderRecordDetail?id=${t.payNo}`),create:()=>E("/supplierOrder/supSendOrderRecordDetail")}},P={pageSearchHook:()=>H(void 0,void 0,k)},{run:O}=G({success:()=>D.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:L,companyName:M}of n.value)if(String(d)!=="2"){F.error(`\u5BF9\u8D26\u5355 ${i},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else t.push({...Y,\u5BF9\u8D26\u7F16\u53F7:i,\u4E70\u65B9\u516C\u53F8\u7F16\u7801:L,\u5356\u65B9\u516C\u53F8\u7F16\u7801:m,\u4E70\u65B9\u516C\u53F8\u540D\u79F0:M,\u5356\u65B9\u516C\u53F8\u540D\u79F0:u});const e=B.book_new(),s=B.json_to_sheet(t);B.book_append_sheet(e,s,"sheet"),Z(e,"\u6279\u91CF\u7533\u8BF7\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}const r=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 K({url:"paytrackxport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>r.value=!0,onSuccess:()=>r.value=!1,onFail:()=>r.value=!1,params:{payNo:n.value[0].payNo}})}const T=t=>{O(J({payNo:t,status:"4"}))};return(t,e)=>{const s=p("ElButton"),d=p("ElTooltip"),i=p("PageContainer"),m=p("PageAuth");return l(),c(m,{pageName:w},{default:a(()=>[x(i,{onContentSelectChange:e[2]||(e[2]=u=>n.value=u),hooks:P,events:b,"content-config":o(X),searchConfig:o(k),"get-content-ref":u=>D.value=u},{content_header:a(()=>[o(_)("038")?(l(),c(s,{key:0,loading:r.value,onClick:e[0]||(e[0]=()=>I()),size:"small"},{default:a(()=>[v(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):h("v-if",!0),o(_)("031")?(l(),c(s,{key:1,size:"small",icon:o(A)("arrow-down-line"),onClick:e[1]||(e[1]=()=>R())},{default:a(()=>[v(" \u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F ")]),_:1},8,["icon"])):h("v-if",!0)]),content_action:a(u=>[x(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(s,{key:0,type:"primary",link:"",text:"",icon:o(A)("refresh-right"),onClick:()=>T(u.payNo)},null,8,["icon","onClick"])):h("v-if",!0)]),_:2},1024)]),_:1},8,["content-config","searchConfig","get-content-ref"])]),_:1})}}});var su=V(uu,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplierOrder/sendOrderRecord/index.vue"]]);export{su as default};