9) 调拨入库
This commit is contained in:
parent
c01512967f
commit
79f870c864
@ -117,3 +117,11 @@ export function undoCommit(queryParams: any) {
|
|||||||
data: queryParams,
|
data: queryParams,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function allocateStockInCommit(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/AllocateStockIn/commit',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
@ -1,22 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-horizontal-wrap" ref="tableContainer">
|
<div class="page-horizontal-wrap">
|
||||||
<div class="page-left-container">
|
<div class="page-left-container">
|
||||||
<div class="left-form-container" style="min-height: 150px">
|
<div class="left-form-container" style="min-height: 150px">
|
||||||
<el-form ref="formDataRef" label-position="left" label-width="120px" :model="formData">
|
<el-form ref="formDataRef" label-position="left" label-width="120px" :model="formData">
|
||||||
<el-form-item label="单据类型" prop="orderType">
|
|
||||||
<el-select v-model="formData.orderType" placeholder="单据类型"
|
|
||||||
default-first-option size="default">
|
|
||||||
<el-option v-for="item in state.OrderList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="质检状态" prop="orderType">
|
|
||||||
<el-select v-model="formData.OQARESULTSTATE" placeholder="质检状态"
|
|
||||||
default-first-option size="default">
|
|
||||||
<el-option v-for="item in state.OQList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="调拨入库单号" prop="SENDORDERNO">
|
<el-form-item label="调拨入库单号" prop="SENDORDERNO">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.SHIPREQUESTNAME"
|
v-model="formData.SHIPREQUESTNAME"
|
||||||
@ -24,7 +10,7 @@
|
|||||||
@keydown.enter.prevent="getBoxList"
|
@keydown.enter.prevent="getBoxList"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="组织">
|
<el-form-item label="发货组织">
|
||||||
<el-input disabled v-model="formData.ERPFACTORYDESC" placeholder="组织" />
|
<el-input disabled v-model="formData.ERPFACTORYDESC" placeholder="组织" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接收组织">
|
<el-form-item label="接收组织">
|
||||||
@ -34,7 +20,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
size="default"
|
size="default"
|
||||||
filterable
|
filterable
|
||||||
@change="changeWare"
|
@change="changeWare(formData.ERPRECEIVELOCATION,formData.ERPFACTORY)"
|
||||||
v-model="formData.ERPRECEIVELOCATION"
|
v-model="formData.ERPRECEIVELOCATION"
|
||||||
placeholder="下拉选择库位"
|
placeholder="下拉选择库位"
|
||||||
>
|
>
|
||||||
@ -47,39 +33,21 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input v-model="formData.ERPRECEIVELOCATION" placeholder="接收仓库" /> -->
|
<!-- <el-input v-model="formData.ERPRECEIVELOCATION" placeholder="接收仓库" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item v-show="USE_LOCATION != 'N'" label="目的货位" -->
|
<el-form-item v-show="USE_LOCATION != 'N'" label="目的货位" prop="portFormRefData.SEARCHTYPE">
|
||||||
<!-- prop="portFormRefData.SEARCHTYPE">-->
|
<el-cascader
|
||||||
<!-- <el-cascader @visible-change="handleOuterClick" v-model="state.StorageSelect" -->
|
|
||||||
<!-- :filter-method="getStorageAll" :options="state.StorageSelectList" :props="{-->
|
|
||||||
<!-- checkStrictly: true,-->
|
|
||||||
<!-- label: 'DESCRIPTION',-->
|
|
||||||
<!-- value: 'ERPLOCATION',-->
|
|
||||||
<!-- children: 'children'}" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item
|
|
||||||
v-show="USE_LOCATION != 'N'"
|
|
||||||
label="目的货位"
|
|
||||||
prop="portFormRefData.SEARCHTYPE"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
size="default"
|
|
||||||
@visible-change="handleOuterClick"
|
@visible-change="handleOuterClick"
|
||||||
v-model="state.StorageSelect"
|
v-model="state.StorageSelect"
|
||||||
:filter-method="getStorageAll"
|
|
||||||
:options="state.StorageSelectList"
|
:options="state.StorageSelectList"
|
||||||
placeholder="目的货位"
|
:props="{
|
||||||
default-first-option
|
checkStrictly: true,
|
||||||
filterable
|
label: 'DESCRIPTION',
|
||||||
>
|
value: 'ERPLOCATION',
|
||||||
<el-option
|
children: 'children'
|
||||||
v-for="item in state.StorageSelectList"
|
}"
|
||||||
:key="item.ERPLOCATION"
|
|
||||||
:label="item.DESCRIPTION"
|
|
||||||
:value="item.ERPLOCATION"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <el-form
|
<!-- <el-form
|
||||||
ref="queryParamRef"
|
ref="queryParamRef"
|
||||||
label-position="left"
|
label-position="left"
|
||||||
@ -97,27 +65,16 @@
|
|||||||
</el-form> -->
|
</el-form> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="vue-element-page-wrap" ref="tableContainer">
|
<div class="vue-element-page-wrap">
|
||||||
<div class="vue-element-page-table">
|
<div class="vue-element-page-table">
|
||||||
<!-- <div class="page-table-operate">
|
<div class="page-table-operate">
|
||||||
<span>发货单明细</span>
|
<span>发货单明细</span>
|
||||||
</div> -->
|
|
||||||
<div class="page-table-title">
|
|
||||||
<div class="page-table-title-left">
|
|
||||||
<span>发货单明细</span>
|
|
||||||
</div>
|
|
||||||
<el-tag size="large" style="margin-left: 30px" type="success"
|
|
||||||
>累计个数:{{ GSSUM }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag size="large" style="margin-left: 20px" type="success"
|
|
||||||
>累计数量:{{ BQSUM }}</el-tag
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
border
|
border
|
||||||
:height="tableHeight"
|
|
||||||
v-loading="undistributed_loading"
|
v-loading="undistributed_loading"
|
||||||
:data="undistributed_list"
|
:data="undistributed_list"
|
||||||
|
height="300"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@ -153,40 +110,24 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- <el-row class="page-search" justify="end" align="middle">-->
|
<el-row class="page-search" justify="end" align="middle">
|
||||||
<!-- <!– <div class="block">–>-->
|
<div class="page-search-btns">
|
||||||
<!-- <!– <el-date-picker :clearable="true" :editable="true" v-model="state.commitDate" type="date" placeholder="选择过账时间" value-format="YYYY-MM-DD"/>–>-->
|
<!-- <el-button
|
||||||
<!-- <!– </div>–>-->
|
type="primary"
|
||||||
<!-- <div class="page-search-btns">-->
|
v-loading="state.loading"
|
||||||
<!-- <el-button-->
|
@click="transferComfirm"
|
||||||
<!-- type="primary"-->
|
:disabled="state.Button_state"
|
||||||
<!-- v-loading="state.loading"-->
|
>调拨</el-button
|
||||||
<!-- @click="handleReserve"-->
|
> -->
|
||||||
<!-- :disabled="state.Button_state"-->
|
<el-button
|
||||||
<!-- >确定</el-button-->
|
type="primary"
|
||||||
<!-- >-->
|
v-loading="state.loading"
|
||||||
<!-- </div>-->
|
@click="handleReserve"
|
||||||
<!-- </el-row>-->
|
:disabled="state.Button_state"
|
||||||
<div class="vue-element-page-table">
|
>确定</el-button
|
||||||
<el-row class="page-search" justify="space-between" align="middle">
|
>
|
||||||
<el-form ref="operateFormRef" :model="operateParams" :inline="true">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span = "4">
|
|
||||||
<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>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-Input v-model="state.OpCode" :disabled = false readonly />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3">
|
|
||||||
<el-button type="primary" @click="handleReserve" :disabled="state.button_state" v-loading="state.loading">入库</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
</div>
|
||||||
|
</el-row>
|
||||||
<!-- assigned_list -->
|
<!-- assigned_list -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -199,35 +140,22 @@ export default {
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue'
|
import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue'
|
||||||
import { ElForm, ElMessageBox } from 'element-plus'
|
import { ElForm, ElMessageBox } from 'element-plus'
|
||||||
import { BpelEvent, getQueryList } from '@/api/common'
|
import { allocateStockInCommit, BpelEvent, getQueryList } from '@/api/common'
|
||||||
import { TransferIn } from '@/api/StockIn'
|
|
||||||
import { getOpCode } from '@/api/opcode'
|
|
||||||
// import { getPageList } from "@/api/menu";
|
// import { getPageList } from "@/api/menu";
|
||||||
// import { Header } from "element-plus/es/components/table-v2/src/components";
|
// import { Header } from "element-plus/es/components/table-v2/src/components";
|
||||||
import { bTableHeight } from '../../../composables/calcTableHeight'
|
|
||||||
import { cals } from '@/utils/cal'
|
|
||||||
import {localStorage} from "@/utils/storage";
|
|
||||||
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(180)
|
|
||||||
const { proxy }: any = getCurrentInstance()
|
const { proxy }: any = getCurrentInstance()
|
||||||
|
|
||||||
const formDataRef = ref(ElForm)
|
const formDataRef = ref(ElForm)
|
||||||
const queryParamRef = ref(ElForm)
|
const queryParamRef = ref(ElForm)
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
OpCode : "", //过账流水
|
|
||||||
commitDate : '',
|
|
||||||
OrderList: [{ label: 'DC单据', value: 'DC' }, { label: 'TF单据', value: 'TF' }] as any,
|
|
||||||
OQList: [{ label: '否', value: 'OK' }, { label: '是', value: 'PREOQA' }] as any,
|
|
||||||
BQSUM: 0,
|
|
||||||
GSSUM: 0,
|
|
||||||
USE_LOCATION: '',
|
USE_LOCATION: '',
|
||||||
Button_state: false,
|
Button_state: false,
|
||||||
// commitDate: '',
|
|
||||||
firstLocation: '',
|
firstLocation: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
locDecList: [] as any,
|
locDecList: [] as any,
|
||||||
StorageSelect: '',
|
StorageSelect: [] as any,
|
||||||
StorageSelectList: [] as any,
|
StorageSelectList: [] as any,
|
||||||
StorageSelectListAll: [] as any,
|
|
||||||
formData: {
|
formData: {
|
||||||
SHIPREQUESTNAME: '',
|
SHIPREQUESTNAME: '',
|
||||||
SHIPREQUESTSTATE: '',
|
SHIPREQUESTSTATE: '',
|
||||||
@ -239,9 +167,7 @@ const state = reactive({
|
|||||||
ToSHIPREQUESTDetail: '',
|
ToSHIPREQUESTDetail: '',
|
||||||
MaterialPackingList: [],
|
MaterialPackingList: [],
|
||||||
ERPRECEIVEFACTORYDESC:'',
|
ERPRECEIVEFACTORYDESC:'',
|
||||||
ERPFACTORYDESC: '',
|
ERPFACTORYDESC:''
|
||||||
orderType:'DC',
|
|
||||||
OQARESULTSTATE:'OK'
|
|
||||||
},
|
},
|
||||||
ERPRECEIVEFACTORY: '',
|
ERPRECEIVEFACTORY: '',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -287,8 +213,6 @@ const state = reactive({
|
|||||||
TransportTaskChoose: [] as any
|
TransportTaskChoose: [] as any
|
||||||
})
|
})
|
||||||
const {
|
const {
|
||||||
GSSUM,
|
|
||||||
BQSUM,
|
|
||||||
locDecList,
|
locDecList,
|
||||||
USE_LOCATION,
|
USE_LOCATION,
|
||||||
TransportTaskChoose,
|
TransportTaskChoose,
|
||||||
@ -305,26 +229,19 @@ const {
|
|||||||
} = toRefs(state)
|
} = 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.undistributed_column = [
|
state.undistributed_column = [
|
||||||
|
// {
|
||||||
|
// header: '发货单号',
|
||||||
|
// field: 'SHIPREQUESTNAME',
|
||||||
|
// width: '100px',
|
||||||
|
// hide: false
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
header: '条码',
|
header: '箱号',
|
||||||
field: 'MATERIALPACKINGNAME',
|
field: 'MATERIALPACKINGNAME',
|
||||||
hide: false,
|
hide: false,
|
||||||
width: '300px'
|
width: '300px'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
header: '批次',
|
|
||||||
field: 'CHARGE',
|
|
||||||
hide: false,
|
|
||||||
width: '300px'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
header: '料号',
|
header: '料号',
|
||||||
field: 'MATERIALSPECNAME',
|
field: 'MATERIALSPECNAME',
|
||||||
@ -340,14 +257,9 @@ onMounted(() => {
|
|||||||
field: 'PHASE',
|
field: 'PHASE',
|
||||||
hide: false
|
hide: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
header: '组织',
|
|
||||||
field: 'ERPFACTORYDESC',
|
|
||||||
hide: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
header: '仓库',
|
header: '仓库',
|
||||||
field: 'ERPLOCATIONDESC',
|
field: 'ERPFACTORYDESC',
|
||||||
hide: false
|
hide: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -355,11 +267,29 @@ onMounted(() => {
|
|||||||
field: 'LOCATIONNAMEDESC',
|
field: 'LOCATIONNAMEDESC',
|
||||||
hide: false
|
hide: false
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// header: '行号',
|
||||||
|
// field: 'SHIPREQUESTDETAILNAME',
|
||||||
|
// width: '100px',
|
||||||
|
// hide: false
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// header: '数量',
|
||||||
|
// field: 'REQUESTQUANTITY',
|
||||||
|
// width: '100px',
|
||||||
|
// hide: false
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
header: '数量',
|
header: '请求数量',
|
||||||
field: 'MATERIALQUANTITY',
|
field: 'MATERIALQUANTITY',
|
||||||
hide: false
|
hide: false
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// header: '绑定数量',
|
||||||
|
// field: 'ASSIGNEDQUANTITY',
|
||||||
|
// width: '100px',
|
||||||
|
// hide: false
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
header: '规格',
|
header: '规格',
|
||||||
field: 'SPECNAME',
|
field: 'SPECNAME',
|
||||||
@ -369,11 +299,6 @@ onMounted(() => {
|
|||||||
header: '批次',
|
header: '批次',
|
||||||
field: 'CHARGE',
|
field: 'CHARGE',
|
||||||
hide: false
|
hide: false
|
||||||
},
|
|
||||||
{
|
|
||||||
header: '调拨订单单号',
|
|
||||||
field: 'SHIPREQUESTNAME',
|
|
||||||
hide: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
state.assigned_column = [
|
state.assigned_column = [
|
||||||
@ -414,19 +339,21 @@ onMounted(() => {
|
|||||||
hide: false
|
hide: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
updateTableHeight()
|
|
||||||
window.addEventListener('resize', handleResize)
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/*****************************************************下面方法******************************************/
|
/*****************************************************下面方法******************************************/
|
||||||
async function handleReserve() {
|
async function handleReserve() {
|
||||||
console.log(state.commitDate)
|
// if (state.assigned_list.length > 0) {
|
||||||
if (state.TransportTaskChoose.length > 0) {
|
if (state.TransportTaskChoose.length > 0) {
|
||||||
state.Button_state = true
|
state.Button_state = true
|
||||||
let objectFull = []
|
let objectFull = []
|
||||||
state.loading = true
|
state.loading = true
|
||||||
if (!state.StorageSelect && state.USE_LOCATION != 'N') {
|
// state.TransportTaskChoose
|
||||||
|
// 原代码
|
||||||
|
// for (let i = 0; i < state.assigned_list.length; i++) {
|
||||||
|
// objectFull.push({ "MATERIALPACKINGNAME": state.assigned_list[i].MATERIALPACKINGNAME, "LOCATIONNAME": state.assigned_list[i].LOCATIONNAME || '' })
|
||||||
|
// }
|
||||||
|
if(!state.StorageSelect.length && state.USE_LOCATION != 'N') {
|
||||||
ElMessageBox.alert('请选择目的货位', '提示框', {
|
ElMessageBox.alert('请选择目的货位', '提示框', {
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
@ -437,83 +364,53 @@ async function handleReserve() {
|
|||||||
for (let i = 0; i < state.TransportTaskChoose.length; i++) {
|
for (let i = 0; i < state.TransportTaskChoose.length; i++) {
|
||||||
objectFull.push({
|
objectFull.push({
|
||||||
MATERIALPACKINGNAME: state.TransportTaskChoose[i].MATERIALPACKINGNAME,
|
MATERIALPACKINGNAME: state.TransportTaskChoose[i].MATERIALPACKINGNAME,
|
||||||
LOCATIONNAME: state.StorageSelect || '',
|
LOCATIONNAME: state.StorageSelect[0] || ''
|
||||||
RECEIVEREQUESTNAME :state.TransportTaskChoose[i].RECEIVEREQUESTNAME,
|
|
||||||
RECEIVEREQUESTDETAILNAME : state.TransportTaskChoose[i].RECEIVEREQUESTDETAILNAME,
|
|
||||||
MATERIALSPECNAME : state.TransportTaskChoose[i].MATERIALSPECNAME,
|
|
||||||
PHASE : state.TransportTaskChoose[i].PHASE,
|
|
||||||
SDK_ID : state.TransportTaskChoose[i].SDK_ID,
|
|
||||||
SHIPREQUESTNAME : state.TransportTaskChoose[i].SHIPREQUESTNAME,
|
|
||||||
CHARGE : state.TransportTaskChoose[i].CHARGE
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
let param = {
|
||||||
if(state.commitDate == null){
|
userId: localStorage.get('userId'),
|
||||||
ElMessageBox.alert('过账时间不可清空', {
|
siteName : localStorage.get('SITENAME') || 'SDK',
|
||||||
confirmButtonText: 'OK',
|
shipRequestName : state.formData.SHIPREQUESTNAME,
|
||||||
})
|
erpLocation: state.formData.ERPRECEIVELOCATION,
|
||||||
state.loading = false
|
erpFactory: state.formData.ERPRECEIVEFACTORY,
|
||||||
state.Button_state = false
|
boxList: objectFull
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
console.log(state.OpCode == null || state.OpCode == "")
|
await allocateStockInCommit(param)
|
||||||
getOpCode (
|
|
||||||
{
|
|
||||||
opcode : state.OpCode,
|
|
||||||
user: localStorage.get('userId'),
|
|
||||||
}
|
|
||||||
).then((res: any) => {
|
|
||||||
console.log(res.resultObj)
|
|
||||||
state.OpCode = res.resultObj
|
|
||||||
// state.loading = false
|
|
||||||
// state.Button_state = false
|
|
||||||
const params = {
|
|
||||||
user: localStorage.get('userId'),
|
|
||||||
commitDate : state.commitDate,
|
|
||||||
opcode : state.OpCode,
|
|
||||||
OQARESULTSTATE: state.formData.OQARESULTSTATE,
|
|
||||||
shipRequestName: state.queryParams.params.SHIPREQUESTNAME,
|
|
||||||
ERPLOCATION: state.formData.ERPRECEIVELOCATION,
|
|
||||||
ERPFACTORY: state.formData.ERPRECEIVEFACTORY,
|
|
||||||
LOCATIONNAME: state.StorageSelect,
|
|
||||||
BOXLIST: objectFull
|
|
||||||
};
|
|
||||||
TransferIn (params)
|
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
ElMessageBox.alert("入库成功", '提示框', {
|
if (res.code == '500') {
|
||||||
|
ElMessageBox.alert(res.data.RETURNMESSAGE, '提示框', {
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
state.loading = false
|
state.loading = false
|
||||||
state.Button_state = false
|
state.Button_state = false
|
||||||
console.log(111,res)
|
} else if (res.code == 'UndefinedCode') {
|
||||||
|
ElMessageBox.alert(res.data.RETURNMESSAGE, '提示框', {
|
||||||
|
confirmButtonText: 'OK'
|
||||||
|
})
|
||||||
|
state.loading = false
|
||||||
|
state.Button_state = false
|
||||||
|
} else if (res.code == '0') {
|
||||||
|
ElMessageBox.alert('入库成功', '提示框', {
|
||||||
|
confirmButtonText: 'OK'
|
||||||
|
})
|
||||||
|
state.loading = false
|
||||||
|
state.Button_state = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
console.log(error)
|
// ElMessageBox.alert(error, '提示框', {
|
||||||
ElMessageBox.alert("错误:"+ error.response.data.message, '提示框', {
|
// confirmButtonText: 'OK'
|
||||||
confirmButtonText: 'OK'
|
// })
|
||||||
})
|
|
||||||
state.Button_state = false
|
state.Button_state = false
|
||||||
state.loading = false
|
|
||||||
// state.Button_state = false
|
|
||||||
})
|
|
||||||
}).catch((error: any) => {
|
|
||||||
console.log(111,error)
|
|
||||||
ElMessageBox.alert("错误:"+ error, '提示框', {
|
|
||||||
confirmButtonText: 'OK'
|
|
||||||
})
|
|
||||||
state.Button_state = false
|
|
||||||
state.loading = false
|
|
||||||
// state.Button_state = false
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// ElMessageBox.alert("入库标签列表为空", '提示框', {
|
// ElMessageBox.alert("入库标签列表为空", '提示框', {
|
||||||
// confirmButtonText: 'OK',
|
// confirmButtonText: 'OK',
|
||||||
// })
|
// })
|
||||||
ElMessageBox.alert('请勾选明细', '提示框', {
|
ElMessageBox.alert('请勾选发货单明细', '提示框', {
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
state.Button_state = false
|
state.Button_state = false
|
||||||
state.loading = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -529,37 +426,16 @@ function handleEnterKey() {
|
|||||||
function handleSelectionChange(selection: any) {
|
function handleSelectionChange(selection: any) {
|
||||||
console.log('调用了', selection)
|
console.log('调用了', selection)
|
||||||
state.TransportTaskChoose = selection
|
state.TransportTaskChoose = selection
|
||||||
let sumList = [...state.TransportTaskChoose];
|
|
||||||
state.BQSUM = 0
|
|
||||||
state.BQSUM = sumList.reduce((accumulator, currentValue) => {
|
|
||||||
console.log(accumulator, currentValue)
|
|
||||||
return (cals.add(accumulator,currentValue.MATERIALQUANTITY)).toNumber();
|
|
||||||
}, 0)
|
|
||||||
state.GSSUM = sumList.length
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBoxList() {
|
function getBoxList() {
|
||||||
console.log(state.formData.orderType)
|
|
||||||
let queryParam = {
|
let queryParam = {
|
||||||
queryId: 'GetTransferInList',
|
queryId: 'GetSaleRetuenList',
|
||||||
version: 'DC0001',
|
version: 'Z00001_SAP',
|
||||||
params: {
|
params: {
|
||||||
SITENAME: 'SDK',
|
SITENAME: 'SDK',
|
||||||
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
||||||
SHIPREQUESTTYPE: '4E'
|
SHIPREQUESTTYPE: '^(07|10|NLCC)$'
|
||||||
}
|
|
||||||
}
|
|
||||||
if (state.formData.orderType == 'TF') {
|
|
||||||
console.log("TF单据类型")
|
|
||||||
queryParam = {
|
|
||||||
queryId: 'GetTransferInList',
|
|
||||||
version: 'TF0001',
|
|
||||||
params: {
|
|
||||||
SITENAME: 'SDK',
|
|
||||||
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
|
||||||
SHIPREQUESTTYPE: '4E'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getQueryList(queryParam)
|
getQueryList(queryParam)
|
||||||
@ -578,6 +454,7 @@ function getBoxList() {
|
|||||||
if(state.formData.ERPRECEIVEFACTORY) {
|
if(state.formData.ERPRECEIVEFACTORY) {
|
||||||
WareList(state.formData.ERPRECEIVEFACTORY)
|
WareList(state.formData.ERPRECEIVEFACTORY)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
ElMessageBox.alert(error, '提示框', {
|
ElMessageBox.alert(error, '提示框', {
|
||||||
@ -585,7 +462,7 @@ function getBoxList() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// getDetailList() // 之前是列表取的出库单详情
|
// getDetailList() // 之前是列表取的出库单详情
|
||||||
getAllPackingList(state.formData.orderType)
|
getAllPackingList()
|
||||||
}
|
}
|
||||||
async function WareList(firstLocation: any) {
|
async function WareList(firstLocation: any) {
|
||||||
try {
|
try {
|
||||||
@ -599,19 +476,19 @@ async function WareList(firstLocation: any) {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
})
|
})
|
||||||
console.log(res)
|
|
||||||
state.locDecList = res.data
|
state.locDecList = res.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error fetching children for item `, error)
|
console.error(`Error fetching children for item `, error)
|
||||||
// 处理错误,可能设置一些默认值或标记该项为出错
|
// 处理错误,可能设置一些默认值或标记该项为出错
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function changeWare(e: any) {
|
function changeWare(erplocation: any,erpfactoryName: any) {
|
||||||
let queryParam = {
|
let queryParam = {
|
||||||
queryId: 'getUseLocation',
|
queryId: 'getUseLocation',
|
||||||
version: '00001',
|
version: '00001',
|
||||||
params: {
|
params: {
|
||||||
ERPLOCATIONNAME: e
|
ERPLOCATIONNAME: erplocation,
|
||||||
|
ERPFACTORYNAME: erpfactoryName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getQueryList(queryParam)
|
getQueryList(queryParam)
|
||||||
@ -623,30 +500,19 @@ function changeWare(e: any) {
|
|||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
//获取所有的箱
|
//获取所有的箱
|
||||||
function getAllPackingList(invType) {
|
function getAllPackingList() {
|
||||||
let queryParam = {
|
let queryParam = {
|
||||||
queryId: 'getAllPackingList',
|
queryId: 'getAllPackingList',
|
||||||
version: 'DC0001',
|
version: 'Z00001_SAP',
|
||||||
params: {
|
params: {
|
||||||
SITENAME: 'SDK',
|
SITENAME: 'SDK',
|
||||||
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
||||||
SHIPREQUESTTYPE: '4E'
|
SHIPREQUESTTYPE: '4E'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invType == "TF") {
|
|
||||||
queryParam = {
|
|
||||||
queryId: 'getAllPackingList',
|
|
||||||
version: 'TF0001',
|
|
||||||
params: {
|
|
||||||
SITENAME: 'SDK',
|
|
||||||
SHIPREQUESTNAME: state.formData.SHIPREQUESTNAME, //预留单
|
|
||||||
SHIPREQUESTTYPE: '4E'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
state.formData.ERPRECEIVELOCATION = ''
|
state.formData.ERPRECEIVELOCATION = ''
|
||||||
getQueryList(queryParam)
|
getQueryList(queryParam)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
@ -671,34 +537,30 @@ async function StorageList(firstLocation: any) {
|
|||||||
state.queryParams.version = '00003'
|
state.queryParams.version = '00003'
|
||||||
state.queryParams.params.ERPLOCATION = firstLocation
|
state.queryParams.params.ERPLOCATION = firstLocation
|
||||||
const res = await getQueryList(state.queryParams)
|
const res = await getQueryList(state.queryParams)
|
||||||
// state.StorageSelectList = res.data
|
state.StorageSelectList = res.data
|
||||||
state.StorageSelectListAll = res.data
|
if (state.StorageSelectList.length == 0) {
|
||||||
getStorageAll('1')
|
|
||||||
if (res.data.length == 0) {
|
|
||||||
proxy.$ElMessage.info('目的货位为空!')
|
proxy.$ElMessage.info('目的货位为空!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// for (let i = 0; i < state.StorageSelectList.length; i++) {
|
||||||
|
// state.queryParams.queryId = 'Get3stStorageName'
|
||||||
|
// state.queryParams.version = '00002'
|
||||||
|
// state.queryParams.params.AREANAME = state.StorageSelectList[i].ERPLOCATION
|
||||||
|
// const childrenRes = await getQueryList(state.queryParams)
|
||||||
|
// state.StorageSelectList[i].children = childrenRes.data
|
||||||
|
// }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error fetching children for item `, error)
|
console.error(`Error fetching children for item `, error)
|
||||||
// 处理错误,可能设置一些默认值或标记该项为出错
|
// 处理错误,可能设置一些默认值或标记该项为出错
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('StorageSelectList', state.StorageSelectList)
|
console.log('StorageSelectList', state.StorageSelectList)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching initial data', error)
|
console.error('Error fetching initial data', error)
|
||||||
// 处理错误,可能重置 state 或进行其他恢复操作
|
// 处理错误,可能重置 state 或进行其他恢复操作
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getStorageAll(query: any) {
|
|
||||||
console.log(query)
|
|
||||||
let arr = state.StorageSelectListAll.filter((item: any) => {
|
|
||||||
return item.DESCRIPTION.includes(query) || item.ERPLOCATION.includes(query)
|
|
||||||
})
|
|
||||||
if (arr.length > 50) {
|
|
||||||
state.StorageSelectList = arr.slice(0, 50)
|
|
||||||
} else {
|
|
||||||
state.StorageSelectList = arr
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getDetailList() {
|
function getDetailList() {
|
||||||
let queryParam = {
|
let queryParam = {
|
||||||
queryId: 'GetSaleReturnDetail',
|
queryId: 'GetSaleReturnDetail',
|
||||||
@ -767,6 +629,76 @@ function slectItem(row: any) {
|
|||||||
state.rowItem = row
|
state.rowItem = row
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选调拨
|
||||||
|
* */
|
||||||
|
// async function transferComfirm() {
|
||||||
|
// let columnsd = [] as any
|
||||||
|
// for (let i = 0; i < state.assigned_list.length; i++) {
|
||||||
|
// if (state.assigned_list[i].MATERIALPACKINGNAME == res.data[0].MATERIALPACKINGNAME) {
|
||||||
|
// ElMessageBox.alert('此标签已经绑定!', '提醒框', {
|
||||||
|
// confirmButtonText: 'OK'
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // for (let i = 0; i < state.undistributed_list.length; i++) {
|
||||||
|
// // if (
|
||||||
|
// // state.undistributed_list[i].SHIPREQUESTNAME == res.data[0].SHIPREQUESTNAME &&
|
||||||
|
// // state.undistributed_list[i].SHIPREQUESTDETAILNAME == res.data[0].SHIPREQUESTDETAILNAME
|
||||||
|
// // ) {
|
||||||
|
// // state.formData.ToSHIPREQUEST = res.data[0].SHIPREQUESTNAME
|
||||||
|
// // state.formData.ToSHIPREQUESTDetail = res.data[0].SHIPREQUESTDETAILNAME
|
||||||
|
// // columnsd = res.data[0]
|
||||||
|
// // state.ThisFlag = true
|
||||||
|
// // break
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // if (state.ThisFlag == true) {
|
||||||
|
// if (state.TransportTaskChoose.length) {
|
||||||
|
// // state.TransportTaskChoose // 选中的箱
|
||||||
|
// const boxList = state.TransportTaskChoose.map((item: any) => item.MATERIALPACKINGNAME) || [];
|
||||||
|
// const qtyList = state.TransportTaskChoose.map((item: any) => item.MATERIALQUANTITY) || []
|
||||||
|
// console.log('boxList', state.TransportTaskChoose, qtyList)
|
||||||
|
// await BpelEvent({
|
||||||
|
// header: {
|
||||||
|
// MESSAGENAME: 'AssignReceiveRequestToBox',
|
||||||
|
// LANGUAGE: 'Chinese',
|
||||||
|
// userId: localStorage.getItem('userId') || '10975133'
|
||||||
|
// },
|
||||||
|
// body: {
|
||||||
|
// SITENAME: localStorage.getItem('SITENAME') || 'SDK',
|
||||||
|
// SHIPREQUESTDETAILNAME: state.TransportTaskChoose[0].SHIPREQUESTDETAILNAME,
|
||||||
|
// SHIPREQUESTNAME: state.TransportTaskChoose[0].SHIPREQUESTNAME,
|
||||||
|
// LOCATIONNAME: state.StorageSelect[0],
|
||||||
|
// // MATERIALPACKINGNAME: state.TransportTaskChoose[0].MATERIALPACKINGNAME,
|
||||||
|
// // MATERIALQUANTITY: state.TransportTaskChoose[0].MATERIALQUANTITY
|
||||||
|
// MATERIALPACKINGNAME: boxList.join(';'),
|
||||||
|
// MATERIALQUANTITY: qtyList.join(';'),
|
||||||
|
// }
|
||||||
|
// }).then((res: any) => {
|
||||||
|
// console.log(666)
|
||||||
|
// if (res.code == '0') {
|
||||||
|
// columnsd.LOCATIONNAME = state.StorageSelect[1]
|
||||||
|
// state.assigned_list.push({ ...columnsd })
|
||||||
|
// state.StorageSelect = []
|
||||||
|
// ElMessageBox.alert('成功', '提醒框', {
|
||||||
|
// confirmButtonText: 'OK'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }).catch((error: any) => {
|
||||||
|
// console.log(2222)
|
||||||
|
// ElMessageBox.alert(error, '提醒框', {
|
||||||
|
// confirmButtonText: 'OK'
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
|
// }else {
|
||||||
|
// ElMessageBox.alert('请选择单据', '提醒框', {
|
||||||
|
// confirmButtonText: 'OK'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回车查询批次信息
|
* 回车查询批次信息
|
||||||
@ -818,9 +750,9 @@ async function getBatch() {
|
|||||||
}
|
}
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
columnsd.LOCATIONNAME = state.StorageSelect
|
columnsd.LOCATIONNAME = state.StorageSelect[1]
|
||||||
state.assigned_list.push({ ...columnsd })
|
state.assigned_list.push({ ...columnsd })
|
||||||
state.StorageSelect = ''
|
state.StorageSelect = []
|
||||||
ElMessageBox.alert('绑定成功', '提醒框', {
|
ElMessageBox.alert('绑定成功', '提醒框', {
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
})
|
})
|
||||||
@ -905,13 +837,4 @@ function stockIn() {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.page-table-title {
|
|
||||||
display: flex;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 32px;
|
|
||||||
padding: 5px 0;
|
|
||||||
.page-table-title-left {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user