|
|
@ -287,12 +287,19 @@ |
|
|
|
:key="'库存事务Operator'+cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-input key="库存事务Value" |
|
|
|
<!-- <el-input key="库存事务Value" |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请输入库存事务,多个库存事务以逗号分隔" |
|
|
|
clearable |
|
|
|
style="flex: 1" |
|
|
|
/> |
|
|
|
/> --> |
|
|
|
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" v-model="item.Value" @blur="blurTransactionType"> |
|
|
|
<template #suffix> |
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -331,7 +338,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- 仓库 --> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode"> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode" @blur="blurWarehouse"> |
|
|
|
<template #suffix> |
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
@ -340,7 +347,7 @@ |
|
|
|
</el-input> |
|
|
|
|
|
|
|
<!-- 库区 --> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode"> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode" @blur="blurWarehouse"> |
|
|
|
<template #suffix> |
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
@ -349,7 +356,7 @@ |
|
|
|
</el-input> |
|
|
|
|
|
|
|
<!-- 库位组 --> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode"> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode" @blur="blurWarehouse"> |
|
|
|
<template #suffix> |
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
@ -358,7 +365,7 @@ |
|
|
|
</el-input> |
|
|
|
|
|
|
|
<!-- 库位 --> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode"> |
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode" @blur="blurWarehouse"> |
|
|
|
<template #suffix> |
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
@ -583,6 +590,8 @@ import * as LocationApi from '@/api/wms/location' |
|
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
import { isString } from '@/utils/is' |
|
|
|
import * as TransactiontypeApi from '@/api/wms/transactiontype' |
|
|
|
import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data' |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -883,10 +892,104 @@ const searchWarehouse = ()=>{ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
const blurWarehouse = async ()=>{ |
|
|
|
// 校验的值 |
|
|
|
let warehouseValue = formData.value.configuration[warehouseType.value] |
|
|
|
if(warehouseType.value == 'WarehouseCode'){ |
|
|
|
// 仓库 |
|
|
|
let verifyRes = await WarehouseApi.verifyWarehouse({ |
|
|
|
code:warehouseValue |
|
|
|
}) |
|
|
|
console.log('仓库verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
formData.value.configuration[warehouseType.value] = verifyRes.map(item=>(item['code'])).join(',') |
|
|
|
}else{ |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
}else if(warehouseType.value == 'AreaCode'){ |
|
|
|
// 库区 |
|
|
|
let verifyRes = await AreaApi.verifyAreaList({ |
|
|
|
code:warehouseValue |
|
|
|
}) |
|
|
|
console.log('库区verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
formData.value.configuration[warehouseType.value] = verifyRes.map(item=>(item['code'])).join(',') |
|
|
|
}else{ |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
}else if(warehouseType.value == 'LocationGroupCode'){ |
|
|
|
// 库位组 |
|
|
|
let verifyRes = await LocationgroupApi.verifyLocationgroup({ |
|
|
|
code:warehouseValue |
|
|
|
}) |
|
|
|
console.log('库位组verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
formData.value.configuration[warehouseType.value] = verifyRes.map(item=>(item['code'])).join(',') |
|
|
|
}else{ |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
|
|
|
|
}else if(warehouseType.value == 'LocationCode'){ |
|
|
|
// 库位 |
|
|
|
let verifyRes = await LocationApi.verifyLocation({ |
|
|
|
code:warehouseValue |
|
|
|
}) |
|
|
|
console.log('库位组verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
formData.value.configuration[warehouseType.value] = verifyRes.map(item=>(item['code'])).join(',') |
|
|
|
}else{ |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode'] |
|
|
|
fields.forEach(item=>{ |
|
|
|
if(item!=warehouseType.value){ |
|
|
|
formData.value.configuration[item] = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
//事务类型 |
|
|
|
const searchTransactionType = ()=>{ |
|
|
|
searchTableRef.value.open( |
|
|
|
'请选择事务类型', |
|
|
|
Transactiontype.allSchemas, |
|
|
|
TransactiontypeApi.getTransactiontypePage, |
|
|
|
'TransactionType', |
|
|
|
'code', |
|
|
|
true, |
|
|
|
undefined, |
|
|
|
undefined, |
|
|
|
undefined |
|
|
|
) |
|
|
|
} |
|
|
|
// 失去焦点校验 |
|
|
|
const blurTransactionType = async ()=>{ |
|
|
|
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
|
if(transactionType){ |
|
|
|
let verifyRes = await TransactiontypeApi.verifyTransactiontype({ |
|
|
|
code:transactionType.Value |
|
|
|
}) |
|
|
|
console.log('事务类型verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
transactionType.Value = verifyRes.map(item=>(item['code'])).join(',') |
|
|
|
}else{ |
|
|
|
transactionType.Value = '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const searchTableSuccess = (formField, searchField, val, type, row) => { |
|
|
|
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' |
|
|
|
console.log('searchTableSuccess',formField, searchField, val, type, row) |
|
|
|
console.log(val.map(item=>(item['code'])).join(',')) |
|
|
|
if(formField=='TransactionType'){ |
|
|
|
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
|
if(transactionType){ |
|
|
|
transactionType.Value = val.map(item=>(item['code'])).join(',') |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
formData.value.configuration[warehouseType.value] = val.map(item=>(item['code'])).join(',') |
|
|
|
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode'] |
|
|
|
fields.forEach(item=>{ |
|
|
|