feat(wms): 多模块优化调整
1. 新增镀锌待打包仓库选项 2. 注释发货单为空打印校验逻辑 3. 优化钢卷查询API参数处理 4. 调整报表接口调用与数据解析 5. 移除发货单模板中的原料厂家列
This commit is contained in:
@@ -104,6 +104,7 @@ export const zincConfig = {
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import {
|
||||
listPendingAction,
|
||||
listCoilWithIds, listLightCoil
|
||||
} from "@/api/wms/coil";
|
||||
import {
|
||||
listLightPendingAction,
|
||||
} from '@/api/wms/pendingAction';
|
||||
import { Message } from 'element-ui'
|
||||
import {
|
||||
Message
|
||||
} from 'element-ui'
|
||||
|
||||
export async function fetchOutputList(queryParams) {
|
||||
const resList = await Promise.all([
|
||||
@@ -38,18 +42,14 @@ export async function fetchOutputList(queryParams) {
|
||||
}
|
||||
|
||||
export async function fetchLossList(actionTypes, queryParams, callback) {
|
||||
const resultList = await Promise.all(actionTypes.map(actionType => {
|
||||
return listPendingAction({
|
||||
actionStatus: 2,
|
||||
actionType,
|
||||
createBys: queryParams.createBys,
|
||||
startTime: queryParams.byCreateTimeStart,
|
||||
endTime: queryParams.byCreateTimeEnd,
|
||||
pageSize: 99999,
|
||||
pageNum: 1,
|
||||
})
|
||||
}))
|
||||
const actions = resultList.flatMap(item => item.rows)
|
||||
const resultList = await listLightPendingAction({
|
||||
actionStatus: 2,
|
||||
actionTypes: actionTypes.join(','),
|
||||
createBys: queryParams.createBys,
|
||||
startTime: queryParams.byCreateTimeStart,
|
||||
endTime: queryParams.byCreateTimeEnd,
|
||||
})
|
||||
const actions = resultList.data
|
||||
const actionIds = actions.map(item => item.actionId).join(',')
|
||||
console.log(actionIds)
|
||||
if (!actionIds) {
|
||||
@@ -80,4 +80,4 @@ export async function fetchLossList(actionTypes, queryParams, callback) {
|
||||
})
|
||||
callback(actionIds)
|
||||
return lossList
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<script>
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import {
|
||||
listPendingAction,
|
||||
listLightPendingAction,
|
||||
} from '@/api/wms/pendingAction';
|
||||
import MemoInput from "@/components/MemoInput";
|
||||
import MutiSelect from "@/components/MutiSelect";
|
||||
@@ -472,14 +472,14 @@ export default {
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
|
||||
// 所有报表类型都使用原始的 listPendingAction 方式获取数据
|
||||
const res = await listPendingAction({ ...this.queryParams, actionTypes: this.actionType, actionStatus: 2 });
|
||||
// 所有报表类型都使用原始的 listLightPendingAction 方式获取数据
|
||||
const res = await listLightPendingAction({ ...this.queryParams, actionTypes: this.actionType, actionStatus: 2 });
|
||||
// 获取两层数据
|
||||
const lossIds = res.rows.filter(item => item.coilId).map(item => item.coilId);
|
||||
const lossActionIds = res.rows.filter(item => item.actionId).map(item => item.actionId);
|
||||
const lossIds = res.data.filter(item => item.coilId).map(item => item.coilId);
|
||||
const lossActionIds = res.data.filter(item => item.actionId).map(item => item.actionId);
|
||||
this.actionIds = lossActionIds.join(',')
|
||||
// 使用new Set去重
|
||||
const outIds = [...new Set(res.rows.filter(item => item.processedCoilIds).map(item => item.processedCoilIds))];
|
||||
const outIds = [...new Set(res.data.filter(item => item.processedCoilIds).map(item => item.processedCoilIds))];
|
||||
|
||||
if (lossIds.length === 0 || outIds.length === 0) {
|
||||
this.$message({
|
||||
|
||||
Reference in New Issue
Block a user