fix:修改库存查询

This commit is contained in:
郭飞 2025-03-14 16:35:25 +08:00
parent 9cefbc3efd
commit 4633d12cd5
5 changed files with 16 additions and 7 deletions

View File

@ -94,7 +94,7 @@ export function PurInSendERPByCharge(ChangeParams: any) {
export function CommitMove(ChangeParams: any) { export function CommitMove(ChangeParams: any) {
return request({ return request({
url: '/api/location/CommitMove2', url: '/api/api/location/CommitMove2',
method: 'post', method: 'post',
data: ChangeParams, data: ChangeParams,
}); });

View File

@ -109,7 +109,7 @@ export function Commit4CToERP(data: any) {
* */ * */
export function RejectsAndExpCheck(data: any) { export function RejectsAndExpCheck(data: any) {
return request({ return request({
url: '/api/api/SaleOut/RejectsAndExpCheck', url: '/api/SaleOut/RejectsAndExpCheck',
method: 'post', method: 'post',
data: data, data: data,
}); });

View File

@ -564,6 +564,14 @@
}) })
} }
function exportExcel() { function exportExcel() {
let paramsObjet = state.queryParams.params;
const parmlist = Object.keys(paramsObjet).filter((key: any) => key !== 'SITENAME')
const allEmpty = parmlist.every(el => !(paramsObjet as any)[el] || (paramsObjet as any)[el] == '')
if(allEmpty) {
proxy.$ElMessage.warning('最少有一个查询条件!');
return;
}
state.queryParams.version = 'WEB00033' state.queryParams.version = 'WEB00033'
getQueryList(state.queryParams).then((res: any) => { getQueryList(state.queryParams).then((res: any) => {
if (res.data.length > 0) { if (res.data.length > 0) {
@ -572,7 +580,7 @@
proxy.$ElMessage.warning('当前查询没有数据可以导出'); proxy.$ElMessage.warning('当前查询没有数据可以导出');
} }
}); });
} }
const getSummaries = (param: any) => { const getSummaries = (param: any) => {
const { columns, data } = param const { columns, data } = param

View File

@ -77,8 +77,8 @@
</el-row> </el-row>
<el-table :height="tableHeight" border v-loading="loading" :data="state.MaterialPackingList" highlight-current-row row-key="id" <el-table :height="tableHeight" border v-loading="loading" :data="state.MaterialPackingList" highlight-current-row row-key="id"
style="width: 100%;min-height:50px" @selection-change="handleSelectionChange2"> style="width: 100%;min-height:50px" @selection-change="handleSelectionChange2">
<el-table-column type="index" width="50" />
<el-table-column fixed="left" type="selection" width="40" :selectable="selectable" :reserve-selection="false" /> <el-table-column fixed="left" type="selection" width="40" :selectable="selectable" :reserve-selection="false" />
<el-table-column type="index" width="50" />
<template v-for="(col, index) in column1" :key="index"> <template v-for="(col, index) in column1" :key="index">
<el-table-column v-if="!col.hide" :label="col.header" show-overflow-tooltip> <el-table-column v-if="!col.hide" :label="col.header" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
@ -116,8 +116,8 @@
</div> </div>
<el-table :height="tableHeight" border v-loading="loading" :data="state.MaterialPackingUsername" highlight-current-row <el-table :height="tableHeight" border v-loading="loading" :data="state.MaterialPackingUsername" highlight-current-row
row-key="id" style="width: 100%;min-height:50px" @selection-change="handleSelectionChange"> row-key="id" style="width: 100%;min-height:50px" @selection-change="handleSelectionChange">
<el-table-column type="index" width="50" />
<el-table-column fixed="left" type="selection" width="50" /> <el-table-column fixed="left" type="selection" width="50" />
<el-table-column type="index" width="50" />
<el-table-column prop="MATERIALQUANTITY2" label="本次发货数量" width="140"> <el-table-column prop="MATERIALQUANTITY2" label="本次发货数量" width="140">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.MATERIALQUANTITY2" min = 0 type =number style="width: 140px"> <el-input v-model="scope.row.MATERIALQUANTITY2" min = 0 type =number style="width: 140px">
@ -476,7 +476,7 @@ function searchFn() {
handleQuery() handleQuery()
} }
function tableRowClassName({ row, rowIndex }) { function tableRowClassName({ row, rowIndex }) {
console.log(11,row, rowIndex) // console.log(11,row, rowIndex)
row.iIndex = rowIndex row.iIndex = rowIndex
} }
async function handleQuery() { async function handleQuery() {

View File

@ -751,6 +751,7 @@ function changeNum(row: any) {
}, 0) }, 0)
} }
function handleSelectionChange(selection: any) { function handleSelectionChange(selection: any) {
console.log(selection)
state.column4 = selection state.column4 = selection
let sumList = [...state.column4]; let sumList = [...state.column4];
state.BQSUM = 0 state.BQSUM = 0
@ -759,7 +760,7 @@ function handleSelectionChange(selection: any) {
return (cals.add(accumulator,currentValue.SPLITQUANTITY)).toNumber(); return (cals.add(accumulator,currentValue.SPLITQUANTITY)).toNumber();
}, 0) }, 0)
state.GSSUM = sumList.length state.GSSUM = sumList.length
console.log(state.column4)
if (state.column4.length > 0) { if (state.column4.length > 0) {
StorageList(state.column4[0].ERPFACTORY) StorageList(state.column4[0].ERPFACTORY)
} }