From 0b7bc50347ee1af032eb5e64c82e55fd43f1a93d Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 14 十一月 2025 11:49:54 +0800
Subject: [PATCH] *

---
 src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html |  132 ++++++++++++++++++++++++++++++++++++-------
 1 files changed, 109 insertions(+), 23 deletions(-)

diff --git a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
index 401945f..4138c62 100644
--- a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
+++ b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
@@ -158,9 +158,12 @@
 				style="width: 100%"
 				v-loading="loading"
 				@sort-change="handleSortChange">
-			<el-table-column prop="itemName" label="缁勮揣鍗曞彿" width="120" align="center" sortable="custom"></el-table-column>
+			<el-table-column prop="itemName" label="缁勮揣鍗曞彿" width="240" align="center" sortable="custom"></el-table-column>
 			<el-table-column prop="cstmrName" label="瀹㈡埛鍚嶇О" min-width="120" align="center"></el-table-column>
+			<el-table-column prop="orderCount" label="缁勮揣鍗曟暟" width="80" align="center"></el-table-column>
 			<el-table-column prop="settle" label="鐘舵��" min-width="100" align="center" :formatter="formatStatus"></el-table-column>
+			<el-table-column prop="createTime" label="鏃ユ湡" min-width="100" align="center" :formatter="formatDateColumn"></el-table-column>
+			<el-table-column prop="updateTime" label="鏇存柊鏃ユ湡" min-width="100" align="center" :formatter="formatDateColumn"></el-table-column>
 			<el-table-column label="鎿嶄綔" width="150" align="center" fixed="right">
 				<template slot-scope="scope">
 					<div class="operation-cell">
@@ -258,7 +261,8 @@
 					class="confirm-report-btn"
 					@click="showConfirmDialog"
 					:loading="reportLoading">
-				纭涓婃姤
+				<!-- 鐩存帴鍦ㄦā鏉夸腑鍒ゆ柇 -->
+				{{ settleA === 17 ? '鍐嶆涓婃姤' :  '纭涓婃姤' }}
 			</el-button>
 			<el-button @click="closeDetailDialog">鍏抽棴</el-button>
 		</div>
@@ -292,6 +296,7 @@
 			currentRow: null,
 			// 瀛愯〃鍒嗛〉
 			detailCurrentPage: 1,
+			settleA: 1,
 			detailPageSize: 5,
 			detailTotal: 0,
 			// 鍔犺浇鐘舵��
@@ -426,7 +431,7 @@
 				const status = 2; // 绠卞彿
 
 				this.$confirm(
-						`纭畾灏嗙粍璐у崟鍙凤細 <strong style="color: #409EFF;">${groupOrderNo}</strong> 銆佺鍙凤細 <strong style="color: #409EFF;">${batch}</strong> 娣诲姞鍒颁笂鎶ュ垪鍚楋紵`,
+						`纭畾灏嗙粍璐у崟鍙凤細 <strong style="color: #409EFF;">${groupOrderNo}</strong> 涓殑绠卞彿锛� <strong style="color: #409EFF;">${batch}</strong> 娣诲姞鍒颁笂鎶ュ垪鍚楋紵`,
 						'纭淇敼',
 						{
 							confirmButtonText: '纭淇敼',
@@ -484,7 +489,6 @@
 					background: 'rgba(0, 0, 0, 0.7)'
 				});
 
-				// 璋冪敤鍚庡彴API鎻愪氦淇敼
 				$.ajax({
 					url: baseUrl + "/order/pakout/orderDetl/batch/report/auth",
 					headers: {'token': localStorage.getItem('token')},
@@ -504,7 +508,6 @@
 								duration: 3000
 							});
 
-							// 淇敼鎴愬姛鍚庡彲浠ュ埛鏂板瓙琛ㄦ暟鎹�
 							this.getTableDataB(groupOrderNo);
 						} else {
 							this.$message.error(res.message || '淇敼澶辫触');
@@ -531,7 +534,6 @@
 				this.getTableDataA();
 			},
 
-			// 鏄剧ず浜屾纭瀵硅瘽妗�
 			showConfirmDialog() {
 				if (!this.currentRow) {
 					this.$message.error('娌℃湁閫夋嫨瑕佷笂鎶ョ殑鏁版嵁');
@@ -575,22 +577,17 @@
 
 				// 璋冪敤鍚庡彴API涓婃姤鏁版嵁
 				$.ajax({
-					url: baseUrl + "/api/report/confirm",
-					headers: {
-						'token': localStorage.getItem('token')
+					url: baseUrl + "/order/pakout/actual/shipment/order/report/auth",
+					headers: {'token': localStorage.getItem('token')},
+					data: {
+						itemName: groupOrderNo // 浼犻�掔粍璐у崟鍙�
 					},
-					data: JSON.stringify({
-						item_name: groupOrderNo // 浼犻�掔粍璐у崟鍙�
-					}),
-					dataType: 'json',
-					contentType: 'application/json;charset=UTF-8',
-					method: 'post',
+					method: 'POST',
 					success: (res) => {
 						this.reportLoading = false;
 						if (typeof done === 'function') {
 							done();
 						}
-
 						if (res.code === 200 || res.success) {
 							this.$message({
 								message: `缁勮揣鍗曞彿 ${groupOrderNo} 涓婃姤鎴愬姛`,
@@ -644,6 +641,7 @@
 				this.currentRow = row;
 				this.detailDialogVisible = true;
 				this.detailCurrentPage = 1;
+				this.settleA = row.settle;
 				this.getTableDataB(row.itemName);
 			},
 
@@ -733,13 +731,6 @@
 				return '楼0.00';
 			},
 
-			// 鏍煎紡鍖栨棩鏈熸樉绀�
-			formatDate(dateStr) {
-				if (!dateStr) return '';
-				// 绠�鍗曠殑鏃ユ湡鏍煎紡鍖栵紝鍙互鏍规嵁瀹為檯鏍煎紡璋冩暣
-				return dateStr;
-			},
-
 			// 妯℃嫙涓昏〃鏁版嵁 - 瀹為檯椤圭洰涓簲鍒犻櫎
 			mockTableAData() {
 				this.tableDataA = [
@@ -772,6 +763,101 @@
 				];
 				this.detailTotal = 1;
 				this.detailLoading = false;
+			},
+
+			// 涓鸿〃鏍煎垪娣诲姞鏍煎紡鍖栨柟娉�
+			formatDateColumn(row, column, cellValue) {
+				return this.formatDate(cellValue);
+			},
+
+
+
+			// // 鏍煎紡鍖栨棩鏈熸樉绀�
+			// formatDate(dateStr) {
+			// 	if (!dateStr) return '';
+			// 	// 绠�鍗曠殑鏃ユ湡鏍煎紡鍖栵紝鍙互鏍规嵁瀹為檯鏍煎紡璋冩暣
+			// 	return dateStr;
+			// },
+
+			// 鍦╒ue瀹炰緥鐨刴ethods涓坊鍔犳垨淇敼formatDate鏂规硶
+			formatDate(dateStr) {
+				if (!dateStr) return '';
+
+				try {
+					// 鍒涘缓Date瀵硅薄
+					const date = new Date(dateStr);
+
+					// 妫�鏌ユ棩鏈熸槸鍚︽湁鏁�
+					if (isNaN(date.getTime())) {
+						return dateStr; // 濡傛灉瑙f瀽澶辫触锛岃繑鍥炲師瀛楃涓�
+					}
+
+					// 鑾峰彇鍚勪釜鏃堕棿缁勪欢
+					const year = date.getFullYear();
+					const month = String(date.getMonth() + 1).padStart(2, '0');
+					const day = String(date.getDate()).padStart(2, '0');
+					const hours = String(date.getHours()).padStart(2, '0');
+					const minutes = String(date.getMinutes()).padStart(2, '0');
+					const seconds = String(date.getSeconds()).padStart(2, '0');
+
+					// 杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆锛歒YYY-MM-DD HH:mm:ss
+					return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+				} catch (error) {
+					console.error('鏃ユ湡鏍煎紡鍖栭敊璇�:', error);
+					return dateStr; // 濡傛灉鍑洪敊锛岃繑鍥炲師瀛楃涓�
+				}
+			},
+
+//鏈湴鏃跺尯鐨勬椂闂�
+			formatDate2(dateStr) {
+				if (!dateStr) return '';
+
+				try {
+					const date = new Date(dateStr);
+
+					if (isNaN(date.getTime())) {
+						return dateStr;
+					}
+
+					// 浣跨敤鏈湴鏃跺尯
+					const year = date.getFullYear();
+					const month = String(date.getMonth() + 1).padStart(2, '0');
+					const day = String(date.getDate()).padStart(2, '0');
+					const hours = String(date.getHours()).padStart(2, '0');
+					const minutes = String(date.getMinutes()).padStart(2, '0');
+					const seconds = String(date.getSeconds()).padStart(2, '0');
+
+					return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+				} catch (error) {
+					console.error('鏃ユ湡鏍煎紡鍖栭敊璇�:', error);
+					return dateStr;
+				}
+			},
+			//淇濇寔UTC鏃堕棿浣嗚浆鎹负鏇存槗璇荤殑鏍煎紡
+			formatDate3(dateStr) {
+				if (!dateStr) return '';
+
+				try {
+					// 鐩存帴瑙f瀽瀛楃涓诧紝涓嶈浆鎹㈡椂鍖�
+					const date = new Date(dateStr);
+
+					if (isNaN(date.getTime())) {
+						return dateStr;
+					}
+
+					// 浣跨敤UTC鏃堕棿缁勪欢
+					const year = date.getUTCFullYear();
+					const month = String(date.getUTCMonth() + 1).padStart(2, '0');
+					const day = String(date.getUTCDate()).padStart(2, '0');
+					const hours = String(date.getUTCHours()).padStart(2, '0');
+					const minutes = String(date.getUTCMinutes()).padStart(2, '0');
+					const seconds = String(date.getUTCSeconds()).padStart(2, '0');
+
+					return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+				} catch (error) {
+					console.error('鏃ユ湡鏍煎紡鍖栭敊璇�:', error);
+					return dateStr;
+				}
 			}
 		}
 	});

--
Gitblit v1.9.1