进销存升级app
1.底部操作栏图标修改
2.首页生产报工调准没反应修改
| | |
| | | { |
| | | "pagePath": "pages/index", |
| | | "iconPath": "static/images/tabbar/home.png", |
| | | "selectedIconPath": "static/images/tabbar/home_.png", |
| | | "selectedIconPath": "static/images/tabbar/homeBlue.png", |
| | | "text": "首页" |
| | | }, |
| | | { |
| | | "pagePath": "pages/works", |
| | | "iconPath": "static/images/tabbar/home.png", |
| | | "selectedIconPath": "static/images/tabbar/home_.png", |
| | | "iconPath": "static/images/tabbar/work.png", |
| | | "selectedIconPath": "static/images/tabbar/workBlue.png", |
| | | "text": "工作台" |
| | | }, |
| | | { |
| | | "pagePath": "pages/message", |
| | | "iconPath": "static/images/tabbar/work.png", |
| | | "selectedIconPath": "static/images/tabbar/work_.png", |
| | | "iconPath": "static/images/tabbar/new.png", |
| | | "selectedIconPath": "static/images/tabbar/newBlue.png", |
| | | "text": "消息" |
| | | }, |
| | | { |
| | | "pagePath": "pages/mine", |
| | | "iconPath": "static/images/tabbar/mine.png", |
| | | "selectedIconPath": "static/images/tabbar/mine_.png", |
| | | "iconPath": "static/images/tabbar/my.png", |
| | | "selectedIconPath": "static/images/tabbar/myBlue.png", |
| | | "text": "我的" |
| | | } |
| | | ] |
| | |
| | | label: "生产报工", |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | bgColor: "linear-gradient(135deg,#3b82f6,#2563eb)", |
| | | route: "/pages/productionManagement/productionReport/index", |
| | | action: "scan", |
| | | }, |
| | | { |
| | | label: "设备巡检", |
| | |
| | | } |
| | | |
| | | function handleQuickTool(item) { |
| | | if (item?.action === "scan") { |
| | | // 生产报工 - 调用扫码 |
| | | uni.scanCode({ |
| | | success: (res) => { |
| | | console.log("扫码结果:", res); |
| | | // 解析扫码结果并跳转到生产报工页面 |
| | | try { |
| | | const scanResult = JSON.parse(res.result); |
| | | uni.navigateTo({ |
| | | url: `/pages/productionManagement/productionReport/index?orderRow=${encodeURIComponent(JSON.stringify(scanResult))}` |
| | | }); |
| | | } catch (e) { |
| | | console.error("扫码结果解析失败:", e); |
| | | uni.showToast({ title: "无效的二维码", icon: "none" }); |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | console.error("扫码失败:", err); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | if (!item?.route) return; |
| | | uni.navigateTo({ url: item.route }); |
| | | } |
| | |
| | | // 页面加载时初始化数据 |
| | | onLoad(options => { |
| | | console.log(options, "options"); |
| | | // 如果没有 orderRow 参数,说明是从首页直接跳转,需要用户手动选择订单 |
| | | if (!options.orderRow) { |
| | | console.log("从首页跳转,无订单数据"); |
| | | getInfo().then(res => { |
| | | // 默认使用当前登录用户 |
| | | form.value.userId = res.user.userId; |
| | | form.value.userName = res.user.userName; |
| | | form.value.schedulingUserId = res.user.userId; |
| | | }); |
| | | return; |
| | | } |
| | | try { |
| | | const orderRow = JSON.parse(options.orderRow); |
| | | console.log("构造的orderRow:", orderRow); |