import{C as O,v as j,N as H,r as n,w as J,y as q,D as _,E as k,M as o,F as s,al as $,as as C,J as v,I as N,G as W,H as X,K as l,am as Y,aw as Z}from"./common.modules-7b90237f.js";import{f as ee,d as te,A as ae,dl as se,dm as ne,c as oe,dn as le,_ as re}from"./page-activity-ActivityDetail-27bd7cf0.js";import{L as ce}from"./page-activity-DailySignIn-63fcaba2.js";import"./page-turntable-assets-d6267459.js";import"./native/index-ecf1462d.js";import"./en-91d2fc72.js";import"./page-activity-Bonus-9d46271c.js";const ie={class:"transRecord__container"},de={style:{height:"65px"}},ue={class:"ar"},pe={class:"ar-searchbar"},_e={class:"transRecord__container-content"},ve={class:"transRecord__container-content__card"},me={class:"transRecord__container-content__card-top"},ye={class:"transRecord__container-content__card-mid"},fe={class:"line"},he={class:"left"},ke={class:"right"},Ce={class:"line"},Ne={class:"left"},we={class:"right"},ge={class:"line"},$e={class:"left"},Re={class:"transRecord__container-content__card-bot"},De=["value"],xe=O({__name:"index",setup(Le){const{t:m}=j(),R=H();function D(){R.back()}const r=n([]),y=n([]),f=n(),c=J({date:"",type:-1}),i=n(!1),h=n(""),x=n(!1),L=async({selectedOptions:t})=>{i.value=!1,h.value=t[0].typeName,c.type=t[0].type,f.value.resetRefresh()};function S(){i.value=!0,x.value=!0}const{key:Se,value:T}=ee(),d=n(T),{minDate:b,maxDate:A}=te(0),u=n(!1),V=({selectedOptions:t})=>{u.value=!1},B=async({selectedOptions:t})=>{u.value=!1,c.date=`${d.value[0]}-${d.value[1]}-${d.value[2]} 00:00:00`,f.value.resetRefresh()},P=({selectedOptions:t})=>{},U=(t,e)=>e;async function G(){const t=await ae(se());t&&(r.value=t.data.typeList.map(e=>(e.typeName=m(`code${e.typeNameCode}`),e)),r.value.unshift({type:-1,typeName:m("all")}),h.value=r.value[0].typeName)}let I=[8e3,8005,8018,8021,8023,8100],M=[8001,8002,8003,8004,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,8017,8019,8020,8022,8024,8029,8030,8031,8101,8102,8103,8104,8105,8107];const Q=t=>{y.value=t.map(e=>{["8125"].includes(e.typeNameCode)?e.typeName=m(`code${e.typeNameCode}`)+" "+e.remark:e.typeName=m(`code${e.typeNameCode}`);let p;return I.includes(e.typeNameCode*1)?p="red":M.includes(e.typeNameCode*1)&&(p="green"),{...e,typeColor:p}})};function z(t){return[109].includes(t)?"red":[111,112,110,108,114].includes(t)?"green":""}return q(async()=>{await G()}),(t,e)=>{const p=_("NavBar"),w=_("ArSelect"),E=_("van-picker"),g=_("van-popup"),F=_("van-date-picker");return N(),k("div",ie,[o(p,{title:t.$t("transactionrecord"),"left-arrow":"",onClickLeft:D},null,8,["title"]),s("div",de,[s("div",ue,[s("div",pe,[o(w,{onClickSelect:S,selectName:h.value},null,8,["selectName"]),o(w,{onClickSelect:e[0]||(e[0]=a=>u.value=!0),selectName:c.date||t.$t("pickDate")},null,8,["selectName"])])])]),$(" 配合弹窗层使用 "),o(g,{show:i.value,"onUpdate:show":e[2]||(e[2]=a=>i.value=a),round:"",position:"bottom"},{default:C(()=>[o(E,{"columns-field-names":{text:"typeName",value:"type",children:"children"},columns:r.value,onCancel:e[1]||(e[1]=a=>i.value=!1),onConfirm:L},null,8,["columns"])]),_:1},8,["show"]),$(" 日期选择 "),o(g,{show:u.value,"onUpdate:show":e[4]||(e[4]=a=>u.value=a),round:"",position:"bottom"},{default:C(()=>[o(F,{modelValue:d.value,"onUpdate:modelValue":e[3]||(e[3]=a=>d.value=a),title:t.$t("pickDate"),onCancel:V,onConfirm:B,filter:U,onChange:P,"min-date":v(b),"max-date":v(A)},null,8,["modelValue","title","min-date","max-date"])]),_:1},8,["show"]),o(ce,{distance:100,api:v(le),list:y.value,"onUpdate:list":[e[5]||(e[5]=a=>y.value=a),Q],ref_key:"listRef",ref:f,pageQuery:c,"onUpdate:pageQuery":e[6]||(e[6]=a=>c=a)},{content:C(()=>[s("div",_e,[(N(!0),k(W,null,X(y.value,(a,K)=>(N(),k("div",{class:"transRecord__container-content__item",key:K},[s("div",ve,[s("div",me,[s("h3",null,l(a.typeName),1)]),s("div",ye,[s("div",fe,[s("div",he,l(t.$t("detail")),1),s("div",ke,l(v(ne)(r.value,a.type)),1)]),s("div",Ce,[s("div",Ne,l(t.$t("time")),1),s("div",we,l(a.addTime),1)]),s("div",ge,[s("div",$e,l(t.$t("amount")),1),s("div",{class:Y(["right",a.typeColor]),style:Z(`color:${z(a.type)}`)},l(v(oe)(a.amount)),7)])]),s("div",Re,[s("textarea",{class:"textarea",name:"remark",cols:"30",rows:"10",readonly:!0,value:[21,22,26].includes(a.type)?"":a.remark},null,8,De)])])]))),128))])]),_:1},8,["api","list","pageQuery"])])}}});const Ge=re(xe,[["__scopeId","data-v-2565e76d"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/views/wallet/TransAction/index.vue"]]);export{Ge as default};
