hldy_xcx/unpackage/dist/dev/mp-weixin/pages/oldmanindex/input.js

71 lines
2.2 KiB
JavaScript
Raw Normal View History

2025-09-19 17:12:59 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_oldmanindex_api = require("./api.js");
const _sfc_main = {
__name: "input",
setup(__props) {
const uuid = common_vendor.ref("");
const goBack = () => {
common_vendor.index.navigateBack();
};
const item = common_vendor.ref({});
function isAtLeastTenChars(str) {
return str.length >= 10;
}
const search = () => {
if (isAtLeastTenChars(uuid.value)) {
pages_oldmanindex_api.getOrgNuId(uuid.value).then((res0) => {
if (res0.result) {
item.value = res0.result;
} else {
common_vendor.index.showToast({
title: "该护理单元不存在",
icon: "none",
// 不显示对勾图标
duration: 2e3
});
}
});
} else {
common_vendor.index.showToast({
title: "该护理单元不存在",
icon: "none",
// 不显示对勾图标
duration: 2e3
});
}
};
common_vendor.onLoad(() => {
});
const goToPay = () => {
common_vendor.index.setStorageSync("payaccount", item.value);
common_vendor.index.navigateTo({
url: "/pages/oldmanindex/protocol"
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(goBack),
b: uuid.value,
c: common_vendor.o(($event) => uuid.value = $event.detail.value),
d: uuid.value,
e: common_vendor.o(($event) => uuid.value = ""),
f: common_vendor.o(search),
g: item.value.nuId
}, item.value.nuId ? common_vendor.e({
h: common_vendor.t(item.value.nuId),
i: common_vendor.t(item.value.departName),
j: common_vendor.t(item.value.nuName),
k: item.value.nuCanUse == 0
}, item.value.nuCanUse == 0 ? {
l: common_vendor.o(goToPay)
} : {
m: common_vendor.t(item.value.msg)
}) : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9a7b17f0"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/oldmanindex/input.js.map