From e10c7bc53745ff2a3b8b0af4984c268516948a9d Mon Sep 17 00:00:00 2001
From: zhengw <247276359@qq.com>
Date: Wed, 4 Feb 2026 11:42:19 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2=E5=8F=8A?=
=?UTF-8?q?=E9=99=84=E4=BB=B6=E6=9F=A5=E7=9C=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/app.json | 5 +-
miniprogram/assets/icons/原料出库.svg | 1 +
miniprogram/assets/icons/调拨出库.svg | 1 +
.../base/viewAttachment/viewAttachment.json | 9 +
.../base/viewAttachment/viewAttachment.ts | 125 ++++++++++++
.../base/viewAttachment/viewAttachment.wxml | 14 ++
.../base/viewAttachment/viewAttachment.wxss | 1 +
miniprogram/pages/finance/giro/giro.ts | 10 +
miniprogram/pages/finance/giro/giro.wxml | 2 +
miniprogram/pages/finance/income/income.ts | 10 +
miniprogram/pages/finance/income/income.wxml | 2 +
miniprogram/pages/finance/outcome/outcome.ts | 10 +
.../pages/finance/outcome/outcome.wxml | 2 +
.../pages/orders/ordersList/ordersList.ts | 10 +
.../pages/orders/ordersList/ordersList.wxml | 2 +
.../pages/other/outbound/outbound.json | 15 ++
miniprogram/pages/other/outbound/outbound.ts | 181 ++++++++++++++++++
.../pages/other/outbound/outbound.wxml | 53 +++++
.../pages/other/outbound/outbound.wxss | 0
.../pages/other/transfer/transfer.json | 15 ++
miniprogram/pages/other/transfer/transfer.ts | 181 ++++++++++++++++++
.../pages/other/transfer/transfer.wxml | 50 +++++
.../pages/other/transfer/transfer.wxss | 0
.../pages/purchase/backOrder/backOrder.ts | 10 +
.../pages/purchase/backOrder/backOrder.wxml | 2 +
.../pages/purchase/buyInOrder/buyInOrder.ts | 10 +
.../pages/purchase/buyInOrder/buyInOrder.wxml | 2 +
.../pages/purchase/buyOrder/buyOrder.ts | 10 +
.../pages/purchase/buyOrder/buyOrder.wxml | 2 +
.../purchase/requestOrder/requestOrder.ts | 10 +
.../purchase/requestOrder/requestOrder.wxml | 2 +
miniprogram/utils/config.ts | 1 +
miniprogram/utils/menuConfig.ts | 101 ++++------
miniprogram/utils/util.ts | 36 ++++
34 files changed, 817 insertions(+), 68 deletions(-)
create mode 100644 miniprogram/assets/icons/原料出库.svg
create mode 100644 miniprogram/assets/icons/调拨出库.svg
create mode 100644 miniprogram/pages/base/viewAttachment/viewAttachment.json
create mode 100644 miniprogram/pages/base/viewAttachment/viewAttachment.ts
create mode 100644 miniprogram/pages/base/viewAttachment/viewAttachment.wxml
create mode 100644 miniprogram/pages/base/viewAttachment/viewAttachment.wxss
create mode 100644 miniprogram/pages/other/outbound/outbound.json
create mode 100644 miniprogram/pages/other/outbound/outbound.ts
create mode 100644 miniprogram/pages/other/outbound/outbound.wxml
create mode 100644 miniprogram/pages/other/outbound/outbound.wxss
create mode 100644 miniprogram/pages/other/transfer/transfer.json
create mode 100644 miniprogram/pages/other/transfer/transfer.ts
create mode 100644 miniprogram/pages/other/transfer/transfer.wxml
create mode 100644 miniprogram/pages/other/transfer/transfer.wxss
diff --git a/miniprogram/app.json b/miniprogram/app.json
index 3066e68..7d402f7 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -26,7 +26,10 @@
"pages/manage/my/my",
"pages/logs/loginLog/loginLog",
"pages/logs/operateLog/operateLog",
- "pages/manage/staff/staff"
+ "pages/manage/staff/staff",
+ "pages/other/transfer/transfer",
+ "pages/base/viewAttachment/viewAttachment",
+ "pages/other/outbound/outbound"
],
"window": {
"navigationBarTextStyle": "black",
diff --git a/miniprogram/assets/icons/原料出库.svg b/miniprogram/assets/icons/原料出库.svg
new file mode 100644
index 0000000..ea9e140
--- /dev/null
+++ b/miniprogram/assets/icons/原料出库.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/miniprogram/assets/icons/调拨出库.svg b/miniprogram/assets/icons/调拨出库.svg
new file mode 100644
index 0000000..3e05aa8
--- /dev/null
+++ b/miniprogram/assets/icons/调拨出库.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/miniprogram/pages/base/viewAttachment/viewAttachment.json b/miniprogram/pages/base/viewAttachment/viewAttachment.json
new file mode 100644
index 0000000..8c6576b
--- /dev/null
+++ b/miniprogram/pages/base/viewAttachment/viewAttachment.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {
+ "t-cell": "tdesign-miniprogram/cell/cell",
+ "t-icon": "tdesign-miniprogram/icon/icon",
+ "t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
+ "t-image": "tdesign-miniprogram/image/image"
+ },
+ "navigationBarTitleText": "附件列表"
+}
\ No newline at end of file
diff --git a/miniprogram/pages/base/viewAttachment/viewAttachment.ts b/miniprogram/pages/base/viewAttachment/viewAttachment.ts
new file mode 100644
index 0000000..069b282
--- /dev/null
+++ b/miniprogram/pages/base/viewAttachment/viewAttachment.ts
@@ -0,0 +1,125 @@
+import { OSSBaseUrl } from '@/utils/config';
+import { loginStatus, post } from '@/utils/https';
+import {
+ formatFileSize,
+ getAuthInfo,
+ getDataSet,
+ getFileType,
+ mediaPreview,
+ toArray,
+} from '@/utils/util';
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ order_no: '',
+ head_id: '',
+ head_id2: '',
+ list: [] as any[],
+ fileIcon: { file: 'file', excel: 'file-excel', pdf: 'file-pdf' },
+ },
+ handleLogin(e: any) {
+ this.setData({ isLogin: e.detail });
+ if (e.detail) {
+ this.init();
+ }
+ },
+ init() {
+ this.setData({ authInfo: getAuthInfo() });
+ this.getList();
+ },
+ formatData(data: any) {
+ const list = toArray(data).map((el) => {
+ el._file_type = getFileType(el.file_name);
+ el.file_path = `${OSSBaseUrl}${el.file_path}`;
+ el._file_size = formatFileSize(el.file_size);
+ return el;
+ });
+ this.setData({ list });
+ },
+ getList() {
+ if (this.data.order_no) {
+ // 销售订单
+ post('Orders/getOrderFiles', { order_no: this.data.order_no }).then((res: any) => {
+ this.formatData(res.files);
+ });
+ } else if (this.data.head_id) {
+ // 仓库采购
+ post('ErpDepot/fileList', { head_id: this.data.head_id }).then((res: any) => {
+ this.formatData(res.data);
+ });
+ } else if (this.data.head_id2) {
+ // 财务
+ post('ErpFinance/fileList', { head_id: this.data.head_id2 }).then((res: any) => {
+ this.formatData(res.data);
+ });
+ }
+ },
+ onPreview(e: any) {
+ const data = getDataSet(e);
+ const index = data.index;
+ const item = this.data.list[index];
+ if (item._file_type != 'file') {
+ mediaPreview([item.file_path], item.file_path);
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ const { title, order_no = '', head_id = '', head_id2 = '' } = options || {};
+ if (title) {
+ wx.setNavigationBarTitle({ title: decodeURIComponent(title) });
+ }
+ this.data.order_no = order_no;
+ this.data.head_id = head_id;
+ this.data.head_id2 = head_id2;
+ this.setData({ loading: true });
+ loginStatus()
+ .then(() => {
+ this.setData({ isLogin: true, loading: false });
+ this.init();
+ })
+ .catch((err) => {
+ this.setData({ isLogin: false, loading: false });
+ console.log('调用登录状态请求失败', err);
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {},
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {},
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {},
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {},
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {},
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {},
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {},
+});
diff --git a/miniprogram/pages/base/viewAttachment/viewAttachment.wxml b/miniprogram/pages/base/viewAttachment/viewAttachment.wxml
new file mode 100644
index 0000000..a6d7630
--- /dev/null
+++ b/miniprogram/pages/base/viewAttachment/viewAttachment.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/base/viewAttachment/viewAttachment.wxss b/miniprogram/pages/base/viewAttachment/viewAttachment.wxss
new file mode 100644
index 0000000..a880bac
--- /dev/null
+++ b/miniprogram/pages/base/viewAttachment/viewAttachment.wxss
@@ -0,0 +1 @@
+/* pages/other/viewAttachment/viewAttachment.wxss */
\ No newline at end of file
diff --git a/miniprogram/pages/finance/giro/giro.ts b/miniprogram/pages/finance/giro/giro.ts
index aa5ae2c..c557d22 100644
--- a/miniprogram/pages/finance/giro/giro.ts
+++ b/miniprogram/pages/finance/giro/giro.ts
@@ -118,6 +118,16 @@ Page({
});
});
},
+ onViewAttachment(e: any) {
+ const data = getDataSet(e);
+ const index = data.index;
+ const item = this.data.list[index];
+ wx.navigateTo({
+ url: `/pages/base/viewAttachment/viewAttachment?head_id2=${
+ item.head_id
+ }&title=${encodeURIComponent(`${item.bill_no} 附件`)}`,
+ });
+ },
/**
* 生命周期函数--监听页面加载
*/
diff --git a/miniprogram/pages/finance/giro/giro.wxml b/miniprogram/pages/finance/giro/giro.wxml
index ab161d2..fa2cb53 100644
--- a/miniprogram/pages/finance/giro/giro.wxml
+++ b/miniprogram/pages/finance/giro/giro.wxml
@@ -45,6 +45,8 @@