Project

General

Profile

追加功能 #471

追加功能 #456: v4.0: Order detail - Step 2 (Niko)

v4.0: Order detail - Step 2 (Bruce)

Added by Xihua Fan 7 months ago. Updated 11 days ago.

Status:
已关闭
Priority:
普通
Assignee:
Target version:
IT: Easytryck (Sweden) - v4.0
Start date:
05/16/2025
Due date:
05/30/2025
% Done:

100%

Estimated time:
80.00 h

Description

Background
  1. New requirement for v4.0 OTS
    See: OneDrive\赤蓝商贸(上海)有限公司\Shanghai Group - IT\开发相关\OTS V4\开发需求
Task List
  • 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:
  1. Git提交
    #xxx(redmine number): xxx(redmine title) - xxx(任意:补充内容)
      
  2. 代码规范
    2.1: 结构:Public -> Protected -> Private
    2.2: 其他代码规范同SBX
      
  3. 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
     
  4. 前台代码
    twig, js, css (js, css尽量写在单独的css文件中)
     
  5. 后台代码
    MVCL (L:en,cn)
     
  6. 注释
    1. 类名:
      /**
       * xxx
       *
       * @copyright RedBlue-OTS 2024
       * @version v4
       *
       */
      
    2. 函数名:参数类型 + 返回值类型
          /**
           * xxx
           *
           * @param  xxx $xxx
           * @param  xxx $xxx
           * @return xxx
           */
      
Output
  • Report and Solution

Others

#1

Updated by Xihua Fan 7 months ago

  • Subject changed from v4.0: Order detail - 2 to v4.0: Order detail - 2 (Bruce)
#2

Updated by Xihua Fan 7 months ago

  • Description updated (diff)
#3

Updated by Xihua Fan 7 months ago

  • Description updated (diff)
#4

Updated by Zhongbao Ye 7 months ago

Output (2025/06/19 ~ 2025/06/20)九亭 + Output (2025/06/16 ~ 2025/06/18) 居家 + Output (2025/06/11 ~ 2025/06/13) 九亭 + Output (2025/06/09 ~ 2025/06/10) 居家 + Output (2025/06/04 ~ 2025/06/05) 九亭 + Output (2025/06/03) 居家 + Output (2025/05/28 ~ 2025/05/30) 九亭 + Output (2025/05/22) 九亭 + Output (2025/05/16) 九亭 + Output (2025/05/19 ~ 2025/05/21) 居家

Note:
  1. 为了访问storage下的文件,我们在web目录下创建了2个软连接
    1. /var/www/html/ots4.0/image -> /var/www/html/storage/image
    2. /var/www/html/ots4.0/upload -> /var/www/html/storage/upload
      • upload公开目录不是一个【好主意】,,由于我们是【内部系统:安全级别暂时交给密码保护】,暂时可以【保持现在的设计】,有必要的时候我们再回到这里【商量一些安全细节】
  2. 预览pdf的功能,Desktop和Mobile有不同的表现
    • Desktop:常规浏览器均支持预览
    • Mobile:
      • IOS: 点击预览,长按可分享,下载,copy链接地址等操作
      • 安卓:仅支持点击下载。

Mobile(To-do):调用相机拍照后,启用图象编辑功能,可以裁剪,添加文字等简单功能(需调查web端是否能够实现)

SQL:参考 #440

#5

Updated by Zhongbao Ye 7 months ago

  • Description updated (diff)
  • % Done changed from 0 to 10
#6

Updated by Zhongbao Ye 7 months ago

  • Description updated (diff)
#7

Updated by Zhongbao Ye 7 months ago

  • Description updated (diff)
#8

Updated by Zhongbao Ye 7 months ago

  • Description updated (diff)
#9

Updated by Zhongbao Ye 7 months ago

  • Description updated (diff)
#10

Updated by Zhongbao Ye 7 months ago

  • % Done changed from 10 to 20
#11

Updated by Zhongbao Ye 7 months ago

  • % Done changed from 20 to 70
#12

Updated by Zhongbao Ye 6 months ago

  • Description updated (diff)
#13

Updated by Zhongbao Ye 6 months ago

  • Description updated (diff)
  • % Done changed from 70 to 90
#14

Updated by Xihua Fan 6 months ago

关于: Mobile(To-do) :调用相机拍照后,启用图象编辑功能,可以裁剪,添加文字等简单功能(需调查web端是否能够实现)

已经记录CheckList(https://trello.com/c/TfP0GZJR/7-%E8%AE%A2%E5%8D%95%E5%88%97%E8%A1%A8-order-list)
关闭此票

#15

Updated by Zhongbao Ye 6 months ago

  • Status changed from 进行中 to 已关闭
  • % Done changed from 90 to 100
#16

Updated by Xihua Fan 22 days ago

  • Subject changed from v4.0: Order detail - 2 (Bruce) to v4.0: Order detail - Step 2 (Bruce)
#17

Updated by Zhongbao Ye 11 days ago

  • Description updated (diff)
#18

Updated by Zhongbao Ye 11 days ago

  • Description updated (diff)
#19

Updated by Xihua Fan 11 days ago

  • Description updated (diff)
#20

Updated by Zhongbao Ye 11 days ago

  • Description updated (diff)

Also available in: Atom PDF