"use strict";
const common_vendor = require("../../common/vendor.js");
const hooks_useNav = require("../../hooks/useNav.js");
const api_api = require("../../api/api.js");
if (!Array) {
  const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
  const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
  (_easycom_up_icon2 + _easycom_up_button2)();
}
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
  (_easycom_up_icon + _easycom_up_button)();
}
const _sfc_main = {
  __name: "applyForDay",
  setup(__props) {
    const { nav, navTo } = hooks_useNav.useNav();
    const dataList = common_vendor.ref([]);
    let checkboxValue1 = common_vendor.ref([]);
    common_vendor.onLoad(async (options) => {
      checkboxValue1.value = JSON.parse(decodeURIComponent(options.list));
      common_vendor.index.__f__("log", "at pageMake/invoice/applyForDay.vue:80", checkboxValue1.value);
      let _res = await api_api.preApply({ ordersIds: JSON.parse(decodeURIComponent(options.list)) });
      dataList.value = _res;
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.p({
          name: "error-circle-fill",
          color: "#3c9cff"
        }),
        b: common_vendor.f(dataList.value, (item, index, i0) => {
          return {
            a: common_vendor.t(item.merchantName),
            b: common_vendor.t(item.electricityAmount),
            c: common_vendor.t(item.serviceAmount),
            d: common_vendor.t(item.invoiceAmount),
            e: index
          };
        }),
        c: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pageMake/invoice/makeInvoice?list=${encodeURIComponent(JSON.stringify(common_vendor.unref(checkboxValue1)))}`)),
        d: common_vendor.p({
          customStyle: {
            height: "80rpx",
            width: "230rpx"
          },
          color: "#4879e6",
          text: "下一步",
          shape: "circle"
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0b3268c8"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pageMake/invoice/applyForDay.js.map
