Compare commits
2 Commits
f73df8fc6f
...
8a68084bfd
Author | SHA1 | Date | |
---|---|---|---|
8a68084bfd | |||
6ec5d3967b |
@ -9,7 +9,7 @@
|
|||||||
<el-Input v-model="queryParams.UNDOID" clearable />
|
<el-Input v-model="queryParams.UNDOID" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="单据类型" prop="TYPE">
|
<el-form-item label="单据类型" prop="TYPE">
|
||||||
<el-select v-model="queryParams.TYPE" placeholder="单据类型" style="width: 240px"
|
<el-select v-model="queryParams.TYPE" placeholder="单据类型" style="width: 240px"
|
||||||
default-first-option>
|
default-first-option>
|
||||||
@ -34,7 +34,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="page-search-btns">
|
<div class="page-search-btns">
|
||||||
<el-button type="primary" @click="handleQueryInfo">搜索</el-button>
|
<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>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="vue-element-page-table">
|
<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"
|
<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" />
|
v-model:pageSizeTo="page_d.pageSize" @pagination="handleQuery_d" />
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -110,6 +119,7 @@ const { proxy }: any = getCurrentInstance();
|
|||||||
const queryFormRef = ref(ElForm);
|
const queryFormRef = ref(ElForm);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
commitDate: "",
|
||||||
ERPFACTORY:'',
|
ERPFACTORY:'',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
UNDOID: '',
|
UNDOID: '',
|
||||||
@ -120,7 +130,8 @@ const state = reactive({
|
|||||||
TypeList: [
|
TypeList: [
|
||||||
{ value: '', label: '全部' },
|
{ value: '', label: '全部' },
|
||||||
{ value: 'A', label: '入库' },
|
{ value: 'A', label: '入库' },
|
||||||
{ value: 'B', label: '出库' }
|
{ value: 'B', label: '出库' },
|
||||||
|
{ value: '调拨出库', label: '调拨出库' }
|
||||||
],
|
],
|
||||||
page: {
|
page: {
|
||||||
pageNum: 1,
|
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)
|
const { loading, list, column, queryParams, page, page_d, loading_d, list_d, column_d, active_row } = toRefs(state)
|
||||||
|
|
||||||
onMounted(() => {
|
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 = [
|
state.column = [
|
||||||
{ header: "物料凭证", field: "UNDOID", hide: false },
|
{ header: "物料凭证", field: "UNDOID", hide: false },
|
||||||
{ header: "单据状态", field: "FLAG", hide: false },
|
{ header: "单据状态", field: "FLAG", hide: false },
|
||||||
@ -251,11 +269,14 @@ function sendUndoCommit() {
|
|||||||
state.button_loading = false
|
state.button_loading = false
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(state.active_row)
|
||||||
undoCommit({
|
undoCommit({
|
||||||
undoId: state.list[0]?.UNDOID,
|
undoId: state.list[0]?.UNDOID,
|
||||||
userId: localStorage.get('userId'),
|
userId: localStorage.get('userId'),
|
||||||
flag: state.list[0]?.FLAG,
|
flag: state.active_row?.FLAG,
|
||||||
inv_TYPE : state.list[0]?.RECEIVEREQUESTTYPE,
|
inv_TYPE : state.active_row?.RECEIVEREQUESTTYPE || state.active_row?.SHIPREQUESTTYPE,
|
||||||
|
lastEventName: state.active_row?.LASTEVENTNAME,
|
||||||
|
commitDate:state.commitDate
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -414,7 +414,7 @@ async function handleReserve() {
|
|||||||
await allocateStockInCommit(param)
|
await allocateStockInCommit(param)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.code == 'UndefinedCode' || res.code == '500') {
|
if (res.code == 'UndefinedCode' || res.code == '500') {
|
||||||
ElMessageBox.alert(res.data.RETURNMESSAGE, '提示框', {
|
ElMessageBox.alert(res.message, '提示框', {
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
state.loading = false
|
state.loading = false
|
||||||
@ -425,10 +425,25 @@ async function handleReserve() {
|
|||||||
})
|
})
|
||||||
state.loading = false
|
state.loading = false
|
||||||
state.Button_state = false
|
state.Button_state = false
|
||||||
|
state.formData= {
|
||||||
|
SHIPREQUESTNAME: '',
|
||||||
|
SHIPREQUESTSTATE: '',
|
||||||
|
ERPRECEIVELOCATION: '',
|
||||||
|
ERPFACTORY:'',
|
||||||
|
ERPRECEIVEFACTORY: '',
|
||||||
|
CUSTOMERNAME: '',
|
||||||
|
ToSHIPREQUEST: '',
|
||||||
|
ToSHIPREQUESTDetail: '',
|
||||||
|
MaterialPackingList: [],
|
||||||
|
ERPRECEIVEFACTORYDESC:'',
|
||||||
|
ERPFACTORYDESC:''
|
||||||
|
}
|
||||||
|
state.undistributed_list = [];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
// ElMessageBox.alert(error, '提示框', {
|
// console.log(error)
|
||||||
|
// ElMessageBox.alert(error.message, '提示框', {
|
||||||
// confirmButtonText: 'OK'
|
// confirmButtonText: 'OK'
|
||||||
// })
|
// })
|
||||||
state.Button_state = false
|
state.Button_state = false
|
||||||
|
@ -28,14 +28,25 @@
|
|||||||
highlight-current-row row-key="id" @row-click="handle">
|
highlight-current-row row-key="id" @row-click="handle">
|
||||||
<el-table-column prop="MATERIALSPECNAME" fixed="left" label="料号" width="100" />
|
<el-table-column prop="MATERIALSPECNAME" fixed="left" label="料号" width="100" />
|
||||||
<el-table-column prop="ERPFACTORY" label="组织" width="100" />
|
<el-table-column prop="ERPFACTORY" label="组织" width="100" />
|
||||||
|
|
||||||
<el-table-column prop="ERPLOCATION" label="库位" width="180">
|
<el-table-column prop="ERPLOCATION" label="库位" width="180">
|
||||||
<template #default="scope">
|
<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
|
||||||
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px" default-first-option filterable>
|
@focus="getStorageSpec(scope.row.ERPLOCATION)" filterable>
|
||||||
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL" :value="item.VALUE" />
|
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL" :value="item.VALUE" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="REQUESTQUANTITY" label="订单数量" width="100" />
|
||||||
<el-table-column prop="RECEIVEDQUANTITY" label="已接收数量" width="100" />
|
<el-table-column prop="RECEIVEDQUANTITY" label="已接收数量" width="100" />
|
||||||
<!-- <el-table-column prop="STOCKINQTY" label="已入库数量" width="100" /> -->
|
<!-- <el-table-column prop="STOCKINQTY" label="已入库数量" width="100" /> -->
|
||||||
@ -802,7 +813,21 @@ function getStorageSpec(value: any) {
|
|||||||
this.locatioNFilter('')
|
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) {
|
function getERPLocation(erpfactory: any) {
|
||||||
getQueryList({
|
getQueryList({
|
||||||
queryId: 'GetERPLocationForCreatePO',
|
queryId: 'GetERPLocationForCreatePO',
|
||||||
|
@ -534,8 +534,23 @@ function handle(row: any, event: any, column: any) {
|
|||||||
state.LShipRequestDetailName = row.SHIPREQUESTDETAILNAME
|
state.LShipRequestDetailName = row.SHIPREQUESTDETAILNAME
|
||||||
state.LShipType = row.SHIPREQUESTTYPE
|
state.LShipType = row.SHIPREQUESTTYPE
|
||||||
getQueryList(state.queryParams).then((res: any) => {
|
getQueryList(state.queryParams).then((res: any) => {
|
||||||
state.MaterialPackingList = res.data;
|
|
||||||
state.MaterialPackingList2 = res.data;
|
// 判定是否是E库存,如果是批次是E库存的销售订单号,则需要单据号相同才能显示
|
||||||
|
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';
|
state.RightqueryParams.queryId = 'GetPackingRow';
|
||||||
|
@ -566,8 +566,21 @@ function handle(row: any, event: any, column: any) {
|
|||||||
state.queryParams.params.IsCheck = state.IsCheck
|
state.queryParams.params.IsCheck = state.IsCheck
|
||||||
|
|
||||||
getQueryList(state.queryParams).then((res: any) => {
|
getQueryList(state.queryParams).then((res: any) => {
|
||||||
state.MaterialPackingList = res.data;
|
getQueryList({queryId:"GetPackingRow",version:"ZWP007_E"}).then((data: any) => {
|
||||||
state.MaterialPackingList2 = res.data;
|
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';
|
state.RightqueryParams.queryId = 'GetPackingRow';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user