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, 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; z-index: 9999999;
left: 0; 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> </style>

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

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

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

@ -429,6 +429,7 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 信息编辑 -->
<el-dialog <el-dialog
v-model="PopupEditing" v-model="PopupEditing"
title="信息编辑" title="信息编辑"
@ -703,6 +704,7 @@ import {
$_postBatchDelete, $_postBatchDelete,
postExportContrastStockInfo, postExportContrastStockInfo,
postSyncTaskData, postSyncTaskData,
getAllDataWithPackage,
} from '@/api/distribution/createTask'; } from '@/api/distribution/createTask';
import { ElMessageBox } from 'element-plus'; import { ElMessageBox } from 'element-plus';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
@ -1623,25 +1625,50 @@ const TcAddData = () => {
TcDataaddition.value = true; // TcDataaddition.value = true; //
}; };
// //
const DbExTc = data => { // const DbExTc = data => {
$_exportGetContrastInfo({ // $_exportGetContrastInfo({
id: data.id, // id: data.id,
questNum: data.questNum, // questNum: data.questNum,
}).then(res => { // }).then(res => {
console.log(res, '导出'); // console.log(res, '');
downloadXls(res.data, `${data.questNum}对比明细.xlsx`); // downloadXls(res.data, `${data.questNum}.xlsx`);
}); // });
}; // };
// //
const ExportDC = val => { const ExportDC = async val => {
// //
console.log(val); try {
DbExTc(val); 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 = () => { 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 = () => { const InformationEditing = () => {
TcPdloading.value = true;
console.log(WrapBarEditing.value, 'WrapBarEditing.value'); console.log(WrapBarEditing.value, 'WrapBarEditing.value');
// if (!InventoryInput.value) return ElMessage.warning('');
let data = [ let data = [
{ {
orderCode: WrapBarEditing.value.orderCode, // orderCode: WrapBarEditing.value.orderCode, //
@ -2347,6 +2375,9 @@ const InformationEditing = () => {
(data[0].cargoName = TcReaJoin.value.join()), // // (data[0].cargoName = TcReaJoin.value.join()), // //
console.log(data, '处理好的数据d'); console.log(data, '处理好的数据d');
} }
TcPdloading.value = true;
PopupEditing.value = false;
$_updateQuestChildInfo(data).then(res => { $_updateQuestChildInfo(data).then(res => {
console.log(res, '盘点状态修改完成的返回值'); console.log(res, '盘点状态修改完成的返回值');
if (res.data.code == 200) { if (res.data.code == 200) {
@ -2357,11 +2388,11 @@ const InformationEditing = () => {
}); });
WrapBarEditing.value = {}; // WrapBarEditing.value = {}; //
InventoryStatus.value = false; // InventoryStatus.value = false; //
TcViewEvent(row.value); TcViewEvent(row.value, TcFrom.value);
} }
}); });
PopupEditing.value = false; // PopupEditing.value = false; //
TcFrom.value = {}; // // TcFrom.value = {}; //
}; };
// //
@ -2648,23 +2679,25 @@ const DelayButton = () => {
/** 未盘点数据导出 */ /** 未盘点数据导出 */
const handleUncountedExport = () => { const handleUncountedExport = () => {
ElMessageBox.confirm(InventoryState.value ? '导出未盘点数据' : '导出已盘点数据').then(async () => { ElMessageBox.confirm(InventoryState.value ? '导出未盘点数据' : '导出已盘点数据').then(
try { async () => {
TcPdloading.value = true; try {
const res = await postExportContrastStockInfo({ TcPdloading.value = true;
questNum: UncountedDetails.value.questNum, const res = await postExportContrastStockInfo({
// InventoryState true false questNum: UncountedDetails.value.questNum,
questStatus: InventoryState.value ? 0 : 1, // InventoryState true false
}); questStatus: InventoryState.value ? 0 : 1,
if (res.status !== 200) return; });
if (res.status !== 200) return;
downloadXls(res.data, `${InventoryState.value ? '未盘点' : '已盘点'}数据.xlsx`); downloadXls(res.data, `${InventoryState.value ? '未盘点' : '已盘点'}数据.xlsx`);
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
TcPdloading.value = false; TcPdloading.value = false;
}
} }
}); );
}; };
/** 同步数据 */ /** 同步数据 */

Loading…
Cancel
Save