You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.6 KiB
1 lines
1.6 KiB
"use strict";const e=require("../../common/vendor.js"),a={__name:"expense",setup(a){const t=e.ref("all"),r=e.ref([{id:1,room:"706",exp_amount:39,exp_date:"2025-09-08 14:27:21",username:"李慧琳",exp_method:"微信支付",exp_type:1,remark:"电卡充值"},{id:2,room:"706",exp_amount:11,exp_date:"2025-09-08 14:28:40",username:"李慧琳",exp_method:"微信支付",exp_type:1,remark:"电卡充值"},{id:3,room:"706",exp_amount:50,exp_date:"2025-08-15 09:20:30",username:"李慧琳",exp_method:"支付宝",exp_type:0,remark:"8月水费"},{id:4,room:"706",exp_amount:120,exp_date:"2025-09-01 16:45:12",username:"李慧琳",exp_method:"微信支付",exp_type:2,remark:"购买扫帚、拖把等清洁用品"},{id:5,room:"706",exp_amount:35,exp_date:"2025-08-22 11:10:25",username:"李慧琳",exp_method:"现金",exp_type:2,remark:"购买垃圾桶2个"}]);return e.onShow((()=>{const a=e.index.getStorageSync("isLogin");console.log(a),a||e.index.redirectTo({url:"/pages/login/login"})})),e.computed((()=>{switch(t.value){case"water":return r.value.filter((e=>"0"===e.exp_type));case"electric":case"public":return r.value.filter((e=>"1"===e.exp_type));default:return r.value}})),(a,o)=>({a:"all"===t.value?1:"",b:e.o((e=>t.value="all")),c:"water"===t.value?1:"",d:e.o((e=>t.value="water")),e:"electric"===t.value?1:"",f:e.o((e=>t.value="electric")),g:"public"===t.value?1:"",h:e.o((e=>t.value="public")),i:e.f(r.value,((a,t,r)=>e.e({a:e.t(a.room),b:e.t(a.exp_amount),c:e.t(a.exp_method),d:e.t(a.exp_date),e:e.t(a.username),f:a.remark},a.remark?{g:e.t(a.remark)}:{},{h:t})))})}},t=e._export_sfc(a,[["__scopeId","data-v-8bd808b9"]]);wx.createPage(t);
|