追加功能 #471
追加功能 #456: v4.0: Order detail - Step 2 (Niko)
v4.0: Order detail - Step 2 (Bruce)
Start date:
05/16/2025
Due date:
05/30/2025
% Done:
100%
Estimated time:
80.00 h
Description
Background
- New requirement for v4.0 OTS
See: OneDrive\赤蓝商贸(上海)有限公司\Shanghai Group - IT\开发相关\OTS V4\开发需求
- Design Files 和 Product Proof Images
对比 Design Files Product Proof Images 使用方式 Dropzone Dropzone 删除方式 逻辑删除 `is_delete` 物理删除 预览支持 图片、PDF 可预览;其他文件显示图标 图片可预览(经压缩处理) 上传过程 上传中禁用 Save;上传完成后启用 同左侧逻辑 文件名是否转换 不转换 转换 → `{file_index}-{order_id}-{order_product_id}-{original_name}` 临时存储路径 - New order:`storage/upload/order/{year}/temp/customer_{customer_id}/`
- Edit order - Desktop order detail:`storage/upload/order/{year}/temp/order_{order_id}/`
- Edit order - Mobile order list:`storage/upload/order/{year}/order_{order_id}/`- New order:`storage/image/cache/order/{year}/temp/customer_{customer_id}/`
- Edit order:`storage/image/cache/order/{year}/temp/order_{order_id}/`
- New order(原始图片):`storage/image/order/{year}/temp/customer_{order_id}/`(压缩后删除)
- Edit order - Desktop order detail(原始图片):`storage/image/order/{year}/temp/order_{order_id}/`(压缩后删除)
- Edit order - Mobile order list(原始图片):`storage/image/order/{year}/order_{order_id}/`(压缩后删除)最终存储路径 `storage/upload/order/{year}/order_{order_id}/` `storage/image/cache/order/{year}/order_{order_id}/` 预览名称格式 `{自然索引.} {文件名}` `{自然索引.} {产品名称}` 图片尺寸处理 不需要压缩 自动按比例压缩(最多 3 张)支持尺寸:
• 1:1 → 1000×1000
• 4:3 → 1000×750
• 3:4 → 750×1000
• 16:9 → 1280×720
• 9:16 → 720×1280
• 20:9 → 2400×1080
• 9:20 → 1080×2400配置参数 max_file_size => 999MB
file_ext_allowed => '.pdf','.zip','.rar','.jpg','.png','.ai','.xlsx','.eps','.7z','.xls','.jpeg','.tif',
'.otf','.txt','.csv','.ttf','.jfif','.psd','.cdr','.partial','.svg','.webp','.bmp','.doc','.docx','.gif','.ods','.mp4'
compress_image => false
max_files => 0 //0 means unlimited
root_dir => storage/upload/
max_file_size => 10MB
file_ext_allowed => '.jpg','.jpeg','.png','.image/*'
compress_image => true
max_files => 3
root_dir => storage/image
Questions:
v4 coding standard:- Git提交
#xxx(redmine number): xxx(redmine title) - xxx(任意:补充内容)
- 代码规范
2.1: 结构:Public -> Protected -> Private
2.2: 其他代码规范同SBX
- MVCL的v3/v4物理分割
3.1: v3/v4的代码分为两个文件,比如: order.php, order_v3.php
3.2: system也分为两个文件,暂时只有一个user_v3
- Note: front的$this->user在v4中会替换为$this->customer, 即v4中需要清除$this->user
3.3: 代码中,区分v3/v4的调用,比如:new User_V3
- 前台代码
twig, js, css (js, css尽量写在单独的css文件中)
- 后台代码
MVCL (L:en,cn)
- 注释
- 类名:
/** * xxx * * @copyright RedBlue-OTS 2024 * @version v4 * */
- 函数名:参数类型 + 返回值类型
/** * xxx * * @param xxx $xxx * @param xxx $xxx * @return xxx */
- 类名:
- Report and Solution
Others