|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 同步数据 */ |
|
|
|
|