hldy_app/unpackage/dist/dev/mp-weixin/Warehouse.js

202 lines
6.0 KiB
JavaScript

"use strict";
const common_vendor = require("./common/vendor.js");
const common_assets = require("./common/assets.js");
if (!Array) {
const _component_donghua = common_vendor.resolveComponent("donghua");
const _component_arrowkeys = common_vendor.resolveComponent("arrowkeys");
(_component_donghua + _component_arrowkeys)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "Warehouse",
props: {
isShow: {
type: Boolean,
required: true
}
},
setup(__props) {
const darkFans = common_vendor.ref(false);
const getblue = common_vendor.ref(false);
const housedex = common_vendor.ref(-1);
const housactive = (index) => {
if (index > 5) {
return;
}
housedex.value = index;
};
const navurl = common_vendor.ref("");
const movecard = (type) => {
common_vendor.index.__f__("log", "at pages/Warehouse/Warehouse.vue:68", type);
switch (type) {
case 0:
housedex.value > 0 ? housedex.value-- : housedex.value = 3;
break;
case 1:
housedex.value > 2 ? housedex.value = 0 : housedex.value++;
break;
case 2:
housedex.value > 2 ? housedex.value = 0 : housedex.value++;
break;
case 3:
housedex.value > 0 ? housedex.value-- : housedex.value = 3;
break;
case 4:
common_vendor.index.__f__("log", "at pages/Warehouse/Warehouse.vue:88", "选中" + housedex.value);
if (housedex.value == 1) {
navurl.value = "pages/Warehouse/procurement";
}
common_vendor.index.navigateTo({
url: "/" + navurl.value
});
break;
case 5:
common_vendor.index.navigateBack();
break;
}
};
const beblue = common_vendor.ref(-1);
let clickResetTimer = null;
function onTap(dir) {
clearClickResetTimer();
beblue.value = dir;
clickResetTimer = setTimeout(() => {
beblue.value = -1;
clickResetTimer = null;
}, 500);
}
function clearClickResetTimer() {
if (clickResetTimer) {
clearTimeout(clickResetTimer);
clickResetTimer = null;
}
}
function genPaths(base, prefix, count, ext = "png", startIndex = 0, pad = false) {
return Array.from({ length: count }, (_, i) => {
const idx = pad ? String(i + startIndex).padStart(2, "0") : i + startIndex;
return `${base}/${prefix}${idx}.${ext}`;
});
}
const animArray = common_vendor.ref([
{
url: genPaths(
"/static/index/warehouse/animation",
"remit0",
5,
// 张数
"png",
1,
// 起始索引为 1
false
// 不补零
),
width: "29vw",
height: "21vw"
},
{
url: genPaths(
"/static/index/warehouse/animation",
"buy0",
5,
// 张数
"png",
1,
// 起始索引为 1
false
// 不补零
),
width: "26vw",
height: "16vw"
},
{
url: genPaths(
"/static/index/warehouse/animation",
"checkout0",
5,
// 张数
"png",
1,
// 起始索引为 1
false
// 不补零
),
width: "24vw",
height: "16vw"
},
{
url: genPaths(
"/static/index/warehouse/animation",
"Pick0",
4,
// 张数
"png",
1,
// 起始索引为 1
false
// 不补零
),
width: "17vw",
height: "13vw"
}
]);
return (_ctx, _cache) => {
return {
a: common_vendor.f(animArray.value, (item, index, i0) => {
return common_vendor.e({
a: housedex.value != index
}, housedex.value != index ? {
b: "/static/index/warehouse/active/w" + index + ".png"
} : {}, {
c: index === housedex.value,
d: "ce457564-0-" + i0,
e: common_vendor.p({
width: item.width,
height: item.height,
links: item.url,
playing: index === housedex.value
}),
f: common_vendor.n("itemact" + (index + 1)),
g: index,
h: common_vendor.o(($event) => housactive(index), index)
});
}),
b: common_vendor.f(12, (item, index, i0) => {
return {
a: "/static/index/warehouse/w" + index + ".png",
b: common_vendor.n("wareitem" + index),
c: index
};
}),
c: common_assets._imports_0$15,
d: common_vendor.o(($event) => housactive(1)),
e: common_vendor.f(["付款", "采购", "结账", "拣货", "护理单元", "中控室"], (v, i, i0) => {
return {
a: common_vendor.t(v),
b: common_vendor.n("annotation" + (i + 1)),
c: i
};
}),
f: common_assets._imports_1$12,
g: common_assets._imports_2$9,
h: common_vendor.o(movecard),
i: common_vendor.p({
getblue: getblue.value,
moveleft: 45
}),
j: common_vendor.f(["请领出库", "退货入库", "库存盘点", "实时监控"], (v, i, i0) => {
return {
a: beblue.value === i ? "/static/index/warehouse/ku/rq" + i + ".png" : "/static/index/warehouse/ku/rs" + i + ".png",
b: common_vendor.t(v),
c: common_vendor.o(($event) => onTap(i)),
d: common_vendor.n(beblue.value === i ? "click-box-target" : "click-box")
};
}),
k: common_vendor.n(darkFans.value ? `darkbackgroundContainer` : `backgroundContainer`),
l: __props.isShow
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ce457564"]]);
exports.MiniProgramPage = MiniProgramPage;
//# sourceMappingURL=../.sourcemap/mp-weixin/Warehouse.js.map