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

73 lines
2.3 KiB
JavaScript

"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: `${common_vendor.index.getStorageSync("moveHeight") + 35}px`,
c: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
d: uuid.value,
e: common_vendor.o(($event) => uuid.value = $event.detail.value),
f: uuid.value,
g: common_vendor.o(($event) => uuid.value = ""),
h: common_vendor.o(search),
i: item.value.nuId
}, item.value.nuId ? common_vendor.e({
j: common_vendor.t(item.value.nuId),
k: common_vendor.t(item.value.departName),
l: common_vendor.t(item.value.nuName),
m: item.value.nuCanUse == 0
}, item.value.nuCanUse == 0 ? {
n: common_vendor.o(goToPay)
} : {
o: 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