货无忧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

394 lines
14 KiB

"use strict";
const common_vendor = require("../../common/vendor.js");
const api_user = require("../../api/user.js");
const utils_cacheimg = require("../../utils/cacheimg.js");
const store_useStorageStore = require("../../store/useStorageStore.js");
require("../../utils/request.js");
require("../../store/index.js");
require("../../utils/utils.js");
require("../../utils/functions.js");
require("../../utils/IDCardVerification.js");
require("../../utils/base64.js");
require("../../config/host.js");
require("../../utils/md5.js");
if (!Array) {
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
const _component_tips = common_vendor.resolveComponent("tips");
(_easycom_u_navbar2 + _component_tips)();
}
const _easycom_u_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
if (!Math) {
_easycom_u_navbar();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const storageStore = store_useStorageStore.useStorageStore();
const { HANDLE_GETSTORAGEINFO } = storageStore;
const { storageArr } = common_vendor.storeToRefs(storageStore);
const tip = common_vendor.ref(null);
let details = common_vendor.reactive({
tablist: [
{
type: 1,
name: "工作台",
minilist: [
{
icon: "http://47.108.51.143:9000/basic/upload/20231016/440a01005f8333bcc76c1254a1d35570.png",
name: "订单查询",
router: "/pagesHome/pages/orderInquiry/orderInquiry"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240103/81ac2b693232dd9968ec35c0fa3d21f2.png",
name: "运单查询",
router: "/pagesHome/pages/waybillInquiry/waybillInquiry"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240103/81ac2b693232dd9968ec35c0fa3d21f2.png",
name: "库位查询",
router: "/pagesHome/pages/storageInquiry/storageInquiry"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240103/81ac2b693232dd9968ec35c0fa3d21f2.png",
name: "托盘查询",
router: "/pagesHome/pages/trayInquiry/trayInquiry"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240103/81ac2b693232dd9968ec35c0fa3d21f2.png",
name: "库存品查询",
router: "/pagesHome/pages/inventoryInquiry/inventoryInquiry"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "物料维护",
router: "/pagesHome/pages/MaterialMaintenance/MaterialMaintenance"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240320/d22bc792f9deff3f106aafc590ec14fb.png",
name: "库位列表",
router: "/pagesHome/pages/StorageLocationList/StorageLocationList"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "发起工单",
router: "/pagesHome/pages/CreateAbnormalWorkOrder/CreateAbnormalWorkOrder"
}
]
},
{
type: 1,
name: "入库",
minilist: [
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/14451e54503266f168edf3651f2ab798.png",
name: "码板打托",
router: "/pagesHome/pages/codePlateBracket/codePlateBracket"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/d4325e620aa324658da28d7cabc6f223.png",
name: "入库扫描",
router: "/pagesHome/pages/TranNumber/TranNumber"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/49254333c9c5c7aed6e9c8aab89c5998.png",
name: "到车入库",
router: "/pagesHome/pages/ArrivalList/ArrivalList"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/d4325e620aa324658da28d7cabc6f223.png",
name: "预入库包件",
router: "/pagesHome/pages/PreStoragePackage/PreStoragePackage"
}
]
},
{
type: 1,
name: "库内",
minilist: [
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/e2604b3c97ee6001f367df87e3d0fdd1.png",
name: "分拣打托",
router: "/pagesHome/pages/scansorting/scansorting"
},
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '订单分拣',
// router: '/pagesHome/pages/ordersorting/ordersorting',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '库存品分拣',
// router: '/pagesHome/pages/lnventorysorting/lnventorysorting',
// },
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/03add918888d36ce0d566da120510840.png",
name: "扫码上架",
router: "/pagesHome/pages/ScanUpType/ScanUpType"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/7b7ca70b84ebf6a2f72e74300725132c.png",
name: "手动上架",
router: "/pagesHome/pages/PeopleScanUpType/PeopleScanUpType"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/7b7e477dd35483ca7628567c609657fc.png",
name: "移库",
router: "/pagesHome/pages/RelocationType/RelocationType"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/b104c036fc6b6af5b635cc619731db6f.png",
name: "滞留",
router: "/pagesHome/pages/Retention/Retention"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/ce45bb522069f1fd154ca964e66069c2.png",
name: "合托",
router: "/pagesHome/pages/MergeTray/MergeTray"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/91403695005c2c65ea2c9d4ddadac9c3.png",
name: "下架",
router: "/pagesHome/pages/DownGoodsType/DownGoodsType"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231017/4ae045f95dcd923e8e8a553ccb374471.png",
name: "空置托盘",
router: "/pagesHome/pages/RemoveTray/RemoveTray"
},
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '复核',
// router: '/pagesHome/pages/Check/Check',
// },
{
icon: "http://47.108.51.143:9000/basic/upload/20231217/5d3a466a54b62a60cfb9dc53b0f6ded1.png",
name: "托盘数据同步",
router: "/pagesHome/pages/SearchTray/SearchTray"
}
]
},
{
type: 1,
name: "出库",
minilist: [
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/b58252914de56c0e3da1bdc75ac51c07.png",
name: "拣货扫描",
router: "/pagesHome/pages/pickingScan/pickingScan"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/7a9648ffdefd77f7ab8bb7861a2473e7.png",
name: "自提扫描",
router: "/pagesHome/pages/SelfPickupScan/SelfPickupScan"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/e5562240ca21316b21306d17f9394abc.png",
name: "配载装车",
router: "/pagesHome/pages/StowageList/StowageList"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/d58281e6ba1845f313d85a119107e260.png",
name: "中转装车",
router: "/pagesHome/pages/RelayScanList/RelayScanList"
}
]
},
{
type: 1,
name: "配送",
minilist: [
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/1a9bbc8c842b8b7ef555d6cd79d421be.png",
name: "装车扫描",
router: "/pagesHome/pages/LoadingScan/LoadingScan"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20231012/6956f6950cfc291e01c038ea5e13f984.png",
name: "签收扫描",
router: "/pagesHome/pages/signinScan/signinScan"
},
{
icon: "http://47.108.51.143:9000/basic/upload/20240429/16a9b462df1546f2fa6159df00ade62e.png",
name: "直发商家签收",
router: "/pagesHome/pages/directGoMarket/directGoMarket"
}
]
},
{
type: 1,
name: "离线上传",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "离线上传",
router: "/pagesHome/pages/OfflineUpload/OfflineUpload"
}
]
},
{
type: 1,
name: "考核",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "考核指标",
router: "/pagesHome/pages/integral/integral"
},
{
icon: "http://8.137.14.82:9000/bladex/upload/20240117/fac9c4fd6c4f0bee599417fc8fbbee62.png",
name: "我的考核",
router: "/pagesHome/pages/integralMy/integralMy"
}
]
}
]
});
function gopathpage(path) {
common_vendor.index.navigateTo({
url: path
});
}
async function init() {
let tabber = common_vendor.index.getStorageSync("homerouter");
if (tabber) {
details.tablist = tabber;
return;
}
let res = await api_user.appMenuroutes({});
console.log(res, "-------------");
console.log("刷新后");
if (res.code == 200) {
getimgcache(res.data);
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initbuts() {
let authbut = common_vendor.index.getStorageSync("authbuts");
console.log("authbut :>> ", authbut);
if (authbut) {
return;
}
let butres = await api_user.appbuttons({});
console.log(butres.data);
let qxan = [];
butres.data.map((item) => {
item.children.map((ite) => {
qxan.push({ name: ite.name, code: ite.code });
});
});
common_vendor.index.setStorageSync("authbuts", qxan);
}
common_vendor.onShow(() => {
init();
initbuts();
});
common_vendor.onLoad(() => {
if (storageArr.value.length === 0)
HANDLE_GETSTORAGEINFO();
});
common_vendor.onPullDownRefresh(async () => {
await Promise.all([init(), initbuts(), HANDLE_GETSTORAGEINFO()]);
console.log("123 :>> ", 123);
common_vendor.index.stopPullDownRefresh();
});
common_vendor.watchEffect(() => {
if (details.tablist.length > 0) {
common_vendor.index.setStorageSync("homerouter", details.tablist);
}
});
async function getimgcache(data) {
let maxarr = [];
if (!data[0])
return;
for (let item of data[0].children) {
let arr = {
type: 1,
name: item.name,
minilist: []
};
for (let ite of item.children) {
let result = null;
if (ite.source != null) {
result = await utils_cacheimg.getImageCache(ite.source);
}
let obj = {
icon: result,
name: ite.name,
router: ite.path
};
arr.minilist.push(obj);
}
maxarr.push(arr);
}
details.tablist = maxarr;
const _taskArr = [];
for (let item of data[1].children) {
let arr = {
type: 1,
name: item.name,
minilist: []
};
if (item.children) {
for (let ite of item.children) {
let result = null;
if (ite.source != null) {
result = await utils_cacheimg.getImageCache(ite.source);
}
let obj = {
icon: result,
name: ite.name,
router: ite.path
};
arr.minilist.push(obj);
}
} else {
let result = null;
if (item.source != null) {
result = await utils_cacheimg.getImageCache(item.source);
}
let obj = {
icon: result,
name: item.name,
router: item.path
};
arr.minilist.push(obj);
}
_taskArr.push(arr);
}
common_vendor.index.setStorageSync("taskMenu", _taskArr);
console.log(details.tablist);
}
const { tablist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "工作台",
placeholder: true,
border: "true",
leftIcon: ""
}),
b: common_vendor.f(common_vendor.unref(tablist), (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: common_vendor.f(item.minilist, (ite, k1, i1) => {
return {
a: ite.icon,
b: common_vendor.t(ite.name),
c: common_vendor.o(($event) => gopathpage(ite.router))
};
})
};
}),
c: common_vendor.sr(tip, "0c2ea314-1", {
"k": "tip"
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/worksp/logpm/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);