(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/goods/index"],{

/***/ 288:
/*!*********************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/main.js?{"page":"pages%2Fgoods%2Findex"} ***!
  \*********************************************************************************************************/
/*! 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 _index = _interopRequireDefault(__webpack_require__(/*! ./pages/goods/index.vue */ 289));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_index.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"]))

/***/ }),

/***/ 289:
/*!**************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/goods/index.vue ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _index_vue_vue_type_template_id_520b1870___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=520b1870& */ 290);
/* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ 292);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _index_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 _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&lang=css& */ 294);
/* 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"])(
  _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _index_vue_vue_type_template_id_520b1870___WEBPACK_IMPORTED_MODULE_0__["render"],
  _index_vue_vue_type_template_id_520b1870___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  null,
  null,
  false,
  _index_vue_vue_type_template_id_520b1870___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

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

/***/ }),

/***/ 290:
/*!*********************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/goods/index.vue?vue&type=template&id=520b1870& ***!
  \*********************************************************************************************************************/
/*! 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_index_vue_vue_type_template_id_520b1870___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!./index.vue?vue&type=template&id=520b1870& */ 291);
/* 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_index_vue_vue_type_template_id_520b1870___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_index_vue_vue_type_template_id_520b1870___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_index_vue_vue_type_template_id_520b1870___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_index_vue_vue_type_template_id_520b1870___WEBPACK_IMPORTED_MODULE_0__["components"]; });



/***/ }),

/***/ 291:
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/goods/index.vue?vue&type=template&id=520b1870& ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! 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
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  var g0 = _vm.isBatchMode ? _vm.selectedItems.length : null
  var g1 = _vm.isBatchMode ? _vm.selectedItems.length : null
  var g2 = _vm.isBatchMode ? _vm.selectedItems.length : null
  var l0 = _vm.__map(_vm.goodsList, function (goods, index) {
    var $orig = _vm.__get_orig(goods)
    var m0 = _vm.isBatchMode ? _vm.isItemSelected(goods.id) : null
    var m1 = _vm.isBatchMode ? _vm.isItemSelected(goods.id) : null
    var m2 = _vm.formatPrice(goods.price)
    return {
      $orig: $orig,
      m0: m0,
      m1: m1,
      m2: m2,
    }
  })
  var g3 = !_vm.hasMore && _vm.goodsList.length > 0
  var m3 =
    _vm.showLocationModal && _vm.selectedWarehouse
      ? _vm.getWarehouseName(_vm.selectedWarehouse)
      : null
  var m4 =
    _vm.showLocationModal && _vm.selectedShelf
      ? _vm.getShelfName(_vm.selectedShelf)
      : null
  var m5 =
    _vm.showLocationModal && _vm.selectedFreight
      ? _vm.getFreightName(_vm.selectedFreight)
      : null
  if (!_vm._isMounted) {
    _vm.e0 = function ($event, goods) {
      var _temp = arguments[arguments.length - 1].currentTarget.dataset,
        _temp2 = _temp.eventParams || _temp["event-params"],
        goods = _temp2.goods
      var _temp, _temp2
      _vm.isBatchMode
        ? _vm.selectItem(goods.id)
        : _vm.previewImage(goods.images)
    }
  }
  _vm.$mp.data = Object.assign(
    {},
    {
      $root: {
        g0: g0,
        g1: g1,
        g2: g2,
        l0: l0,
        g3: g3,
        m3: m3,
        m4: m4,
        m5: m5,
      },
    }
  )
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 292:
/*!***************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/goods/index.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_index_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!./index.vue?vue&type=script&lang=js& */ 293);
/* 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_index_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_index_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_index_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_index_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_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 293:
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/goods/index.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 _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 34));
var _config = _interopRequireDefault(__webpack_require__(/*! @/utils/config.js */ 41));
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 {
      locationCode: '',
      // 货区代码
      goodsList: [],
      // 商品列表
      loading: true,
      isLoadingMore: false,
      // 加载更多状态
      userId: '',
      // 用户ID
      pageNum: 1,
      // 当前页码
      pageSize: 10,
      // 每页数量
      hasMore: true,
      // 是否有更多数据
      totalPages: 1,
      // 总页数
      searchKeyword: '',
      // 搜索关键词
      originalData: [],
      // 保存原始数据用于搜索
      dateInput: '',
      // 日期输入
      displayDate: {
        day: new Date().getDate().toString().padStart(2, '0'),
        month: (new Date().getMonth() + 1).toString().padStart(2, '0'),
        year: new Date().getFullYear()
      },
      total: 0,
      // 数据总条数
      isBatchMode: false,
      // 批量选择模式
      selectedItems: [],
      // 已选择的商品ID
      isAllSelected: false,
      // 是否全选

      // 货区选择弹窗相关
      showLocationModal: false,
      // 是否显示货区选择弹窗
      // 货区数据
      warehouseList: [],
      // 一级货区列表
      shelfList: [],
      // 二级货区列表
      freightList: [],
      // 三级货区列表
      selectedWarehouse: '',
      // 选中的一级货区ID
      selectedShelf: '',
      // 选中的二级货区ID
      selectedFreight: '',
      // 选中的三级货区ID
      warehouseLoading: false,
      // 一级货区加载状态
      shelfLoading: false,
      // 二级货区加载状态
      freightLoading: false // 三级货区加载状态
    };
  },
  onLoad: function onLoad(option) {
    // 从路由参数获取货区代码
    if (option.code) {
      this.locationCode = option.code;
      console.log('接收到的货区代码:', this.locationCode);
    }

    // 从本地存储获取用户ID
    this.userId = uni.getStorageSync('userId');

    // 加载商品数据
    this.fetchGoodsData();
  },
  // 添加下拉刷新
  onPullDownRefresh: function onPullDownRefresh() {
    this.pageNum = 1;
    this.hasMore = true;
    this.fetchGoodsData().then(function () {
      uni.stopPullDownRefresh();
    });
  },
  methods: {
    // 切换批量选择模式
    toggleBatchMode: function toggleBatchMode() {
      this.isBatchMode = !this.isBatchMode;
      if (!this.isBatchMode) {
        // 退出批量模式时清空选择
        this.selectedItems = [];
        this.isAllSelected = false;
      }
    },
    // 选择/取消选择商品
    selectItem: function selectItem(itemId) {
      var index = this.selectedItems.indexOf(itemId);
      if (index === -1) {
        // 添加到选中列表
        this.selectedItems.push(itemId);
      } else {
        // 从选中列表移除
        this.selectedItems.splice(index, 1);
      }
      // 更新全选状态
      this.isAllSelected = this.selectedItems.length === this.goodsList.length;

      // 打印选中的商品ID
      console.log('当前选中的商品IDs:', this.selectedItems);
    },
    // 判断商品是否被选中
    isItemSelected: function isItemSelected(itemId) {
      return this.selectedItems.indexOf(itemId) !== -1;
    },
    // 切换全选/取消全选
    toggleSelectAll: function toggleSelectAll() {
      if (this.isAllSelected) {
        // 取消全选
        this.selectedItems = [];
      } else {
        // 全选
        this.selectedItems = this.goodsList.map(function (item) {
          return item.id;
        });
      }
      this.isAllSelected = !this.isAllSelected;

      // 打印选中的商品ID
      console.log('全选/取消全选后的商品IDs:', this.selectedItems);
    },
    // 批量删除
    batchDelete: function batchDelete() {
      var _this = this;
      if (this.selectedItems.length === 0) {
        return;
      }
      uni.showModal({
        title: '确认删除',
        content: "\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u7684".concat(this.selectedItems.length, "\u4E2A\u5546\u54C1\u5417\uFF1F"),
        success: function success(res) {
          if (res.confirm) {
            // 执行删除操作
            console.log('执行批量删除:', _this.selectedItems);
            // TODO: 调用批量删除API
            uni.showToast({
              title: '删除操作待实现',
              icon: 'none'
            });
          }
        }
      });
    },
    // 批量编辑
    batchEdit: function batchEdit() {
      if (this.selectedItems.length === 0) {
        return;
      }

      // 加载一级货区数据
      this.fetchWarehouses();
      // 显示货区选择弹窗
      this.showLocationModal = true;
    },
    // 获取一级货区列表
    fetchWarehouses: function fetchWarehouses() {
      var _this2 = 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;
                _this2.warehouseLoading = true;
                _this2.warehouseList = [];
                _this2.shelfList = [];
                _this2.freightList = [];
                _this2.selectedWarehouse = '';
                _this2.selectedShelf = '';
                _this2.selectedFreight = '';
                _context.next = 10;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/namelist',
                  method: 'GET',
                  data: {
                    phoneNumber: uni.getStorageSync('phoneNumber')
                  }
                });
              case 10:
                _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];
                _this2.warehouseLoading = false;
                if (!err) {
                  _context.next = 19;
                  break;
                }
                console.error('获取一级货区列表失败:', err);
                uni.showToast({
                  title: '获取一级货区列表失败',
                  icon: 'none'
                });
                return _context.abrupt("return");
              case 19:
                if (response.statusCode === 200 && response.data && response.data.rows) {
                  _this2.warehouseList = response.data.rows;
                  console.log('一级货区列表:', _this2.warehouseList);
                } else {
                  uni.showToast({
                    title: '暂无可用一级货区',
                    icon: 'none'
                  });
                }
                _context.next = 27;
                break;
              case 22:
                _context.prev = 22;
                _context.t0 = _context["catch"](0);
                _this2.warehouseLoading = false;
                console.error('获取一级货区列表异常:', _context.t0);
                uni.showToast({
                  title: '获取一级货区列表失败',
                  icon: 'none'
                });
              case 27:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, null, [[0, 22]]);
      }))();
    },
    // 获取二级货架数据
    fetchShelves: function fetchShelves(depotId) {
      var _this3 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
        var _yield$uni$request3, _yield$uni$request4, err, response;
        return _regenerator.default.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                if (depotId) {
                  _context2.next = 6;
                  break;
                }
                _this3.shelfList = [];
                _this3.freightList = [];
                _this3.selectedShelf = '';
                _this3.selectedFreight = '';
                return _context2.abrupt("return");
              case 6:
                _context2.prev = 6;
                _this3.shelfLoading = true;
                _this3.shelfList = [];
                _this3.freightList = [];
                _this3.selectedShelf = '';
                _this3.selectedFreight = '';
                _context2.next = 14;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/sheNamelist',
                  method: 'GET',
                  data: {
                    depotId: depotId
                  }
                });
              case 14:
                _yield$uni$request3 = _context2.sent;
                _yield$uni$request4 = (0, _slicedToArray2.default)(_yield$uni$request3, 2);
                err = _yield$uni$request4[0];
                response = _yield$uni$request4[1];
                _this3.shelfLoading = false;
                if (!err) {
                  _context2.next = 23;
                  break;
                }
                console.error('获取二级货架失败:', err);
                uni.showToast({
                  title: '获取二级货架失败',
                  icon: 'none'
                });
                return _context2.abrupt("return");
              case 23:
                if (response.statusCode === 200 && response.data && response.data.rows) {
                  _this3.shelfList = response.data.rows;
                  console.log('二级货架列表:', _this3.shelfList);
                } else {
                  uni.showToast({
                    title: '暂无二级货架',
                    icon: 'none'
                  });
                }
                _context2.next = 31;
                break;
              case 26:
                _context2.prev = 26;
                _context2.t0 = _context2["catch"](6);
                _this3.shelfLoading = false;
                console.error('获取二级货架失败:', _context2.t0);
                uni.showToast({
                  title: '获取二级货架失败',
                  icon: 'none'
                });
              case 31:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2, null, [[6, 26]]);
      }))();
    },
    // 获取三级货架数据
    fetchFreights: function fetchFreights(sheId) {
      var _this4 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
        var _yield$uni$request5, _yield$uni$request6, err, response;
        return _regenerator.default.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                if (sheId) {
                  _context3.next = 4;
                  break;
                }
                _this4.freightList = [];
                _this4.selectedFreight = '';
                return _context3.abrupt("return");
              case 4:
                _context3.prev = 4;
                _this4.freightLoading = true;
                _this4.freightList = [];
                _this4.selectedFreight = '';
                _context3.next = 10;
                return uni.request({
                  url: 'https://api.buzhiyushu.cn/shelves/shelves/freNamelist',
                  method: 'GET',
                  data: {
                    sheId: sheId
                  }
                });
              case 10:
                _yield$uni$request5 = _context3.sent;
                _yield$uni$request6 = (0, _slicedToArray2.default)(_yield$uni$request5, 2);
                err = _yield$uni$request6[0];
                response = _yield$uni$request6[1];
                _this4.freightLoading = false;
                if (!err) {
                  _context3.next = 19;
                  break;
                }
                console.error('获取三级货架失败:', err);
                uni.showToast({
                  title: '获取三级货架失败',
                  icon: 'none'
                });
                return _context3.abrupt("return");
              case 19:
                if (response.statusCode === 200 && response.data && response.data.rows) {
                  _this4.freightList = response.data.rows;
                  console.log('三级货架列表:', _this4.freightList);
                } else {
                  uni.showToast({
                    title: '暂无三级货架',
                    icon: 'none'
                  });
                }
                _context3.next = 27;
                break;
              case 22:
                _context3.prev = 22;
                _context3.t0 = _context3["catch"](4);
                _this4.freightLoading = false;
                console.error('获取三级货架失败:', _context3.t0);
                uni.showToast({
                  title: '获取三级货架失败',
                  icon: 'none'
                });
              case 27:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3, null, [[4, 22]]);
      }))();
    },
    // 一级货区选择改变
    onWarehouseChange: function onWarehouseChange(e) {
      var index = e.detail.value;
      if (index >= 0 && this.warehouseList[index]) {
        this.selectedWarehouse = this.warehouseList[index].id;
        this.fetchShelves(this.selectedWarehouse);
      } else {
        this.selectedWarehouse = '';
        this.shelfList = [];
        this.freightList = [];
      }
    },
    // 二级货架选择改变
    onShelfChange: function onShelfChange(e) {
      var index = e.detail.value;
      if (index >= 0 && this.shelfList[index]) {
        this.selectedShelf = this.shelfList[index].id;
        this.fetchFreights(this.selectedShelf);
      } else {
        this.selectedShelf = '';
        this.freightList = [];
      }
    },
    // 三级货架选择改变
    onFreightChange: function onFreightChange(e) {
      var index = e.detail.value;
      if (index >= 0 && this.freightList[index]) {
        this.selectedFreight = this.freightList[index].id;
      } else {
        this.selectedFreight = '';
      }
    },
    // 关闭货区选择弹窗
    closeLocationModal: function closeLocationModal() {
      this.showLocationModal = false;
    },
    // 确认移动商品到新货区
    confirmMoveItems: function confirmMoveItems() {
      var _this5 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
        var warehouse, shelf, freight, newLocationCode;
        return _regenerator.default.wrap(function _callee5$(_context5) {
          while (1) {
            switch (_context5.prev = _context5.next) {
              case 0:
                if (!(!_this5.selectedWarehouse || !_this5.selectedShelf || !_this5.selectedFreight)) {
                  _context5.next = 3;
                  break;
                }
                uni.showToast({
                  title: '请选择完整的货区路径',
                  icon: 'none'
                });
                return _context5.abrupt("return");
              case 3:
                // 获取选中的一级、二级、三级货区对象
                warehouse = _this5.warehouseList.find(function (item) {
                  return item.id === _this5.selectedWarehouse;
                });
                shelf = _this5.shelfList.find(function (item) {
                  return item.id === _this5.selectedShelf;
                });
                freight = _this5.freightList.find(function (item) {
                  return item.id === _this5.selectedFreight;
                });
                if (!(!warehouse || !shelf || !freight)) {
                  _context5.next = 9;
                  break;
                }
                uni.showToast({
                  title: '获取货区信息失败',
                  icon: 'none'
                });
                return _context5.abrupt("return");
              case 9:
                // 构建新的货区代码
                newLocationCode = "".concat(warehouse.code || '').concat(shelf.code || '').concat(freight.code || '');
                console.log('新的货区代码:', newLocationCode);

                // 打印将要移动的商品IDs
                console.log('即将移动的商品IDs:', _this5.selectedItems);

                // 确认对话框
                uni.showModal({
                  title: '确认移动',
                  content: "\u786E\u5B9A\u8981\u5C06\u9009\u4E2D\u7684".concat(_this5.selectedItems.length, "\u4E2A\u5546\u54C1\u79FB\u52A8\u5230 ").concat(warehouse.name, "-").concat(shelf.name, "-").concat(freight.name, " \u5417\uFF1F"),
                  success: function () {
                    var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(res) {
                      var _yield$uni$request7, _yield$uni$request8, err, response, _response$data;
                      return _regenerator.default.wrap(function _callee4$(_context4) {
                        while (1) {
                          switch (_context4.prev = _context4.next) {
                            case 0:
                              if (!res.confirm) {
                                _context4.next = 22;
                                break;
                              }
                              _context4.prev = 1;
                              uni.showLoading({
                                title: '移动中...'
                              });

                              // 调用批量移动API
                              _context4.next = 5;
                              return uni.request({
                                url: 'https://api.buzhiyushu.cn/zhishu/shopGoods/batchMoveItems',
                                method: 'POST',
                                header: {
                                  'Content-Type': 'application/x-www-form-urlencoded'
                                },
                                data: {
                                  itemIds: _this5.selectedItems.join(','),
                                  warehouse: warehouse.code || '',
                                  shelf: shelf.code || '',
                                  freight: freight.code || '',
                                  userId: _this5.userId
                                }
                              });
                            case 5:
                              _yield$uni$request7 = _context4.sent;
                              _yield$uni$request8 = (0, _slicedToArray2.default)(_yield$uni$request7, 2);
                              err = _yield$uni$request8[0];
                              response = _yield$uni$request8[1];
                              uni.hideLoading();
                              if (!err) {
                                _context4.next = 14;
                                break;
                              }
                              console.error('API调用失败:', err);
                              uni.showToast({
                                title: 'API调用失败: ' + (err.errMsg || '网络错误'),
                                icon: 'none',
                                duration: 3000
                              });
                              return _context4.abrupt("return");
                            case 14:
                              if (response.statusCode === 200) {
                                // API调用成功
                                console.log('API响应:', response.data);

                                // 关闭弹窗
                                _this5.showLocationModal = false;

                                // 退出批量模式
                                _this5.isBatchMode = false;
                                _this5.selectedItems = [];

                                // 刷新数据
                                _this5.pageNum = 1;
                                _this5.fetchGoodsData();
                                uni.showToast({
                                  title: '移动成功',
                                  icon: 'success'
                                });
                              } else {
                                console.error('API返回错误状态码:', response.statusCode, response.data);
                                uni.showToast({
                                  title: 'API调用失败: ' + (((_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.message) || '服务器错误'),
                                  icon: 'none',
                                  duration: 3000
                                });
                              }
                              _context4.next = 22;
                              break;
                            case 17:
                              _context4.prev = 17;
                              _context4.t0 = _context4["catch"](1);
                              uni.hideLoading();
                              console.error('批量移动商品失败:', _context4.t0);
                              uni.showToast({
                                title: '批量移动失败',
                                icon: 'none'
                              });
                            case 22:
                            case "end":
                              return _context4.stop();
                          }
                        }
                      }, _callee4, null, [[1, 17]]);
                    }));
                    function success(_x) {
                      return _success.apply(this, arguments);
                    }
                    return success;
                  }()
                });
              case 13:
              case "end":
                return _context5.stop();
            }
          }
        }, _callee5);
      }))();
    },
    // 日期选择器确认事件
    onDatePickerConfirm: function onDatePickerConfirm(e) {
      this.dateInput = e.detail.value;
      console.log("获取日期", this.dateInput);
      var _this$dateInput$split = this.dateInput.split('-'),
        _this$dateInput$split2 = (0, _slicedToArray2.default)(_this$dateInput$split, 3),
        year = _this$dateInput$split2[0],
        month = _this$dateInput$split2[1],
        day = _this$dateInput$split2[2];
      this.displayDate = {
        day: day,
        month: month,
        year: year
      };

      // 重置分页
      this.pageNum = 1;
      this.hasMore = true;

      // 重新加载数据
      this.fetchGoodsData();
    },
    // 重置日期筛选
    resetDateFilter: function resetDateFilter() {
      var now = new Date();
      this.displayDate = {
        day: now.getDate().toString().padStart(2, '0'),
        month: (now.getMonth() + 1).toString().padStart(2, '0'),
        year: now.getFullYear()
      };
      this.dateInput = '';

      // 重置分页
      this.pageNum = 1;
      this.hasMore = true;

      // 重新加载数据
      this.fetchGoodsData();
    },
    // 获取商品数据
    fetchGoodsData: function fetchGoodsData() {
      var _this6 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
        var _yield$uni$request9, _yield$uni$request10, err, res, goodsList, total, key, formattedGoods;
        return _regenerator.default.wrap(function _callee6$(_context6) {
          while (1) {
            switch (_context6.prev = _context6.next) {
              case 0:
                if (!(!_this6.locationCode || !_this6.userId)) {
                  _context6.next = 4;
                  break;
                }
                uni.showToast({
                  title: '参数不完整',
                  icon: 'none'
                });
                _this6.loading = false;
                return _context6.abrupt("return");
              case 4:
                if (_this6.pageNum === 1) {
                  _this6.loading = true;
                } else {
                  _this6.isLoadingMore = true;
                }
                _context6.prev = 5;
                _context6.next = 8;
                return uni.request({
                  // url: `${config.baseURL}/zhishu/shopGoods/getGoodsData`,
                  url: 'https://api.buzhiyushu.cn/zhishu/shopGoods/getGoodsData',
                  method: 'GET',
                  header: {
                    'Content-Type': 'application/json',
                    'cientid': _config.default.clientId,
                    'isToken': 'false',
                    'isEncrypt': 'false',
                    'repeatSubmit': 'false'
                  },
                  data: {
                    code: _this6.locationCode,
                    userId: _this6.userId,
                    pageNum: _this6.pageNum,
                    pageSize: _this6.pageSize,
                    date: _this6.dateInput // 添加日期参数
                  }
                });
              case 8:
                _yield$uni$request9 = _context6.sent;
                _yield$uni$request10 = (0, _slicedToArray2.default)(_yield$uni$request9, 2);
                err = _yield$uni$request10[0];
                res = _yield$uni$request10[1];
                _this6.loading = false;
                _this6.isLoadingMore = false;
                if (!err) {
                  _context6.next = 18;
                  break;
                }
                console.error('获取商品数据失败:', err);
                uni.showToast({
                  title: '获取商品数据失败',
                  icon: 'none'
                });
                return _context6.abrupt("return");
              case 18:
                console.log('商品数据响应:', res);

                // 检查响应数据结构
                if (!(res.statusCode === 200 && res.data)) {
                  _context6.next = 57;
                  break;
                }
                // 获取商品数据列表，适应不同的数据结构
                goodsList = [];
                total = 0; // 根据实际响应格式获取数据
                // data.data.rows结构 (根据实际响应格式)
                if (!(res.data.data && res.data.data.rows && Array.isArray(res.data.data.rows))) {
                  _context6.next = 27;
                  break;
                }
                goodsList = res.data.data.rows;
                total = res.data.data.total || goodsList.length;
                _context6.next = 52;
                break;
              case 27:
                if (!(res.data.data && Array.isArray(res.data.data))) {
                  _context6.next = 32;
                  break;
                }
                goodsList = res.data.data;
                total = res.data.total || goodsList.length;
                _context6.next = 52;
                break;
              case 32:
                if (!(res.data.rows && Array.isArray(res.data.rows))) {
                  _context6.next = 37;
                  break;
                }
                goodsList = res.data.rows;
                total = res.data.total || goodsList.length;
                _context6.next = 52;
                break;
              case 37:
                if (!Array.isArray(res.data)) {
                  _context6.next = 42;
                  break;
                }
                goodsList = res.data;
                total = goodsList.length;
                _context6.next = 52;
                break;
              case 42:
                if (!((0, _typeof2.default)(res.data) === 'object')) {
                  _context6.next = 52;
                  break;
                }
                _context6.t0 = _regenerator.default.keys(res.data);
              case 44:
                if ((_context6.t1 = _context6.t0()).done) {
                  _context6.next = 51;
                  break;
                }
                key = _context6.t1.value;
                if (!Array.isArray(res.data[key])) {
                  _context6.next = 49;
                  break;
                }
                goodsList = res.data[key];
                return _context6.abrupt("break", 51);
              case 49:
                _context6.next = 44;
                break;
              case 51:
                total = goodsList.length;
              case 52:
                console.log('提取的商品列表:', goodsList);
                console.log('总数:', total);
                if (goodsList.length > 0) {
                  // 处理商品数据，添加必要的字段
                  formattedGoods = goodsList.map(function (item) {
                    return _objectSpread(_objectSpread({}, item), {}, {
                      image: item.image || item.bookPic || '/static/default-book.png',
                      images: item.bookPic ? [item.bookPic] : [item.image || '/static/default-book.png'],
                      name: item.goodsName || item.bookName || item.name || '未知商品',
                      barcode: item.isbn || item.barcode || '无ISBN',
                      createTime: item.createTime ? item.createTime.substring(0, 10) : '',
                      price: item.price || 0,
                      inventory: item.inventory || item.stock || 0,
                      condition: _this6.formatCondition(item.conditionCode) || item.condition || item.qualityText || '未知',
                      pddPublishedStatus: item.pddPublishedStatus || 0,
                      kfzPublishedStatus: item.kfzPublishedStatus || 0
                    });
                  });
                  if (_this6.pageNum === 1) {
                    _this6.goodsList = formattedGoods;
                  } else {
                    _this6.goodsList = [].concat((0, _toConsumableArray2.default)(_this6.goodsList), (0, _toConsumableArray2.default)(formattedGoods));
                  }
                  _this6.originalData = (0, _toConsumableArray2.default)(_this6.goodsList); // 保存原始数据

                  // 计算总页数和是否有更多数据
                  _this6.total = total; // 更新总数
                  _this6.totalPages = Math.ceil(total / _this6.pageSize);
                  _this6.hasMore = _this6.goodsList.length < total;

                  // 清空选择
                  if (_this6.isBatchMode) {
                    _this6.selectedItems = [];
                    _this6.isAllSelected = false;
                  }
                } else {
                  if (_this6.pageNum === 1) {
                    _this6.goodsList = [];
                    _this6.originalData = [];
                  }
                  _this6.totalPages = 1;
                  _this6.total = 0;
                  _this6.hasMore = false;
                  console.log('未找到商品数据');
                }
                _context6.next = 63;
                break;
              case 57:
                if (_this6.pageNum === 1) {
                  _this6.goodsList = [];
                  _this6.originalData = [];
                }
                _this6.totalPages = 1;
                _this6.total = 0;
                _this6.hasMore = false;
                console.log('接口返回错误状态码或数据格式不正确:', res.statusCode);

                // 显示错误信息
                uni.showToast({
                  title: '获取数据失败: ' + (res.data && res.data.message ? res.data.message : '未知错误'),
                  icon: 'none'
                });
              case 63:
                _context6.next = 72;
                break;
              case 65:
                _context6.prev = 65;
                _context6.t2 = _context6["catch"](5);
                _this6.loading = false;
                _this6.isLoadingMore = false;
                console.error('获取商品数据异常:', _context6.t2);

                // 在控制台打印更详细的错误信息
                if (_context6.t2 && _context6.t2.stack) {
                  console.error('错误堆栈:', _context6.t2.stack);
                }
                uni.showToast({
                  title: '获取商品数据失败: ' + (_context6.t2.message || '未知错误'),
                  icon: 'none'
                });
              case 72:
              case "end":
                return _context6.stop();
            }
          }
        }, _callee6, null, [[5, 65]]);
      }))();
    },
    // 加载更多数据
    loadMore: function loadMore() {
      if (!this.hasMore || this.loading || this.isLoadingMore) return;
      this.pageNum++;
      this.fetchGoodsData();
    },
    // 格式化价格
    formatPrice: function formatPrice(price) {
      if (!price && price !== 0) return '0.00';
      // 价格可能是以分为单位存储的，需要转换为元
      var priceInYuan = parseFloat(price) / 100;
      return priceInYuan.toFixed(2);
    },
    // 处理图片加载错误
    handleImageError: function handleImageError(e) {
      // 使用默认图片替代
      e.target.src = '/static/default-book.png';
    },
    // 将品相代码转换为对应的文本
    formatCondition: function formatCondition(conditionCode) {
      if (!conditionCode) return '未知品相';
      switch (conditionCode) {
        case 'A':
          return '一品';
        case 'B':
          return '二品';
        case 'C':
          return '三品';
        case 'D':
          return '四品';
        case 'E':
          return '五品';
        case 'F':
          return '六品';
        case 'G':
          return '六五品';
        case 'H':
          return '七品';
        case 'I':
          return '七五品';
        case 'J':
          return '八品';
        case 'K':
          return '八五品';
        case 'L':
          return '九品';
        case 'M':
          return '九五品';
        case 'N':
          return '全新';
        default:
          return conditionCode;
      }
    },
    // 预览图片
    previewImage: function previewImage(images) {
      if (!images || !images.length) return;

      // 显示图片预览
      uni.previewImage({
        urls: images,
        longPressActions: {
          itemList: ['发送给朋友', '保存图片', '收藏'],
          success: function success(data) {
            console.log('选中了第' + (data.tapIndex + 1) + '个按钮');
          },
          fail: function fail(err) {
            console.log(err.errMsg);
          }
        }
      });
    },
    // 搜索商品
    searchGoods: function searchGoods() {
      if (!this.searchKeyword.trim()) {
        // 如果搜索关键词为空，恢复原始数据
        this.goodsList = (0, _toConsumableArray2.default)(this.originalData);
        return;
      }

      // 在原始数据中过滤符合条件的商品
      var keyword = this.searchKeyword.toLowerCase();
      this.goodsList = this.originalData.filter(function (goods) {
        return goods.name && goods.name.toLowerCase().includes(keyword) || goods.barcode && goods.barcode.toLowerCase().includes(keyword);
      });
    },
    // 获取一级货区名称
    getWarehouseName: function getWarehouseName(id) {
      if (!id) return '请选择';
      var item = this.warehouseList.find(function (item) {
        return item.id === id;
      });
      return item ? item.name : '请选择';
    },
    // 获取二级货架名称
    getShelfName: function getShelfName(id) {
      if (!id) return '请选择';
      var item = this.shelfList.find(function (item) {
        return item.id === id;
      });
      return item ? item.name : '请选择';
    },
    // 获取三级货架名称
    getFreightName: function getFreightName(id) {
      if (!id) return '请选择';
      var item = this.freightList.find(function (item) {
        return item.id === id;
      });
      return item ? item.name : '请选择';
    }
  }
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 294:
/*!***********************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/goods/index.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_index_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!./index.vue?vue&type=style&index=0&lang=css& */ 295);
/* 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_index_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_index_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_index_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_index_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_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 295:
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/goods/index.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; }
  

/***/ })

},[[288,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/goods/index.js.map