Browse Source

发料失去焦点校验提示

intex
zhang_li 6 days ago
parent
commit
0ef262eda7
  1. 46
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  2. 4
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

46
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -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" />
@ -955,8 +955,13 @@ const blurWarehouse = async ()=>{
if(verifyRes&&verifyRes.length>0){
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(',')
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'){
@ -968,7 +973,12 @@ const blurWarehouse = async ()=>{
if(verifyRes&&verifyRes.length>0){
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(',')
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] = ''
}
@ -995,8 +1010,13 @@ const blurWarehouse = async ()=>{
if(verifyRes&&verifyRes.length>0){
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(',')
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(',')
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)
//

4
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -1085,6 +1085,10 @@ const blurWarehouse = async ({module='config',type})=>{
//
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 + '没有找到对应数据')
}
}

Loading…
Cancel
Save