From bbae990ed1f4574fa954753faeae159052d03fba Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 27 一月 2026 16:14:06 +0800
Subject: [PATCH] 待我审核增加销售订单,采购订单

---
 utils/menuListApp.js |  114 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 84 insertions(+), 30 deletions(-)

diff --git a/utils/menuListApp.js b/utils/menuListApp.js
index f509c61..e176ca5 100644
--- a/utils/menuListApp.js
+++ b/utils/menuListApp.js
@@ -1,39 +1,93 @@
-import { getUserInfo } from "./auth";
-import { CommonUtils } from "./common";
+import {
+	getUserInfo
+} from "./auth";
+import {
+	CommonUtils
+} from "./common";
 
-export function getMenuList({ user = getUserInfo()['Czymc'], menuName }) {
-	CommonUtils.doRequest2({
-		url: '',
-		data: {
-			HMakeName: user,
-			menuName,
-		},
-		(res) => {
-			let {data, count, Message} = res.data;
-			if(count == 1) {
-				
-			}else {
-				
+export function getMenuList({
+	user = getUserInfo()['Czymc'],
+	menuName,
+	HType = "APP"
+}) {
+	return new Promise((resolve, reject) => {
+		CommonUtils.doRequest2({
+			url: '/Web/MenuList_APP',
+			data: {
+				HMaker: user,
+				HMenuListName: menuName,
+				HType
+			},
+			resFunction: (res) => {
+				let {
+					data,
+					count,
+					Message
+				} = res.data;
+				if (count == 1) {
+					// uni.showToast({
+					// 	icon: 'none',
+					// 	Message: Message
+					// })
+					resolve(data)
+				} else {
+					uni.showToast({
+						icon: 'none',
+						Message: Message
+					})
+					reject()
+				}
 			}
-		}
-	})()
+		})
+	})
 }
 
-export function setMenuList({user = getUserInfo()['Czymc'], menuName, payload}) {
+export function setMenuList({
+	user = getUserInfo()['Czymc'],
+	menuName,
+	deviceType = "APP",
+	payload
+}) {
+	let oMain = ""
+	let oMainSub = []
+	Array.from(payload).forEach((one, index) => {
+		
+		oMainSub.push({
+			HEntryID: one.id,
+			HIndex: index,
+			HName: one.text,
+			HPicNum: one.img,
+			HShowMode: !one.hidden,
+			HMenuName: menuName,
+		})
+		
+	})
+	oMain = JSON.stringify(oMainSub) + ";" + user + ";" + menuName + ";" +
+		deviceType
+	// string oMain = 
 	CommonUtils.doRequest2({
-		url: '',
+		url: '/Web/SetMenuList_APP',
 		data: {
-			user,
-			menuName,
-			payload,
+			oMain: oMain
 		},
-		(res) => {
-			let {data, count, Message} = res.data;
-			if(count == 1) {
-				
-			}else {
-				
+		resFunction: (res) => {
+			let {
+				data,
+				count,
+				Message
+			} = res.data;
+			if (count == 1) {
+				uni.showToast({
+					icon: 'none',
+					title: Message
+				})
+			} else {
+				uni.showToast({
+					icon: 'none',
+					Message: Message
+				})
 			}
-		}
-	})()
+		},
+		method: 'POST'
+	})
 }
\ No newline at end of file

--
Gitblit v1.9.1