This commit is contained in:
2025-09-20 13:00:53 +08:00
parent 9b107d665a
commit d857eca39f
12 changed files with 89 additions and 64 deletions

View File

@@ -119,12 +119,6 @@
"style": {
"navigationBarTitleText": "报表"
}
},
{
"path": "pages/report/entry",
"style": {
"navigationBarTitleText": "报表"
}
}
],
"globalStyle": {

View File

@@ -152,6 +152,11 @@
uni.navigateTo({ url: '/pages/product/list' })
return
}
if (item.key === 'sale') {
// 进入开单页并预选“销售-出货”
uni.navigateTo({ url: '/pages/order/create?biz=sale&type=out' })
return
}
if (item.key === 'customer') {
uni.navigateTo({ url: '/pages/customer/select' })
return
@@ -165,6 +170,21 @@
uni.navigateTo({ url: '/pages/supplier/select' })
return
}
if (item.key === 'purchase') {
// 进入开单页并预选“进货-进货”
uni.navigateTo({ url: '/pages/order/create?biz=purchase&type=in' })
return
}
if (item.key === 'report') {
// 直接进入报表页
uni.navigateTo({ url: '/pages/report/index' })
return
}
if (item.key === 'otherPay') {
// 进入开单页并预选“其他支出”
uni.navigateTo({ url: '/pages/order/create?biz=expense' })
return
}
uni.showToast({ title: item.title + '(开发中)', icon: 'none' })
},
goProduct() {
@@ -181,7 +201,7 @@
},
goReport() {
this.activeTab = 'report'
uni.navigateTo({ url: '/pages/report/entry' })
uni.navigateTo({ url: '/pages/report/index' })
},
goMe() {
this.activeTab = 'me'

View File

@@ -201,9 +201,22 @@
return Number(p.cash||0) + Number(p.bank||0) + Number(p.wechat||0)
}
},
onLoad() {
this.fetchCategories()
},
onLoad(query) {
try {
const biz = query && query.biz
const type = query && query.type
if (biz === 'sale' || biz === 'purchase' || biz === 'income' || biz === 'expense') {
this.biz = biz
}
if (this.biz === 'sale' && (type === 'out' || type === 'return' || type === 'collect')) {
this.saleType = type
}
if (this.biz === 'purchase' && (type === 'in' || type === 'return' || type === 'pay')) {
this.purchaseType = type
}
} catch(e) {}
this.fetchCategories()
},
onShow() {
if (this.biz === 'sale') {
if (this.order.customerId && this.order.customerId !== this._lastCustomerId) {

View File

@@ -1,44 +0,0 @@
<template>
<view class="entry">
<view class="section">
<view class="section-title">资金报表</view>
<view class="grid">
<view class="btn" @click="go('sale','customer')">利润统计</view>
<view class="btn" @click="go('sale','product')">营业员统计</view>
<view class="btn" @click="go('sale','customer')">经营业绩</view>
</view>
</view>
<view class="section">
<view class="section-title">进销存报表</view>
<view class="grid">
<view class="btn" @click="go('sale','customer')">销售统计</view>
<view class="btn" @click="go('purchase','supplier')">进货统计</view>
<view class="btn" @click="go('inventory','qty')">库存统计</view>
<view class="btn" @click="go('arap','ar')">应收对账单</view>
<view class="btn" @click="go('arap','ap')">应付对账单</view>
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
go(mode, dim) {
const q = `mode=${encodeURIComponent(mode)}&dim=${encodeURIComponent(dim||'')}`
uni.navigateTo({ url: `/pages/report/index?${q}` })
}
}
}
</script>
<style>
.entry { padding: 20rpx; }
.section { margin-bottom: 24rpx; }
.section-title { background:#f1f4f8; color:#6a7a8a; padding: 14rpx 16rpx; border-radius: 12rpx; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18rpx; padding: 18rpx 6rpx 0; }
.btn { text-align: center; padding: 18rpx 8rpx; border: 1rpx solid #e5e9ef; border-radius: 12rpx; color:#333; background: #fff; }
.btn:active { background: #f6f8fa; }
</style>

View File

@@ -1 +1 @@
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t/*每个页面公共css */\r\n</style>\r\n","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif\r\n\r\n// 规范化 WebSocket 关闭码(仅微信小程序)\r\n// #ifdef MP-WEIXIN\r\nif (typeof uni !== 'undefined' && typeof uni.connectSocket === 'function') {\r\n const _connectSocket = uni.connectSocket\r\n uni.connectSocket = function(options) {\r\n const task = _connectSocket.call(this, options)\r\n if (task && typeof task.close === 'function') {\r\n const _close = task.close\r\n task.close = function(params = {}) {\r\n if (params && typeof params === 'object') {\r\n const codeNum = Number(params.code)\r\n const isValid = codeNum === 1000 || (codeNum >= 3000 && codeNum <= 4999)\r\n if (!isValid) {\r\n params.code = 1000\r\n if (!params.reason) params.reason = 'normalized from invalid close code'\r\n }\r\n }\r\n return _close.call(this, params)\r\n }\r\n }\r\n return task\r\n }\r\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;AAKA,IAAI,OAAOF,cAAG,UAAK,eAAe,OAAOA,cAAAA,MAAI,kBAAkB,YAAY;AACzE,QAAM,iBAAiBA,cAAAA,MAAI;AAC3BA,sBAAI,gBAAgB,SAAS,SAAS;AACpC,UAAM,OAAO,eAAe,KAAK,MAAM,OAAO;AAC9C,QAAI,QAAQ,OAAO,KAAK,UAAU,YAAY;AAC5C,YAAM,SAAS,KAAK;AACpB,WAAK,QAAQ,SAAS,SAAS,IAAI;AACjC,YAAI,UAAU,OAAO,WAAW,UAAU;AACxC,gBAAM,UAAU,OAAO,OAAO,IAAI;AAClC,gBAAM,UAAU,YAAY,OAAS,WAAW,OAAQ,WAAW;AACnE,cAAI,CAAC,SAAS;AACZ,mBAAO,OAAO;AACd,gBAAI,CAAC,OAAO;AAAQ,qBAAO,SAAS;AAAA,UACrC;AAAA,QACF;AACD,eAAO,OAAO,KAAK,MAAM,MAAM;AAAA,MAChC;AAAA,IACF;AACD,WAAO;AAAA,EACR;AACH;;;"}
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t/*每个页面公共css */\r\n</style>\r\n","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif\r\n\r\n// 规范化 WebSocket 关闭码(仅微信小程序)\r\n// #ifdef MP-WEIXIN\r\nif (typeof uni !== 'undefined' && typeof uni.connectSocket === 'function') {\r\n const _connectSocket = uni.connectSocket\r\n uni.connectSocket = function(options) {\r\n const task = _connectSocket.call(this, options)\r\n if (task && typeof task.close === 'function') {\r\n const _close = task.close\r\n task.close = function(params = {}) {\r\n if (params && typeof params === 'object') {\r\n const codeNum = Number(params.code)\r\n const isValid = codeNum === 1000 || (codeNum >= 3000 && codeNum <= 4999)\r\n if (!isValid) {\r\n params.code = 1000\r\n if (!params.reason) params.reason = 'normalized from invalid close code'\r\n }\r\n }\r\n return _close.call(this, params)\r\n }\r\n }\r\n return task\r\n }\r\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;AAKA,IAAI,OAAOF,cAAG,UAAK,eAAe,OAAOA,cAAAA,MAAI,kBAAkB,YAAY;AACzE,QAAM,iBAAiBA,cAAAA,MAAI;AAC3BA,sBAAI,gBAAgB,SAAS,SAAS;AACpC,UAAM,OAAO,eAAe,KAAK,MAAM,OAAO;AAC9C,QAAI,QAAQ,OAAO,KAAK,UAAU,YAAY;AAC5C,YAAM,SAAS,KAAK;AACpB,WAAK,QAAQ,SAAS,SAAS,IAAI;AACjC,YAAI,UAAU,OAAO,WAAW,UAAU;AACxC,gBAAM,UAAU,OAAO,OAAO,IAAI;AAClC,gBAAM,UAAU,YAAY,OAAS,WAAW,OAAQ,WAAW;AACnE,cAAI,CAAC,SAAS;AACZ,mBAAO,OAAO;AACd,gBAAI,CAAC,OAAO;AAAQ,qBAAO,SAAS;AAAA,UACrC;AAAA,QACF;AACD,eAAO,OAAO,KAAK,MAAM,MAAM;AAAA,MAChC;AAAA,IACF;AACD,WAAO;AAAA,EACR;AACH;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -22,7 +22,6 @@ if (!Math) {
"./pages/my/index.js";
"./pages/my/about.js";
"./pages/report/index.js";
"./pages/report/entry.js";
}
const _sfc_main = {
onLaunch: function() {

View File

@@ -19,8 +19,7 @@
"pages/detail/index",
"pages/my/index",
"pages/my/about",
"pages/report/index",
"pages/report/entry"
"pages/report/index"
],
"window": {
"navigationBarTextStyle": "black",

View File

@@ -63,6 +63,10 @@ const _sfc_main = {
common_vendor.index.navigateTo({ url: "/pages/product/list" });
return;
}
if (item.key === "sale") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=sale&type=out" });
return;
}
if (item.key === "customer") {
common_vendor.index.navigateTo({ url: "/pages/customer/select" });
return;
@@ -75,6 +79,18 @@ const _sfc_main = {
common_vendor.index.navigateTo({ url: "/pages/supplier/select" });
return;
}
if (item.key === "purchase") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=purchase&type=in" });
return;
}
if (item.key === "report") {
common_vendor.index.navigateTo({ url: "/pages/report/index" });
return;
}
if (item.key === "otherPay") {
common_vendor.index.navigateTo({ url: "/pages/order/create?biz=expense" });
return;
}
common_vendor.index.showToast({ title: item.title + "(开发中)", icon: "none" });
},
goProduct() {
@@ -87,14 +103,14 @@ const _sfc_main = {
goDetail() {
this.activeTab = "detail";
try {
common_vendor.index.__f__("log", "at pages/index/index.vue:179", "[index] goDetail → /pages/detail/index");
common_vendor.index.__f__("log", "at pages/index/index.vue:199", "[index] goDetail → /pages/detail/index");
} catch (e) {
}
common_vendor.index.navigateTo({ url: "/pages/detail/index" });
},
goReport() {
this.activeTab = "report";
common_vendor.index.navigateTo({ url: "/pages/report/entry" });
common_vendor.index.navigateTo({ url: "/pages/report/index" });
},
goMe() {
this.activeTab = "me";

View File

@@ -68,7 +68,21 @@ const _sfc_main = {
return Number(p.cash || 0) + Number(p.bank || 0) + Number(p.wechat || 0);
}
},
onLoad() {
onLoad(query) {
try {
const biz = query && query.biz;
const type = query && query.type;
if (biz === "sale" || biz === "purchase" || biz === "income" || biz === "expense") {
this.biz = biz;
}
if (this.biz === "sale" && (type === "out" || type === "return" || type === "collect")) {
this.saleType = type;
}
if (this.biz === "purchase" && (type === "in" || type === "return" || type === "pay")) {
this.purchaseType = type;
}
} catch (e) {
}
this.fetchCategories();
},
onShow() {

View File

@@ -37,10 +37,24 @@
3.明细功能√
4.报表功能√
9.20王德鹏2
除了“我的”,正常功能基本实现
前端问题:
1.都只做了小程序的,就没看过安卓端,还需要做双端适配
2.图标
2.图标
后端问题:
1.数据库驱动是硬编码
2.图片问题
3.登陆问题
4.账户只测试过一个,切换账户后不知道有没有功能假实现
5.缓存问题
6.“我的”没做
7.vip功能模糊
8.管理端没做
9.咨询功能没做