|
@ -310,7 +310,6 @@ |
|
|
v-model="warehouseType" |
|
|
v-model="warehouseType" |
|
|
placeholder="" |
|
|
placeholder="" |
|
|
style="width: 110px; margin-right: 10px" |
|
|
style="width: 110px; margin-right: 10px" |
|
|
@change="changeWarehouse" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
:label="cur.label" |
|
|
:label="cur.label" |
|
@ -319,7 +318,45 @@ |
|
|
:key="'仓库'+cur.value" |
|
|
:key="'仓库'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-select |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 仓库 --> |
|
|
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode"> |
|
|
|
|
|
<template #suffix> |
|
|
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 库区 --> |
|
|
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode"> |
|
|
|
|
|
<template #suffix> |
|
|
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 库位组 --> |
|
|
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode"> |
|
|
|
|
|
<template #suffix> |
|
|
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 库位 --> |
|
|
|
|
|
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode"> |
|
|
|
|
|
<template #suffix> |
|
|
|
|
|
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse"> |
|
|
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
<!-- <el-select |
|
|
v-model="formData.configuration.WarehouseCode" |
|
|
v-model="formData.configuration.WarehouseCode" |
|
|
v-if="warehouseType == 'WarehouseCode'" |
|
|
v-if="warehouseType == 'WarehouseCode'" |
|
|
placeholder="请选择仓库" |
|
|
placeholder="请选择仓库" |
|
@ -387,7 +424,7 @@ |
|
|
:label="cur.code" |
|
|
:label="cur.code" |
|
|
:value="cur.code" |
|
|
:value="cur.code" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> --> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<!-- 数量排序方向 --> |
|
|
<!-- 数量排序方向 --> |
|
@ -560,6 +597,10 @@ |
|
|
<TableHead :HeadButttondata="Butttondata" @buttonBaseClick="buttonBaseClick" /> |
|
|
<TableHead :HeadButttondata="Butttondata" @buttonBaseClick="buttonBaseClick" /> |
|
|
</template> |
|
|
</template> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
|
|
|
<SearchTable |
|
|
|
|
|
ref="searchTableRef" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
@ -571,7 +612,15 @@ import { getAreaList } from '@/api/wms/areabasic' |
|
|
import { getLocationgroupList } from '@/api/wms/locationgroup' |
|
|
import { getLocationgroupList } from '@/api/wms/locationgroup' |
|
|
import { getLocationList } from '@/api/wms/location' |
|
|
import { getLocationList } from '@/api/wms/location' |
|
|
import * as RuleApi from '@/api/wms/rule' |
|
|
import * as RuleApi from '@/api/wms/rule' |
|
|
|
|
|
import * as WarehouseApi from '@/api/wms/warehouse' |
|
|
|
|
|
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' |
|
|
|
|
|
import * as AreaApi from '@/api/wms/areabasic' |
|
|
|
|
|
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' |
|
|
|
|
|
import * as LocationgroupApi from '@/api/wms/locationgroup' |
|
|
|
|
|
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data' |
|
|
|
|
|
|
|
|
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
import { isString } from '@/utils/is' |
|
|
import { isString } from '@/utils/is' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
@ -836,7 +885,81 @@ const filterMethodWarehouseList = (query: string) => { |
|
|
options.warehouseList = options.originWarehouseList |
|
|
options.warehouseList = options.originWarehouseList |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
getFormWarehouseList() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const searchTableRef = ref() |
|
|
|
|
|
const searchWarehouse = ()=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(warehouseType.value == 'WarehouseCode'){ |
|
|
|
|
|
// 仓库 |
|
|
|
|
|
searchTableRef.value.open( |
|
|
|
|
|
'请选择仓库', |
|
|
|
|
|
Warehouse.allSchemas, |
|
|
|
|
|
WarehouseApi.getWarehousePage, |
|
|
|
|
|
'WarehouseCode', |
|
|
|
|
|
'code', |
|
|
|
|
|
true, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined |
|
|
|
|
|
) |
|
|
|
|
|
}else if(warehouseType.value == 'AreaCode'){ |
|
|
|
|
|
searchTableRef.value.open( |
|
|
|
|
|
'请选择库区', |
|
|
|
|
|
Area.allSchemas, |
|
|
|
|
|
AreaApi.getAreaPage, |
|
|
|
|
|
'WarehouseCode', |
|
|
|
|
|
'code', |
|
|
|
|
|
true, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
}else if(warehouseType.value == 'LocationGroupCode'){ |
|
|
|
|
|
|
|
|
|
|
|
searchTableRef.value.open( |
|
|
|
|
|
'请选择库位组', |
|
|
|
|
|
Locationgroup.allSchemas, |
|
|
|
|
|
LocationgroupApi.getLocationgroupPage, |
|
|
|
|
|
'WarehouseCode', |
|
|
|
|
|
'code', |
|
|
|
|
|
true, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
}else if(warehouseType.value == 'LocationCode'){ |
|
|
|
|
|
searchTableRef.value.open( |
|
|
|
|
|
'请选择库位', |
|
|
|
|
|
Location.allSchemas, |
|
|
|
|
|
LocationApi.getLocationPage, |
|
|
|
|
|
'WarehouseCode', |
|
|
|
|
|
'code', |
|
|
|
|
|
true, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined, |
|
|
|
|
|
undefined |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
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(',')) |
|
|
|
|
|
formData.value.configuration[warehouseType.value] = val.map(item=>(item['code'])).join(',') |
|
|
|
|
|
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode'] |
|
|
|
|
|
fields.forEach(item=>{ |
|
|
|
|
|
if(item!=warehouseType.value){ |
|
|
|
|
|
formData.value.configuration[item] = '' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
// getFormWarehouseList() |
|
|
// 选择仓库/库位/库位组/库区 |
|
|
// 选择仓库/库位/库位组/库区 |
|
|
const changeWarehouse = (e) => { |
|
|
const changeWarehouse = (e) => { |
|
|
formData.value.configuration.WarehouseCode = '' |
|
|
formData.value.configuration.WarehouseCode = '' |
|
@ -906,25 +1029,25 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
formData.value.configuration.WarehouseCode |
|
|
formData.value.configuration.WarehouseCode |
|
|
) { |
|
|
) { |
|
|
warehouseType.value = 'WarehouseCode' |
|
|
warehouseType.value = 'WarehouseCode' |
|
|
getFormWarehouseList() |
|
|
// getFormWarehouseList() |
|
|
} else if ( |
|
|
} else if ( |
|
|
'AreaCode' in formData.value.configuration && |
|
|
'AreaCode' in formData.value.configuration && |
|
|
formData.value.configuration.AreaCode |
|
|
formData.value.configuration.AreaCode |
|
|
) { |
|
|
) { |
|
|
warehouseType.value = 'AreaCode' |
|
|
warehouseType.value = 'AreaCode' |
|
|
getFormAreaList() |
|
|
// getFormAreaList() |
|
|
} else if ( |
|
|
} else if ( |
|
|
'LocationGroupCode' in formData.value.configuration && |
|
|
'LocationGroupCode' in formData.value.configuration && |
|
|
formData.value.configuration.LocationGroupCode |
|
|
formData.value.configuration.LocationGroupCode |
|
|
) { |
|
|
) { |
|
|
warehouseType.value = 'LocationGroupCode' |
|
|
warehouseType.value = 'LocationGroupCode' |
|
|
getFormLocationgrouList() |
|
|
// getFormLocationgrouList() |
|
|
} else if ( |
|
|
} else if ( |
|
|
'LocationCode' in formData.value.configuration && |
|
|
'LocationCode' in formData.value.configuration && |
|
|
formData.value.configuration.LocationCode |
|
|
formData.value.configuration.LocationCode |
|
|
) { |
|
|
) { |
|
|
warehouseType.value = 'LocationCode' |
|
|
warehouseType.value = 'LocationCode' |
|
|
getFormLocationList() |
|
|
// getFormLocationList() |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
} finally { |
|
|
formLoading.value = false |
|
|
formLoading.value = false |
|
|