(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/warehouse/warehouse-select"],{

/***/ 306:
/*!************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/main.js?{"page":"pages%2Fwarehouse%2Fwarehouse-select"} ***!
  \************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(wx, createPage) {

var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
__webpack_require__(/*! uni-pages */ 26);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
var _warehouseSelect = _interopRequireDefault(__webpack_require__(/*! ./pages/warehouse/warehouse-select.vue */ 307));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_warehouseSelect.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["createPage"]))

/***/ }),

/***/ 307:
/*!*****************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue ***!
  \*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./warehouse-select.vue?vue&type=template&id=016d574b& */ 308);
/* harmony import */ var _warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warehouse-select.vue?vue&type=script&lang=js& */ 310);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./warehouse-select.vue?vue&type=style&index=0&lang=css& */ 312);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 37);

var renderjs





/* normalize component */

var component = Object(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  _warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["render"],
  _warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  null,
  null,
  false,
  _warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

component.options.__file = "pages/warehouse/warehouse-select.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 308:
/*!************************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=template&id=016d574b& ***!
  \************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./warehouse-select.vue?vue&type=template&id=016d574b& */ 309);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_template_id_016d574b___WEBPACK_IMPORTED_MODULE_0__["components"]; });



/***/ }),

/***/ 309:
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=template&id=016d574b& ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
try {
  components = {
    uniPopup: function () {
      return __webpack_require__.e(/*! import() | node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup */ "node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(__webpack_require__.bind(null, /*! @dcloudio/uni-ui/lib/uni-popup/uni-popup.vue */ 418))
    },
  }
} catch (e) {
  if (
    e.message.indexOf("Cannot find module") !== -1 &&
    e.message.indexOf(".vue") !== -1
  ) {
    console.error(e.message)
    console.error("1. 排查组件名称拼写是否正确")
    console.error(
      "2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
    )
    console.error(
      "3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件"
    )
  } else {
    throw e
  }
}
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  var g0 = !_vm.loading ? _vm.warehouses.length : null
  var l1 =
    !_vm.loading && !(g0 === 0)
      ? _vm.__map(_vm.warehouses, function (warehouse, index) {
          var $orig = _vm.__get_orig(warehouse)
          var g1 =
            warehouse.expanded && !warehouse.loadingShelves
              ? warehouse.shelves && warehouse.shelves.length === 0
              : null
          var l0 =
            warehouse.expanded && !warehouse.loadingShelves && !g1
              ? _vm.__map(warehouse.shelves, function (shelf, shelfIndex) {
                  var $orig = _vm.__get_orig(shelf)
                  var g2 =
                    shelf.expanded && !shelf.loadingFreights
                      ? shelf.freights && shelf.freights.length === 0
                      : null
                  return {
                    $orig: $orig,
                    g2: g2,
                  }
                })
              : null
          return {
            $orig: $orig,
            g1: g1,
            l0: l0,
          }
        })
      : null
  if (!_vm._isMounted) {
    _vm.e0 = function ($event) {
      _vm.editForm.status = "0"
    }
    _vm.e1 = function ($event) {
      _vm.editForm.status = "1"
    }
  }
  _vm.$mp.data = Object.assign(
    {},
    {
      $root: {
        g0: g0,
        l1: l1,
      },
    }
  )
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 310:
/*!******************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=script&lang=js& ***!
  \******************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./warehouse-select.vue?vue&type=script&lang=js& */ 311);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 311:
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=script&lang=js& ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {

var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 32));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 34));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = {
  data: function data() {
    return {
      warehouses: [],
      loading: true,
      phoneNumber: '',
      userName: '',
      userId: '',
      // 添加userId字段
      // 添加编辑表单数据
      editForm: {
        id: '',
        name: '',
        sheQuantityMax: '',
        code: '',
        status: '0',
        address: '',
        manager: '',
        remark: '',
        unit: '库' // 添加单位字段
      },

      // 二级货架编辑表单数据
      editShelfForm: {
        id: '',
        depotId: '',
        depotName: '',
        name: '',
        code: '',
        unit: '区'
      },
      // 二级货架新增表单数据
      addShelfForm: {
        depotId: '',
        depotName: '',
        name: '',
        code: '',
        unit: '区'
      },
      // 三级货架新增表单数据
      addFreightForm: {
        sheId: '',
        sheName: '',
        name: '',
        code: '',
        depotId: '',
        unit: '架'
      },
      // 三级货架编辑表单数据
      editFreightForm: {
        id: '',
        sheId: '',
        sheName: '',
        name: '',
        code: '',
        depotId: '',
        unit: '架'
      },
      showUnitDropdown: false,
      // 控制一级货区单位下拉框显示
      showShelfUnitDropdown: false,
      // 控制二级货架编辑单位下拉框显示
      showAddShelfUnitDropdown: false,
      // 控制二级货架新增单位下拉框显示
      showAddFreightUnitDropdown: false,
      // 控制三级货架新增单位下拉框显示
      showEditFreightUnitDropdown: false,
      // 控制三级货架编辑单位下拉框显示
      unitOptions: ['库', '区', '架', '层', '位'],
      // 单位选项
      currentWarehouseIndex: -1,
      // 当前编辑的一级货区索引
      currentShelfIndex: -1,
      // 当前编辑的二级货架索引
      // 添加编码验证规则
      codeValidationRules: {
        depot: {
          regex: /^[1-9A-Z][0-9A-Z]$/,
          message: '一级货区编码必须为两位，且不能以0开头'
        },
        shelf: {
          default: {
            regex: /^[A-Z][0-9A-Z]$/,
            message: '二级货区编码必须为两位，且首位必须为字母'
          },
          layer: {
            regex: /^[1-9]$/,
            message: '当二级货区为层时，编码必须为一位数字(1-9)'
          }
        },
        freight: {
          default: {
            regex: /^[0-9A-Z]$/,
            message: '三级货区编码必须为一位数字或字母'
          },
          layer: {
            regex: /^([A-Z][0-9]|[0-9]{2})$/,
            message: '当二级货区为层时，三级编码必须为字母+数字组合或两位纯数字'
          }
        }
      }
    };
  },
  onLoad: function onLoad() {
    // 从本地存储获取手机号和用户ID
    this.phoneNumber = uni.getStorageSync('phoneNumber');
    this.userId = uni.getStorageSync('userId'); // 获取用户ID

    if (!this.phoneNumber) {
      uni.showToast({
        title: '登录信息无效，请重新登录',
        icon: 'none',
        duration: 2500
      });
      uni.redirectTo({
        url: '/pages/login/index'
      });
      return;
    }

    // 加载仓库列表
    this.fetchWarehouses();
  },
  methods: {
    // 获取仓库列表
    fetchWarehouses: function fetchWarehouses() {
      var _this = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
        var _yield$uni$request, _yield$uni$request2, err, response;
        return _regenerator.default.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _context.prev = 0;
                console.log('开始获取仓库列表，手机号:', _this.phoneNumber);
                _this.loading = true;
                _context.next = 5;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/namelist',
                  method: 'GET',
                  data: {
                    phoneNumber: _this.phoneNumber
                  }
                });
              case 5:
                _yield$uni$request = _context.sent;
                _yield$uni$request2 = (0, _slicedToArray2.default)(_yield$uni$request, 2);
                err = _yield$uni$request2[0];
                response = _yield$uni$request2[1];
                console.log("response111", response);
                _this.loading = false;
                if (!err) {
                  _context.next = 15;
                  break;
                }
                console.error('请求发生错误:', err);
                uni.showToast({
                  title: '获取仓库列表失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 15:
                console.log('API响应完整数据:', response);
                if (!(!response || !response.data)) {
                  _context.next = 20;
                  break;
                }
                console.error('响应数据为空');
                uni.showToast({
                  title: '获取仓库列表失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 20:
                console.log('响应数据:', response.data);
                if (response.data.rows) {
                  _context.next = 25;
                  break;
                }
                console.error('rows数据为空');
                uni.showToast({
                  title: '暂无可用仓库',
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 25:
                // 初始化仓库数据，添加expanded属性
                _this.warehouses = (response.data.rows || []).map(function (warehouse) {
                  return _objectSpread(_objectSpread({}, warehouse), {}, {
                    expanded: false,
                    shelves: [],
                    loadingShelves: false
                  });
                });
                console.log('解析后的仓库数据:', _this.warehouses);
                _context.next = 34;
                break;
              case 29:
                _context.prev = 29;
                _context.t0 = _context["catch"](0);
                console.error('获取仓库列表失败:', _context.t0);
                _this.loading = false;
                uni.showToast({
                  title: '获取仓库列表失败',
                  icon: 'none',
                  duration: 2500
                });
              case 34:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, null, [[0, 29]]);
      }))();
    },
    // 展开/收起一级货区
    toggleExpand: function toggleExpand(warehouse, index) {
      var _this2 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
        return _regenerator.default.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                // 切换展开状态
                _this2.$set(_this2.warehouses[index], 'expanded', !warehouse.expanded);

                // 如果是展开且还没有加载过二级货架数据，则加载数据
                if (!(_this2.warehouses[index].expanded && (!warehouse.shelves || warehouse.shelves.length === 0))) {
                  _context2.next = 4;
                  break;
                }
                _context2.next = 4;
                return _this2.fetchShelves(warehouse.id, index);
              case 4:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }))();
    },
    // 获取二级货架数据
    fetchShelves: function fetchShelves(depotId, warehouseIndex) {
      var _this3 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
        var _yield$uni$request3, _yield$uni$request4, err, response, shelves;
        return _regenerator.default.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _context3.prev = 0;
                _this3.$set(_this3.warehouses[warehouseIndex], 'loadingShelves', true);
                _context3.next = 4;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/sheNamelist',
                  method: 'GET',
                  data: {
                    depotId: depotId
                  }
                });
              case 4:
                _yield$uni$request3 = _context3.sent;
                _yield$uni$request4 = (0, _slicedToArray2.default)(_yield$uni$request3, 2);
                err = _yield$uni$request4[0];
                response = _yield$uni$request4[1];
                _this3.$set(_this3.warehouses[warehouseIndex], 'loadingShelves', false);
                if (!err) {
                  _context3.next = 13;
                  break;
                }
                console.error('获取二级货架失败:', err);
                uni.showToast({
                  title: '获取二级货架失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context3.abrupt("return");
              case 13:
                if (!(!response || !response.data || !response.data.rows)) {
                  _context3.next = 17;
                  break;
                }
                console.error('二级货架数据为空');
                _this3.$set(_this3.warehouses[warehouseIndex], 'shelves', []);
                return _context3.abrupt("return");
              case 17:
                // 初始化二级货架数据
                shelves = (response.data.rows || []).map(function (shelf) {
                  return _objectSpread(_objectSpread({}, shelf), {}, {
                    expanded: false,
                    freights: [],
                    loadingFreights: false
                  });
                });
                _this3.$set(_this3.warehouses[warehouseIndex], 'shelves', shelves);
                console.log('二级货架数据:', shelves);
                _context3.next = 27;
                break;
              case 22:
                _context3.prev = 22;
                _context3.t0 = _context3["catch"](0);
                console.error('获取二级货架失败:', _context3.t0);
                _this3.$set(_this3.warehouses[warehouseIndex], 'loadingShelves', false);
                uni.showToast({
                  title: '获取二级货架失败',
                  icon: 'none',
                  duration: 2500
                });
              case 27:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3, null, [[0, 22]]);
      }))();
    },
    // 展开/收起二级货架
    toggleExpandShelf: function toggleExpandShelf(warehouse, warehouseIndex, shelf, shelfIndex) {
      var _this4 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
        return _regenerator.default.wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                // 切换展开状态
                _this4.$set(_this4.warehouses[warehouseIndex].shelves[shelfIndex], 'expanded', !shelf.expanded);

                // 如果是展开且还没有加载过三级货架数据，则加载数据
                if (!(_this4.warehouses[warehouseIndex].shelves[shelfIndex].expanded && (!shelf.freights || shelf.freights.length === 0))) {
                  _context4.next = 4;
                  break;
                }
                _context4.next = 4;
                return _this4.fetchFreights(shelf.id, warehouseIndex, shelfIndex);
              case 4:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4);
      }))();
    },
    // 获取三级货架数据
    fetchFreights: function fetchFreights(sheId, warehouseIndex, shelfIndex) {
      var _this5 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
        var _yield$uni$request5, _yield$uni$request6, err, response;
        return _regenerator.default.wrap(function _callee5$(_context5) {
          while (1) {
            switch (_context5.prev = _context5.next) {
              case 0:
                _context5.prev = 0;
                _this5.$set(_this5.warehouses[warehouseIndex].shelves[shelfIndex], 'loadingFreights', true);
                _context5.next = 4;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/freNamelist',
                  method: 'GET',
                  data: {
                    sheId: sheId
                  }
                });
              case 4:
                _yield$uni$request5 = _context5.sent;
                _yield$uni$request6 = (0, _slicedToArray2.default)(_yield$uni$request5, 2);
                err = _yield$uni$request6[0];
                response = _yield$uni$request6[1];
                _this5.$set(_this5.warehouses[warehouseIndex].shelves[shelfIndex], 'loadingFreights', false);
                if (!err) {
                  _context5.next = 13;
                  break;
                }
                console.error('获取三级货架失败:', err);
                uni.showToast({
                  title: '获取三级货架失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context5.abrupt("return");
              case 13:
                if (!(!response || !response.data || !response.data.rows)) {
                  _context5.next = 17;
                  break;
                }
                console.error('三级货架数据为空');
                _this5.$set(_this5.warehouses[warehouseIndex].shelves[shelfIndex], 'freights', []);
                return _context5.abrupt("return");
              case 17:
                // 设置三级货架数据
                _this5.$set(_this5.warehouses[warehouseIndex].shelves[shelfIndex], 'freights', response.data.rows || []);
                console.log('三级货架数据:', response.data.rows);
                _context5.next = 26;
                break;
              case 21:
                _context5.prev = 21;
                _context5.t0 = _context5["catch"](0);
                console.error('获取三级货架失败:', _context5.t0);
                _this5.$set(_this5.warehouses[warehouseIndex].shelves[shelfIndex], 'loadingFreights', false);
                uni.showToast({
                  title: '获取三级货架失败',
                  icon: 'none',
                  duration: 2500
                });
              case 26:
              case "end":
                return _context5.stop();
            }
          }
        }, _callee5, null, [[0, 21]]);
      }))();
    },
    // 选择仓库
    selectWarehouse: function selectWarehouse(warehouse) {
      console.log('选择仓库:', warehouse);
      uni.removeStorageSync('selectedWarehouse', warehouse);

      // 将选中的仓库信息存储到本地
      uni.setStorageSync('selectedWarehouse', warehouse);
      // 跳转到首页
      uni.switchTab({
        url: '/pages/index/index',
        success: function success() {
          console.log('成功跳转到首页');
        },
        fail: function fail(err) {
          console.error('跳转到首页失败:', err);
          // 如果switchTab失败，尝试使用navigateTo
          uni.switchTab({
            url: '/pages/index/index'
          });
        }
      });
    },
    // 跳转到新建货区页面
    navigateToCreateWarehouse: function navigateToCreateWarehouse() {
      uni.navigateTo({
        url: '/pages/warehouse/create-warehouse',
        success: function success() {
          console.log('成功跳转到创建货区页面');
        },
        fail: function fail(err) {
          console.error('跳转创建货区页面失败:', err);
          uni.showToast({
            title: '页面跳转失败',
            icon: 'none',
            duration: 2500
          });
        }
      });
    },
    // 修改编辑一级货区方法
    editWarehouse: function editWarehouse(warehouse) {
      console.log('编辑一级货区:', warehouse);
      // 填充表单数据
      this.editForm = {
        id: warehouse.id,
        name: warehouse.name || '',
        sheQuantityMax: warehouse.sheQuantityMax || '',
        code: warehouse.code || '',
        status: warehouse.status || '0',
        address: warehouse.address || '',
        manager: warehouse.manager || '',
        remark: warehouse.remark || '',
        unit: warehouse.unit || '库'
      };
      // 打开弹窗
      this.$refs.editPopup.open();
    },
    // 关闭编辑弹窗
    closeEditPopup: function closeEditPopup() {
      this.showUnitDropdown = false;
      this.$refs.editPopup.close();
    },
    // 验证货区编码
    validateCode: function validateCode(type, code, unitType) {
      // 检查编码是否为空
      if (!code) {
        return {
          valid: false,
          message: '编码不能为空'
        };
      }
      var regex, message;

      // 根据货区类型选择验证规则
      switch (type) {
        case 'depot':
          // 一级货区
          regex = this.codeValidationRules.depot.regex;
          message = this.codeValidationRules.depot.message;
          break;
        case 'shelf':
          // 二级货区
          // 如果是"层"，使用特殊规则
          if (unitType === '层') {
            regex = this.codeValidationRules.shelf.layer.regex;
            message = this.codeValidationRules.shelf.layer.message;
          } else {
            regex = this.codeValidationRules.shelf.default.regex;
            message = this.codeValidationRules.shelf.default.message;
          }
          break;
        case 'freight':
          // 三级货区
          // 检查对应的二级货区是否为"层"
          if (unitType === '层') {
            regex = this.codeValidationRules.freight.layer.regex;
            message = this.codeValidationRules.freight.layer.message;
          } else {
            regex = this.codeValidationRules.freight.default.regex;
            message = this.codeValidationRules.freight.default.message;
          }
          break;
        default:
          return {
            valid: false,
            message: '未知货区类型'
          };
      }

      // 执行验证
      if (regex.test(code)) {
        return {
          valid: true,
          message: '验证通过'
        };
      } else {
        return {
          valid: false,
          message: message
        };
      }
    },
    // 提交编辑表单
    submitEditForm: function submitEditForm() {
      var _this6 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
        var codeValidation, params, _yield$uni$request7, _yield$uni$request8, err, res;
        return _regenerator.default.wrap(function _callee6$(_context6) {
          while (1) {
            switch (_context6.prev = _context6.next) {
              case 0:
                _context6.prev = 0;
                if (_this6.editForm.name) {
                  _context6.next = 4;
                  break;
                }
                uni.showToast({
                  title: '请输入名称',
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 4:
                if (_this6.editForm.sheQuantityMax) {
                  _context6.next = 7;
                  break;
                }
                uni.showToast({
                  title: '请输入货区数量',
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 7:
                if (_this6.editForm.code) {
                  _context6.next = 10;
                  break;
                }
                uni.showToast({
                  title: '请输入货区编码',
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 10:
                // 验证一级货区编码
                codeValidation = _this6.validateCode('depot', _this6.editForm.code);
                if (codeValidation.valid) {
                  _context6.next = 14;
                  break;
                }
                uni.showToast({
                  title: codeValidation.message,
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 14:
                if (_this6.editForm.manager) {
                  _context6.next = 17;
                  break;
                }
                uni.showToast({
                  title: '请输入管理员',
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 17:
                // 构造请求参数
                params = {
                  id: _this6.editForm.id,
                  name: _this6.editForm.name,
                  sheQuantityMax: _this6.editForm.sheQuantityMax,
                  code: _this6.editForm.code,
                  status: _this6.editForm.status,
                  address: _this6.editForm.address,
                  manager: _this6.editForm.manager,
                  remark: _this6.editForm.remark,
                  unit: _this6.editForm.unit
                }; // 调用接口更新数据
                _context6.next = 20;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/depot/depot',
                  method: 'PUT',
                  data: params,
                  header: {
                    'Content-Type': 'application/json'
                  }
                });
              case 20:
                _yield$uni$request7 = _context6.sent;
                _yield$uni$request8 = (0, _slicedToArray2.default)(_yield$uni$request7, 2);
                err = _yield$uni$request8[0];
                res = _yield$uni$request8[1];
                if (!err) {
                  _context6.next = 28;
                  break;
                }
                console.error('更新货区信息失败:', err);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context6.abrupt("return");
              case 28:
                // 检查响应
                if (res.data && res.data.code === 200) {
                  // 更新成功
                  uni.showToast({
                    title: '更新成功',
                    icon: 'success',
                    duration: 2500
                  });
                  // 关闭弹窗
                  _this6.closeEditPopup();
                  // 刷新列表
                  _this6.fetchWarehouses();
                } else {
                  // 更新失败
                  uni.showToast({
                    title: res.data.msg || '更新失败',
                    icon: 'none',
                    duration: 2500
                  });
                }
                _context6.next = 35;
                break;
              case 31:
                _context6.prev = 31;
                _context6.t0 = _context6["catch"](0);
                console.error('更新货区信息失败:', _context6.t0);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
              case 35:
              case "end":
                return _context6.stop();
            }
          }
        }, _callee6, null, [[0, 31]]);
      }))();
    },
    // 删除一级货区
    deleteWarehouse: function deleteWarehouse(warehouse) {
      var _this7 = this;
      uni.showModal({
        title: '确认删除',
        content: "\u786E\u5B9A\u8981\u5220\u9664\"".concat(warehouse.name, "\"\u5417\uFF1F"),
        success: function () {
          var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(res) {
            var userId, _yield$uni$request9, _yield$uni$request10, err, response, _response$data;
            return _regenerator.default.wrap(function _callee7$(_context7) {
              while (1) {
                switch (_context7.prev = _context7.next) {
                  case 0:
                    if (!res.confirm) {
                      _context7.next = 24;
                      break;
                    }
                    console.log('确认删除一级货区:', warehouse);
                    // 获取userId
                    userId = uni.getStorageSync('userId');
                    if (userId) {
                      _context7.next = 6;
                      break;
                    }
                    uni.showToast({
                      title: '用户未登录，请先登录',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context7.abrupt("return");
                  case 6:
                    _context7.prev = 6;
                    _context7.next = 9;
                    return uni.request({
                      url: "https://api.buzhiyushu.cn/depot/depot/".concat(warehouse.id, "?LocalUserId=").concat(userId),
                      method: 'DELETE'
                    });
                  case 9:
                    _yield$uni$request9 = _context7.sent;
                    _yield$uni$request10 = (0, _slicedToArray2.default)(_yield$uni$request9, 2);
                    err = _yield$uni$request10[0];
                    response = _yield$uni$request10[1];
                    if (!err) {
                      _context7.next = 17;
                      break;
                    }
                    console.error('删除一级货区失败:', err);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context7.abrupt("return");
                  case 17:
                    // 检查响应
                    if (response.data && response.data.code === 200) {
                      // 删除成功
                      uni.showToast({
                        title: '删除成功',
                        icon: 'success',
                        duration: 2500
                      });
                      // 删除成功后刷新列表
                      _this7.fetchWarehouses();
                    } else {
                      // 删除失败
                      uni.showToast({
                        title: ((_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.msg) || '删除失败',
                        icon: 'none',
                        duration: 2500
                      });
                    }
                    _context7.next = 24;
                    break;
                  case 20:
                    _context7.prev = 20;
                    _context7.t0 = _context7["catch"](6);
                    console.error('删除一级货区出错:', _context7.t0);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                  case 24:
                  case "end":
                    return _context7.stop();
                }
              }
            }, _callee7, null, [[6, 20]]);
          }));
          function success(_x) {
            return _success.apply(this, arguments);
          }
          return success;
        }()
      });
    },
    // 添加二级货架
    addShelf: function addShelf(warehouse) {
      console.log('添加二级货架到一级货区:', warehouse);
      // 填充表单数据
      this.addShelfForm = {
        depotId: warehouse.id,
        depotName: warehouse.name + warehouse.unit,
        name: '',
        code: '',
        unit: '区'
      };
      // 记录当前编辑的仓库索引
      this.currentWarehouseIndex = this.warehouses.findIndex(function (w) {
        return w.id === warehouse.id;
      });
      // 打开弹窗
      this.$refs.addShelfPopup.open();
    },
    // 关闭二级货架新增弹窗
    closeAddShelfPopup: function closeAddShelfPopup() {
      this.$refs.addShelfPopup.close();
    },
    // 提交二级货架新增表单
    submitAddShelfForm: function submitAddShelfForm() {
      var _this8 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
        var parentWarehouse, parentUnit, codeValidation, params, _yield$uni$request11, _yield$uni$request12, err, res;
        return _regenerator.default.wrap(function _callee8$(_context8) {
          while (1) {
            switch (_context8.prev = _context8.next) {
              case 0:
                _context8.prev = 0;
                if (_this8.addShelfForm.name) {
                  _context8.next = 4;
                  break;
                }
                uni.showToast({
                  title: '请输入名称',
                  icon: 'none',
                  duration: 2500
                });
                return _context8.abrupt("return");
              case 4:
                if (_this8.addShelfForm.code) {
                  _context8.next = 7;
                  break;
                }
                uni.showToast({
                  title: '请输入货区编码',
                  icon: 'none',
                  duration: 2500
                });
                return _context8.abrupt("return");
              case 7:
                // 获取当前一级货区的单位
                parentWarehouse = _this8.warehouses.find(function (w) {
                  return w.id === _this8.addShelfForm.depotId;
                });
                parentUnit = parentWarehouse ? parentWarehouse.unit : '库'; // 验证二级货区编码
                codeValidation = _this8.validateCode('shelf', _this8.addShelfForm.code, parentUnit);
                if (codeValidation.valid) {
                  _context8.next = 13;
                  break;
                }
                uni.showToast({
                  title: codeValidation.message,
                  icon: 'none',
                  duration: 2500
                });
                return _context8.abrupt("return");
              case 13:
                // 构造请求参数
                params = {
                  name: _this8.addShelfForm.name,
                  code: _this8.addShelfForm.code,
                  depotId: _this8.addShelfForm.depotId,
                  userId: _this8.userId,
                  // 添加用户ID
                  unit: _this8.addShelfForm.unit
                }; // 调用接口添加数据
                _context8.next = 16;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves',
                  method: 'POST',
                  data: params,
                  header: {
                    'Content-Type': 'application/json'
                  }
                });
              case 16:
                _yield$uni$request11 = _context8.sent;
                _yield$uni$request12 = (0, _slicedToArray2.default)(_yield$uni$request11, 2);
                err = _yield$uni$request12[0];
                res = _yield$uni$request12[1];
                if (!err) {
                  _context8.next = 24;
                  break;
                }
                console.error('新增二级货架失败:', err);
                uni.showToast({
                  title: '新增失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context8.abrupt("return");
              case 24:
                // 检查响应
                if (res.data && res.data.code === 200) {
                  // 新增成功
                  uni.showToast({
                    title: '新增成功',
                    icon: 'success',
                    duration: 2500
                  });
                  // 关闭弹窗
                  _this8.closeAddShelfPopup();
                  // 刷新二级货架列表
                  if (_this8.currentWarehouseIndex !== -1) {
                    _this8.fetchShelves(_this8.addShelfForm.depotId, _this8.currentWarehouseIndex);
                  }
                } else {
                  // 新增失败
                  uni.showToast({
                    title: res.data.msg || '新增失败',
                    icon: 'none',
                    duration: 2500
                  });
                }
                _context8.next = 31;
                break;
              case 27:
                _context8.prev = 27;
                _context8.t0 = _context8["catch"](0);
                console.error('新增二级货架失败:', _context8.t0);
                uni.showToast({
                  title: '新增失败',
                  icon: 'none',
                  duration: 2500
                });
              case 31:
              case "end":
                return _context8.stop();
            }
          }
        }, _callee8, null, [[0, 27]]);
      }))();
    },
    // 编辑二级货架
    editShelf: function editShelf(warehouse, shelf) {
      console.log('编辑二级货架:', shelf, '所属一级货区:', warehouse);
      // 填充表单数据
      this.editShelfForm = {
        id: shelf.id,
        depotId: warehouse.id,
        depotName: warehouse.name + warehouse.unit,
        name: shelf.name || '',
        code: shelf.code || ''
      };
      // 记录当前编辑的仓库索引
      this.currentWarehouseIndex = this.warehouses.findIndex(function (w) {
        return w.id === warehouse.id;
      });
      // 打开弹窗
      this.$refs.editShelfPopup.open();
    },
    // 关闭二级货架编辑弹窗
    closeEditShelfPopup: function closeEditShelfPopup() {
      this.$refs.editShelfPopup.close();
    },
    // 提交二级货架编辑表单
    submitEditShelfForm: function submitEditShelfForm() {
      var _this9 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
        var params, _yield$uni$request13, _yield$uni$request14, err, res;
        return _regenerator.default.wrap(function _callee9$(_context9) {
          while (1) {
            switch (_context9.prev = _context9.next) {
              case 0:
                _context9.prev = 0;
                if (_this9.editShelfForm.name) {
                  _context9.next = 4;
                  break;
                }
                uni.showToast({
                  title: '请输入名称',
                  icon: 'none',
                  duration: 2500
                });
                return _context9.abrupt("return");
              case 4:
                // 构造请求参数
                params = {
                  id: _this9.editShelfForm.id,
                  name: _this9.editShelfForm.name,
                  unit: _this9.editShelfForm.unit
                }; // 调用接口更新数据
                _context9.next = 7;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves',
                  method: 'PUT',
                  data: params,
                  header: {
                    'Content-Type': 'application/json'
                  }
                });
              case 7:
                _yield$uni$request13 = _context9.sent;
                _yield$uni$request14 = (0, _slicedToArray2.default)(_yield$uni$request13, 2);
                err = _yield$uni$request14[0];
                res = _yield$uni$request14[1];
                if (!err) {
                  _context9.next = 15;
                  break;
                }
                console.error('更新二级货架信息失败:', err);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context9.abrupt("return");
              case 15:
                // 检查响应
                if (res.data && res.data.code === 200) {
                  // 更新成功
                  uni.showToast({
                    title: '更新成功',
                    icon: 'success',
                    duration: 2500
                  });
                  // 关闭弹窗
                  _this9.closeEditShelfPopup();
                  // 刷新二级货架列表
                  if (_this9.currentWarehouseIndex !== -1) {
                    _this9.fetchShelves(_this9.editShelfForm.depotId, _this9.currentWarehouseIndex);
                  }
                } else {
                  // 更新失败
                  uni.showToast({
                    title: res.data.msg || '更新失败',
                    icon: 'none',
                    duration: 2500
                  });
                }
                _context9.next = 22;
                break;
              case 18:
                _context9.prev = 18;
                _context9.t0 = _context9["catch"](0);
                console.error('更新二级货架信息失败:', _context9.t0);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
              case 22:
              case "end":
                return _context9.stop();
            }
          }
        }, _callee9, null, [[0, 18]]);
      }))();
    },
    // 删除二级货架
    deleteShelf: function deleteShelf(warehouse, shelf) {
      var _this10 = this;
      uni.showModal({
        title: '确认删除',
        content: "\u786E\u5B9A\u8981\u5220\u9664\"".concat(shelf.name, "\"\u5417\uFF1F"),
        success: function () {
          var _success2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(res) {
            var userId, _yield$uni$request15, _yield$uni$request16, err, response, index, _response$data2;
            return _regenerator.default.wrap(function _callee10$(_context10) {
              while (1) {
                switch (_context10.prev = _context10.next) {
                  case 0:
                    if (!res.confirm) {
                      _context10.next = 24;
                      break;
                    }
                    console.log('确认删除二级货架:', shelf);
                    // 获取userId
                    userId = uni.getStorageSync('userId');
                    if (userId) {
                      _context10.next = 6;
                      break;
                    }
                    uni.showToast({
                      title: '用户未登录，请先登录',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context10.abrupt("return");
                  case 6:
                    _context10.prev = 6;
                    _context10.next = 9;
                    return uni.request({
                      url: "https://api.buzhiyushu.cn/shelves/shelves/".concat(shelf.id, "?LocalUserId=").concat(userId),
                      method: 'DELETE'
                    });
                  case 9:
                    _yield$uni$request15 = _context10.sent;
                    _yield$uni$request16 = (0, _slicedToArray2.default)(_yield$uni$request15, 2);
                    err = _yield$uni$request16[0];
                    response = _yield$uni$request16[1];
                    if (!err) {
                      _context10.next = 17;
                      break;
                    }
                    console.error('删除二级货架失败:', err);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context10.abrupt("return");
                  case 17:
                    // 检查响应
                    if (response.data && response.data.code === 200) {
                      // 删除成功
                      uni.showToast({
                        title: '删除成功',
                        icon: 'success',
                        duration: 2500
                      });
                      // 删除成功后刷新当前一级货区的二级货架列表
                      index = _this10.warehouses.findIndex(function (w) {
                        return w.id === warehouse.id;
                      });
                      if (index !== -1) {
                        _this10.fetchShelves(warehouse.id, index);
                      }
                    } else {
                      // 删除失败
                      uni.showToast({
                        title: ((_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.msg) || '删除失败',
                        icon: 'none',
                        duration: 2500
                      });
                    }
                    _context10.next = 24;
                    break;
                  case 20:
                    _context10.prev = 20;
                    _context10.t0 = _context10["catch"](6);
                    console.error('删除二级货架出错:', _context10.t0);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                  case 24:
                  case "end":
                    return _context10.stop();
                }
              }
            }, _callee10, null, [[6, 20]]);
          }));
          function success(_x2) {
            return _success2.apply(this, arguments);
          }
          return success;
        }()
      });
    },
    // 添加三级货架
    addFreight: function addFreight(warehouse, shelf) {
      console.log('添加三级货架到二级货架:', shelf, '所属一级货区:', warehouse);
      // 填充表单数据
      this.addFreightForm = {
        sheId: shelf.id,
        sheName: shelf.name,
        depotId: warehouse.id,
        name: '',
        code: '',
        unit: '架'
      };
      // 记录当前编辑的仓库和货架索引
      this.currentWarehouseIndex = this.warehouses.findIndex(function (w) {
        return w.id === warehouse.id;
      });
      this.currentShelfIndex = this.warehouses[this.currentWarehouseIndex].shelves.findIndex(function (s) {
        return s.id === shelf.id;
      });
      // 打开弹窗
      this.$refs.addFreightPopup.open();
    },
    // 关闭三级货架新增弹窗
    closeAddFreightPopup: function closeAddFreightPopup() {
      this.$refs.addFreightPopup.close();
    },
    // 提交三级货架新增表单
    submitAddFreightForm: function submitAddFreightForm() {
      var _this11 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
        var parentWarehouse, parentShelf, parentUnit, codeValidation, params, _yield$uni$request17, _yield$uni$request18, err, res;
        return _regenerator.default.wrap(function _callee11$(_context11) {
          while (1) {
            switch (_context11.prev = _context11.next) {
              case 0:
                _context11.prev = 0;
                if (_this11.addFreightForm.name) {
                  _context11.next = 4;
                  break;
                }
                uni.showToast({
                  title: '请输入名称',
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 4:
                if (_this11.addFreightForm.code) {
                  _context11.next = 7;
                  break;
                }
                uni.showToast({
                  title: '请输入货区编码',
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 7:
                // 获取对应的二级货架信息
                parentWarehouse = _this11.warehouses.find(function (w) {
                  return w.id === _this11.addFreightForm.depotId;
                });
                if (parentWarehouse) {
                  _context11.next = 11;
                  break;
                }
                uni.showToast({
                  title: '找不到对应的一级货区',
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 11:
                // 找到当前二级货架
                parentShelf = parentWarehouse.shelves.find(function (s) {
                  return s.id === _this11.addFreightForm.sheId;
                });
                if (parentShelf) {
                  _context11.next = 15;
                  break;
                }
                uni.showToast({
                  title: '找不到对应的二级货架',
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 15:
                // 获取一级货区的单位，用于确定验证规则
                parentUnit = parentWarehouse.unit; // 验证三级货区编码
                codeValidation = _this11.validateCode('freight', _this11.addFreightForm.code, parentUnit);
                if (codeValidation.valid) {
                  _context11.next = 20;
                  break;
                }
                uni.showToast({
                  title: codeValidation.message,
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 20:
                // 构造请求参数
                params = {
                  name: _this11.addFreightForm.name,
                  code: _this11.addFreightForm.code,
                  shelvesId: _this11.addFreightForm.sheId,
                  // 修改参数名称为shelves_id
                  userId: _this11.userId,
                  // 添加用户ID
                  unit: _this11.addFreightForm.unit
                };
                console.log('新增三级货架请求参数:', params);

                // 调用接口添加数据
                _context11.next = 24;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/zhishu/freight',
                  method: 'POST',
                  data: params,
                  header: {
                    'Content-Type': 'application/json'
                  }
                });
              case 24:
                _yield$uni$request17 = _context11.sent;
                _yield$uni$request18 = (0, _slicedToArray2.default)(_yield$uni$request17, 2);
                err = _yield$uni$request18[0];
                res = _yield$uni$request18[1];
                if (!err) {
                  _context11.next = 32;
                  break;
                }
                console.error('新增三级货区失败:', err);
                uni.showToast({
                  title: '新增失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context11.abrupt("return");
              case 32:
                // 检查响应
                if (res.data && res.data.code === 200) {
                  // 新增成功
                  uni.showToast({
                    title: '新增成功',
                    icon: 'success',
                    duration: 2500
                  });
                  // 关闭弹窗
                  _this11.closeAddFreightPopup();
                  // 刷新三级货架列表
                  if (_this11.currentWarehouseIndex !== -1 && _this11.currentShelfIndex !== -1) {
                    _this11.fetchFreights(_this11.addFreightForm.sheId, _this11.currentWarehouseIndex, _this11.currentShelfIndex);
                  }
                } else {
                  // 新增失败
                  uni.showToast({
                    title: res.data.msg || '新增失败',
                    icon: 'none',
                    duration: 2500
                  });
                }
                _context11.next = 39;
                break;
              case 35:
                _context11.prev = 35;
                _context11.t0 = _context11["catch"](0);
                console.error('新增三级货区失败:', _context11.t0);
                uni.showToast({
                  title: '新增失败',
                  icon: 'none',
                  duration: 2500
                });
              case 39:
              case "end":
                return _context11.stop();
            }
          }
        }, _callee11, null, [[0, 35]]);
      }))();
    },
    // 编辑三级货架
    editFreight: function editFreight(warehouse, shelf, freight) {
      console.log('编辑三级货架:', freight, '所属二级货架:', shelf, '所属一级货区:', warehouse);
      // 填充表单数据
      this.editFreightForm = {
        id: freight.id,
        sheId: shelf.id,
        sheName: shelf.name,
        depotId: warehouse.id,
        name: freight.name || '',
        code: freight.code || ''
      };
      // 记录当前编辑的仓库和货架索引
      this.currentWarehouseIndex = this.warehouses.findIndex(function (w) {
        return w.id === warehouse.id;
      });
      this.currentShelfIndex = this.warehouses[this.currentWarehouseIndex].shelves.findIndex(function (s) {
        return s.id === shelf.id;
      });
      // 打开弹窗
      this.$refs.editFreightPopup.open();
    },
    // 关闭三级货架编辑弹窗
    closeEditFreightPopup: function closeEditFreightPopup() {
      this.$refs.editFreightPopup.close();
    },
    // 提交三级货架编辑表单
    submitEditFreightForm: function submitEditFreightForm() {
      var _this12 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
        var params, _yield$uni$request19, _yield$uni$request20, err, res;
        return _regenerator.default.wrap(function _callee12$(_context12) {
          while (1) {
            switch (_context12.prev = _context12.next) {
              case 0:
                _context12.prev = 0;
                if (_this12.editFreightForm.name) {
                  _context12.next = 4;
                  break;
                }
                uni.showToast({
                  title: '请输入名称',
                  icon: 'none',
                  duration: 2500
                });
                return _context12.abrupt("return");
              case 4:
                // 编辑时不验证编码，因为编码是禁用的
                // 构造请求参数
                params = {
                  id: _this12.editFreightForm.id,
                  name: _this12.editFreightForm.name,
                  shelvesId: _this12.editFreightForm.sheId
                };
                console.log('编辑三级货架请求参数:', params);

                // 调用接口更新数据
                _context12.next = 8;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/zhishu/freight',
                  method: 'PUT',
                  data: params,
                  header: {
                    'Content-Type': 'application/json'
                  }
                });
              case 8:
                _yield$uni$request19 = _context12.sent;
                _yield$uni$request20 = (0, _slicedToArray2.default)(_yield$uni$request19, 2);
                err = _yield$uni$request20[0];
                res = _yield$uni$request20[1];
                if (!err) {
                  _context12.next = 16;
                  break;
                }
                console.error('更新三级货架失败:', err);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
                return _context12.abrupt("return");
              case 16:
                // 检查响应
                if (res.data && res.data.code === 200) {
                  // 更新成功
                  uni.showToast({
                    title: '更新成功',
                    icon: 'success',
                    duration: 2500
                  });
                  // 关闭弹窗
                  _this12.closeEditFreightPopup();
                  // 刷新三级货架列表
                  if (_this12.currentWarehouseIndex !== -1 && _this12.currentShelfIndex !== -1) {
                    _this12.fetchFreights(_this12.editFreightForm.sheId, _this12.currentWarehouseIndex, _this12.currentShelfIndex);
                  }
                } else {
                  // 更新失败
                  uni.showToast({
                    title: res.data.msg || '更新失败',
                    icon: 'none',
                    duration: 2500
                  });
                }
                _context12.next = 23;
                break;
              case 19:
                _context12.prev = 19;
                _context12.t0 = _context12["catch"](0);
                console.error('更新三级货架失败:', _context12.t0);
                uni.showToast({
                  title: '更新失败',
                  icon: 'none',
                  duration: 2500
                });
              case 23:
              case "end":
                return _context12.stop();
            }
          }
        }, _callee12, null, [[0, 19]]);
      }))();
    },
    // 删除三级货架
    deleteFreight: function deleteFreight(warehouse, shelf, freight) {
      var _this13 = this;
      uni.showModal({
        title: '确认删除',
        content: "\u786E\u5B9A\u8981\u5220\u9664\"".concat(freight.name, "\"\u5417\uFF1F"),
        success: function () {
          var _success3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(res) {
            var userId, _yield$uni$request21, _yield$uni$request22, err, response, warehouseIndex, shelfIndex, _response$data3;
            return _regenerator.default.wrap(function _callee13$(_context13) {
              while (1) {
                switch (_context13.prev = _context13.next) {
                  case 0:
                    if (!res.confirm) {
                      _context13.next = 24;
                      break;
                    }
                    console.log('确认删除三级货架:', freight);
                    // 获取userId
                    userId = uni.getStorageSync('userId');
                    if (userId) {
                      _context13.next = 6;
                      break;
                    }
                    uni.showToast({
                      title: '用户未登录，请先登录',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context13.abrupt("return");
                  case 6:
                    _context13.prev = 6;
                    _context13.next = 9;
                    return uni.request({
                      url: "https://api.buzhiyushu.cn/zhishu/freight/".concat(freight.id, "?LocalUserId=").concat(userId),
                      method: 'DELETE'
                    });
                  case 9:
                    _yield$uni$request21 = _context13.sent;
                    _yield$uni$request22 = (0, _slicedToArray2.default)(_yield$uni$request21, 2);
                    err = _yield$uni$request22[0];
                    response = _yield$uni$request22[1];
                    if (!err) {
                      _context13.next = 17;
                      break;
                    }
                    console.error('删除三级货架失败:', err);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                    return _context13.abrupt("return");
                  case 17:
                    // 检查响应
                    if (response.data && response.data.code === 200) {
                      // 删除成功
                      uni.showToast({
                        title: '删除成功',
                        icon: 'success',
                        duration: 2500
                      });
                      // 删除成功后刷新当前二级货架的三级货架列表
                      warehouseIndex = _this13.warehouses.findIndex(function (w) {
                        return w.id === warehouse.id;
                      });
                      if (warehouseIndex !== -1) {
                        shelfIndex = _this13.warehouses[warehouseIndex].shelves.findIndex(function (s) {
                          return s.id === shelf.id;
                        });
                        if (shelfIndex !== -1) {
                          _this13.fetchFreights(shelf.id, warehouseIndex, shelfIndex);
                        }
                      }
                    } else {
                      // 删除失败
                      uni.showToast({
                        title: ((_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.msg) || '删除失败',
                        icon: 'none',
                        duration: 2500
                      });
                    }
                    _context13.next = 24;
                    break;
                  case 20:
                    _context13.prev = 20;
                    _context13.t0 = _context13["catch"](6);
                    console.error('删除三级货架出错:', _context13.t0);
                    uni.showToast({
                      title: '删除失败',
                      icon: 'none',
                      duration: 2500
                    });
                  case 24:
                  case "end":
                    return _context13.stop();
                }
              }
            }, _callee13, null, [[6, 20]]);
          }));
          function success(_x3) {
            return _success3.apply(this, arguments);
          }
          return success;
        }()
      });
    },
    // 切换单位下拉框显示状态
    toggleUnitDropdown: function toggleUnitDropdown() {
      this.showUnitDropdown = !this.showUnitDropdown;
    },
    // 选择单位
    selectUnit: function selectUnit(unit) {
      this.editForm.unit = unit;
      this.showUnitDropdown = false;
    },
    // 切换二级货架编辑单位下拉框
    toggleShelfUnitDropdown: function toggleShelfUnitDropdown() {
      this.showShelfUnitDropdown = !this.showShelfUnitDropdown;
    },
    // 选择二级货架编辑单位
    selectShelfUnit: function selectShelfUnit(unit) {
      this.editShelfForm.unit = unit;
      this.showShelfUnitDropdown = false;
    },
    // 切换二级货架新增单位下拉框
    toggleAddShelfUnitDropdown: function toggleAddShelfUnitDropdown() {
      this.showAddShelfUnitDropdown = !this.showAddShelfUnitDropdown;
    },
    // 选择二级货架新增单位
    selectAddShelfUnit: function selectAddShelfUnit(unit) {
      this.addShelfForm.unit = unit;
      this.showAddShelfUnitDropdown = false;
    },
    // 切换三级货架新增单位下拉框
    toggleAddFreightUnitDropdown: function toggleAddFreightUnitDropdown() {
      this.showAddFreightUnitDropdown = !this.showAddFreightUnitDropdown;
    },
    // 选择三级货架新增单位
    selectAddFreightUnit: function selectAddFreightUnit(unit) {
      this.addFreightForm.unit = unit;
      this.showAddFreightUnitDropdown = false;
    },
    // 切换三级货架编辑单位下拉框
    toggleEditFreightUnitDropdown: function toggleEditFreightUnitDropdown() {
      this.showEditFreightUnitDropdown = !this.showEditFreightUnitDropdown;
    },
    // 选择三级货架编辑单位
    selectEditFreightUnit: function selectEditFreightUnit(unit) {
      this.editFreightForm.unit = unit;
      this.showEditFreightUnitDropdown = false;
    }
  }
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 312:
/*!**************************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=style&index=0&lang=css& ***!
  \**************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./warehouse-select.vue?vue&type=style&index=0&lang=css& */ 313);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_warehouse_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 313:
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/warehouse/warehouse-select.vue?vue&type=style&index=0&lang=css& ***!
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin
    if(false) { var cssReload; }
  

/***/ })

},[[306,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/warehouse/warehouse-select.js.map