From b3d4bf6f8dca3d015ba98be425c44615badd6327 Mon Sep 17 00:00:00 2001
From: qb <1191961160@qq.com>
Date: Mon, 19 Aug 2024 16:49:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=98=E7=82=B9=E9=83=A8?=
=?UTF-8?q?=E5=88=86bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/distribution/createTask.js | 12 +++
src/components/tablecmt/tablecmt.vue | 21 ++++
.../basicdata/carrier/basicdataCarrier2.vue | 2 +-
.../checkInventoryTask/createTask.vue | 95 +++++++++++++------
4 files changed, 98 insertions(+), 32 deletions(-)
diff --git a/src/api/distribution/createTask.js b/src/api/distribution/createTask.js
index ffd26bd5..feaa60b5 100644
--- a/src/api/distribution/createTask.js
+++ b/src/api/distribution/createTask.js
@@ -233,3 +233,15 @@ export const postSyncTaskData = data => {
data,
});
};
+
+/**
+ * 同步数据
+ */
+export const getAllDataWithPackage = params => {
+ return request({
+ url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/export-allDataWithPackage',
+ method: 'get',
+ params,
+ responseType: 'blob',
+ });
+};
diff --git a/src/components/tablecmt/tablecmt.vue b/src/components/tablecmt/tablecmt.vue
index ae6b5d72..9590dc79 100644
--- a/src/components/tablecmt/tablecmt.vue
+++ b/src/components/tablecmt/tablecmt.vue
@@ -937,4 +937,25 @@ defineExpose({ handleCheckSelect, handleClearSelect });
z-index: 9999999;
left: 0;
}
+
+/* ---el-table滚动条公共样式--- */
+.el-scrollbar {
+ // 滚动条样式
+ .scorll {
+ opacity: 0.8; // 默认滚动条自带透明度
+ height: 8px; // 横向滑块的宽度
+ border-radius: 4px; // 圆角度数
+ background-color: #909399; // 滑块背景色
+ box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); // 滑块阴影
+ }
+
+ // 横向滚动条
+ .el-scrollbar__bar.is-horizontal .el-scrollbar__thumb {
+ @extend .scorll;
+ }
+ // 纵向滚动条
+ .el-scrollbar__bar.is-vertical .el-scrollbar__thumb {
+ @extend .scorll;
+ }
+}
diff --git a/src/views/basicdata/carrier/basicdataCarrier2.vue b/src/views/basicdata/carrier/basicdataCarrier2.vue
index d394f362..b0e8eed0 100644
--- a/src/views/basicdata/carrier/basicdataCarrier2.vue
+++ b/src/views/basicdata/carrier/basicdataCarrier2.vue
@@ -83,8 +83,8 @@
+
-
+
{
TcDataaddition.value = true; //新增弹窗显示
};
// 对比数据导出公共函数
-const DbExTc = data => {
- $_exportGetContrastInfo({
- id: data.id,
- questNum: data.questNum,
- }).then(res => {
- console.log(res, '导出');
- downloadXls(res.data, `${data.questNum}对比明细.xlsx`);
- });
-};
+// const DbExTc = data => {
+// $_exportGetContrastInfo({
+// id: data.id,
+// questNum: data.questNum,
+// }).then(res => {
+// console.log(res, '导出');
+// downloadXls(res.data, `${data.questNum}对比明细.xlsx`);
+// });
+// };
// 盘点对比导出
-const ExportDC = val => {
+const ExportDC = async val => {
// 触发下载函数
- console.log(val);
- DbExTc(val);
+ try {
+ loadingObj.pageLoading = true;
+
+ const res = await getAllDataWithPackage({
+ questNum: val.questNum,
+ });
+
+ const { status, data } = res;
+
+ console.log('data :>> ', data);
+ if (status !== 200) return;
+
+ downloadXls(data, `${val.questNum} -- 任务详情.xlsx`);
+ } catch (error) {
+ console.log('error :>> ', error);
+ } finally {
+ loadingObj.pageLoading = false;
+ }
};
// 对比数据导出
const MXexport = () => {
// 触发下载函数
- DbExTc(DbEx.value);
+
+ $_exportGetContrastInfo({
+ id: DbEx.value.id,
+ questNum: DbEx.value.questNum,
+ }).then(res => {
+ console.log(res, '导出');
+ downloadXls(res.data, `${data.questNum}对比明细.xlsx`);
+ });
+
+ // DbExTc(DbEx.value);
};
// 新增任务按钮(搜索不到出现此按钮)
@@ -2291,8 +2318,9 @@ const InventoryEditing = val => {
};
// 信息编辑弹窗提交
const InformationEditing = () => {
- TcPdloading.value = true;
console.log(WrapBarEditing.value, 'WrapBarEditing.value');
+ // if (!InventoryInput.value) return ElMessage.warning('请选择货物当前状态');
+
let data = [
{
orderCode: WrapBarEditing.value.orderCode, //订单编号
@@ -2347,6 +2375,9 @@ const InformationEditing = () => {
(data[0].cargoName = TcReaJoin.value.join()), //状态 //状态
console.log(data, '处理好的数据d');
}
+
+ TcPdloading.value = true;
+ PopupEditing.value = false;
$_updateQuestChildInfo(data).then(res => {
console.log(res, '盘点状态修改完成的返回值');
if (res.data.code == 200) {
@@ -2357,11 +2388,11 @@ const InformationEditing = () => {
});
WrapBarEditing.value = {}; //重置提交表单
InventoryStatus.value = false; //关闭状态选择
- TcViewEvent(row.value);
+ TcViewEvent(row.value, TcFrom.value);
}
});
PopupEditing.value = false; //关闭弹窗
- TcFrom.value = {}; //重置搜索对象
+ // TcFrom.value = {}; //重置搜索对象
};
// 弹窗品类搜索
@@ -2648,23 +2679,25 @@ const DelayButton = () => {
/** 未盘点数据导出 */
const handleUncountedExport = () => {
- ElMessageBox.confirm(InventoryState.value ? '导出未盘点数据' : '导出已盘点数据').then(async () => {
- try {
- TcPdloading.value = true;
- const res = await postExportContrastStockInfo({
- questNum: UncountedDetails.value.questNum,
- // InventoryState true是未盘 false是已盘
- questStatus: InventoryState.value ? 0 : 1,
- });
- if (res.status !== 200) return;
+ ElMessageBox.confirm(InventoryState.value ? '导出未盘点数据' : '导出已盘点数据').then(
+ async () => {
+ try {
+ TcPdloading.value = true;
+ const res = await postExportContrastStockInfo({
+ questNum: UncountedDetails.value.questNum,
+ // InventoryState true是未盘 false是已盘
+ questStatus: InventoryState.value ? 0 : 1,
+ });
+ if (res.status !== 200) return;
- downloadXls(res.data, `${InventoryState.value ? '未盘点' : '已盘点'}数据.xlsx`);
- } catch (error) {
- console.log('error :>> ', error);
- } finally {
- TcPdloading.value = false;
+ downloadXls(res.data, `${InventoryState.value ? '未盘点' : '已盘点'}数据.xlsx`);
+ } catch (error) {
+ console.log('error :>> ', error);
+ } finally {
+ TcPdloading.value = false;
+ }
}
- });
+ );
};
/** 同步数据 */