"use strict"; const common_vendor = require("../../common/vendor.js"); const pages_yuangongindex_api = require("./api.js"); if (!Math) { queren(); } const queren = () => "./queren.js"; const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "companyyaoqing", setup(__props) { const hulijigouArray = common_vendor.ref([]); const hulitarget = common_vendor.ref(-1); common_vendor.ref(false); common_vendor.ref(""); const querenshow = common_vendor.ref(false); const buttonOpen = common_vendor.ref(false); const goBack = () => { common_vendor.index.navigateBack(); }; const search = () => { buttonOpen.value = false; hulitarget.value = -1; pages_yuangongindex_api.getInvited(common_vendor.index.getStorageSync("openid")).then((res) => { if (res.success) { hulijigouArray.value = res.result; } }); }; common_vendor.ref(false); const saveitem = common_vendor.ref({ employeesId: "", orgCode: "" }); const changeStatus = (item, status) => { if (!status) { querenshow.value = true; saveitem.value = { employeesId: item.employeesId, orgCode: item.orgCode }; return; } let data = { employeeId: item.employeesId, status: status ? 2 : 3, orgCode: item.orgCode }; pages_yuangongindex_api.invitedConfirm(data).then((res) => { if (res.success) { search(); } }); }; const querensecond = () => { querenshow.value = false; let data = { employeeId: saveitem.value.employeesId, status: 3, orgCode: saveitem.value.orgCode }; pages_yuangongindex_api.invitedConfirm(data).then((res) => { if (res.success) { search(); } }); }; search(); return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.o(goBack), b: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`, c: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`, d: !hulijigouArray.value.length }, !hulijigouArray.value.length ? {} : {}, { e: common_vendor.f(hulijigouArray.value, (item, index, i0) => { return common_vendor.e({ a: common_vendor.t(item.departName), b: common_vendor.t(item.comLegalPerson), c: common_vendor.t(item.tel), d: item.applyStatus === `1` }, item.applyStatus === `1` ? {} : {}, { e: item.applyStatus === `2` }, item.applyStatus === `2` ? {} : {}, { f: item.applyStatus === `3` }, item.applyStatus === `3` ? {} : {}, { g: common_vendor.t(item.comRegisterAddress), h: item.applyStatus === `1` }, item.applyStatus === `1` ? { i: common_vendor.o(($event) => changeStatus(item, true), index), j: common_vendor.o(($event) => changeStatus(item, false), index) } : {}, { k: index, l: hulitarget.value === index ? "4rpx solid #0093FF" : "none", m: item.applyStatus == 1 ? "370rpx" : "330rpx" }); }), f: common_vendor.o(($event) => querenshow.value = false), g: common_vendor.o(querensecond), h: common_vendor.p({ show: querenshow.value }) }); }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-568a34ee"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/yuangongindex/companyyaoqing.js.map