var f=(e,i,a)=>new Promise((_,l)=>{var p=s=>{try{c(a.next(s))}catch(u){l(u)}},n=s=>{try{c(a.throw(s))}catch(u){l(u)}},c=s=>s.done?_(s.value):Promise.resolve(s.value).then(p,n);c((a=a.apply(e,i)).next())});import{_ as y,$ as L,a0 as G,c as d,w as o,j as C,C as S,E as $,o as r,k as t,l as q,cd as E,q as I,p as m,t as v,u as N,f as h,i as g,L as Q,M as B,N as D,a6 as F,a7 as j,a8 as P}from"./index-CZJgrp0v.js";import{_ as b}from"./FlatTab.DTGSghS1.js";import{l as V}from"./listMixins.CccSbMD4.js";import{_ as z}from"./uv-button.DwAMxj01.js";import{n as O,p as U}from"./eventJava.C13-6nEn.js";import{i as W,s as A}from"./common.D2w6zaJ1.js";import"./uv-tabs.Dgbny3zs.js";const H={name:"scanQrCodeReceiveGoods",data(){return{temporaryInput:""}},methods:{handleScanQrCode(){return f(this,null,function*(){if(console.log(this.temporaryInput),W())A(e=>{const i=e.eventMaterialId;console.log({eventMaterialId:i,result:e}),this.checkCanReceiveGoods(i)});else{if(this.temporaryInput.trim()==="")return;this.checkCanReceiveGoods(this.temporaryInput)}})},checkCanReceiveGoods(e){return f(this,null,function*(){return new Promise((i,a)=>f(this,null,function*(){let _=yield O(e);console.log({res:_,data:e}),_.code!==0?(L({title:"提示",content:_.msg,showCancel:!1}),i(!1)):G({url:`/pages/myModulePart/goodsCollection/detail?eventMaterialId=${e}`})}))})}}};function J(e,i,a,_,l,p){const n=q,c=I,s=C,u=S($("uv-button"),z);return r(),d(s,{class:"scan-qrcode-container"},{default:o(()=>[t(n,{class:"scan-qrcode-image",src:E,mode:"scaleToFill"}),t(c,{class:"scan-qrcode-text"},{default:o(()=>[m("扫码领取物资")]),_:1}),t(s,{class:"temporary-input"}),t(u,{type:"primary",text:"扫一扫",class:"scan-qrcode-btn",onClick:p.handleScanQrCode},null,8,["onClick"])]),_:1})}const K=y(H,[["render",J],["__scopeId","data-v-314d3790"]]),X={name:"GoodsReceiveItem",props:{info:{type:Object,default:()=>({date:"",title:"",goods:"",receiver:""})}}};function Y(e,i,a,_,l,p){const n=C,c=I;return r(),d(n,{class:"goods-receive-item-container"},{default:o(()=>[t(n,{class:"date"},{default:o(()=>[m(v(a.info.updateTime),1)]),_:1}),t(n,{class:"content"},{default:o(()=>[t(n,{class:"title"},{default:o(()=>[m(v(a.info.eventName),1)]),_:1}),t(n,{class:"info"},{default:o(()=>[t(n,{class:"info-item"},{default:o(()=>[t(c,{class:"label"},{default:o(()=>[m("领取物资：")]),_:1}),t(c,{class:"value"},{default:o(()=>[m(v(a.info.eventMaterialName||"--"),1)]),_:1})]),_:1}),t(n,{class:"info-item"},{default:o(()=>[t(c,{class:"label"},{default:o(()=>[m("领取人：")]),_:1}),t(c,{class:"value"},{default:o(()=>[m(v(a.info.tsName||"--"),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const Z=y(X,[["render",Y],["__scopeId","data-v-00e59a6c"]]),ee={name:"goodsCollectionList",mixins:[V],components:{FlatTab:b,ScanQrCodeReceiveGoods:K,GoodsReceiveItem:Z},data(){return{scrollTop:0,tabIndex:0,tabList:[{name:"物资领取"},{name:"领取列表"}],userStore:N()}},onLoad(e){},onPageScroll({scrollTop:e}){this.scrollTop=e},methods:{clickTab(e){this.tabIndex=e.index,this.tabIndex===1&&this.resetData()},getList(e){return f(this,null,function*(){let i={page:this.page,size:10,status:1,tsId:this.userStore.userInfo.tsId},a=yield U(i);this.getListExtend(a,e)})},getMockData(){}},mounted(){}};function te(e,i,a,_,l,p){const n=b,c=h("ScanQrCodeReceiveGoods"),s=C,u=h("GoodsReceiveItem"),k=F,x=j,T=P,R=h("layout-default-uni");return r(),d(R,null,{default:o(()=>[t(s,{class:"page-common-container"},{default:o(()=>[t(n,{tabList:l.tabList,onClickTab:p.clickTab},null,8,["tabList","onClickTab"]),l.tabIndex===0?(r(),d(s,{key:0,class:"qrcode-container"},{default:o(()=>[t(c)]),_:1})):g("",!0),l.tabIndex===1?(r(),d(s,{key:1,class:"list-container"},{default:o(()=>[(r(!0),Q(B,null,D(e.list,(M,w)=>(r(),d(s,{key:w,class:"pt-32rpx"},{default:o(()=>[t(u,{info:M},null,8,["info"])]),_:2},1024))),128)),e.showEmpty?(r(),d(k,{key:0,marginTop:45})):g("",!0),e.showLoadMore?(r(),d(x,{key:1,status:e.loadStatus},null,8,["status"])):g("",!0),t(T,{"scroll-top":l.scrollTop},null,8,["scroll-top"])]),_:1})):g("",!0)]),_:1})]),_:1})}const _e=y(ee,[["render",te],["__scopeId","data-v-42a32fad"]]);export{_e as default};
