diff --git a/childPackage/pages/billDetail/index.wxml b/childPackage/pages/billDetail/index.wxml index 26cc9d4..443e46a 100644 --- a/childPackage/pages/billDetail/index.wxml +++ b/childPackage/pages/billDetail/index.wxml @@ -11,7 +11,7 @@ - 用电地址: + 商户地址: {{ detail.tenement.address }} diff --git a/childPackage/pages/electricQuery/components/accountingCard/index.js b/childPackage/pages/electricQuery/components/accountingCard/index.js index 922326c..e1ed51e 100644 --- a/childPackage/pages/electricQuery/components/accountingCard/index.js +++ b/childPackage/pages/electricQuery/components/accountingCard/index.js @@ -1,24 +1,23 @@ // pages/electricQuery/components/accountingCard/index.js Component({ + /** + * 组件的属性列表 + */ + properties: { + data: Object + }, - /** - * 组件的属性列表 - */ - properties: { - data: Object - }, + /** + * 组件的初始数据 + */ + data: { - /** - * 组件的初始数据 - */ - data: { + }, - }, + /** + * 组件的方法列表 + */ + methods: { - /** - * 组件的方法列表 - */ - methods: { - - } + } }) \ No newline at end of file diff --git a/childPackage/pages/electricQuery/components/accountingCard/index.wxml b/childPackage/pages/electricQuery/components/accountingCard/index.wxml index 5cae3e3..d49642f 100644 --- a/childPackage/pages/electricQuery/components/accountingCard/index.wxml +++ b/childPackage/pages/electricQuery/components/accountingCard/index.wxml @@ -1,41 +1,86 @@ - - {{data.meter.address}} - - - - 初始余额 - - - {{data.startMoney}} - - - - - 储值累计金额 - - - {{data.rechargeMoney}} - - - - - 电费 - - - {{data.electricMoney}} - - - - - - 账务余额 - + + {{data.meter.address}} + 电表编号:{{data.meter.sn}} + + + + + 类目 + 金额 + 更新时间 + + + - - - {{data.currentMoney}} - - + + + + 初始余额 + + + {{data.startMoney}} + + + {{data.updateStartMoneyAt || '--'}} + + + + + + + + 累计充值金额 + + + {{data.rechargeMoney}} + + + {{data.updateRechargeMoneyAt || '--'}} + + + + + + + + 电费 + + + {{data.electricMoney}} + + + {{data.updateElectricMoneyAt || '--'}} + + + + + + + + 账务余额 + + + {{data.accountMoney}} + + + {{data.updateAccountMoneyAt || '--'}} + + + + + + + + 电表余额 + + + {{data.meterMoney}} + + + {{data.updateMeterMoneyAt || '--'}} + + + \ No newline at end of file diff --git a/childPackage/pages/electricQuery/components/accountingCard/index.wxss b/childPackage/pages/electricQuery/components/accountingCard/index.wxss index c538ef6..776e121 100644 --- a/childPackage/pages/electricQuery/components/accountingCard/index.wxss +++ b/childPackage/pages/electricQuery/components/accountingCard/index.wxss @@ -17,8 +17,25 @@ } .tableContent { - margin-top: 10rpx; + margin-top: 25rpx; margin-bottom: 20rpx; text-align: center; font-size: 32rpx; -} \ No newline at end of file +} +.table-header { + display: flex; + width: 100%; + background-color: #f5f5f5; + border-bottom: 1rpx solid #eaeaea; + } + .table-header-row { + display: flex; + width: 100%; + } + .table-header-cell { + flex: 1; + text-align: center; + padding: 20rpx 0; + font-size: 25rpx; + color: #333; + } \ No newline at end of file diff --git a/childPackage/pages/electricQuery/components/reading/index.js b/childPackage/pages/electricQuery/components/reading/index.js index 6a5347e..4a8bafb 100644 --- a/childPackage/pages/electricQuery/components/reading/index.js +++ b/childPackage/pages/electricQuery/components/reading/index.js @@ -35,7 +35,7 @@ Component({ meterReadingHeader: [ { key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address }, { title: '倍率', key: 'ratio' }, - { key: 'number', title: '抄表记录' }, + { key: 'number', title: '当前表字' }, ], meterReadingList: [], yearMonthDayReading: dayjs().format("YYYY-MM-DD"), diff --git a/childPackage/pages/electricQuery/components/reading/index.wxml b/childPackage/pages/electricQuery/components/reading/index.wxml index 204d925..7aff417 100644 --- a/childPackage/pages/electricQuery/components/reading/index.wxml +++ b/childPackage/pages/electricQuery/components/reading/index.wxml @@ -49,54 +49,101 @@ label="地址" readonly /> + + + + + + + + + + + + + + 上次抄表记录起,至现在时间内的用电量 diff --git a/childPackage/pages/electricQuery/components/reading/index.wxss b/childPackage/pages/electricQuery/components/reading/index.wxss index 3779087..a9a3c5d 100644 --- a/childPackage/pages/electricQuery/components/reading/index.wxss +++ b/childPackage/pages/electricQuery/components/reading/index.wxss @@ -92,4 +92,11 @@ page { content:""; display:block; clear:both + } + + .text{ + font-size: 28rpx; + color: #999999; + margin: 10rpx 0; + text-align: center; } \ No newline at end of file diff --git a/childPackage/pages/electricQuery/index.js b/childPackage/pages/electricQuery/index.js index 3947497..34680ed 100644 --- a/childPackage/pages/electricQuery/index.js +++ b/childPackage/pages/electricQuery/index.js @@ -142,14 +142,14 @@ Page({ const times = [...new Set(data?.map(item => item.time))]. map(item => Number(item.replace(point, ""))). sort((a, b) => a - b). - map(ele => `${ele}${point}`.padStart(2, "0")); - + map(ele => `${ele}${point}`.padStart(3, "0")); + console.log(times) const options = { tooltip: { trigger: 'axis' }, legend: { - data: parkInfo?.category === 1 ? ["尖", "峰", "平", "谷"] : data?.map(item => item?.meter?.address), + data: data?.map(item => item?.meter?.address), }, grid: { left: '3%', @@ -165,34 +165,13 @@ Page({ yAxis: { type: 'value' }, - series: parkInfo?.category === 1 ? [ - { - name: "尖", - type: 'line', - data: data?.map(item => Number(item?.critical || 0)) - }, - { - name: "峰", - type: 'line', - data: data?.map(item => Number(item?.peak || 0)) - }, - { - name: "平", - type: 'line', - data: data?.map(item => Number(item?.flat || 0)) - }, - { - name: "谷", - type: 'line', - data: data?.map(item => Number(item?.valley || 0)) - } - ] : ids?.map(item => { + series: ids?.map(item => { const element = data?.find(i => i?.meter?.id === item) const list = data?.filter(ele => ele?.meter?.id === item) const newList = [...times].map(item => { const exist = list.find(ele => ele.time === item) if (exist) { - return exist.number; + return Number(exist.critical)+ Number(exist.peak)+Number(exist.flat)+Number(exist.valley); } return null }) diff --git a/childPackage/pages/electricQuery/index.wxml b/childPackage/pages/electricQuery/index.wxml index 3598af7..4c8c574 100644 --- a/childPackage/pages/electricQuery/index.wxml +++ b/childPackage/pages/electricQuery/index.wxml @@ -30,23 +30,25 @@ - 日耗量 + 日用电量 - 月耗量 + 月电用量 - 年耗量 + 年用电量 - 不包括线损电量,显示为电表实际消耗电量。仅供参考,实际能耗电量以电费账单为主。如有疑问,请联系客服。 + 不包括线损电量,显示为电表实际消用电量。仅供参考,实际能用电量以电费账单为主。如有疑问,请联系客服。 - 选择时间 + 选择时间 + 选择日期 + 选择月份 {{yearMonthDay}} {{yearMonth}} @@ -63,7 +65,10 @@ - 账务余额更新时间为:每次预存电费后,每次账单发布后,剩余的实际金额。电表余额与账务余额相差较大的用户,每半年统一处理一次。 + 账务余额更新时间为:每次预存电费后,每次发布账单后剩余的实际金额。 + + + 计算公式:账务余额 = 初始余额 + 累充充值金额 - 电费 @@ -95,7 +100,7 @@ /> - 合计:表计数量:{{meterNumber}},耗电量:{{electricNumber}} + 合计:表计数量:{{meterNumber}},用电量:{{electricNumber}} diff --git a/pages/my/index.wxml b/pages/my/index.wxml index 5c0684b..b898aa1 100644 --- a/pages/my/index.wxml +++ b/pages/my/index.wxml @@ -88,7 +88,7 @@ - + { - await this.init(); - }) - } - }, - /** - * 组件的方法列表 - */ - methods: { - onParkFocus(e) { - this.setData({ - show: true, - title: "园区", - type: 'park' - }) + /** + * 组件的属性列表 + */ + properties: { + status: Number }, - onConfirm(e) { - const { data } = e.detail; - const that = this; - this.setData({ - parkName: data.name, - park: data.id, - }, () => { - loadingFunc(async () => { - await that.init(); - }) - }) - this.onCancel(); + + /** + * 组件的初始数据 + */ + data: { + keyword: "", + keywordTemp: "", + page: 1, + currentActionSheet: null, + actionItems: [{ + name: '查看详细', + value: 'detail' + }], }, - onSearchKeyword(e) { - const that = this; - that.setData({ - keyword: e.detail - }, () => { - loadingFunc(async () => { - await that.init(); - }) - }) - }, - onChangeKeyword(e) { - this.setData({ keywordTemp: e.detail }) - }, - onSearch() { - const that = this; - that.setData({ - keyword: that.data.keywordTemp - }, () => { - loadingFunc(async () => { - await that.init(); - }) - }) - }, - async init() { - const { page, keyword, park, status } = this.data; - const { code, message, data, total } = await getRechargeApproveList({ park, page, keyword, status }) - if (code !== OK) { - alertInfo(message); - return; - } - this.setData({ - list: data, - total: total, - totalPage: Math.ceil(total / 20) - }) - }, - onChangeReason(e) { - this.setData({ - reason: e.detail, - }) - }, - onApproveClose() { - this.setData({ - reason: "", - approveShow: false, - }) - }, - onApproveConfirm() { - const { reason, record } = this.data; - const that = this; - if (!reason) { - alertInfo("请输入拒绝理由") - return; - } - loadingFunc(async () => { - const { code, message } = await rechargeApprove({ id: record, status: 1, reason }) - if (code !== OK) { - alertInfo(message) - return; - } - alertSuccess("已拒绝") - that.init(); - that.setData({ - reason: "", - approveShow: false, - record: "", - }) - }) - - }, - handleApprove(e) { - const status = e.currentTarget.dataset.status; - const that = this; - if (status === '1') { - this.setData({ - approveShow: true - }) - return; - } - const { record, list } = this.data; - const item = list.find(ele => ele.id === record) - - wx.showModal({ - title: '提示', - content: `您确认要同意${item?.tenement?.shortName || 当前记录}吗?`, - complete: async (res) => { - if (res.cancel) { - - } - if (res.confirm) { + + lifetimes: { + attached() { loadingFunc(async () => { - const { code, message } = await rechargeApprove({ id: record, status: 0, }) - if (code !== OK) { - alertInfo(message) - return; - } - alertSuccess("已同意") - that.init(); + await this.init(); }) - - } } - }) }, - jumpToDetail(e) { - const { id } = e.currentTarget.dataset; - wx.navigateTo({ - url: '/pages/rechargeDetail/index?id=' + id, - }) - }, - async onChangePage(e) { - const page = e.detail.currentIndex; - const that = this; - this.setData({ - page - }, () => { - loadingFunc(async () => { - await that.init(); - }) - }) - }, - onCancel() { - this.setData({ - show: false, - title: "", - type: "", - }) - }, - onChangeSelectRecharge(e) { - this.setData({ - record: e.detail - }) + /** + * 组件的方法列表 + */ + methods: { + onParkFocus(e) { + this.setData({ + show: true, + title: "园区", + type: 'park' + }) + }, + onConfirm(e) { + const { + data + } = e.detail; + const that = this; + this.setData({ + parkName: data.name, + park: data.id, + }, () => { + loadingFunc(async () => { + await that.init(); + }) + }) + this.onCancel(); + }, + onSearchKeyword(e) { + const that = this; + that.setData({ + keyword: e.detail + }, () => { + loadingFunc(async () => { + await that.init(); + }) + }) + }, + onChangeKeyword(e) { + this.setData({ + keywordTemp: e.detail + }) + }, + onSearch() { + const that = this; + that.setData({ + keyword: that.data.keywordTemp + }, () => { + loadingFunc(async () => { + await that.init(); + }) + }) + }, + async init() { + const { + page, + keyword, + park, + status + } = this.data; + const { + code, + message, + data, + total + } = await getRechargeApproveList({ + park, + page, + keyword, + status + }) + if (code !== OK) { + alertInfo(message); + return; + } + this.setData({ + list: data.map(item => { + item.topTime = dayjs(item.topTime).format("MM-DD") + return item + }), + total: total, + totalPage: Math.ceil(total / 20) + }) + }, + onChangeReason(e) { + this.setData({ + reason: e.detail, + }) + }, + onApproveClose() { + this.setData({ + reason: "", + approveShow: false, + }) + }, + onApproveConfirm() { + const { + reason, + record + } = this.data; + const that = this; + if (!reason) { + alertInfo("请输入拒绝理由") + return; + } + loadingFunc(async () => { + const { + code, + message + } = await rechargeApprove({ + id: record, + status: 1, + reason + }) + if (code !== OK) { + alertInfo(message) + return; + } + alertSuccess("已拒绝") + that.init(); + that.setData({ + reason: "", + approveShow: false, + record: "", + }) + }) + + }, + handleApprove(e) { + const status = e.currentTarget.dataset.status; + const that = this; + if (status === '1') { + this.setData({ + approveShow: true + }) + return; + } + const { + record, + list + } = this.data; + const item = list.find(ele => ele.id === record) + + wx.showModal({ + title: '提示', + content: `您确认要同意${item?.tenement?.shortName || 当前记录}吗?`, + complete: async (res) => { + if (res.cancel) { + + } + if (res.confirm) { + loadingFunc(async () => { + const { + code, + message + } = await rechargeApprove({ + id: record, + status: 0, + }) + if (code !== OK) { + alertInfo(message) + return; + } + alertSuccess("已同意") + that.init(); + }) + + } + } + }) + }, + + showActionMenu(e) { + this.setData({ + currentActionSheet: e.currentTarget.dataset.id + }); + }, + + hideActionMenu() { + this.setData({ + currentActionSheet: null + }); + }, + + onMenuSelect(e) { + const { + value + } = e.detail; + const id = e.currentTarget.dataset.id; + + if (value === 'detail') { + this.jumpToDetail({ + currentTarget: { + dataset: { + id + } + } + }); + } + }, + + jumpToDetail(e) { + const { + id + } = e.currentTarget.dataset; + wx.navigateTo({ + url: '/pages/rechargeDetail/index?id=' + id, + }) + }, + async onChangePage(e) { + const page = e.detail.currentIndex; + const that = this; + this.setData({ + page + }, () => { + loadingFunc(async () => { + await that.init(); + }) + }) + }, + onCancel() { + this.setData({ + show: false, + title: "", + type: "", + }) + }, + onChangeSelectRecharge(e) { + this.setData({ + record: e.detail + }) + } } - } }) \ No newline at end of file diff --git a/pages/workBench/components/recharge/components/approve/index.json b/pages/workBench/components/recharge/components/approve/index.json index c064e73..145ec1b 100644 --- a/pages/workBench/components/recharge/components/approve/index.json +++ b/pages/workBench/components/recharge/components/approve/index.json @@ -11,6 +11,8 @@ "van-radio": "@vant/weapp/radio/index", "van-radio-group": "@vant/weapp/radio-group/index", "van-dialog": "@vant/weapp/dialog/index", - "searchSelectWrapper": "/components/searchSelectWrapper/index" + "searchSelectWrapper": "/components/searchSelectWrapper/index", + "van-icon": "@vant/weapp/icon/index", + "van-action-sheet": "@vant/weapp/action-sheet/index" } } \ No newline at end of file diff --git a/pages/workBench/components/recharge/components/approve/index.wxml b/pages/workBench/components/recharge/components/approve/index.wxml index a1795ce..6e2a30a 100644 --- a/pages/workBench/components/recharge/components/approve/index.wxml +++ b/pages/workBench/components/recharge/components/approve/index.wxml @@ -1,100 +1,66 @@ - + - + - 同意 - 拒绝 + 同意 + 拒绝 - - 商户名字 - 充值金额 - 操作 + + + 商户名字 + 充值金额 + 状态 + 提交时间 + 操作 - - + + - {{ item.tenement.shortName }} - {{ item.money }} - - - 查看详细 - + + {{ item.tenement.shortName }} + + + {{ item.money }} + + + {{item.orderStatus}} + + + {{item.topTime}} + + + + + - - - + + + - + - + - - + + \ No newline at end of file diff --git a/pages/workBench/components/recharge/components/approve/index.wxss b/pages/workBench/components/recharge/components/approve/index.wxss index 311c82e..641964d 100644 --- a/pages/workBench/components/recharge/components/approve/index.wxss +++ b/pages/workBench/components/recharge/components/approve/index.wxss @@ -1,6 +1,6 @@ /* pages/workBench/components/recharge/components/waitApprove/index.wxss */ .table { - width: 810rpx; + width: 500rpx; } @@ -17,7 +17,7 @@ } .thead .th { - padding: 20rpx; + padding: 10rpx; white-space: nowrap; text-align: center; box-sizing: border-box; @@ -28,11 +28,11 @@ } .tbody { - width: 810rpx; + width: 500rpx; } .tbody .tr { - padding: 20rpx; + padding: 10rpx; border-bottom: 1rpx solid #EEEEEE; display: flex; align-items: center; @@ -43,3 +43,28 @@ word-break: break-all; text-align: center; } + +.more-icon { + padding: 20rpx; + color: #1989fa; + display: flex; + justify-content: center; + align-items: center; + } + +/* 基础标签样式 */ +.tag { + display: inline-block; + padding: 4px 5px; + margin-right: 0px; + border-radius: 16px; + background: #07c160; + color: white; + font-size: 25rpx; + } + + /* 激活状态样式 */ + .tag.active { + background: #07c160; + color: white; + } \ No newline at end of file diff --git a/project.config.json b/project.config.json index cafe0d2..fd63881 100644 --- a/project.config.json +++ b/project.config.json @@ -37,7 +37,15 @@ } ], "minifyWXSS": true, - "ignoreUploadUnusedFiles": false + "ignoreUploadUnusedFiles": false, + "compileWorklet": false, + "minifyWXML": true, + "localPlugins": false, + "disableUseStrict": false, + "useCompilerPlugins": false, + "condition": false, + "swc": false, + "disableSWC": true }, "editorSetting": { "tabIndent": "insertSpaces", @@ -48,5 +56,7 @@ "ignore": [], "include": [] }, - "appid": "wxb34b4e70f8a5c6f1" + "appid": "wxb34b4e70f8a5c6f1", + "libVersion": "development", + "simulatorPluginLibVersion": {} } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 710c626..7cbcbb6 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -4,57 +4,35 @@ "setting": { "compileHotReLoad": true, "urlCheck": false, - "skylineRenderEnable": true + "skylineRenderEnable": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true, + "bigPackageSizeSupport": false }, "libVersion": "development", "condition": { "miniprogram": { "list": [ { - "name": "childPackage/pages/billDetail/index", - "pathName": "childPackage/pages/billDetail/index", - "query": "id=R00103882183475201&time=2025-03", - "launchMode": "default", - "scene": null - }, - { - "name": "childPackage/pages/electricQuery/index", - "pathName": "childPackage/pages/electricQuery/index", + "name": "pages/workBench/index", + "pathName": "pages/workBench/index", "query": "", - "launchMode": "default", - "scene": null + "scene": null, + "launchMode": "default" }, { - "name": "pages/handleLogin/index", - "pathName": "pages/handleLogin/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "pages/ticket/index", - "pathName": "pages/ticket/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "pages/aid/consult/index", - "pathName": "pages/aid/consult/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "pages/aid/law/index", - "pathName": "pages/aid/law/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "pages/my/index", - "pathName": "pages/my/index", + "name": "pages/workBench/index", + "pathName": "pages/workBench/index", "query": "", "launchMode": "default", "scene": null @@ -74,15 +52,29 @@ "scene": null }, { - "name": "pages/publicTransfer/index", - "pathName": "pages/publicTransfer/index", - "query": "money=50&meterId=METER00071009940341737&tenementId=T00069259189616641&tenementName=%E5%8D%8E%E6%98%8C%E5%AE%9D%E8%83%BD&park=P00070370277523457", + "name": "childPackage/pages/electricQuery/index", + "pathName": "childPackage/pages/electricQuery/index", + "query": "", "launchMode": "default", "scene": null }, { - "name": "pages/special/index", - "pathName": "pages/special/index", + "name": "pages/workBench/index", + "pathName": "pages/workBench/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "childPackage/pages/electricQuery/index", + "pathName": "childPackage/pages/electricQuery/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "childPackage/pages/electricQuery/index", + "pathName": "childPackage/pages/electricQuery/index", "query": "", "launchMode": "default", "scene": null diff --git a/utils/index.js b/utils/index.js index e909304..6d79893 100644 --- a/utils/index.js +++ b/utils/index.js @@ -47,7 +47,8 @@ export function getConfigByEnv() { case 'develop': api = "http://localhost:8000" // api = "https://zgd.hbhcbn.com/api3" - // api = "https://zgd.hbhcbn.com/wxApi" + // TODO: 发布正式时使用此路径 + // api = "https://zgd.hbhcbn.com/wxApi" // api = "http://127.0.0.1:4523/m1/4143821-0-default" break; // 体验版