From af2aa81cd45dc92ae3ed3bae32cea7122e4df697 Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Fri, 11 Jul 2025 17:22:08 +0800
Subject: [PATCH] =?UTF-8?q?YT-2797=E9=A1=BA=E5=BC=95=E5=8F=91=E8=B4=A7?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=A2=9E=E5=8A=A0=E3=80=90=E7=BB=B4=E6=8A=A4?=
=?UTF-8?q?=E5=AF=B9=E8=B4=A6=E6=97=A5=E6=9C=9F=E3=80=91=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=85=A5=E7=BA=B3=E5=85=A5=E5=8F=97=E9=A2=86?=
=?UTF-8?q?=E4=B9=A6=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E5=B7=AE=E5=BC=82=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ImportForm/src/ImportFormStep.vue | 53 +++++++-------
src/components/TableForm/src/TableForm.vue | 7 ++
src/locales/en-US.ts | 3 +-
src/locales/zh-CN.ts | 5 +-
.../deliverRecordMain.data.ts | 57 ++++++++++++++-
.../deliverRecordMain/index.vue | 72 ++++++++++++++++++-
6 files changed, 165 insertions(+), 32 deletions(-)
diff --git a/src/components/ImportForm/src/ImportFormStep.vue b/src/components/ImportForm/src/ImportFormStep.vue
index 07a7d8ca3..687ed2ba6 100644
--- a/src/components/ImportForm/src/ImportFormStep.vue
+++ b/src/components/ImportForm/src/ImportFormStep.vue
@@ -85,7 +85,7 @@
- {{ t('ts.下载差异数据') }}
+ {{ t('ts.差异数据') }}
{{ t('ts.下一步') }}
@@ -113,6 +113,7 @@ import download from '@/utils/download'
import { getBaseUrl } from '@/utils/systemParam'
import { UploadFilled, List, CircleCheckFilled,WarningFilled } from '@element-plus/icons-vue'
import { waitForDebugger } from 'node:inspector/promises'
+import { emit } from 'process'
import * as XLSX from 'xlsx';
@@ -278,7 +279,8 @@ const emits = defineEmits([
'clearSearchInput',
'clearInput',
'sumFormDataHandle',
- 'visibleChange'
+ 'visibleChange',
+ 'open-difference-data'
])
/** 打开弹窗 */
@@ -689,29 +691,30 @@ const downloadDifferenceData = () => {
return;
}
- // 获取当前使用的列定义
- const columns = currentColumns.value;
-
- // 创建工作簿和工作表,使用原始数据
- const wb = XLSX.utils.book_new();
- const ws = XLSX.utils.json_to_sheet(props.tableObject.tableList);
-
- // 替换表头为中文;
- columns.forEach((col, index) => {
- const cellAddress = XLSX.utils.encode_cell({ r: 0, c: index });
- if (ws[cellAddress]) {
- ws[cellAddress].v = col.label;
- }
- });
-
- // 设置列宽(可选)
- const colWidth = columns.map(() => ({ wch: 20 }));
- ws['!cols'] = colWidth;
-
- // 添加工作表到工作簿并下载
- XLSX.utils.book_append_sheet(wb, ws, "差异数据");
- const timestamp = new Date().getTime();
- XLSX.writeFile(wb, `差异数据_${timestamp}.xlsx`);
+// // 获取当前使用的列定义
+// const columns = currentColumns.value;
+
+// // 创建工作簿和工作表,使用原始数据
+// const wb = XLSX.utils.book_new();
+// const ws = XLSX.utils.json_to_sheet(props.tableObject.tableList);
+
+// // 替换表头为中文;
+// columns.forEach((col, index) => {
+// const cellAddress = XLSX.utils.encode_cell({ r: 0, c: index });
+// if (ws[cellAddress]) {
+// ws[cellAddress].v = col.label;
+// }
+// });
+
+// // 设置列宽(可选)
+// const colWidth = columns.map(() => ({ wch: 20 }));
+// ws['!cols'] = colWidth;
+
+// // 添加工作表到工作簿并下载
+// XLSX.utils.book_append_sheet(wb, ws, "差异数据");
+// const timestamp = new Date().getTime();
+// XLSX.writeFile(wb, `差异数据_${timestamp}.xlsx`);
+ emit("open-difference-data")
}
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index a46e47def..5d4cbc092 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -427,6 +427,13 @@
>
{{ t('ts.批量删除') }}
+
+ {{ t('ts.调整差异数量') }}
+
([
width: 150
},
},
+
]))
// 维护对账日期主校验
@@ -1604,4 +1605,58 @@ export const MaintenanceBillDateDetailRules = reactive({
serialNoShow: [
{ required: true, message: '请输入不包含顺序号', trigger: 'blur' }
],
-})
\ No newline at end of file
+})
+
+/**
+ * @returns {Array} 调整差异数据主
+ */
+export const AdjustDiffDataMain = useCrudSchemas(reactive([
+ {
+ label: '客户订单号',
+ field: 'billDate',
+ sort: 'custom',
+ tableForm: {
+ type: 'FormDate',
+ placeholder: '请选择维护对账日期',
+ valueFormat: 'YYYYMMDD',
+ },
+ form: {
+ component: 'Input',
+ componentProps: {
+ placeholder: '请输入客户订单号',
+ disabled: true
+ }
+ },
+
+ },
+]))
+/**
+ * @returns {Array} 调整差异数据列表
+ */
+export const AdjustDiffDataTable = useCrudSchemas(reactive([
+ {
+ label: '品番',
+ field: 'itemCode',
+ sort: 'custom',
+ }, {
+ label: '描述',
+ field: 'disc1',
+ sort: 'custom',
+ }, {
+ label: '背番',
+ field: 'backNumber',
+ sort: 'custom',
+ }, {
+ label: '纳入数量',
+ field: 'itemCode',
+ sort: 'custom',
+ }, {
+ label: '发货数量',
+ field: 'itemCode',
+ sort: 'custom',
+ }, {
+ label: '差异数量',
+ field: 'itemCode',
+ sort: 'custom',
+ }
+]))
\ No newline at end of file
diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
index 786c03186..d858de866 100644
--- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
+++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
@@ -86,6 +86,7 @@
:isShowDownloadBtn="false"
:confirmFormSuccess="confirmFormSuccess"
@searchTableSuccess="searchTableSuccess"
+ @open-difference-data="openDifferenceData"
sourcePage="InducedProduct"
/>
@@ -111,6 +112,8 @@
:tableData="tableDataBillDate"
:isShowFooterButtton="false"
:footButttondata="footButttondata"
+ :isShowReduceButton="false"
+ :isShowReduceButtonSelection="true"
@handleAddTable="handleAddTableBillDate"
@handleDeleteTable="handleDeleteTableBillDate"
@tableSelectionDelete="tableSelectionDeleteBillDate"
@@ -124,12 +127,45 @@
-
+
+
+
+
+
以下是调整后的数据差异情况
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+