增加了手机操作端

This commit is contained in:
wushumin
2026-05-15 14:01:36 +08:00
parent 9aac78b8da
commit dd56e0861b
107 changed files with 23547 additions and 346 deletions

View File

@@ -29,6 +29,7 @@ $tables = [
'shipping_warehouses',
'order_shipping_targets',
'material_tag_scan_logs', 'material_batch_download_logs', 'material_tag_codes', 'material_batches',
'order_transfer_flow_logs', 'order_transfer_flows', 'internal_transfer_tags', 'internal_transfer_tag_batches',
'enterprise_webhook_deliveries', 'enterprise_order_events', 'enterprise_customer_order_refs', 'enterprise_api_nonces', 'enterprise_customer_apps', 'enterprise_customers',
'user_api_tokens', 'sms_code_logs',
'admin_api_tokens', 'admin_role_permissions', 'admin_permissions', 'admin_role_relations', 'admin_roles', 'operation_logs', 'system_configs', 'admin_users',
@@ -172,8 +173,8 @@ INSERT INTO appraisal_tasks (id, order_id, task_stage, service_provider, status,
INSERT INTO appraisal_task_results (id, task_id, order_id, result_status, result_text, result_desc, condition_grade, condition_desc, valuation_min, valuation_max, valuation_desc, internal_remark, external_remark, created_at, updated_at) VALUES
(1, 3, 3, 'authentic', '正品', '综合当前送检资料与商品特征判断,符合正品特征。', 'A', '整体状态良好,存在轻微使用痕迹。', 2800.00, 3200.00, '当前估值仅供参考,具体以市场流通情况为准。', '鉴定完成,可出正式报告。', '综合当前送检资料与商品特征判断,符合正品特征。', '{$now}', '{$now}');
INSERT INTO reports (id, report_no, order_id, appraisal_no, report_type, service_provider, institution_name, report_title, report_status, report_version, publish_time, created_at, updated_at) VALUES
(1, 'AXY-R-20260420-0001', 3, 'AXY-APP-20260418-0088', 'appraisal', 'zhongjian', '中检合作机构', '中检鉴定报告', 'published', 1, '2026-04-18 18:26:00', '{$now}', '{$now}');
INSERT INTO reports (id, report_no, order_id, appraisal_no, report_type, service_provider, institution_name, report_title, report_status, report_version, publish_time, zhongjian_report_no, report_entry_admin_id, report_entry_admin_name, report_entered_at, created_at, updated_at) VALUES
(1, 'AXY-R-20260420-0001', 3, 'AXY-APP-20260418-0088', 'appraisal', 'zhongjian', '中检合作机构', '中检鉴定报告', 'published', 1, '2026-04-18 18:26:00', 'ZJ-20260418-0001', 3, '王师傅', '2026-04-18 18:20:00', '{$now}', '{$now}');
");
$productSnapshot = json_encode([
@@ -206,7 +207,18 @@ $valuationSnapshot = json_encode([
'valuation_desc' => '当前估值仅供参考,具体以市场流通情况为准。',
], JSON_UNESCAPED_UNICODE);
$stmt = $pdo->prepare('INSERT INTO report_contents (id, report_id, product_snapshot_json, result_snapshot_json, appraisal_snapshot_json, valuation_snapshot_json, risk_notice_text, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
$zhongjianReportFiles = json_encode([
[
'file_id' => 'seed_zhongjian_report_pdf',
'file_url' => '/uploads/appraisal-evidence/demo/zhongjian-report.pdf',
'thumbnail_url' => '',
'name' => '中检报告示例.pdf',
'file_type' => 'pdf',
'mime_type' => 'application/pdf',
],
], JSON_UNESCAPED_UNICODE);
$stmt = $pdo->prepare('INSERT INTO report_contents (id, report_id, product_snapshot_json, result_snapshot_json, appraisal_snapshot_json, valuation_snapshot_json, zhongjian_report_files_json, risk_notice_text, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
$stmt->execute([
1,
1,
@@ -214,25 +226,12 @@ $stmt->execute([
$resultSnapshot,
$appraisalSnapshot,
$valuationSnapshot,
$zhongjianReportFiles,
'本报告基于送检商品及当前提交资料出具。若商品状态或所附资料发生变化,报告结论可能不再适用。',
$now,
$now,
]);
$stmt = $pdo->prepare('INSERT INTO report_verifies (id, report_id, report_no, verify_token, verify_qrcode_url, verify_url, verify_status, verify_count, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
$stmt->execute([
1,
1,
'AXY-R-20260420-0001',
'verify_axyr202604200001',
'',
'/api/app/verify?report_no=AXY-R-20260420-0001',
'valid',
0,
$now,
$now,
]);
$pdo->exec("
INSERT INTO message_templates (id, template_name, template_code, channel, event_code, title, content, is_enabled, created_at, updated_at) VALUES
(1, '下单成功通知', 'order_created_inbox', 'inbox', 'order_created', '订单提交成功', '您的鉴定订单已提交成功,可前往订单中心查看进度。', 1, '{$now}', '{$now}'),
@@ -285,10 +284,11 @@ INSERT INTO admin_permissions (id, name, code, module, action, created_at, updat
(7, '管理工单', 'tickets.manage', 'tickets', 'manage', '{$now}', '{$now}'),
(8, '管理用户', 'users.manage', 'users', 'manage', '{$now}', '{$now}'),
(9, '管理客户', 'customers.manage', 'customers', 'manage', '{$now}', '{$now}'),
(10, '管理仓库', 'warehouses.manage', 'warehouses', 'manage', '{$now}', '{$now}'),
(11, '管理物料', 'materials.manage', 'materials', 'manage', '{$now}', '{$now}'),
(12, '管理权限', 'access.manage', 'access', 'manage', '{$now}', '{$now}'),
(13, '管理系统配置', 'system.manage', 'system_config', 'manage', '{$now}', '{$now}');
(10, '仓管作业', 'warehouse_workbench.manage', 'warehouse_workbench', 'manage', '{$now}', '{$now}'),
(11, '管理仓库', 'warehouses.manage', 'warehouses', 'manage', '{$now}', '{$now}'),
(12, '管理物料', 'materials.manage', 'materials', 'manage', '{$now}', '{$now}'),
(13, '管理权限', 'access.manage', 'access', 'manage', '{$now}', '{$now}'),
(14, '管理系统配置', 'system.manage', 'system_config', 'manage', '{$now}', '{$now}');
INSERT INTO admin_role_permissions (id, role_id, permission_id, created_at) VALUES
(1, 1, 1, '{$now}'),
@@ -303,7 +303,8 @@ INSERT INTO admin_role_permissions (id, role_id, permission_id, created_at) VALU
(10, 1, 10, '{$now}'),
(11, 1, 11, '{$now}'),
(12, 1, 12, '{$now}'),
(13, 1, 13, '{$now}');
(13, 1, 13, '{$now}'),
(14, 1, 14, '{$now}');
INSERT INTO system_configs (id, config_group, config_key, config_value, remark, created_at, updated_at) VALUES
(1, 'mini_program', 'app_id', '', '后台系统配置', '{$now}', '{$now}'),