1 |
- import{d6 as L,dJ as U,cs as F,bb as N,ae as V,dY as P,cr as S,_ as $,d as q,p as G,x as _,aM as J,bc as z,aZ as r,r as f,o as B,G as E,D as i,l as A,m as n,M as w,a as g,J as k,bd as Z,cx as K}from"./index.js";import{u as C,w as Q}from"./xlsx.ed122d16.js";import{h as X}from"./export.fc82d641.js";const uu={\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:"",\u53D1\u7968\u7A0E\u540E\u91D1\u989D:"",\u5F00\u7968\u65E5\u671F:"",\u6821\u9A8C\u7801:""},m=[{value:"1",label:"\u5F85\u4ED8\u6B3E"},{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"},{value:"3",label:"\u5DF2\u4ED8\u6B3E"}],R=[{value:"1",label:"\u5F85\u56DE\u7968"},{value:"2",label:"\u90E8\u5206\u56DE\u7968"},{value:"3",label:"\u5DF2\u56DE\u7968"}],eu=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",width:150,align:"left"},{label:"\u603B\u989D\u6B3E",prop:"total_fee",width:110,align:"total_fee"},{label:"\u72B6\u6001",prop:"status",width:140,...F(P)},{label:"\u4E1A\u52A1\u7C7B\u578B",width:95,...F(S,"is_comon")},{label:"\u4ED8\u6B3E\u72B6\u6001",prop:"pay_status",width:80,transform:e=>{var a;return((a=m.find(s=>e===s.value))==null?void 0:a.label)||"--"},...F(m,"pay_status")},{label:"\u4ED8\u6B3E\u6807\u7B7E\u91D1\u989D",prop:"pay_tag_fee",width:"100px"},{label:"\u56DE\u7968\u72B6\u6001",prop:"inv_status",width:80,transform:e=>{var a;return((a=m.find(s=>e===s.value))==null?void 0:a.label)||"--"},...F(R,"inv_status")},{label:"\u56DE\u7968\u6807\u7B7E\u91D1\u989D",prop:"inv_tag_fee",width:"100px"},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",minWidth:180,align:"left",...N("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyNo",minWidth:180,align:"left",...N("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8:")},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:70,align:"left"},{label:"\u7533\u8BF7\u65F6\u95F4",width:140,prop:"addtime",formatter:({addtime:e})=>V(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:140,slot:"operation"}],tu={title:"\u8BA2\u5355\u5BF9\u8D26",columns:eu,deleteProp:"payNo",apis:{httpList:L,httpDelete:U,httpAdd:!0},companyProp:"supplierNo",superUserNoAction:!0,listNoRelation:!0,showDelete:({status:e})=>!1},x={formItems:[{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"startTime",endProp:"endTime",startPlaceholder:"\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u7ED3\u675F\u65E5\u671F"}},{field:"companyNo",type:"business-query"},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:P},{field:"pay_status",type:"select",placeholder:"\u4ED8\u6B3E\u72B6\u6001",options:m},{field:"inv_status",type:"select",placeholder:"\u56DE\u7968\u72B6\u6001",options:R},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u7801"}]}},{field:"is_comon",type:"select",placeholder:"\u4E1A\u52A1\u7C7B\u578B",span:4,options:S}]},ou=q({__name:"index",setup(e){const a="supplyOrderRecord",s="/supply/supplyOrderRecordDetail",{push:v}=G(),l=_([]),c=_(!1),{hasPermissionWithCode:D}=J(a),O={pageSearchHook:()=>Z(void 0,void 0,x)},T={content:{preview:({payNo:t})=>v(`${s}?id=${t}`),create:()=>v(s)}},b=_(null),{run:M}=z({success:()=>{r.success("\u64A4\u9500\u5BF9\u8D26\u6210\u529F!"),b.value.onSearch()}});function Y(){if(l.value.length===0){r.error("\u81F3\u5C11\u52FE\u9009\u4E00\u6761\u5BF9\u8D26\u5355");return}const t=[];for(const{status:h,payNo:d,supplierNo:y,supplierName:u,companyNo:j,companyName:H}of l.value)if(String(h)!=="2"){r.error(`\u5BF9\u8D26\u5355 ${d},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else t.push({...uu,\u4E70\u65B9\u516C\u53F8\u7F16\u7801:j,\u4E70\u65B9\u516C\u53F8\u540D\u79F0:H,\u5356\u65B9\u516C\u53F8\u7F16\u7801:y,\u5356\u65B9\u516C\u53F8\u540D\u79F0:u,\u5BF9\u8D26\u7F16\u7801:d});const o=C.book_new(),p=C.json_to_sheet(t);C.book_append_sheet(o,p,"sheet"),Q(o,"\u6279\u91CF\u7533\u8BF7\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}async function I(){if(l.value.length===0){r.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(l.value.length>1){r.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await X({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>c.value=!0,onSuccess:()=>c.value=!1,onFail:()=>c.value=!1,params:{payNo:l.value[0].payNo}})}const W=t=>{if("pay_tag_id"in t&&Number(t.pay_tag_id)!==0){r.warning("\u8BF7\u5148\u89E3\u9664\u4ED8\u6B3E\u6807\u7B7E\u518D\u64A4\u9500\u5BF9\u8D26\u5355");return}M(K({payNo:t.payNo,status:"4"}))};return(t,o)=>{const p=f("ElButton"),h=f("ElTooltip"),d=f("PageContainer"),y=f("PageAuth");return B(),E(y,{pageName:a},{default:i(()=>[A(d,{hooks:O,events:T,contentConfig:n(tu),"search-config":n(x),"get-content-ref":u=>b.value=u,onContentSelectChange:o[2]||(o[2]=u=>l.value=u)},{content_header:i(()=>[n(D)("038")?(B(),E(p,{key:0,type:"small",loading:c.value,onClick:o[0]||(o[0]=()=>I())},{default:i(()=>[w(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):g("v-if",!0),n(D)("031")?(B(),E(p,{key:1,size:"small",icon:n(k)("arrow-down-line"),onClick:o[1]||(o[1]=()=>Y())},{default:i(()=>[w("\u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F")]),_:1},8,["icon"])):g("v-if",!0)]),content_action:i(u=>[A(h,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:i(()=>[(String(u.status)==="1"||String(u.status)==="2")&&n(D)("022")&&String(u.is_comon)==="0"?(B(),E(p,{key:0,type:"primary",link:"",text:"",icon:n(k)("refresh-right"),onClick:()=>W(u)},null,8,["icon","onClick"])):g("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var lu=$(ou,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/orderRecord/index.vue"]]);export{lu as default};
|