Browse Source

HL-5281、HL-5538 上架策略 下架策略

hella_online_20240823
wangyufei 3 months ago
parent
commit
52b2271849
  1. 4
      src/api/wms/areabasic/index.ts
  2. 5
      src/api/wms/location/index.ts
  3. 4
      src/api/wms/locationgroup/index.ts
  4. 6
      src/api/wms/transactiontype/index.ts
  5. 7
      src/api/wms/warehouse/index.ts
  6. 85
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  7. 115
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

4
src/api/wms/areabasic/index.ts

@ -32,6 +32,10 @@ export const selectAreabasicDOByCode = async (locationCode: String) => {
export const getAreaList = async (params) => {
return await request.get({ url: `/wms/areabasic/list`, params })
}
// 校验库区
export const verifyAreaList = async (params) => {
return await request.get({ url: `/wms/areabasic/listAreabasicByCode`, params })
}
// 查询库区详情
export const getArea = async (id: number) => {
return await request.get({ url: `/wms/areabasic/get?id=` + id })

5
src/api/wms/location/index.ts

@ -34,7 +34,10 @@ export const getLocationPage = async (params) => {
return await request.get({ url: `/wms/location/page`, params })
}
}
// 校验库位
export const verifyLocation = async (params) => {
return await request.get({ url: `/wms/location/listLocationByCode`, params })
}
export const getLocationMPage = async (params) => {
if (params.isSearch) {
delete params.isSearch

4
src/api/wms/locationgroup/index.ts

@ -22,6 +22,10 @@ export const getLocationgroupPage = async (params) => {
return await request.get({ url: `/wms/locationgroup/page`, params })
}
}
// 校验库位组
export const verifyLocationgroup = async (params) => {
return await request.get({ url: `/wms/locationgroup/ListByCode`, params })
}
// 查询库位组列表
export const getLocationgroupList = async (params) => {
return await request.get({ url: `/wms/locationgroup/list`, params })

6
src/api/wms/transactiontype/index.ts

@ -24,6 +24,12 @@ export const getTransactiontypePage = async (params) => {
}
}
// 校验事务类型列表
export const verifyTransactiontype = async (params) => {
return await request.get({ url: `/wms/transactiontype/ListByCode`, params })
}
// 查询事务类型详情
export const getTransactiontype = async (id: number) => {
return await request.get({ url: `/wms/transactiontype/get?id=` + id })

7
src/api/wms/warehouse/index.ts

@ -21,6 +21,13 @@ export const getWarehousePage = async (params) => {
return await request.get({ url: `/wms/warehouse/page`, params })
}
}
// 校验仓库
export const verifyWarehouse = async (params) => {
return await request.get({ url: `/wms/warehouse/ListByCode`, params })
}
// 查询仓库所有列表
export const getWarehouseList = async (params) => {
return await request.get({ url: `/wms/warehouse/list`, params })

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

@ -311,7 +311,7 @@
clearable
style="flex: 1"
/> -->
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" v-model="item.Value">
<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" />
@ -344,7 +344,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" />
@ -353,7 +353,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" />
@ -363,7 +363,7 @@
<!-- 库位组 -->
<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" />
@ -372,7 +372,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" />
@ -917,6 +917,64 @@ const filterMethodWarehouseList = (query: string) => {
const searchTableRef = ref()
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(
@ -931,6 +989,23 @@ const searchTransactionType = ()=>{
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 searchWarehouse = ()=>{
if(warehouseType.value == 'WarehouseCode'){

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

@ -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=>{

Loading…
Cancel
Save