refactor rename product management to smart valves
This commit is contained in:
@@ -44,10 +44,10 @@ var PlatformMenus = [][]Menu{
|
|||||||
{Identity: "user_service_relation", ParentIdentity: "user", GroupCode: "user", Name: "服务关系", Path: "/user/service-relation", SortNo: 3, Status: common.StatusEnable},
|
{Identity: "user_service_relation", ParentIdentity: "user", GroupCode: "user", Name: "服务关系", Path: "/user/service-relation", SortNo: 3, Status: common.StatusEnable},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{Identity: "device", GroupCode: "device", Name: "产品管理", Icon: "icon-common", Path: "/product", SortNo: 60, Status: common.StatusEnable},
|
{Identity: "device", GroupCode: "device", Name: "智能气阀管理", Icon: "icon-common", Path: "/product", SortNo: 60, Status: common.StatusEnable},
|
||||||
{Identity: "product_type", ParentIdentity: "device", GroupCode: "device", Name: "产品类型", Path: "/product/product-type", SortNo: 1, Status: common.StatusEnable},
|
{Identity: "product_type", ParentIdentity: "device", GroupCode: "device", Name: "类型管理", Path: "/product/product-type", SortNo: 1, Status: common.StatusEnable},
|
||||||
{Identity: "product_warehouse", ParentIdentity: "device", GroupCode: "device", Name: "库房", Path: "/product/warehouse", SortNo: 2, Status: common.StatusEnable},
|
{Identity: "product_warehouse", ParentIdentity: "device", GroupCode: "device", Name: "库房管理", Path: "/product/warehouse", SortNo: 2, Status: common.StatusEnable},
|
||||||
{Identity: "product_info", ParentIdentity: "device", GroupCode: "device", Name: "产品信息", Path: "/product/product-info", SortNo: 3, Status: common.StatusEnable},
|
{Identity: "product_info", ParentIdentity: "device", GroupCode: "device", Name: "智能气阀管理", Path: "/product/product-info", SortNo: 3, Status: common.StatusEnable},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{Identity: "gasorder", GroupCode: "gasorder", Name: "气体配送订单管理", Icon: "icon-list", Path: "/gasorder", SortNo: 70, Status: common.StatusEnable},
|
{Identity: "gasorder", GroupCode: "gasorder", Name: "气体配送订单管理", Icon: "icon-list", Path: "/gasorder", SortNo: 70, Status: common.StatusEnable},
|
||||||
|
|||||||
@@ -78,10 +78,10 @@ const fieldLabels: Record<string, string> = {
|
|||||||
expired_at: '到期时间',
|
expired_at: '到期时间',
|
||||||
real_name: '实名姓名',
|
real_name: '实名姓名',
|
||||||
is_default: '默认地址',
|
is_default: '默认地址',
|
||||||
params: '产品参数',
|
params: '智能气阀参数',
|
||||||
produced_at: '生产时间',
|
produced_at: '生产时间',
|
||||||
enabled_at: '启用时间',
|
enabled_at: '启用时间',
|
||||||
product_status: '产品生命周期',
|
product_status: '智能气阀状态',
|
||||||
contract_status: '合同状态',
|
contract_status: '合同状态',
|
||||||
order_status: '订单状态',
|
order_status: '订单状态',
|
||||||
previous_order_status: '异常前订单状态',
|
previous_order_status: '异常前订单状态',
|
||||||
@@ -291,13 +291,13 @@ export const resources: ResourceUiDefinition[] = [
|
|||||||
define('user_address', '用户地址', 'writable', [relation('user_account_identity', '/user_account', true), f('address', { required: true }), f('longitude'), f('latitude'), f('is_default')]),
|
define('user_address', '用户地址', 'writable', [relation('user_account_identity', '/user_account', true), f('address', { required: true }), f('longitude'), f('latitude'), f('is_default')]),
|
||||||
define('user_service_relation', '用户服务关系', 'writable', [relation('user_account_identity', '/user_account', true), relation('gas_basic_identity', '/gas_basic'), relation('delivery_basic_identity', '/delivery_basic'), relation('staff_account_identity', '/staff_account')]),
|
define('user_service_relation', '用户服务关系', 'writable', [relation('user_account_identity', '/user_account', true), relation('gas_basic_identity', '/gas_basic'), relation('delivery_basic_identity', '/delivery_basic'), relation('staff_account_identity', '/staff_account')]),
|
||||||
|
|
||||||
define('product_type', '产品类型', 'editable', [f('code', { required: true }), f('name', { required: true })]),
|
define('product_type', '智能气阀类型', 'editable', [f('code', { required: true }), f('name', { required: true })]),
|
||||||
define('product_warehouse', '库房', 'editable', [f('code', { required: true }), f('name', { required: true }), f('address'), f('manager'), f('phone')]),
|
define('product_warehouse', '智能气阀库房', 'editable', [f('code', { required: true }), f('name', { required: true }), f('address'), f('manager'), f('phone')]),
|
||||||
define('product_info', '产品信息', 'editable', [f('code', { required: true }), f('name', { required: true }), relation('product_type_identity', '/product_type', true), f('params', { required: true }), relation('warehouse_identity', '/product_warehouse'), relation('gas_basic_identity', '/gas_basic'), relation('delivery_basic_identity', '/delivery_basic'), relation('user_account_identity', '/user_account'), f('produced_at', { required: true })], 'list', [
|
define('product_info', '智能气阀', 'editable', [f('code', { required: true }), f('name', { required: true }), relation('product_type_identity', '/product_type', true), f('params', { required: true }), relation('warehouse_identity', '/product_warehouse'), relation('gas_basic_identity', '/gas_basic'), relation('delivery_basic_identity', '/delivery_basic'), relation('user_account_identity', '/user_account'), f('produced_at', { required: true })], 'list', [
|
||||||
{ name: '修改产品生命周期', resource: '/product_info/:identity/lifecycle', method: 'PATCH', fields: [f('product_status', { required: true, type: 'select', options: [{ label: '待处理', value: 10 }, { label: '在库', value: 28 }, { label: '运输中', value: 29 }, { label: '使用中', value: 30 }, { label: '维修中', value: 31 }, { label: '已报废', value: 27 }] })] },
|
{ name: '修改智能气阀状态', resource: '/product_info/:identity/lifecycle', method: 'PATCH', fields: [f('product_status', { required: true, type: 'select', options: [{ label: '待处理', value: 10 }, { label: '在库', value: 28 }, { label: '运输中', value: 29 }, { label: '使用中', value: 30 }, { label: '维修中', value: 31 }, { label: '已报废', value: 27 }] })] },
|
||||||
]),
|
]),
|
||||||
define('product_repair', '产品检修记录', 'editable', [relation('product_info_identity', '/product_info', true), f('repair_no', { required: true }), f('repair_type', { required: true }), f('started_at', { required: true }), f('completed_at'), f('result', { type: 'select', options: [{ label: '待处理', value: 'pending' }, { label: '通过', value: 'passed' }, { label: '未通过', value: 'failed' }] }), f('target_product_status', { type: 'select', options: [{ label: '在库', value: 28 }, { label: '运输中', value: 29 }, { label: '使用中', value: 30 }, { label: '报废', value: 27 }] }), f('content'), f('operator'), f('remark')]),
|
define('product_repair', '智能气阀检修记录', 'editable', [relation('product_info_identity', '/product_info', true), f('repair_no', { required: true }), f('repair_type', { required: true }), f('started_at', { required: true }), f('completed_at'), f('result', { type: 'select', options: [{ label: '待处理', value: 'pending' }, { label: '通过', value: 'passed' }, { label: '未通过', value: 'failed' }] }), f('target_product_status', { type: 'select', options: [{ label: '在库', value: 28 }, { label: '运输中', value: 29 }, { label: '使用中', value: 30 }, { label: '报废', value: 27 }] }), f('content'), f('operator'), f('remark')]),
|
||||||
define('product_owner', '产品归属记录', 'readonly', []),
|
define('product_owner', '智能气阀归属记录', 'readonly', []),
|
||||||
|
|
||||||
define('gasorder_contract', '配送合同', 'managed', [f('contract_no', { required: true }), relation('user_account_identity', '/user_account', true), relation('gas_basic_identity', '/gas_basic', true), relation('delivery_basic_identity', '/delivery_basic'), f('title', { required: true }), f('terms'), f('file_uri'), f('default_delivery_fee'), f('signed_at', { required: true }), f('effective_at', { required: true }), f('expired_at')], 'list', [
|
define('gasorder_contract', '配送合同', 'managed', [f('contract_no', { required: true }), relation('user_account_identity', '/user_account', true), relation('gas_basic_identity', '/gas_basic', true), relation('delivery_basic_identity', '/delivery_basic'), f('title', { required: true }), f('terms'), f('file_uri'), f('default_delivery_fee'), f('signed_at', { required: true }), f('effective_at', { required: true }), f('expired_at')], 'list', [
|
||||||
{ name: '启用合同', resource: '/gasorder_contract/:identity/activate', fields: reason },
|
{ name: '启用合同', resource: '/gasorder_contract/:identity/activate', fields: reason },
|
||||||
|
|||||||
@@ -77,12 +77,12 @@ const routes: AppRouteRecordRaw[] = [
|
|||||||
child('user', 'user-address', 'address', '用户地址', '/user_address', 'user_address'),
|
child('user', 'user-address', 'address', '用户地址', '/user_address', 'user_address'),
|
||||||
child('user', 'service-relation', 'service-relation', '服务关系', '/user_service_relation', 'user_service_relation'),
|
child('user', 'service-relation', 'service-relation', '服务关系', '/user_service_relation', 'user_service_relation'),
|
||||||
]),
|
]),
|
||||||
group('product', 'product', '产品管理', 'icon-common', 50, [
|
group('product', 'product', '智能气阀管理', 'icon-common', 50, [
|
||||||
child('product', 'product-type', 'type', '产品类型', '/product_type', 'product_type'),
|
child('product', 'product-type', 'type', '类型管理', '/product_type', 'product_type'),
|
||||||
child('product', 'warehouse', 'warehouse', '库房', '/product_warehouse', 'product_warehouse'),
|
child('product', 'warehouse', 'warehouse', '库房管理', '/product_warehouse', 'product_warehouse'),
|
||||||
child('product', 'product-info', 'info', '产品信息', '/product_info', 'product_info'),
|
child('product', 'product-info', 'info', '智能气阀管理', '/product_info', 'product_info'),
|
||||||
child('product', 'repair', 'repair', '检修记录', '/product_repair', 'product_info', true, 'product-info'),
|
child('product', 'repair', 'repair', '智能气阀检修记录', '/product_repair', 'product_info', true, 'product-info'),
|
||||||
child('product', 'owner', 'owner', '归属记录', '/product_owner', 'product_info', true, 'product-info'),
|
child('product', 'owner', 'owner', '智能气阀归属记录', '/product_owner', 'product_info', true, 'product-info'),
|
||||||
], 'device'),
|
], 'device'),
|
||||||
group('gasorder', 'gasorder', '气体配送订单管理', 'icon-list', 60, [
|
group('gasorder', 'gasorder', '气体配送订单管理', 'icon-list', 60, [
|
||||||
child('gasorder', 'contracts', 'contracts', '合同管理', '/gasorder_contract', 'gasorder_contract'),
|
child('gasorder', 'contracts', 'contracts', '合同管理', '/gasorder_contract', 'gasorder_contract'),
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const cards: { key: CountKey; label: string; hint: string; money?: boolean }[] =
|
|||||||
{ key: 'delivery_basic_count', label: '启用配送点', hint: '跨组织汇总' },
|
{ key: 'delivery_basic_count', label: '启用配送点', hint: '跨组织汇总' },
|
||||||
{ key: 'staff_count', label: '在岗人员', hint: '当前可接单' },
|
{ key: 'staff_count', label: '在岗人员', hint: '当前可接单' },
|
||||||
{ key: 'user_count', label: '启用客户', hint: '有效业主账户' },
|
{ key: 'user_count', label: '启用客户', hint: '有效业主账户' },
|
||||||
{ key: 'product_count', label: '在册气瓶', hint: '已启用资产' },
|
{ key: 'product_count', label: '智能气阀', hint: '已启用资产' },
|
||||||
{ key: 'active_contract_count', label: '生效合同', hint: '当前履约中' },
|
{ key: 'active_contract_count', label: '生效合同', hint: '当前履约中' },
|
||||||
{ key: 'today_order_count', label: '今日订单', hint: '自然日新增' },
|
{ key: 'today_order_count', label: '今日订单', hint: '自然日新增' },
|
||||||
{ key: 'today_order_amount', label: '今日应付金额', hint: '订单口径', money: true },
|
{ key: 'today_order_amount', label: '今日应付金额', hint: '订单口径', money: true },
|
||||||
@@ -70,7 +70,7 @@ const cards: { key: CountKey; label: string; hint: string; money?: boolean }[] =
|
|||||||
const actions = [
|
const actions = [
|
||||||
{ label: '新建气站', route: 'gas-basic', menu: 'gas_basic', icon: IconPlus },
|
{ label: '新建气站', route: 'gas-basic', menu: 'gas_basic', icon: IconPlus },
|
||||||
{ label: '配送订单', route: 'gasorder-orders', menu: 'gasorder_basic', icon: IconFile },
|
{ label: '配送订单', route: 'gasorder-orders', menu: 'gasorder_basic', icon: IconFile },
|
||||||
{ label: '气瓶档案', route: 'product-info', menu: 'product_info', icon: IconStorage },
|
{ label: '智能气阀', route: 'product-info', menu: 'product_info', icon: IconStorage },
|
||||||
{ label: '用户管理', route: 'user-account', menu: 'user_account', icon: IconUser },
|
{ label: '用户管理', route: 'user-account', menu: 'user_account', icon: IconUser },
|
||||||
{ label: '商城订单', route: 'ec-orders', menu: 'ec_order', icon: IconApps },
|
{ label: '商城订单', route: 'ec-orders', menu: 'ec_order', icon: IconApps },
|
||||||
{ label: '角色权限', route: 'platform-roles', menu: 'platform_role', icon: IconSettings },
|
{ label: '角色权限', route: 'platform-roles', menu: 'platform_role', icon: IconSettings },
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const labels: Record<string, string> = {
|
|||||||
delivery_basic_count: '配送站数量',
|
delivery_basic_count: '配送站数量',
|
||||||
staff_count: '在岗工作人员',
|
staff_count: '在岗工作人员',
|
||||||
user_count: '启用用户',
|
user_count: '启用用户',
|
||||||
product_count: '在册气瓶',
|
product_count: '智能气阀',
|
||||||
active_contract_count: '生效合同',
|
active_contract_count: '生效合同',
|
||||||
today_order_count: '今日订单',
|
today_order_count: '今日订单',
|
||||||
today_order_amount: '今日应付金额(分)',
|
today_order_amount: '今日应付金额(分)',
|
||||||
|
|||||||
Reference in New Issue
Block a user