Browse Source

修复盘点部分bug

dev-xx
qb 8 months ago
parent
commit
b3d4bf6f8d
  1. 12
      src/api/distribution/createTask.js
  2. 21
      src/components/tablecmt/tablecmt.vue
  3. 2
      src/views/basicdata/carrier/basicdataCarrier2.vue
  4. 95
      src/views/distribution/checkInventoryTask/createTask.vue

12
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',
});
};

21
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;
}
}
</style>

2
src/views/basicdata/carrier/basicdataCarrier2.vue

@ -83,8 +83,8 @@
</el-pagination>
</div>
<!-- 新增/编辑 -->
<div>
<!-- 新增/编辑 -->
<el-dialog
destroy-on-close
:modal-append-to-body="false"

95
src/views/distribution/checkInventoryTask/createTask.vue

@ -429,6 +429,7 @@
</span>
</el-dialog>
<!-- 信息编辑 -->
<el-dialog
v-model="PopupEditing"
title="信息编辑"
@ -703,6 +704,7 @@ import {
$_postBatchDelete,
postExportContrastStockInfo,
postSyncTaskData,
getAllDataWithPackage,
} from '@/api/distribution/createTask';
import { ElMessageBox } from 'element-plus';
import { ElMessage } from 'element-plus';
@ -1623,25 +1625,50 @@ const TcAddData = () => {
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;
}
}
});
);
};
/** 同步数据 */

Loading…
Cancel
Save