From 6c926cf3d5d5e47155891ccd91f1d81fb280ac4f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 9 Jul 2026 14:07:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20add=20status=20codes=20to=20models=20?= =?UTF-8?q?=E2=80=94=20prevents=20empty=20code=20field=20in=20search=5Ffor?= =?UTF-8?q?m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/sub_distributors.json | 300 ++++++------- models/suppliers.json | 420 ++++++++++--------- supplychain/__pycache__/init.cpython-310.pyc | Bin 23346 -> 24713 bytes 3 files changed, 376 insertions(+), 344 deletions(-) diff --git a/models/sub_distributors.json b/models/sub_distributors.json index 91a061a..02972c8 100644 --- a/models/sub_distributors.json +++ b/models/sub_distributors.json @@ -1,143 +1,159 @@ { - "summary": [ - { - "name": "sub_distributors", - "title": "二级分销商表", - "primary": ["id"], - "catelog": "entity" - } - ], - "fields": [ - { - "name": "id", - "title": "主键ID", - "type": "str", - "length": 32, - "nullable": "no" - }, - { - "name": "resellerid", - "title": "所属主分销商机构ID", - "type": "str", - "length": 32, - "nullable": "no" - }, - { - "name": "sub_dist_code", - "title": "二级分销商编号", - "type": "str", - "length": 64, - "nullable": "no" - }, - { - "name": "sub_dist_name", - "title": "二级分销商名称", - "type": "str", - "length": 255, - "nullable": "no" - }, - { - "name": "contact_person", - "title": "联系人", - "type": "str", - "length": 100 - }, - { - "name": "contact_phone", - "title": "联系电话", - "type": "str", - "length": 50 - }, - { - "name": "contact_email", - "title": "联系邮箱", - "type": "str", - "length": 255 - }, - { - "name": "address", - "title": "地址", - "type": "str", - "length": 500 - }, - { - "name": "tax_number", - "title": "税号", - "type": "str", - "length": 64 - }, - { - "name": "bank_name", - "title": "开户银行", - "type": "str", - "length": 255 - }, - { - "name": "bank_account", - "title": "银行账号", - "type": "str", - "length": 64 - }, - { - "name": "managed_by", - "title": "负责销售ID", - "type": "str", - "length": 32 - }, - { - "name": "status", - "title": "状态", - "type": "char", - "length": 1, - "nullable": "no", - "default": "1" - }, - { - "name": "remark", - "title": "备注", - "type": "text" - }, - { - "name": "created_by", - "title": "创建人", - "type": "str", - "length": 32 - }, - { - "name": "created_at", - "title": "创建时间", - "type": "datetime", - "nullable": "no" - }, - { - "name": "updated_at", - "title": "更新时间", - "type": "datetime" - } - ], - "indexes": [ - { - "name": "idx_sd_reseller", - "idxtype": "index", - "idxfields": ["resellerid"] - }, - { - "name": "idx_sd_code", - "idxtype": "unique", - "idxfields": ["resellerid", "sub_dist_code"] - }, - { - "name": "idx_sd_manager", - "idxtype": "index", - "idxfields": ["managed_by"] - } - ], - "codes": [ - { - "field": "resellerid", - "table": "organization", - "valuefield": "id", - "textfield": "orgname" - } - ] -} + "summary": [ + { + "name": "sub_distributors", + "title": "二级分销商表", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "主键ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "resellerid", + "title": "所属主分销商机构ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "sub_dist_code", + "title": "二级分销商编号", + "type": "str", + "length": 64, + "nullable": "no" + }, + { + "name": "sub_dist_name", + "title": "二级分销商名称", + "type": "str", + "length": 255, + "nullable": "no" + }, + { + "name": "contact_person", + "title": "联系人", + "type": "str", + "length": 100 + }, + { + "name": "contact_phone", + "title": "联系电话", + "type": "str", + "length": 50 + }, + { + "name": "contact_email", + "title": "联系邮箱", + "type": "str", + "length": 255 + }, + { + "name": "address", + "title": "地址", + "type": "str", + "length": 500 + }, + { + "name": "tax_number", + "title": "税号", + "type": "str", + "length": 64 + }, + { + "name": "bank_name", + "title": "开户银行", + "type": "str", + "length": 255 + }, + { + "name": "bank_account", + "title": "银行账号", + "type": "str", + "length": 64 + }, + { + "name": "managed_by", + "title": "负责销售ID", + "type": "str", + "length": 32 + }, + { + "name": "status", + "title": "状态", + "type": "char", + "length": 1, + "nullable": "no", + "default": "1" + }, + { + "name": "remark", + "title": "备注", + "type": "text" + }, + { + "name": "created_by", + "title": "创建人", + "type": "str", + "length": 32 + }, + { + "name": "created_at", + "title": "创建时间", + "type": "datetime", + "nullable": "no" + }, + { + "name": "updated_at", + "title": "更新时间", + "type": "datetime" + } + ], + "indexes": [ + { + "name": "idx_sd_reseller", + "idxtype": "index", + "idxfields": [ + "resellerid" + ] + }, + { + "name": "idx_sd_code", + "idxtype": "unique", + "idxfields": [ + "resellerid", + "sub_dist_code" + ] + }, + { + "name": "idx_sd_manager", + "idxtype": "index", + "idxfields": [ + "managed_by" + ] + } + ], + "codes": [ + { + "field": "resellerid", + "table": "organization", + "valuefield": "id", + "textfield": "orgname" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='sub_distributor_status'" + } + ] +} \ No newline at end of file diff --git a/models/suppliers.json b/models/suppliers.json index aeb083b..f1da846 100644 --- a/models/suppliers.json +++ b/models/suppliers.json @@ -1,203 +1,219 @@ { - "summary": [ - { - "name": "suppliers", - "title": "供应商表", - "primary": ["id"], - "catelog": "entity" - } - ], - "fields": [ - { - "name": "id", - "title": "主键ID", - "type": "str", - "length": 32, - "nullable": "no" - }, - { - "name": "resellerid", - "title": "所属分销商机构ID", - "type": "str", - "length": 32, - "nullable": "no" - }, - { - "name": "supplier_code", - "title": "供应商编号", - "type": "str", - "length": 64, - "nullable": "no" - }, - { - "name": "supplier_name", - "title": "供应商名称", - "type": "str", - "length": 255, - "nullable": "no" - }, - { - "name": "contact_person", - "title": "联系人", - "type": "str", - "length": 100 - }, - { - "name": "contact_phone", - "title": "联系电话", - "type": "str", - "length": 50 - }, - { - "name": "contact_email", - "title": "联系邮箱", - "type": "str", - "length": 255 - }, - { - "name": "address", - "title": "地址", - "type": "str", - "length": 500 - }, - { - "name": "tax_number", - "title": "税号", - "type": "str", - "length": 64 - }, - { - "name": "bank_name", - "title": "开户银行", - "type": "str", - "length": 255 - }, - { - "name": "bank_account", - "title": "银行账号", - "type": "str", - "length": 64 - }, - { - "name": "orgid", - "title": "机构ID", - "type": "str", - "length": 32, - "nullable": "no" - }, - { - "name": "is_external", - "title": "是否外部供应商", - "type": "char", - "length": 1, - "nullable": "no", - "default": "1" - }, - { - "name": "settlement_cycle", - "title": "结算周期", - "type": "str", - "length": 20 - }, - { - "name": "settlement_day", - "title": "结算日", - "type": "int" - }, - { - "name": "payment_type", - "title": "付款方式", - "type": "str", - "length": 20 - }, - { - "name": "status", - "title": "状态", - "type": "char", - "length": 1, - "nullable": "no", - "default": "1" - }, - { - "name": "remark", - "title": "备注", - "type": "text" - }, - { - "name": "created_by", - "title": "创建人", - "type": "str", - "length": 32 - }, - { - "name": "created_at", - "title": "创建时间", - "type": "datetime", - "nullable": "no" - }, - { - "name": "updated_at", - "title": "更新时间", - "type": "datetime" - } - ], - "indexes": [ - { - "name": "idx_suppliers_reseller", - "idxtype": "index", - "idxfields": ["resellerid"] - }, - { - "name": "idx_suppliers_orgid", - "idxtype": "index", - "idxfields": ["orgid"] - }, - { - "name": "idx_suppliers_code", - "idxtype": "unique", - "idxfields": ["resellerid", "supplier_code"] - } - ], - "codes": [ - { - "field": "resellerid", - "table": "organization", - "valuefield": "id", - "textfield": "orgname" - }, - { - "field": "orgid", - "table": "organization", - "valuefield": "id", - "textfield": "orgname" - }, - { - "field": "is_external", - "table": "appcodes_kv", - "valuefield": "k", - "textfield": "v", - "cond": "parentid='supplier_is_external'" - }, - { - "field": "payment_type", - "table": "appcodes_kv", - "valuefield": "k", - "textfield": "v", - "cond": "parentid='supplier_payment_type'" - }, - { - "field": "settlement_cycle", - "table": "appcodes_kv", - "valuefield": "k", - "textfield": "v", - "cond": "parentid='supplier_settle_cycle'" - }, - { - "field": "status", - "table": "appcodes_kv", - "valuefield": "k", - "textfield": "v", - "cond": "parentid='supplier_status'" - } - ] -} + "summary": [ + { + "name": "suppliers", + "title": "供应商表", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "主键ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "resellerid", + "title": "所属分销商机构ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "supplier_code", + "title": "供应商编号", + "type": "str", + "length": 64, + "nullable": "no" + }, + { + "name": "supplier_name", + "title": "供应商名称", + "type": "str", + "length": 255, + "nullable": "no" + }, + { + "name": "contact_person", + "title": "联系人", + "type": "str", + "length": 100 + }, + { + "name": "contact_phone", + "title": "联系电话", + "type": "str", + "length": 50 + }, + { + "name": "contact_email", + "title": "联系邮箱", + "type": "str", + "length": 255 + }, + { + "name": "address", + "title": "地址", + "type": "str", + "length": 500 + }, + { + "name": "tax_number", + "title": "税号", + "type": "str", + "length": 64 + }, + { + "name": "bank_name", + "title": "开户银行", + "type": "str", + "length": 255 + }, + { + "name": "bank_account", + "title": "银行账号", + "type": "str", + "length": 64 + }, + { + "name": "orgid", + "title": "机构ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "is_external", + "title": "是否外部供应商", + "type": "char", + "length": 1, + "nullable": "no", + "default": "1" + }, + { + "name": "settlement_cycle", + "title": "结算周期", + "type": "str", + "length": 20 + }, + { + "name": "settlement_day", + "title": "结算日", + "type": "int" + }, + { + "name": "payment_type", + "title": "付款方式", + "type": "str", + "length": 20 + }, + { + "name": "status", + "title": "状态", + "type": "char", + "length": 1, + "nullable": "no", + "default": "1" + }, + { + "name": "remark", + "title": "备注", + "type": "text" + }, + { + "name": "created_by", + "title": "创建人", + "type": "str", + "length": 32 + }, + { + "name": "created_at", + "title": "创建时间", + "type": "datetime", + "nullable": "no" + }, + { + "name": "updated_at", + "title": "更新时间", + "type": "datetime" + } + ], + "indexes": [ + { + "name": "idx_suppliers_reseller", + "idxtype": "index", + "idxfields": [ + "resellerid" + ] + }, + { + "name": "idx_suppliers_orgid", + "idxtype": "index", + "idxfields": [ + "orgid" + ] + }, + { + "name": "idx_suppliers_code", + "idxtype": "unique", + "idxfields": [ + "resellerid", + "supplier_code" + ] + } + ], + "codes": [ + { + "field": "resellerid", + "table": "organization", + "valuefield": "id", + "textfield": "orgname" + }, + { + "field": "orgid", + "table": "organization", + "valuefield": "id", + "textfield": "orgname" + }, + { + "field": "is_external", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_is_external'" + }, + { + "field": "payment_type", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_payment_type'" + }, + { + "field": "settlement_cycle", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_settle_cycle'" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_status'" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='supplier_status'" + } + ] +} \ No newline at end of file diff --git a/supplychain/__pycache__/init.cpython-310.pyc b/supplychain/__pycache__/init.cpython-310.pyc index c09cad69a2ccb1a1d88e539ac278fd47d878f937..35e0935420049c6e5e9f9a47dc0dae18a0be8f32 100644 GIT binary patch delta 6672 zcmb7I33Qaz6`uFcz9oT75&{V`8N%|j3|o3cAs~x^ummAN6x1=!KOqB?neb);g#P0| zajn)0Pf^igQc$5*t&R)ss8y;3d+_ued&blD9M7pm(7HgiwV=KC{*#$WIuV+j`TqO1 z``-KRd-vY|fBHFg+v}_->U7$4@OS48OV^J+u(PO&{qd;@N15|l#ebu2O}!#D>*VWF zXIZs{eVZC?E4Q$NV(L)AmW#KB?k@?zNWK!G8KFgVmmXpvG0oLzx)Lj*V!P{Y)-CGg zDxs8p;93rq2PKXV-U1*O^M#_P*6Z_QjSJy2gzFGm5w1sAj6ib*QEC$pl~1UTqSy(L zW~+Dy79s!#t-KOtju1kS5oRG2Bhaud!d$VGZ5NZhRid+^$4+W#Rc&I#Fu5Y9&XliC ztR1$P-I{u2*t;x=%aMz;txQ41cOcx3@H2!v5q^$v7XoczCrSf3gSvD{tgEv#-0crU zBX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