2025-12-19 09:46:56 +08:00

33 lines
1.5 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const WORKORDER_show_model = require("./model.js");
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
const gen_Apis = require("../../gen/Apis.js");
const method = {
getShow(id) {
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.WorkOrder.HouseWorkOrders.Show, { id }).then((res) => {
WORKORDER_show_model.useModel.dataShow.value = res == null ? void 0 : res.data;
});
},
getHouseWorkLogs(id) {
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.WorkOrder.HouseWorkLogs.List, { house_work_orders_id: id }).then((res) => {
WORKORDER_show_model.useModel.logsData.value = res == null ? void 0 : res.data;
});
},
toPageAddLogs() {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
common_vendor.index.navigateTo({
url: `/WORKORDER/update/index?id=${(_c = (_b = (_a = WORKORDER_show_model.useModel) == null ? void 0 : _a.dataShow) == null ? void 0 : _b.value) == null ? void 0 : _c.id}&code=${(_f = (_e = (_d = WORKORDER_show_model.useModel) == null ? void 0 : _d.dataShow) == null ? void 0 : _e.value) == null ? void 0 : _f.code}&title=${(_i = (_h = (_g = WORKORDER_show_model.useModel) == null ? void 0 : _g.dataShow) == null ? void 0 : _h.value) == null ? void 0 : _i.title}`
});
},
handleCopyPhone(phone) {
if (phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
//仅为示例,并非真实的电话号码
});
}
}
};
exports.method = method;