|
@ -369,9 +369,9 @@ |
|
|
:key="'库存事务Operator'+cur.value" |
|
|
:key="'库存事务Operator'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurTransactionType"> |
|
|
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurBusinessType"> |
|
|
<template #suffix> |
|
|
<template #suffix> |
|
|
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType"> |
|
|
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactiontype"> |
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
@ -392,7 +392,7 @@ |
|
|
:key="'业务类型Operator'+cur.value" |
|
|
:key="'业务类型Operator'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-input key="业务类型Value" style="flex:1" placeholder="请选择业务类型" disabled v-model="item.Value" @blur="blurTransactionType"> |
|
|
<el-input key="业务类型Value" style="flex:1" placeholder="请选择业务类型" disabled v-model="item.Value" @blur="blurBusinessType"> |
|
|
<template #suffix> |
|
|
<template #suffix> |
|
|
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchBusinessType"> |
|
|
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchBusinessType"> |
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
@ -751,7 +751,7 @@ const formData = ref({ |
|
|
// // 存储类型 |
|
|
// // 存储类型 |
|
|
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, |
|
|
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, |
|
|
// 库存事务 // 业务类型 |
|
|
// 库存事务 // 业务类型 |
|
|
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }, |
|
|
{ ParamCode: 'BusinessType', Operator: 'IN', Value: '' }, |
|
|
], |
|
|
], |
|
|
configuration: { |
|
|
configuration: { |
|
|
// 仓库代码 |
|
|
// 仓库代码 |
|
@ -1099,7 +1099,7 @@ const searchBusinessType = ()=>{ |
|
|
'请选择业务类型', |
|
|
'请选择业务类型', |
|
|
Businesstype.allSchemas, |
|
|
Businesstype.allSchemas, |
|
|
BusinesstypeApi.getBusinesstypePage, |
|
|
BusinesstypeApi.getBusinesstypePage, |
|
|
'TransactionType', |
|
|
'BusinessType', |
|
|
'code', |
|
|
'code', |
|
|
true, |
|
|
true, |
|
|
undefined, |
|
|
undefined, |
|
@ -1108,12 +1108,12 @@ const searchBusinessType = ()=>{ |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
//事务类型 |
|
|
//事务类型 |
|
|
const searchTransactionType = ()=>{ |
|
|
const searchTransactiontype = ()=>{ |
|
|
searchTableRef.value.open( |
|
|
searchTableRef.value.open( |
|
|
'请选择事务类型', |
|
|
'请选择事务类型', |
|
|
Transactiontype.allSchemas, |
|
|
Transactiontype.allSchemas, |
|
|
TransactiontypeApi.getTransactiontypePage, |
|
|
TransactiontypeApi.getTransactiontypePage, |
|
|
'TransactionType', |
|
|
'BusinessType', |
|
|
'code', |
|
|
'code', |
|
|
true, |
|
|
true, |
|
|
undefined, |
|
|
undefined, |
|
@ -1121,21 +1121,22 @@ const searchTransactionType = ()=>{ |
|
|
undefined |
|
|
undefined |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 失去焦点校验 |
|
|
// 失去焦点校验 |
|
|
const blurTransactionType = async ()=>{ |
|
|
const blurBusinessType = async ()=>{ |
|
|
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
let BusinessType = formData.value.condition.find(item=>item['ParamCode']=='BusinessType') |
|
|
console.log('transactionType',transactionType) |
|
|
console.log('BusinessType',BusinessType) |
|
|
if(transactionType&&transactionType.Value){ |
|
|
if(BusinessType&&BusinessType.Value){ |
|
|
let verifyRes = await TransactiontypeApi.verifyTransactiontype({ |
|
|
let verifyRes = await TransactiontypeApi.verifyTransactiontype({ |
|
|
code:transactionType.Value |
|
|
code:BusinessType.Value |
|
|
}) |
|
|
}) |
|
|
console.log('事务类型verifyRes',verifyRes) |
|
|
console.log('事务类型verifyRes',verifyRes) |
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
let codeList = transactionType.Value.split(',') |
|
|
let codeList = BusinessType.Value.split(',') |
|
|
transactionType.Value = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',') |
|
|
BusinessType.Value = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',') |
|
|
}else{ |
|
|
}else{ |
|
|
transactionType.Value = '' |
|
|
BusinessType.Value = '' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1143,15 +1144,18 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { |
|
|
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' |
|
|
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' |
|
|
console.log('searchTableSuccess',formField, searchField, val, type, row) |
|
|
console.log('searchTableSuccess',formField, searchField, val, type, row) |
|
|
console.log(val.map(item=>(item['code'])).join(',')) |
|
|
console.log(val.map(item=>(item['code'])).join(',')) |
|
|
// if(formField=='TransactionType'){ |
|
|
// if(formField=='BusinessType'){ |
|
|
// let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
// let BusinessType = formData.value.condition.find(item=>item['ParamCode']=='BusinessType') |
|
|
// if(transactionType){ |
|
|
// if(BusinessType){ |
|
|
// transactionType.Value = val.map(item=>(item['code'])).join(',') |
|
|
// BusinessType.Value = val.map(item=>(item['code'])).join(',') |
|
|
// } |
|
|
// } |
|
|
// return |
|
|
// return |
|
|
// }else |
|
|
// }else |
|
|
if(formField=='TransactionType'){ |
|
|
if(formField=='BusinessType'){ |
|
|
let businessType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
console.log('condition',formData.value.condition) |
|
|
|
|
|
debugger |
|
|
|
|
|
let businessType = formData.value.condition.find(item=>item['ParamCode']=='BusinessType') |
|
|
|
|
|
console.log('businessType',businessType) |
|
|
if(businessType){ |
|
|
if(businessType){ |
|
|
businessType.Value = val.map(item=>(item['code'])).join(',') |
|
|
businessType.Value = val.map(item=>(item['code'])).join(',') |
|
|
} |
|
|
} |
|
@ -1291,11 +1295,11 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
/** 提交表单 */ |
|
|
/** 提交表单 */ |
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|
|
const submitForm = async () => { |
|
|
const submitForm = async () => { |
|
|
let TransactionType = formData.value.condition[2]['Value'] |
|
|
let BusinessType = formData.value.condition[2]['Value'] |
|
|
if(Array.isArray(TransactionType)){ |
|
|
if(Array.isArray(BusinessType)){ |
|
|
TransactionType = TransactionType.join(',') |
|
|
BusinessType = BusinessType.join(',') |
|
|
} |
|
|
} |
|
|
if(TransactionType=='Repleinment'){ |
|
|
if(BusinessType=='Repleinment'){ |
|
|
//补料--物料和库位必填 |
|
|
//补料--物料和库位必填 |
|
|
let msg = '' |
|
|
let msg = '' |
|
|
let itemCodeType = formData.value.condition[1]['ParamCode'] |
|
|
let itemCodeType = formData.value.condition[1]['ParamCode'] |
|
@ -1323,7 +1327,7 @@ const submitForm = async () => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
await blurWarehouse({module:'config',type:warehouseType.value}) |
|
|
await blurWarehouse({module:'config',type:warehouseType.value}) |
|
|
// await blurTransactionType() |
|
|
// await blurBusinessType() |
|
|
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){ |
|
|
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){ |
|
|
// 仓库 |
|
|
// 仓库 |
|
|
message.error('请选择仓库') |
|
|
message.error('请选择仓库') |
|
@ -1426,7 +1430,7 @@ const resetForm = () => { |
|
|
// // 存储类型 |
|
|
// // 存储类型 |
|
|
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, |
|
|
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] }, |
|
|
// 库存事务 // 业务类型 |
|
|
// 库存事务 // 业务类型 |
|
|
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }, |
|
|
{ ParamCode: 'BusinessType', Operator: 'IN', Value: '' }, |
|
|
], |
|
|
], |
|
|
configuration: { |
|
|
configuration: { |
|
|
// 仓库代码 |
|
|
// 仓库代码 |
|
|