"use strict"; const common_vendor = require("../../common/vendor.js"); const pages_yuangongindex_api = require("./api.js"); if (!Array) { const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup"); _easycom_u_popup2(); } const _easycom_u_popup = () => "../../uni_modules/vk-uview-ui/components/u-popup/u-popup.js"; if (!Math) { _easycom_u_popup(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "searchjigou", setup(__props) { const hulijigouArray = common_vendor.ref([]); const hulitarget = common_vendor.ref(-1); const popupshow = common_vendor.ref(false); const supervalue = common_vendor.ref(""); const jumpRuzhu = () => { popupshow.value = false; common_vendor.index.navigateTo({ url: "/pages/yuangongindex/workjoin" }); }; const buttonOpen = common_vendor.ref(false); const clickCard = (index) => { var _a, _b; if (hulitarget.value === index) { hulitarget.value = -1; buttonOpen.value = false; } else { hulitarget.value = index; if (((_a = hulijigouArray.value[index].employeesApiEntity) == null ? void 0 : _a.status) == 1 || ((_b = hulijigouArray.value[index].employeesApiEntity) == null ? void 0 : _b.status) == 2) { buttonOpen.value = false; } else { buttonOpen.value = true; } } }; const clearvalue = () => { hulitarget.value = -1; supervalue.value = ""; }; const goBack = () => { common_vendor.index.navigateBack(); }; const search = () => { buttonOpen.value = false; hulitarget.value = -1; pages_yuangongindex_api.getOrgInfo(supervalue.value).then((res) => { if (res.success) { hulijigouArray.value = res.result.records; } }); }; const sumbit = common_vendor.ref(false); const apply = () => { if (sumbit.value) { return; } sumbit.value = true; let data = common_vendor.index.getStorageSync("staff"); data = { ...data, dateOfBirth: data.birthDate, marriedOrNot: data.maritalStatus, address: data.address, emergencyContact: data.contactName, emergencyTel: data.contactTel, emergencyRelationship: data.contactRelationship, hukouNature: data.hukouType, idCardPositive: data.cardZmPath, idCardNegative: data.cardFmPath, healthCertificatePositive: data.healthZmPath, healthCertificateNegative: data.healthFmPath, bankPositive: data.bankZmPath, bankNegative: data.bankFmPath, qualification: data.qualificationPath, noCrimeCertificate: data.noCrimeCertificate, houseAddress: data.idCardAddress, employeeId: data.id, id: null, createTime: null, updateBy: null, updateTime: null, orgCode: hulijigouArray.value[hulitarget.value].orgCode }; pages_yuangongindex_api.Apply(data).then((data2) => { if (data2.success) { popupshow.value = true; setTimeout(() => search(), 1e3); } setTimeout(() => sumbit.value = false, 1e3); }); }; search(); return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.o(goBack), b: common_vendor.o(search), c: supervalue.value, d: common_vendor.o(($event) => supervalue.value = $event.detail.value), e: supervalue.value }, supervalue.value ? { f: common_vendor.o(clearvalue) } : {}, { g: common_vendor.o(search), h: common_vendor.f(hulijigouArray.value, (item, index, i0) => { var _a, _b, _c, _d, _e, _f; return common_vendor.e({ a: hulitarget.value === index }, hulitarget.value === index ? {} : {}, { b: common_vendor.t(item.departName), c: common_vendor.t(item.comLegalPerson), d: common_vendor.t(item.tel), e: ((_a = item.employeesApiEntity) == null ? void 0 : _a.status) === `1` }, ((_b = item.employeesApiEntity) == null ? void 0 : _b.status) === `1` ? {} : {}, { f: ((_c = item.employeesApiEntity) == null ? void 0 : _c.status) === `2` }, ((_d = item.employeesApiEntity) == null ? void 0 : _d.status) === `2` ? {} : {}, { g: ((_e = item.employeesApiEntity) == null ? void 0 : _e.status) === `3` }, ((_f = item.employeesApiEntity) == null ? void 0 : _f.status) === `3` ? {} : {}, { h: !item.employeesApiEntity }, !item.employeesApiEntity ? {} : {}, { i: common_vendor.t(item.comRegisterAddress), j: index, k: common_vendor.s(hulitarget.value === index ? { border: `4rpx solid #0093FF` } : {}), l: common_vendor.o(($event) => clickCard(index), index) }); }), i: buttonOpen.value }, buttonOpen.value ? { j: common_vendor.o(apply) } : {}, { k: common_vendor.o(($event) => jumpRuzhu()), l: common_vendor.o(($event) => popupshow.value = $event), m: common_vendor.p({ mode: "bottom", ["border-radius"]: "40", modelValue: popupshow.value }) }); }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0e7ef1bb"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/yuangongindex/searchjigou.js.map