fix:修改货位

This commit is contained in:
郭飞 2025-05-22 15:02:40 +08:00
parent b7d641667e
commit 6ec5d3967b
5 changed files with 104 additions and 15 deletions

View File

@ -9,7 +9,7 @@
<el-Input v-model="queryParams.UNDOID" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="单据类型" prop="TYPE">
<el-select v-model="queryParams.TYPE" placeholder="单据类型" style="width: 240px"
default-first-option>
@ -34,7 +34,6 @@
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="handleQueryInfo">搜索</el-button>
<el-button type="primary" @click="sendUndoCommit" :disabled="state.button_state" v-loading="state.button_loading">冲销</el-button>
</div>
</el-row>
<div class="vue-element-page-table">
@ -85,7 +84,17 @@
<pagination v-if="page_d.total" :total="page_d.total" v-model:pageNumTo="page_d.pageNum"
v-model:pageSizeTo="page_d.pageSize" @pagination="handleQuery_d" />
</div>
<el-row class="page-search" justify="end" align="middle">
<div class="block" style="float: right;margin-top: 10px;" >
<el-form-item label="过账日期" prop="state.commitDate">
<el-date-picker :clearable="true" :editable="true" v-model="state.commitDate" type="date" placeholder="选择过账时间" value-format="YYYY-MM-DD"/>
</el-form-item>
</div>
<div class="page-search-btns">
<!-- <el-button type="primary" @click="handleReserve" :disabled="state.button_state" v-loading="state.button_loading">备货</el-button> -->
<el-button type="primary" @click="sendUndoCommit" :disabled="state.button_state" v-loading="state.button_loading">冲销</el-button>
</div>
</el-row>
</div>
</template>
@ -110,6 +119,7 @@ const { proxy }: any = getCurrentInstance();
const queryFormRef = ref(ElForm);
const state = reactive({
commitDate: "",
ERPFACTORY:'',
queryParams: {
UNDOID: '',
@ -120,7 +130,8 @@ const state = reactive({
TypeList: [
{ value: '', label: '全部' },
{ value: 'A', label: '入库' },
{ value: 'B', label: '出库' }
{ value: 'B', label: '出库' },
{ value: '调拨出库', label: '调拨出库' }
],
page: {
pageNum: 1,
@ -146,6 +157,13 @@ const state = reactive({
const { loading, list, column, queryParams, page, page_d, loading_d, list_d, column_d, active_row } = toRefs(state)
onMounted(() => {
var newDate = new Date();
var year = newDate.getFullYear();
var moth = newDate.getMonth() + 1;
if(moth < 10) moth = '0' + moth;
var day = newDate.getDate();
if(day < 10) day = '0' + day;
state.commitDate = year + '-' + moth + '-' + day
state.column = [
{ header: "物料凭证", field: "UNDOID", hide: false },
{ header: "单据状态", field: "FLAG", hide: false },
@ -251,11 +269,14 @@ function sendUndoCommit() {
state.button_loading = false
return;
}
console.log(state.active_row)
undoCommit({
undoId: state.list[0]?.UNDOID,
userId: localStorage.get('userId'),
flag: state.list[0]?.FLAG,
inv_TYPE : state.list[0]?.RECEIVEREQUESTTYPE,
flag: state.active_row?.FLAG,
inv_TYPE : state.active_row?.RECEIVEREQUESTTYPE || state.active_row?.SHIPREQUESTTYPE,
lastEventName: state.active_row?.LASTEVENTNAME,
commitDate:state.commitDate
}).then((res: any) => {
console.log(res)
if (res.success) {

View File

@ -414,7 +414,7 @@ async function handleReserve() {
await allocateStockInCommit(param)
.then((res: any) => {
if (res.code == 'UndefinedCode' || res.code == '500') {
ElMessageBox.alert(res.data.RETURNMESSAGE, '提示框', {
ElMessageBox.alert(res.message, '提示框', {
confirmButtonText: 'OK'
})
state.loading = false
@ -425,10 +425,25 @@ async function handleReserve() {
})
state.loading = false
state.Button_state = false
state.formData= {
SHIPREQUESTNAME: '',
SHIPREQUESTSTATE: '',
ERPRECEIVELOCATION: '',
ERPFACTORY:'',
ERPRECEIVEFACTORY: '',
CUSTOMERNAME: '',
ToSHIPREQUEST: '',
ToSHIPREQUESTDetail: '',
MaterialPackingList: [],
ERPRECEIVEFACTORYDESC:'',
ERPFACTORYDESC:''
}
state.undistributed_list = [];
}
})
.catch((error: any) => {
// ElMessageBox.alert(error, '', {
// console.log(error)
// ElMessageBox.alert(error.message, '', {
// confirmButtonText: 'OK'
// })
state.Button_state = false

View File

@ -28,14 +28,25 @@
highlight-current-row row-key="id" @row-click="handle">
<el-table-column prop="MATERIALSPECNAME" fixed="left" label="料号" width="100" />
<el-table-column prop="ERPFACTORY" label="组织" width="100" />
<el-table-column prop="ERPLOCATION" label="库位" width="180">
<template #default="scope">
<!-- <el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px" default-first-option @focus="getStorageSpec(scope.row.ERPLOCATION)" filterable>-->
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px" default-first-option filterable>
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px" default-first-option
@focus="getStorageSpec(scope.row.ERPLOCATION)" filterable>
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL" :value="item.VALUE" />
</el-select>
</template>
</el-table-column>
<el-table-column prop="LOCATIONNAME" label="货位" width="180">
<template #default="scope">
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px"
@focus="getStorageSpec(scope.row.ERPLOCATION)" default-first-option filterable
:filter-method="locatioNFilter">
<el-option v-for="item in state.LocationList" :key="item.VALUE" :label="item.LABEL"
:value="item.VALUE" />
</el-select>
</template>
</el-table-column>
<el-table-column prop="REQUESTQUANTITY" label="订单数量" width="100" />
<el-table-column prop="RECEIVEDQUANTITY" label="已接收数量" width="100" />
<el-table-column prop="STOCKINQTY" label="已入库数量" width="100" />
@ -802,7 +813,21 @@ function getStorageSpec(value: any) {
this.locatioNFilter('')
})
}
/**
* 货位卡顿处理
* @param query
*/
function locatioNFilter(query : any) {
console.log(query)
let arr = state.AllLocationList.filter((item : any) => {
return (item.LABEL.includes(query) || item.VALUE.includes(query))
})
if (arr.length > 50) {
state.LocationList = arr.slice(0, 50)
} else {
state.LocationList = arr
}
}
function getERPLocation(erpfactory: any) {
getQueryList({
queryId: 'GetERPLocationForCreatePO',

View File

@ -534,8 +534,23 @@ function handle(row: any, event: any, column: any) {
state.LShipRequestDetailName = row.SHIPREQUESTDETAILNAME
state.LShipType = row.SHIPREQUESTTYPE
getQueryList(state.queryParams).then((res: any) => {
// EE
getQueryList({queryId:"GetPackingRow",version:"ZWP007_E"}).then((data: any) => {
console.log(data.data[0].ENUMVALUE)
if(data.data[0].ENUMVALUE == 'Y') {
state.MaterialPackingList = (res.data || []).filter((item:any) => item.SALESHIPREQUESTNAME == state.queryParams.params.SHIPREQUESTNAME || !item.SALESHIPREQUESTNAME);
state.MaterialPackingList2 = (res.data || []).filter((item:any) => item.SALESHIPREQUESTNAME == state.queryParams.params.SHIPREQUESTNAME || !item.SALESHIPREQUESTNAME);
}else {
state.MaterialPackingList = res.data;
state.MaterialPackingList2 = res.data;
}
}).catch((err: any) => {
state.MaterialPackingList = res.data;
state.MaterialPackingList2 = res.data;
});
});
state.RightqueryParams.queryId = 'GetPackingRow';

View File

@ -566,8 +566,21 @@ function handle(row: any, event: any, column: any) {
state.queryParams.params.IsCheck = state.IsCheck
getQueryList(state.queryParams).then((res: any) => {
getQueryList({queryId:"GetPackingRow",version:"ZWP007_E"}).then((data: any) => {
console.log(data.data[0].ENUMVALUE)
if(data.data[0].ENUMVALUE == 'Y') {
state.MaterialPackingList = (res.data || []).filter((item:any) => item.SALESHIPREQUESTNAME == state.queryParams.params.SHIPREQUESTNAME || !item.SALESHIPREQUESTNAME);
state.MaterialPackingList2 = (res.data || []).filter((item:any) => item.SALESHIPREQUESTNAME == state.queryParams.params.SHIPREQUESTNAME || !item.SALESHIPREQUESTNAME);
}else {
state.MaterialPackingList = res.data;
state.MaterialPackingList2 = res.data;
}
}).catch((err: any) => {
state.MaterialPackingList = res.data;
state.MaterialPackingList2 = res.data;
});
});
state.RightqueryParams.queryId = 'GetPackingRow';