From 04be125365bfd254166072f75da87e406f633ba3 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 09 一月 2025 18:36:56 +0800
Subject: [PATCH] Merge branch 'master' of http://47.96.225.205:8888/r/operation_pc-v2
---
utils/form-item-config.js | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/utils/form-item-config.js b/utils/form-item-config.js
index d60c569..62d834b 100644
--- a/utils/form-item-config.js
+++ b/utils/form-item-config.js
@@ -76,6 +76,7 @@
current: 1,
size: 2000,
status: 'P',
+ isEnabled: 1,
},
props: {
label: 'name',
@@ -92,6 +93,37 @@
},
}
}
+
+export const getPartnerListNameWithIdConfig = () => {
+ return {
+ label: '合伙人:',
+ id: 'partnerId',
+ type: 'bus-select',
+ el: {
+ interfaceUri: 'flower/api/partner/page',
+ extraQuery: {
+ current: 1,
+ size: 2000,
+ status: 'P',
+ isEnabled: 1,
+ },
+ props: {
+ label: 'name',
+ value: 'id',
+ dataPath: 'records',
+ },
+ filterable: true,
+ clearable: true,
+ style: 'width:100%',
+ // 列表返回的是id是int但是存的是string情况
+ filterOptions: (list) => {
+ const listFilter= list.map((item) => ({ ...item, id: item.id + '',name:item.name+'(PID:'+item.id +')'}))
+ return listFilter
+ },
+ },
+ }
+}
+
export const getGoodsCategoryListConfig = (
checkStrictly = false,
@@ -176,3 +208,62 @@
},
}
}
+
+export const getSupplierListConfig = () => {
+ return {
+ label: '供应商:',
+ id: 'supplierId',
+ type: 'bus-select',
+ el: {
+ interfaceUri: 'flower/api/supplier/page',
+ extraQuery: {
+ current: 1,
+ size: 2000,
+ status: 'P',
+ isEnabled: 1,
+ },
+ props: {
+ label: 'name',
+ value: 'id',
+ dataPath: 'records',
+ },
+ filterable: true,
+ clearable: true,
+ style: 'width:100%',
+ // 列表返回的是id是int但是存的是string情况
+ filterOptions: (list) => {
+ return list.map((item) => ({ ...item, id: item.id + '' }))
+ },
+ },
+ }
+}
+
+export const getSupplierListWithIdConfig = () => {
+ return {
+ label: '供应商:',
+ id: 'supplierId',
+ type: 'bus-select',
+ el: {
+ interfaceUri: 'flower/api/supplier/page',
+ extraQuery: {
+ current: 1,
+ size: 2000,
+ status: 'P',
+ isEnabled: 1,
+ },
+ props: {
+ label: 'name',
+ value: 'id',
+ dataPath: 'records',
+ },
+ filterable: true,
+ clearable: true,
+ style: 'width:100%',
+ // 列表返回的是id是int但是存的是string情况
+ filterOptions: (list) => {
+ const listFilter= list.map((item) => ({ ...item, id: item.id + '',name:item.name+'(SID:'+item.id +')'}))
+ return listFilter
+ },
+ },
+ }
+}
--
Gitblit v1.9.3