"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); if (!Math) { warehouseInfo(); } const warehouseInfo = () => "./components/warehouseInfo/warehouseInfo.js"; const _sfc_main = { __name: "warehouse", setup(__props) { const navList = [ { state: 0, text: "仓房基本信息", loadingType: "more", orderList: [] }, { state: 1, text: "库区基本信息", loadingType: "more", orderList: [] } ]; const tabCurrentIndex = common_vendor.ref(0); const tabClick = (index) => { tabCurrentIndex.value = index; }; const warehouses = common_vendor.ref([ { name: "1-1", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false }, { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false }, { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false } ]); const toggleSelection = (index) => { warehouses.value[index].selected = !warehouses.value[index].selected; }; const selectAll = () => { warehouses.value.forEach((warehouse) => { warehouse.selected = true; }); }; const confirmSelection = () => { }; return (_ctx, _cache) => { return { a: common_vendor.f(navList, (item, index, i0) => { return { a: common_vendor.t(item.text), b: index, c: tabCurrentIndex.value === index ? 1 : "", d: common_vendor.o(($event) => tabClick(index), index) }; }), b: common_vendor.f(warehouses.value, (warehouse, index, i0) => { return { a: common_vendor.t(warehouse.name), b: warehouse.selected, c: common_vendor.o(($event) => toggleSelection(index), index), d: common_vendor.t(warehouse.emptyRooms), e: common_vendor.t(warehouse.selected ? "1个" : "0个"), f: common_vendor.t(warehouse.capacity), g: common_vendor.t(warehouse.rooms), h: common_vendor.t(warehouse.emptyRooms), i: common_vendor.t(warehouse.selected ? "1个" : "0个"), j: index }; }), c: common_assets._imports_0$2, d: common_vendor.o(selectAll), e: common_vendor.o(confirmSelection), f: tabCurrentIndex.value, g: common_vendor.o((...args) => _ctx.changeTab && _ctx.changeTab(...args)) }; }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-41554ef3"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/warehouse/warehouse.js.map