m0_70156489 hai 14 horas
pai
achega
cd31d4be9b

+ 66 - 24
application/admin/controller/Procuremen.php

@@ -4563,26 +4563,57 @@ class Procuremen extends Backend
         $confirmApproveTime = ProcuremenTime::formatDisplayDateTime($confirmApproveTime);
         $doneTime = ProcuremenTime::formatDisplayDateTime($doneTime);
 
-        $deadlineText = '';
+        $deadlineLines = [];
         $sysRqRaw = trim((string)($main['sys_rq'] ?? ''));
         if ($sysRqRaw !== '' && stripos($sysRqRaw, '0000-00-00') !== 0) {
             $deadlineDisp = $this->formatProcuremenSysRqForDisplay($sysRqRaw);
             if ($deadlineDisp !== '' && $deadlineDisp !== '—') {
-                $deadlineText = '招标截止 ' . $deadlineDisp;
+                $deadlineLines[] = '招标截止日期:' . $deadlineDisp;
             }
         }
+        $deliveryRaw = trim((string)($main['delivery_deadline'] ?? ''));
+        if ($deliveryRaw !== '' && stripos($deliveryRaw, '0000-00-00') !== 0) {
+            $deliveryDisp = $this->formatProcuremenDeliveryDeadlineForInput($deliveryRaw);
+            if ($deliveryDisp === '') {
+                $deliveryDisp = $this->formatDeliveryYmd($deliveryRaw);
+            }
+            if ($deliveryDisp !== '') {
+                $deadlineLines[] = '交货截止日期:' . $deliveryDisp;
+            }
+        }
+        $issueOperTimeRaw = $step2Done ? ($issueTime !== '' ? $issueTime : $poTime) : '';
+        if ($issueOperTimeRaw !== '' && $issueOperTimeRaw !== '—') {
+            $deadlineLines[] = '操作时间:' . $issueOperTimeRaw;
+        }
+        $deadlineText = implode("\n", $deadlineLines);
+
+        $prefixOperTime = static function (string $t): string {
+            $t = trim($t);
+            if ($t === '' || $t === '—') {
+                return $t;
+            }
+            if (strpos($t, '操作时间') === 0) {
+                return $t;
+            }
+
+            return '操作时间:' . $t;
+        };
+
+        $step4Time = $step4Done ? ($auditSelectTime !== '' ? $auditSelectTime : $pickedTime) : '';
+        $step5Time = $step5Done ? ($confirmApproveTime !== '' ? $confirmApproveTime : $doneTime) : '';
+        $step6Time = $step6Done ? $doneTime : '';
 
         $steps = [
             [
                 'title'    => '未发',
                 'subtitle' => '',
-                'time'     => $issued ? '—' : ($hasMain ? $poTime : ''),
+                'time'     => $issued ? '—' : ($hasMain ? $prefixOperTime($poTime) : ''),
                 'done'     => $step1Done,
             ],
             [
                 'title'    => '下发',
                 'subtitle' => $deadlineText,
-                'time'     => $step2Done ? ($issueTime !== '' ? $issueTime : $poTime) : '',
+                'time'     => '',
                 'done'     => $step2Done,
             ],
             [
@@ -4596,19 +4627,19 @@ class Procuremen extends Backend
                 'subtitle' => $step4Done
                     ? ($pickedName !== '' ? ('选定:' . $pickedName) : '')
                     : ($issued ? '待选供应商' : ''),
-                'time'     => $step4Done ? ($auditSelectTime !== '' ? $auditSelectTime : $pickedTime) : '',
+                'time'     => $prefixOperTime($step4Time),
                 'done'     => $step4Done,
             ],
             [
                 'title'    => '待审批',
                 'subtitle' => ($pickedName !== '' && $step4Done) ? ('供应商:' . $pickedName) : '',
-                'time'     => $step5Done ? ($confirmApproveTime !== '' ? $confirmApproveTime : $doneTime) : '',
+                'time'     => $prefixOperTime($step5Time),
                 'done'     => $step5Done,
             ],
             [
                 'title'    => '已完结',
                 'subtitle' => '',
-                'time'     => $step6Done ? $doneTime : '',
+                'time'     => $prefixOperTime($step6Time),
                 'done'     => $step6Done,
             ],
         ];
@@ -4769,7 +4800,26 @@ class Procuremen extends Backend
 
         $operLogs = [];
         try {
-            $operLogs = Db::table('purchase_order_oper_log')->where('scydgy_id', $ids)->order('id', 'asc')->select();
+            $operSidList = array_keys($detailSidList);
+            if ($operSidList === [] && (int)$ids !== 0) {
+                $operSidList = [(int)$ids];
+            }
+            if ($operSidList !== []) {
+                $operLogs = Db::table('purchase_order_oper_log')
+                    ->where(ProcuremenOperLog::COL_SCYDGY_ID, 'in', $operSidList)
+                    ->order('id', 'asc')
+                    ->select();
+            }
+            // 手工单等:主表 scydgy_id 与日志不一致时,再按采购订单ID兜底
+            if ((!is_array($operLogs) || $operLogs === []) && $main !== []) {
+                $poId = (int)($main['id'] ?? $main['ID'] ?? 0);
+                if ($poId > 0) {
+                    $operLogs = Db::table('purchase_order_oper_log')
+                        ->where(ProcuremenOperLog::COL_PO_ID, $poId)
+                        ->order('id', 'asc')
+                        ->select();
+                }
+            }
         } catch (\Throwable $e) {
             $operLogs = [];
         }
@@ -7331,13 +7381,6 @@ class Procuremen extends Backend
         // ---------- 操作日志记录(批量写入,减少提交等待) ----------
         if ($logSidList !== []) {
             list($adminId, $adminName) = $this->GetUseName();
-            $cut = function ($s, $max) {
-                if (function_exists('mb_substr')) {
-                    return mb_substr($s, 0, $max, 'UTF-8');
-                }
-
-                return strlen($s) <= $max ? $s : substr($s, 0, $max);
-            };
             $logRows = [];
             $seenLogSid = [];
             foreach ($mergeRows as $row) {
@@ -7354,15 +7397,14 @@ class Procuremen extends Backend
                     $tid = (int)$poIdBySid[$ids];
                     $poIdLog = $tid > 0 ? $tid : null;
                 }
-                $logRows[] = [
-                    'scydgy_id'         => $ids,
-                    'purchase_order_id' => $poIdLog,
-                    'admin_id'          => $adminId,
-                    'admin_name'        => $cut($adminName, 64),
-                    'action'            => $cut('issue_submit', 64),
-                    'content'           => $cut($logMsg, 1000),
-                    'createtime'        => ProcuremenTime::nowDateTime(),
-                ];
+                $logRows[] = ProcuremenOperLog::buildInsertRow(
+                    $ids,
+                    'issue_submit',
+                    $logMsg,
+                    $poIdLog,
+                    (int)$adminId,
+                    (string)$adminName
+                );
             }
             if ($logRows !== []) {
                 try {

+ 6 - 4
application/admin/controller/Procuremenexport.php

@@ -3,6 +3,7 @@
 namespace app\admin\controller;
 
 use app\common\controller\Backend;
+use app\common\library\ProcuremenOperLog;
 use app\common\library\ProcuremenStatus;
 use app\common\library\ProcuremenTime;
 use think\Db;
@@ -480,9 +481,9 @@ class Procuremenexport extends Backend
         }
         try {
             $logs = Db::table('purchase_order_oper_log')
-                ->where('scydgy_id', 'in', $scydgyIds)
-                ->where('action', 'in', $actions)
-                ->field('scydgy_id,createtime')
+                ->where(ProcuremenOperLog::COL_SCYDGY_ID, 'in', $scydgyIds)
+                ->where(ProcuremenOperLog::COL_ACTION, 'in', ProcuremenOperLog::expandActionQueryValues($actions))
+                ->field(ProcuremenOperLog::COL_SCYDGY_ID . ',' . ProcuremenOperLog::COL_TIME)
                 ->order('id', 'asc')
                 ->select();
         } catch (\Throwable $e) {
@@ -495,8 +496,9 @@ class Procuremenexport extends Backend
             if (!is_array($log)) {
                 continue;
             }
+            $log = ProcuremenOperLog::normalizeRow($log);
             $sid = (int)($log['scydgy_id'] ?? 0);
-            $ct = (int)($log['createtime'] ?? 0);
+            $ct = ProcuremenTime::parseToTimestamp($log['createtime'] ?? null);
             if ($sid > 0 && $ct > 946684800) {
                 $out[$sid] = isset($out[$sid]) ? max($out[$sid], $ct) : $ct;
             }

+ 15 - 5
application/admin/view/procuremen/details_fragment.html

@@ -87,14 +87,24 @@
     .proc-step-sub {
         font-size: 11px;
         color: #888;
-        line-height: 1.3;
-        min-height: 2.6em;
+        line-height: 1.45;
+        min-height: 4.4em;
+        white-space: pre-line;
+        word-break: break-word;
+        text-align: left;
+        display: inline-block;
+        max-width: 100%;
+        vertical-align: top;
     }
     .proc-step-time {
         font-size: 11px;
         color: #aaa;
         margin-top: 4px;
-        white-space: nowrap;
+        white-space: pre-line;
+        line-height: 1.3;
+        text-align: left;
+        display: inline-block;
+        max-width: 100%;
     }
     .procuremen-details-wrap .procuremen-order-info-block {
         border: 1px solid #ddd;
@@ -367,10 +377,10 @@
                         <td style="vertical-align:top;padding:2px 2px 0;border:0 !important;font-size:12px;color:#333;line-height:1.35;font-weight:600;text-align:center;">{$st.title|htmlentities}</td>
                     </tr>
                     <tr>
-                        <td style="vertical-align:top;padding:2px 2px 0;height:44px;border:0 !important;font-size:11px;color:#888;line-height:1.3;text-align:center;overflow:hidden;">{$st.subtitle|default=''|htmlentities}</td>
+                        <td style="vertical-align:top;padding:2px 2px 0;height:72px;border:0 !important;font-size:11px;color:#888;line-height:1.45;text-align:left;overflow:hidden;">{$st.subtitle|default=''|htmlentities|nl2br}</td>
                     </tr>
                     <tr>
-                        <td style="vertical-align:bottom;padding:2px 2px 0;border:0 !important;font-size:11px;color:#aaa;text-align:center;white-space:nowrap;">{$st.time|default=''|htmlentities}</td>
+                        <td style="vertical-align:bottom;padding:2px 2px 0;border:0 !important;font-size:11px;color:#aaa;text-align:center;line-height:1.3;">{$st.time|default=''|htmlentities|nl2br}</td>
                     </tr>
                 </table>
             </td>

+ 6 - 4
application/common/library/ProcuremenDashboard.php

@@ -513,8 +513,8 @@ class ProcuremenDashboard
     {
         try {
             $logs = Db::table('purchase_order_oper_log')
-                ->where('action', 'in', $actions)
-                ->field('scydgy_id,createtime')
+                ->where(ProcuremenOperLog::COL_ACTION, 'in', ProcuremenOperLog::expandActionQueryValues($actions))
+                ->field(ProcuremenOperLog::COL_SCYDGY_ID . ',' . ProcuremenOperLog::COL_TIME)
                 ->select();
         } catch (\Throwable $e) {
             return [];
@@ -527,6 +527,7 @@ class ProcuremenDashboard
             if (!is_array($log)) {
                 continue;
             }
+            $log = ProcuremenOperLog::normalizeRow($log);
             $ts = ProcuremenTime::parseToTimestamp($log['createtime'] ?? null);
             if ($ts < $startTs || $ts > $endTs) {
                 continue;
@@ -853,8 +854,8 @@ class ProcuremenDashboard
         }
         try {
             $logs = Db::table('purchase_order_oper_log')
-                ->where('action', 'in', ['purchase_confirm', 'mark_complete'])
-                ->field('scydgy_id,createtime')
+                ->where(ProcuremenOperLog::COL_ACTION, 'in', ProcuremenOperLog::expandActionQueryValues(['purchase_confirm', 'mark_complete']))
+                ->field(ProcuremenOperLog::COL_SCYDGY_ID . ',' . ProcuremenOperLog::COL_TIME)
                 ->select();
         } catch (\Throwable $e) {
             return 0;
@@ -867,6 +868,7 @@ class ProcuremenDashboard
             if (!is_array($log)) {
                 continue;
             }
+            $log = ProcuremenOperLog::normalizeRow($log);
             $ts = ProcuremenTime::parseToTimestamp($log['createtime'] ?? null);
             if ($ts < $startTs || $ts > $endTs) {
                 continue;

+ 182 - 15
application/common/library/ProcuremenOperLog.php

@@ -6,10 +6,153 @@ use think\Db;
 use think\Log;
 
 /**
- * 协助采购操作日志(下发 / 确认供应商 / 审核确认供应商 等追溯)
+ * 协助采购操作日志(purchase_order_oper_log)
+ *
+ * 表字段为英文;写入时「action」存中文操作类型,查询时兼容历史英文码。
  */
 class ProcuremenOperLog
 {
+    public const COL_SCYDGY_ID = 'scydgy_id';
+    public const COL_PO_ID = 'purchase_order_id';
+    public const COL_ADMIN_ID = 'admin_id';
+    public const COL_ADMIN_NAME = 'admin_name';
+    public const COL_ACTION = 'action';
+    public const COL_CONTENT = 'content';
+    public const COL_TIME = 'createtime';
+
+    /**
+     * 英文码 => 中文操作类型(入库展示用;与库中已有中文值对齐)
+     *
+     * @return array<string, string>
+     */
+    public static function actionLabelMap(): array
+    {
+        return [
+            'issue_submit'           => '下发通知',
+            'audit_select'           => '确认供应商',
+            'purchase_confirm'       => '审核确认供应商',
+            'purchase_reject'        => '审核驳回',
+            'bid_open_verify'        => '开标验证',
+            'audit_append_supplier'  => '补加供应商',
+            'audit_resend_sms'       => '重发短信',
+            'audit_resend_email'     => '重发邮件',
+            'manual_add'             => '手工新增',
+            'pick_soft_delete'       => '初选删除',
+            'save_qty_price'         => '保存数量限价',
+            'mark_complete'          => '直接完结',
+            'audit_abandon'          => '审批重新下发',
+            'archive_abandon'        => '历史重新下发',
+        ];
+    }
+
+    /**
+     * 同一业务动作的可选别名(查询时一并匹配)
+     *
+     * @return array<string, string[]>
+     */
+    public static function actionAliases(): array
+    {
+        return [
+            'issue_submit'          => ['下发通知', '下发', 'issue_submit'],
+            'audit_select'          => ['确认供应商', 'audit_select'],
+            'purchase_confirm'      => ['审核确认供应商', 'purchase_confirm'],
+            'purchase_reject'       => ['审核驳回', 'purchase_reject'],
+            'bid_open_verify'       => ['开标验证', 'bid_open_verify'],
+            'audit_append_supplier' => ['补加供应商', 'audit_append_supplier'],
+            'audit_resend_sms'      => ['重发短信', 'audit_resend_sms'],
+            'audit_resend_email'    => ['重发邮件', 'audit_resend_email'],
+            'manual_add'            => ['手工新增', 'manual_add'],
+            'pick_soft_delete'      => ['初选删除', 'pick_soft_delete'],
+            'save_qty_price'        => ['保存数量限价', 'save_qty_price'],
+            'mark_complete'         => ['直接完结', '完结', 'mark_complete'],
+            'audit_abandon'         => ['审批重新下发', '重新下发', 'audit_abandon'],
+            'archive_abandon'       => ['历史重新下发', '存证重新下发', 'archive_abandon'],
+        ];
+    }
+
+    public static function toActionLabel(string $action): string
+    {
+        $action = trim($action);
+        if ($action === '') {
+            return '';
+        }
+        $map = self::actionLabelMap();
+        if (isset($map[$action])) {
+            return $map[$action];
+        }
+        // 已是中文别名时,归一到主标签
+        foreach (self::actionAliases() as $code => $aliases) {
+            if (in_array($action, $aliases, true)) {
+                return $map[$code] ?? $action;
+            }
+        }
+
+        return $action;
+    }
+
+    /**
+     * 查询用:同时匹配中文标签、别名与历史英文码
+     *
+     * @param string|array<int, string> $actions
+     * @return string[]
+     */
+    public static function expandActionQueryValues($actions): array
+    {
+        $aliases = self::actionAliases();
+        $map = self::actionLabelMap();
+        $out = [];
+        foreach ((array)$actions as $a) {
+            $a = trim((string)$a);
+            if ($a === '') {
+                continue;
+            }
+            $out[$a] = true;
+            $code = $a;
+            if (!isset($aliases[$code])) {
+                foreach ($aliases as $c => $list) {
+                    if (in_array($a, $list, true) || (isset($map[$c]) && $map[$c] === $a)) {
+                        $code = $c;
+                        break;
+                    }
+                }
+            }
+            if (isset($aliases[$code])) {
+                foreach ($aliases[$code] as $v) {
+                    $out[$v] = true;
+                }
+            }
+            if (isset($map[$code])) {
+                $out[$map[$code]] = true;
+            }
+        }
+
+        return array_keys($out);
+    }
+
+    /**
+     * 组装入库行(英文字段,操作类型存中文)
+     *
+     * @return array<string, mixed>
+     */
+    public static function buildInsertRow(
+        int $scydgyId,
+        string $action,
+        string $content,
+        ?int $purchaseOrderId,
+        int $adminId,
+        string $adminName
+    ): array {
+        return [
+            self::COL_SCYDGY_ID   => $scydgyId,
+            self::COL_PO_ID       => $purchaseOrderId,
+            self::COL_ADMIN_ID    => $adminId,
+            self::COL_ADMIN_NAME  => self::cut($adminName !== '' ? $adminName : '未知用户', 64),
+            self::COL_ACTION      => self::cut(self::toActionLabel($action), 64),
+            self::COL_CONTENT     => self::cut($content, 1000),
+            self::COL_TIME        => ProcuremenTime::nowDateTime(),
+        ];
+    }
+
     /**
      * @param array{0:int,1:string} $admin [id, name]
      */
@@ -19,22 +162,45 @@ class ProcuremenOperLog
             return;
         }
         $adminId = (int)($admin[0] ?? 0);
-        $adminName = self::cut((string)($admin[1] ?? '未知用户'), 64);
+        $adminName = (string)($admin[1] ?? '未知用户');
         try {
-            Db::table('purchase_order_oper_log')->insert([
-                'scydgy_id'         => $scydgyId,
-                'purchase_order_id' => $purchaseOrderId,
-                'admin_id'          => $adminId,
-                'admin_name'        => $adminName,
-                'action'            => self::cut($action, 64),
-                'content'           => self::cut($content, 1000),
-                'createtime'        => ProcuremenTime::nowDateTime(),
-            ]);
+            Db::table('purchase_order_oper_log')->insert(
+                self::buildInsertRow($scydgyId, $action, $content, $purchaseOrderId, $adminId, $adminName)
+            );
         } catch (\Throwable $e) {
             Log::write('procuremen oper log: ' . $e->getMessage(), 'error');
         }
     }
 
+    /**
+     * 查询结果规范化(兼容偶发中文列名 → 英文键)
+     *
+     * @param array<string, mixed> $log
+     * @return array<string, mixed>
+     */
+    public static function normalizeRow(array $log): array
+    {
+        $map = [
+            '工序ID'     => 'scydgy_id',
+            '采购订单ID' => 'purchase_order_id',
+            '操作人ID'   => 'admin_id',
+            '操作人'     => 'admin_name',
+            '操作类型'   => 'action',
+            '操作内容'   => 'content',
+            '创建时间'   => 'createtime',
+        ];
+        foreach ($map as $cn => $en) {
+            if (array_key_exists($cn, $log) && !array_key_exists($en, $log)) {
+                $log[$en] = $log[$cn];
+            }
+        }
+        if (isset($log['action'])) {
+            $log['action'] = self::toActionLabel((string)$log['action']);
+        }
+
+        return $log;
+    }
+
     /**
      * @param string|array<int, string> $actions
      */
@@ -43,18 +209,18 @@ class ProcuremenOperLog
         if (!ProcuremenGuard::isValidScydgyId($scydgyId)) {
             return '';
         }
-        $acts = is_array($actions) ? $actions : [$actions];
-        $acts = array_values(array_filter(array_map('strval', $acts)));
+        $acts = self::expandActionQueryValues($actions);
         if ($acts === []) {
             return '';
         }
         try {
             $log = Db::table('purchase_order_oper_log')
-                ->where('scydgy_id', $scydgyId)
-                ->where('action', 'in', $acts)
+                ->where(self::COL_SCYDGY_ID, $scydgyId)
+                ->where(self::COL_ACTION, 'in', $acts)
                 ->order('id', 'desc')
                 ->find();
             if (is_array($log)) {
+                $log = self::normalizeRow($log);
                 $text = ProcuremenTime::formatDisplayDateTime($log['createtime'] ?? null);
                 if ($text !== '') {
                     return $text;
@@ -81,6 +247,7 @@ class ProcuremenOperLog
             if (!is_array($lg)) {
                 continue;
             }
+            $lg = self::normalizeRow($lg);
             $lg['createtime_text'] = ProcuremenTime::formatDisplayDateTime($lg['createtime'] ?? null);
             $lg['content'] = ProcuremenTime::formatOperLogContent(
                 (string)($lg['content'] ?? ''),

+ 13 - 11
application/common/library/ProcuremenTime.php

@@ -93,9 +93,9 @@ class ProcuremenTime
         }
         try {
             $logs = Db::table('purchase_order_oper_log')
-                ->where('scydgy_id', 'in', $scydgyIds)
-                ->where('action', 'in', $actions)
-                ->field('scydgy_id,createtime')
+                ->where(ProcuremenOperLog::COL_SCYDGY_ID, 'in', $scydgyIds)
+                ->where(ProcuremenOperLog::COL_ACTION, 'in', ProcuremenOperLog::expandActionQueryValues($actions))
+                ->field(ProcuremenOperLog::COL_SCYDGY_ID . ',' . ProcuremenOperLog::COL_TIME)
                 ->order('id', 'asc')
                 ->select();
         } catch (\Throwable $e) {
@@ -108,6 +108,7 @@ class ProcuremenTime
             if (!is_array($log)) {
                 continue;
             }
+            $log = ProcuremenOperLog::normalizeRow($log);
             $sid = (int)($log['scydgy_id'] ?? 0);
             $ct = self::parseToTimestamp($log['createtime'] ?? null);
             if ($sid > 0 && $ct > 946684800) {
@@ -157,14 +158,15 @@ class ProcuremenTime
         if ($content === '') {
             return '';
         }
-        $action = trim($action);
+        // 统一成中文标签后再匹配(兼容历史英文码)
+        $action = ProcuremenOperLog::toActionLabel(trim($action));
 
-        if ($action === 'purchase_confirm') {
+        if ($action === '审核确认供应商') {
             if (preg_match('/[「『](.+?)[」』]/u', $content, $m)) {
                 return '审核确认供应商:已选定「' . trim($m[1]) . '」';
             }
         }
-        if ($action === 'audit_select') {
+        if ($action === '确认供应商') {
             if (preg_match('/选定[::]\s*(.+)$/u', $content, $m)) {
                 $name = trim($m[1]);
                 if (preg_match('/^确认供应商/u', $content) && preg_match('/订单([^),]+)/u', $content, $om)) {
@@ -174,34 +176,34 @@ class ProcuremenTime
                 return '确认供应商:已选定「' . $name . '」';
             }
         }
-        if ($action === 'bid_open_verify') {
+        if ($action === '开标验证') {
             if (preg_match('/开标验证/u', $content)) {
                 return $content;
             }
             return '开标验证:' . $content;
         }
-        if ($action === 'audit_append_supplier') {
+        if ($action === '补加供应商') {
             if (preg_match('/^补加供应商/u', $content)) {
                 return $content;
             }
 
             return '补加供应商:' . $content;
         }
-        if ($action === 'audit_resend_sms') {
+        if ($action === '重发短信') {
             if (preg_match('/重新发送短信/u', $content)) {
                 return $content;
             }
 
             return '确认页重新发送短信:' . $content;
         }
-        if ($action === 'audit_resend_email') {
+        if ($action === '重发邮件') {
             if (preg_match('/重新发送邮件/u', $content)) {
                 return $content;
             }
 
             return '确认页重新发送邮件:' . $content;
         }
-        if ($action === 'issue_submit') {
+        if ($action === '下发通知' || $action === '下发') {
             if (preg_match('/通知供应商[((](\d+)\s*家[))].*?[::]\s*(.+)$/u', $content, $m)) {
                 return '下发:通知供应商(' . $m[1] . ' 家):' . trim($m[2]);
             }

+ 11 - 0
application/extra/purchase_order_oper_log_rename_en.sql

@@ -0,0 +1,11 @@
+-- purchase_order_oper_log:字段名用英文,注释/内容用中文
+-- 若库中已是中文列名,可执行本脚本改回英文(数据不丢)
+
+ALTER TABLE `purchase_order_oper_log`
+  CHANGE COLUMN `工序ID` `scydgy_id` int NOT NULL COMMENT '工序行 ID(scydgy.ID)',
+  CHANGE COLUMN `采购订单ID` `purchase_order_id` int unsigned NULL DEFAULT NULL COMMENT '采购订单 ID(purchase_order.id)',
+  CHANGE COLUMN `操作人ID` `admin_id` int unsigned NOT NULL DEFAULT 0 COMMENT '操作人 ID(admin.id)',
+  CHANGE COLUMN `操作人` `admin_name` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人姓名/账号快照',
+  CHANGE COLUMN `操作类型` `action` varchar(64) NOT NULL DEFAULT '' COMMENT '操作类型(中文)',
+  CHANGE COLUMN `操作内容` `content` varchar(1000) NOT NULL DEFAULT '' COMMENT '操作说明(详情页展示)',
+  CHANGE COLUMN `创建时间` `createtime` varchar(19) NOT NULL DEFAULT '' COMMENT '操作时间';