This commit is contained in:
2025-09-27 22:57:59 +08:00
parent 8a458ff0a4
commit ed26244cdb
12585 changed files with 1914308 additions and 3474 deletions

View File

@@ -11,9 +11,29 @@ const _sfc_main = {
onLoad(query) {
if (query && query.id) {
this.id = Number(query.id);
this.load();
}
},
methods: {
async load() {
if (!this.id)
return;
try {
const d = await common_http.get(`/api/suppliers/${this.id}`);
this.form = {
name: (d == null ? void 0 : d.name) || "",
contactName: (d == null ? void 0 : d.contactName) || "",
mobile: (d == null ? void 0 : d.mobile) || "",
phone: (d == null ? void 0 : d.phone) || "",
address: (d == null ? void 0 : d.address) || "",
apOpening: Number((d == null ? void 0 : d.apOpening) || 0),
apPayable: Number((d == null ? void 0 : d.apPayable) || 0),
remark: (d == null ? void 0 : d.remark) || ""
};
} catch (e) {
common_vendor.index.showToast({ title: (e == null ? void 0 : e.message) || "加载失败", icon: "none" });
}
},
async save() {
if (!this.form.name)
return common_vendor.index.showToast({ title: "请填写供应商名称", icon: "none" });