|
|
@ -341,7 +341,7 @@ |
|
|
|
:key="'生产线Operator'+cur.value" |
|
|
|
/> |
|
|
|
</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="请选择生产线" v-model="item.Value" @blur="blurProductionline"> |
|
|
|
<template #suffix> |
|
|
|
<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" /> |
|
|
@ -956,7 +956,12 @@ const blurWarehouse = async ()=>{ |
|
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
|
let codeList = formData.value.configuration[warehouseType.value].split(',') |
|
|
|
formData.value.configuration[warehouseType.value] = codeList.filter(item => verifyList.indexOf(item) > -1).join(',') |
|
|
|
const str = codeList.filter(item => verifyList.indexOf(item) == -1).join(',') |
|
|
|
if (str) { |
|
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
message.alert('代码' + formData.value.configuration[warehouseType.value] + '没有找到对应数据') |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
}else if(warehouseType.value == 'AreaCode'){ |
|
|
@ -969,6 +974,11 @@ const blurWarehouse = async ()=>{ |
|
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
|
let codeList = formData.value.configuration[warehouseType.value].split(',') |
|
|
|
formData.value.configuration[warehouseType.value] = codeList.filter(item => verifyList.indexOf(item) > -1).join(',') |
|
|
|
const str = codeList.filter(item => verifyList.indexOf(item) == -1).join(',') |
|
|
|
if (str) { |
|
|
|
message.alert('代码' + formData.value.configuration[warehouseType.value] + '没有找到对应数据') |
|
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
@ -982,7 +992,12 @@ const blurWarehouse = async ()=>{ |
|
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
|
let codeList = formData.value.configuration[warehouseType.value].split(',') |
|
|
|
formData.value.configuration[warehouseType.value] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',') |
|
|
|
const str = codeList.filter(item => verifyList.indexOf(item) == -1).join(',') |
|
|
|
if (str) { |
|
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
message.alert('代码' + formData.value.configuration[warehouseType.value] + '没有找到对应数据') |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
|
|
|
@ -996,7 +1011,12 @@ const blurWarehouse = async ()=>{ |
|
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
|
let codeList = formData.value.configuration[warehouseType.value].split(',') |
|
|
|
formData.value.configuration[warehouseType.value] = codeList.filter(item => verifyList.indexOf(item) > -1).join(',') |
|
|
|
const str = codeList.filter(item => verifyList.indexOf(item) == -1).join(',') |
|
|
|
if (str) { |
|
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
message.alert('代码' + formData.value.configuration[warehouseType.value] + '没有找到对应数据') |
|
|
|
formData.value.configuration[warehouseType.value] = '' |
|
|
|
} |
|
|
|
} |
|
|
@ -1041,18 +1061,24 @@ const searchTransactionType = ()=>{ |
|
|
|
) |
|
|
|
} |
|
|
|
// 失去焦点校验 |
|
|
|
const blurTransactionType = async ()=>{ |
|
|
|
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') |
|
|
|
const blurProductionline= async ()=>{ |
|
|
|
let transactionType = formData.value.condition.find(item => item['ParamCode'] == 'Productionline') |
|
|
|
console.log(transactionType) |
|
|
|
if(transactionType&&transactionType.Value){ |
|
|
|
let verifyRes = await TransactiontypeApi.verifyTransactiontype({ |
|
|
|
code:transactionType.Value |
|
|
|
let verifyRes = await ProductionlineApi.getProductionlineByCodes({ |
|
|
|
codes:transactionType.Value |
|
|
|
}) |
|
|
|
console.log('事务类型verifyRes',verifyRes) |
|
|
|
if(verifyRes&&verifyRes.length>0){ |
|
|
|
let verifyList = verifyRes.map(item=>(item['code'])) |
|
|
|
let codeList = transactionType.Value.split(',') |
|
|
|
transactionType.Value = codeList.filter(item => verifyList.indexOf(item) > -1).join(',') |
|
|
|
const str = codeList.filter(item => verifyList.indexOf(item) == -1).join(',') |
|
|
|
if (str) { |
|
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
message.alert('代码' + transactionType.Value + '没有找到对应数据') |
|
|
|
transactionType.Value = '' |
|
|
|
} |
|
|
|
} |
|
|
@ -1258,7 +1284,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|
|
|
const submitForm = async () => { |
|
|
|
await blurWarehouse() |
|
|
|
await blurTransactionType() |
|
|
|
await blurProductionline() |
|
|
|
console.log('规则条件',formData.value.condition) |
|
|
|
|
|
|
|
// 校验表单 |
|
|
|