快乐的昕的电脑
2025-10-16 52bbf8ee3d126998c5c625a3aab234b1fdcb2362
修改:规范历史时间到秒
已修改3个文件
17 ■■■■ 文件已修改
.vs/前端2/CopilotIndices/17.14.878.3237/SemanticSymbols.db 补丁 | 查看 | 原始文档 | blame | 历史
.vs/前端2/CopilotIndices/17.14.878.3237/SemanticSymbols.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
components/WorkOrderPrint.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/ǰ¶Ë2/CopilotIndices/17.14.878.3237/SemanticSymbols.db
Binary files differ
.vs/ǰ¶Ë2/CopilotIndices/17.14.878.3237/SemanticSymbols.db-wal
Binary files differ
components/WorkOrderPrint.vue
@@ -217,7 +217,7 @@
        },
        computed: {
            calculatedCurrentCount() { return (this.productionCount || 0) - (this.initialValue || 0); },
            calculatedTotalProduction() { return (this.kgQty || 0); }, // è‹¥éœ€è¦æ¢å¤ä¹‹å‰é€»è¾‘可改为 (this.kgQty||0)+this.calculatedCurrentCount
            calculatedTotalProduction() { return (this.kgQty || 0); }, // è‹¥éœ€æ¢å¤æ—§é€»è¾‘可用 (this.kgQty||0)+this.calculatedCurrentCount
            calculatedDefectiveCount() { return this.calculatedTotalProduction - (this.sQuantity || 0); },
            planQtyDisplay() { return this.order.planQty || this.order.planQuantity || this.order.daa008 || 0; },
            staffDisplay() {
@@ -237,7 +237,8 @@
            this.init();
            this.getXS0101();
            this.updateNowTime();
            this.nowTimeTimer = setInterval(this.updateNowTime, 60000);
            // ç§’级刷新;如不需动态跳秒可改为 60000
            this.nowTimeTimer = setInterval(this.updateNowTime, 1000);
        },
        beforeDestroy() { if (this.nowTimeTimer) clearInterval(this.nowTimeTimer); },
        methods: {
@@ -247,9 +248,10 @@
                return segs.length > 1 ? `${segs[0]} ${segs[1]}` : u;
            },
            selectUser(u) { this.staffNo = u; this.isShowUserSelect = false; this.userSearch = ''; },
            /* ä¿®æ”¹ï¼šå¢žåŠ ç§’ */
            updateNowTime() {
                const d = new Date(), p = n => n.toString().padStart(2, '0');
                this.nowTime = `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
                this.nowTime = `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`;
            },
            initializeData() {
                this.productionCount = this.printedCount = this.defectiveCount = 0;
@@ -290,8 +292,17 @@
                }
            },
            /* æ–°å¢žï¼šèŽ·å–åŽ†å²æŠ¥å·¥è®°å½• */
            /* ä¿®æ”¹ï¼šè§„范历史时间到秒 */
            getReportingHistory() {
                if (!this.orderNo) { this.reportingHistory = []; return; }
                const fmtSec = v => {
                    if (!v) return '';
                    // å…¼å®¹åŽç«¯å¯èƒ½è¿”回的不同格式
                    const d = new Date(typeof v === 'string' ? v.replace(/-/g, '/') : v);
                    if (isNaN(d.getTime())) return v; // æ— æ³•解析则原样返回
                    const p = n => n.toString().padStart(2, '0');
                    return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`;
                };
                this.$post({
                    url: "/Womdaa/GetByBillNoBG",
                    data: { billNo: this.orderNo, machineNo: this.machineNo || null }