Browse Source

YT-1138规则配置填写,填写不存在的应提示,如仓库不存在,现输入后直接清空

intex
zhang_li 1 day ago
parent
commit
add596bc0b
  1. 10
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  2. 34
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

10
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

@ -271,7 +271,7 @@
</el-input>
<!-- 库区 -->
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择从库区" v-model="formData.configuration.AreaCode" @blur="({module:'config',type:'AreaCode'})">
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择从库区" v-model="formData.configuration.AreaCode" @blur="blurWarehouse({module:'config',type:'AreaCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click.stop="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
@ -281,7 +281,7 @@
<!-- 库位组 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择从库位组" v-model="formData.configuration.LocationGroupCode" @blur="({module:'config',type:'LocationGroupCode'})">
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择从库位组" v-model="formData.configuration.LocationGroupCode" @blur="blurWarehouse({module:'config',type:'LocationGroupCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click.stop="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
@ -290,7 +290,7 @@
</el-input>
<!-- 库位 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择从库位" v-model="formData.configuration.LocationCode" @blur="({module:'config',type:'LocationCode'})">
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择从库位" v-model="formData.configuration.LocationCode" @blur="blurWarehouse({module:'config',type:'LocationCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click.stop="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
@ -755,7 +755,9 @@ const filterMethodWarehouseList = (query: string) => {
const searchTableRef = ref()
const blurWarehouse = async ({module='config',type})=>{
const blurWarehouse = async ({ module = 'config', type }) => {
console.log(22,warehouseType.value)
console.log(22,module)
//
let warehouseValue = formData.value.configuration[warehouseType.value]

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

@ -215,7 +215,7 @@
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料" style="flex:1" placeholder="请输入物料,多个物料以逗号分隔" disabled v-else-if="item.ParamCode == 'ItemCode'"v-model="item.Value" :disabled="formData.priority==0&&formType=='update'">
<el-input key="物料" style="flex:1" placeholder="请输入物料,多个物料以逗号分隔" v-else-if="item.ParamCode == 'ItemCode'"v-model="item.Value" :disabled="formData.priority==0&&formType=='update'" @blur="blurVerify('ItemCode')">
<template #suffix>
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click.stop="searchItemCode">
<Icon icon="ep:search" class="mr-5px" />
@ -341,7 +341,7 @@
:key="'生产线Operator'+cur.value"
/>
</el-select>
<el-input key="生产线Value" style="flex:1" placeholder="请选择生产线" v-model="item.Value" @blur="blurProductionline"
<el-input key="生产线Value" style="flex:1" placeholder="请选择生产线" v-model="item.Value" @blur="blurVerify('Productionline')"
:disabled="formData.priority==0&&formType=='update'">
<template #suffix>
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click.stop="searchTransactionType">
@ -659,12 +659,7 @@
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'UpShelfStrategyAddForm' })
import { getSupplierList } from '@/api/wms/supplier'
import { getCustomerList } from '@/api/wms/customer'
import { getWarehouseList } from '@/api/wms/warehouse'
import { getAreaList } from '@/api/wms/areabasic'
import { getLocationgroupList } from '@/api/wms/locationgroup'
import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
@ -676,6 +671,8 @@ import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locat
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { isString } from '@/utils/is'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
@ -981,6 +978,7 @@ const blurWarehouse = async ()=>{
message.alert('代码' + str + '没有找到对应数据')
}
}else{
message.alert('代码' + formData.value.configuration[warehouseType.value] + '没有找到对应数据')
formData.value.configuration[warehouseType.value] = ''
}
}else if(warehouseType.value == 'LocationGroupCode'){
@ -1062,13 +1060,21 @@ const searchTransactionType = ()=>{
)
}
//
const blurProductionline= async ()=>{
let transactionType = formData.value.condition.find(item => item['ParamCode'] == 'Productionline')
const blurVerify= async (type)=>{
let transactionType = formData.value.condition.find(item => item['ParamCode'] == type)
console.log(transactionType)
if(transactionType&&transactionType.Value){
let verifyRes = await ProductionlineApi.getProductionlineByCodes({
codes:transactionType.Value
})
if (transactionType && transactionType.Value) {
let verifyRes =null
if (type == 'ItemCode') {
verifyRes = await ItembasicApi.getItemListByCodes({
codes:transactionType.Value
})
}else if (type == 'Productionline') {
verifyRes = await ProductionlineApi.getProductionlineByCodes({
codes:transactionType.Value
})
}
console.log('事务类型verifyRes',verifyRes)
if(verifyRes&&verifyRes.length>0){
let verifyList = verifyRes.map(item=>(item['code']))

Loading…
Cancel
Save