60 lines
2.2 KiB
JavaScript
60 lines
2.2 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
|
|
const pages_me_model = require("./model.js");
|
|
const gen_Apis = require("../../gen/Apis.js");
|
|
require("../../common/libraries/request.js");
|
|
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
|
|
require("../../common/store/useWorkStore.js");
|
|
common_store_useWeAppAuthStore.useWeAppAuthStore();
|
|
const getOwnerAuditList = () => {
|
|
var _a, _b;
|
|
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseRegisters.OwnerAuditList, (_b = (_a = pages_me_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then((res) => {
|
|
pages_me_model.useModel.dataList.value = [...pages_me_model.useModel.dataList.value, ...res == null ? void 0 : res.data];
|
|
pages_me_model.useModel.meta.value = res == null ? void 0 : res.meta;
|
|
console.log(res);
|
|
});
|
|
};
|
|
const handleSrarch = () => {
|
|
pages_me_model.useModel.dataList.value = [];
|
|
pages_me_model.useModel.formData.value.page = 1;
|
|
getOwnerAuditList();
|
|
};
|
|
const method = {
|
|
getOwnerAuditList,
|
|
handleSrarch,
|
|
handleLoadMore(page) {
|
|
pages_me_model.useModel.formData.value.page = page;
|
|
getOwnerAuditList();
|
|
},
|
|
getCountHouse() {
|
|
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Customer.Customers.GetCountHouse, {}).then((res) => {
|
|
pages_me_model.useModel.countHouseData.value = res == null ? void 0 : res.data;
|
|
console.log(res);
|
|
});
|
|
},
|
|
handleAudit(e) {
|
|
common_vendor.index.showModal({
|
|
title: "提示",
|
|
content: "请仔细确认好注册用户信息!",
|
|
confirmText: "通过",
|
|
confirmColor: "#2A7EFB",
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseRegisters.Audit, {
|
|
status: "Approved",
|
|
id: e == null ? void 0 : e.id
|
|
}).then((res2) => {
|
|
handleSrarch();
|
|
console.log(res2);
|
|
});
|
|
console.log("用户点击确定");
|
|
} else if (res.cancel) {
|
|
console.log("用户点击取消");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
};
|
|
exports.method = method;
|