update: 新增供应增加判断是否获取详情

This commit is contained in:
admin 2024-06-17 16:07:33 +08:00
parent 5f07e0d5e8
commit 4dbcdab87b
2 changed files with 14 additions and 12 deletions

View File

@ -320,7 +320,7 @@ const startSave = (v: boolean) => {
delta: 1, delta: 1,
success: (res) => { success: (res) => {
uni.$emit("pricingParams", { uni.$emit("pricingParams", {
name: model1.formData.name name: model1.formData.name,
}); });
}, },
}); });
@ -366,6 +366,7 @@ onMounted(() => {
onLoad((option: any) => { onLoad((option: any) => {
// //
const title = option.title; const title = option.title;
if (option.item) {
SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => { SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
if (res.data.length > 0) { if (res.data.length > 0) {
@ -378,6 +379,8 @@ onLoad((option: any) => {
} }
} }
}); });
}
// //
if (!option.item) { if (!option.item) {
formAttrList[1].required = true; formAttrList[1].required = true;

View File

@ -118,7 +118,6 @@ const update = (item: any) => {
}; };
const edit = (item: any) => { const edit = (item: any) => {
console.log(JSON.stringify(item))
uni.navigateTo({ uni.navigateTo({
url: url:
"/pagesApp/components/addSupplier?title=编辑供应商&item=" + "/pagesApp/components/addSupplier?title=编辑供应商&item=" +