|
@ -1,15 +1,26 @@ |
|
|
<!-- 库位存储策略弹窗弹窗 --> |
|
|
<!-- 库位存储策略弹窗弹窗 --> |
|
|
<template> |
|
|
<template> |
|
|
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px;"> |
|
|
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px"> |
|
|
<div class="p-20px m--10px" style="max-height: 50vh;overflow-y: auto;"> |
|
|
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto"> |
|
|
<el-form ref="formRef" :model="formData" :rules="rules" label-width="130px" label-position="left"> |
|
|
<el-form |
|
|
|
|
|
ref="formRef" |
|
|
|
|
|
:model="formData" |
|
|
|
|
|
:rules="rules" |
|
|
|
|
|
label-width="130px" |
|
|
|
|
|
label-position="left" |
|
|
|
|
|
> |
|
|
<!-- 规则 --> |
|
|
<!-- 规则 --> |
|
|
<div class="item"> |
|
|
<div class="item"> |
|
|
<div class="title">规则</div> |
|
|
<div class="title">规则</div> |
|
|
<el-row gutter="10"> |
|
|
<el-row gutter="10"> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="代码" prop="strategyCode"> |
|
|
<el-form-item label="代码" prop="strategyCode"> |
|
|
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled /> |
|
|
<el-input |
|
|
|
|
|
v-model="formData.strategyCode" |
|
|
|
|
|
placeholder="请输入代码" |
|
|
|
|
|
clearable |
|
|
|
|
|
disabled |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
@ -43,13 +54,41 @@ |
|
|
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index"> |
|
|
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index"> |
|
|
<!-- 仓库 库区 库位组 库位 --> |
|
|
<!-- 仓库 库区 库位组 库位 --> |
|
|
<el-form-item label="" label-width="0" class="err-130" v-if="index == 0"> |
|
|
<el-form-item label="" label-width="0" class="err-130" v-if="index == 0"> |
|
|
<el-select v-model="item.ParamCode" placeholder="" style="width: 120px;margin-right: 10px;" |
|
|
<el-select |
|
|
@change="changeWarehouse"> |
|
|
v-model="item.ParamCode" |
|
|
<el-option :label="cur.label" :value="cur.value" v-for="(cur, index) in options.warehouseTypeOptions" |
|
|
placeholder="" |
|
|
:key="index" /> |
|
|
style="width: 120px; margin-right: 10px" |
|
|
|
|
|
@change="changeWarehouse" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
:label="cur.label" |
|
|
|
|
|
:value="cur.value" |
|
|
|
|
|
v-for="(cur, index) in options.warehouseTypeOptions" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-select v-model="item.Value" :placeholder="`请选择${item.ParamCode == 'WarehouseCode'?'仓库': item.ParamCode == 'AreaCode' ? '库区' : item.ParamCode == 'LocationGroupCode' ? '库位组' : item.ParamCode == 'LocationCode' ? '库位' : ''}`" clearable style="flex: 1;"> |
|
|
<el-select |
|
|
<el-option v-for="cur in options.warehouseList" :key="cur.id" :label="cur.name" :value="cur.id" /> |
|
|
v-model="item.Value" |
|
|
|
|
|
:placeholder="`请选择${ |
|
|
|
|
|
item.ParamCode == 'WarehouseCode' |
|
|
|
|
|
? '仓库' |
|
|
|
|
|
: item.ParamCode == 'AreaCode' |
|
|
|
|
|
? '库区' |
|
|
|
|
|
: item.ParamCode == 'LocationGroupCode' |
|
|
|
|
|
? '库位组' |
|
|
|
|
|
: item.ParamCode == 'LocationCode' |
|
|
|
|
|
? '库位' |
|
|
|
|
|
: '' |
|
|
|
|
|
}`" |
|
|
|
|
|
clearable |
|
|
|
|
|
style="flex: 1" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="cur in options.warehouseList" |
|
|
|
|
|
:key="cur.id" |
|
|
|
|
|
:label="cur.name" |
|
|
|
|
|
:value="cur.id" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
@ -60,73 +99,110 @@ |
|
|
<div class="item mt-20px"> |
|
|
<div class="item mt-20px"> |
|
|
<div class="title">规则配置</div> |
|
|
<div class="title">规则配置</div> |
|
|
<el-row gutter="10"> |
|
|
<el-row gutter="10"> |
|
|
<el-col :span="index == 0 || index == 1 ? 24 : 12" v-for="(item, index) in formData.configuration" |
|
|
<el-col :span="24"> |
|
|
:key="index"> |
|
|
|
|
|
<!-- 默认库存状态 --> |
|
|
<!-- 默认库存状态 --> |
|
|
<el-form-item label="默认库存状态" class="flex-top" v-if="index == 0"> |
|
|
<el-form-item label="默认库存状态" class="flex-top"> |
|
|
<div class="checkbox"> |
|
|
<div class="checkbox"> |
|
|
<el-radio-group v-model="item.Value"> |
|
|
<el-radio-group v-model="formData.configuration.DefaultInventoryStatus"> |
|
|
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)" |
|
|
<el-radio |
|
|
:key="cur.value">{{ cur.label }}</el-radio> |
|
|
:label="cur.value" |
|
|
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)" |
|
|
|
|
|
:key="cur.value" |
|
|
|
|
|
>{{ cur.label }}</el-radio |
|
|
|
|
|
> |
|
|
</el-radio-group> |
|
|
</el-radio-group> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 溢流库位 --> |
|
|
</el-col> |
|
|
<el-form-item label="溢流库位" v-else-if="index == 1"> |
|
|
<!-- 溢流库位 --> |
|
|
<el-select v-model="item.Value" placeholder="请选择溢流库位" clearable> |
|
|
<el-col :span="24"> |
|
|
<el-option v-for="cur in options.overflowWarehouseList" :key="cur.id" :label="cur.name" |
|
|
<el-form-item label="溢流库位"> |
|
|
:value="cur.id" /> |
|
|
<el-select |
|
|
|
|
|
v-model="formData.configuration.OverflowLocationCode" |
|
|
|
|
|
placeholder="请选择溢流库位" |
|
|
|
|
|
clearable |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="cur in options.overflowWarehouseList" |
|
|
|
|
|
:key="cur.id" |
|
|
|
|
|
:label="cur.name" |
|
|
|
|
|
:value="cur.id" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许负库存 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许负库存" v-else-if="index == 2"> |
|
|
<!-- 允许负库存 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许负库存"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableNegative" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 保留零库存 --> |
|
|
</el-col> |
|
|
<el-form-item label="保留零库存" v-else-if="index == 3"> |
|
|
<!-- 保留零库存 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="保留零库存"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableKeepZero" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许领料 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许领料" v-else-if="index == 4"> |
|
|
<!-- 允许领料 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许领料"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnablePick" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许过量领料 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许过量领料" v-else-if="index == 5"> |
|
|
<!-- 允许过量领料 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许过量领料"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableOverPick" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许整包存储 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许整包存储" v-else-if="index == 6"> |
|
|
<!-- 允许整包存储 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许整包存储"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableWholeStore" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许散量存储 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许散量存储" v-else-if="index == 7"> |
|
|
<!-- 允许散量存储 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许散量存储"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableBreakStore" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许出库 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许出库" v-else-if="index == 8"> |
|
|
<!-- 允许出库 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许出库"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableShip" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许入库 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许入库" v-else-if="index == 9"> |
|
|
<!-- 允许入库 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许入库"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableReceive" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许退货到供应商 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许退货到供应商" v-else-if="index == 10"> |
|
|
<!-- 允许退货到供应商 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许退货到供应商"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableReturnToSupplier" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 允许接收客户退货 --> |
|
|
</el-col> |
|
|
<el-form-item label="允许接收客户退货" v-else-if="index == 11"> |
|
|
<!-- 允许接收客户退货 --> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="允许接收客户退货"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableReturnFromCustomer" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
<!-- 允许拆箱 --> |
|
|
<!-- 允许拆箱 --> |
|
|
<el-form-item label="允许拆箱" v-else-if="index == 12"> |
|
|
<el-col :span="12"> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-form-item label="允许拆箱"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableSplitBox" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
<!-- 允许拆托 --> |
|
|
<!-- 允许拆托 --> |
|
|
<el-form-item label="允许拆托" v-else-if="index == 13"> |
|
|
<el-col :span="12"> |
|
|
<el-switch v-model="item.Value" /> |
|
|
<el-form-item label="允许拆托"> |
|
|
|
|
|
<el-switch v-model="formData.configuration.EnableSplitPallet" active-value="TRUE" inactive-value="FALSE"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -150,7 +226,6 @@ import * as RuleApi from '@/api/wms/rule' |
|
|
|
|
|
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
@ -160,59 +235,57 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加 |
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|
|
const formRef = ref() // 表单 Ref |
|
|
const formRef = ref() // 表单 Ref |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formStrategyCode = ref('') |
|
|
const formStrategyCode = ref('') |
|
|
// form表单数据 |
|
|
// form表单数据 |
|
|
const formData = ref({ |
|
|
const formData = ref({ |
|
|
id: '', |
|
|
id: '', |
|
|
strategyCode: formStrategyCode.value,//策略代码id |
|
|
strategyCode: formStrategyCode.value, //策略代码id |
|
|
name: '',//名称 |
|
|
name: '', //名称 |
|
|
description: '',//描述 |
|
|
description: '', //描述 |
|
|
priority: '',//优先级 |
|
|
priority: '', //优先级 |
|
|
status: true,//状态 |
|
|
status: true, //状态 |
|
|
//规则条件集合 |
|
|
//规则条件集合 |
|
|
condition: [ |
|
|
condition: [ |
|
|
// 仓库 |
|
|
// 仓库 |
|
|
{ ParamCode: 'LocationCode', Value: "" }, |
|
|
{ ParamCode: 'LocationCode', Value: '' } |
|
|
], |
|
|
], |
|
|
configuration: [ |
|
|
configuration: { |
|
|
// 默认库存状态 |
|
|
// 默认库存状态 |
|
|
{ ParamCode: 'DefaultInventoryStatus', Value: 'OK' }, |
|
|
DefaultInventoryStatus: 'OK', |
|
|
// 溢流库位 |
|
|
// 溢流库位 |
|
|
{ ParamCode: 'OverflowLocationCode', Value: '' }, |
|
|
OverflowLocationCode: '', |
|
|
// 可以负库存 |
|
|
// 可以负库存 |
|
|
{ ParamCode: 'EnableNegative', Value: true }, |
|
|
EnableNegative: 'TRUE', |
|
|
// 可以保留零库存 |
|
|
// 可以保留零库存 |
|
|
{ ParamCode: 'EnableKeepZero', Value: true }, |
|
|
EnableKeepZero: 'TRUE', |
|
|
// 可以领料 |
|
|
// 可以领料 |
|
|
{ ParamCode: 'EnablePick', Value: true }, |
|
|
EnablePick: 'TRUE', |
|
|
// 可以过量领料 |
|
|
// 可以过量领料 |
|
|
{ ParamCode: 'EnableOverPick', Value: true }, |
|
|
EnableOverPick: 'TRUE', |
|
|
// 可以整包存储 |
|
|
// 可以整包存储 |
|
|
{ ParamCode: 'EnableWholeStore', Value: true }, |
|
|
EnableWholeStore: 'TRUE', |
|
|
// 可以散件存储 |
|
|
// 可以散件存储 |
|
|
{ ParamCode: 'EnableBreakStore', Value: true }, |
|
|
EnableBreakStore: 'TRUE', |
|
|
// 可以发出 |
|
|
// 可以发出 |
|
|
{ ParamCode: 'EnableShip', Value: true }, |
|
|
EnableShip: 'TRUE', |
|
|
// 可以接收 |
|
|
// 可以接收 |
|
|
{ ParamCode: 'EnableReceive', Value: true }, |
|
|
EnableReceive: 'TRUE', |
|
|
// 可以退货给供应商 |
|
|
// 可以退货给供应商 |
|
|
{ ParamCode: 'EnableReturnToSupplier', Value: true }, |
|
|
EnableReturnToSupplier: 'TRUE', |
|
|
// 可以接收客户退货 |
|
|
// 可以接收客户退货 |
|
|
{ ParamCode: 'EnableReturnFromCustomer', Value: true }, |
|
|
EnableReturnFromCustomer: 'TRUE', |
|
|
// 是否可以拆箱 |
|
|
// 是否可以拆箱 |
|
|
{ ParamCode: 'EnableSplitBox', Value: true }, |
|
|
EnableSplitBox: 'TRUE', |
|
|
// 是否可以拆托 |
|
|
// 是否可以拆托 |
|
|
{ ParamCode: 'EnableSplitPallet', Value: true }, |
|
|
EnableSplitPallet: 'TRUE' |
|
|
] |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
// 验证规则 |
|
|
// 验证规则 |
|
|
const rules = ref({ |
|
|
const rules = ref({ |
|
|
strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }], |
|
|
strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }], |
|
|
name: [{ required: true, message: '请输入名字', trigger: 'blur' }], |
|
|
name: [{ required: true, message: '请输入名字', trigger: 'blur' }], |
|
|
description: [{ required: true, message: '请输入描述', trigger: 'blur' }], |
|
|
description: [{ required: true, message: '请输入描述', trigger: 'blur' }], |
|
|
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }], |
|
|
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }] |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 所有的范围类型 |
|
|
// 所有的范围类型 |
|
@ -226,11 +299,11 @@ const rangeOptions = [ |
|
|
{ value: 'IN', label: '包含' }, |
|
|
{ value: 'IN', label: '包含' }, |
|
|
{ value: 'NOT IN', label: '不包含' }, |
|
|
{ value: 'NOT IN', label: '不包含' }, |
|
|
{ value: 'NULL', label: '为空' }, |
|
|
{ value: 'NULL', label: '为空' }, |
|
|
{ value: 'NOT NULL', label: '不为空' }, |
|
|
{ value: 'NOT NULL', label: '不为空' } |
|
|
] |
|
|
] |
|
|
const formatRangeOptions = (...rest) => { |
|
|
const formatRangeOptions = (...rest) => { |
|
|
// 交集 |
|
|
// 交集 |
|
|
let result = rangeOptions.filter(aItem => rest.some(bItem => aItem.value === bItem)); |
|
|
let result = rangeOptions.filter((aItem) => rest.some((bItem) => aItem.value === bItem)) |
|
|
return result |
|
|
return result |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -241,32 +314,35 @@ const options = reactive({ |
|
|
rangeOptions2: formatRangeOptions('>', '<', '>=', '<='), |
|
|
rangeOptions2: formatRangeOptions('>', '<', '>=', '<='), |
|
|
|
|
|
|
|
|
//仓库列表 |
|
|
//仓库列表 |
|
|
warehouseTypeOptions: [{ value: 'WarehouseCode', label: '仓库' }, { value: 'AreaCode', label: '库区' }, { value: 'LocationGroupCode', label: '库位组' }, { value: 'LocationCode', label: '库位' }], |
|
|
warehouseTypeOptions: [ |
|
|
|
|
|
{ value: 'WarehouseCode', label: '仓库' }, |
|
|
|
|
|
{ value: 'AreaCode', label: '库区' }, |
|
|
|
|
|
{ value: 'LocationGroupCode', label: '库位组' }, |
|
|
|
|
|
{ value: 'LocationCode', label: '库位' } |
|
|
|
|
|
], |
|
|
warehouseList: [], |
|
|
warehouseList: [], |
|
|
// 溢流库位列表 |
|
|
// 溢流库位列表 |
|
|
overflowWarehouseList: [] |
|
|
overflowWarehouseList: [] |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取仓库列表 |
|
|
// 获取仓库列表 |
|
|
const getFormWarehouseList = async () => { |
|
|
const getFormWarehouseList = async () => { |
|
|
options.warehouseList = await getWarehouseList(); |
|
|
options.warehouseList = await getWarehouseList() |
|
|
} |
|
|
} |
|
|
// 获取库区列表 |
|
|
// 获取库区列表 |
|
|
const getFormAreaList = async () => { |
|
|
const getFormAreaList = async () => { |
|
|
options.warehouseList = await getAreaList(); |
|
|
options.warehouseList = await getAreaList() |
|
|
} |
|
|
} |
|
|
// 获取库位组列表 |
|
|
// 获取库位组列表 |
|
|
const getFormLocationgrouList = async () => { |
|
|
const getFormLocationgrouList = async () => { |
|
|
options.warehouseList = await getLocationgroupList(); |
|
|
options.warehouseList = await getLocationgroupList() |
|
|
} |
|
|
} |
|
|
// 获取库位列表 |
|
|
// 获取库位列表 |
|
|
const getFormLocationList = async (queryParms) => { |
|
|
const getFormLocationList = async (queryParms) => { |
|
|
if (queryParms) { |
|
|
if (queryParms) { |
|
|
options.overflowWarehouseList = await getLocationList(queryParms); |
|
|
options.overflowWarehouseList = await getLocationList(queryParms) |
|
|
} else { |
|
|
} else { |
|
|
options.warehouseList = await getLocationList(); |
|
|
options.warehouseList = await getLocationList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
getFormLocationList() |
|
|
getFormLocationList() |
|
@ -342,11 +418,11 @@ const submitForm = async () => { |
|
|
try { |
|
|
try { |
|
|
let data = { |
|
|
let data = { |
|
|
id: formData.value.id, |
|
|
id: formData.value.id, |
|
|
strategyCode: formData.value.strategyCode,//策略代码 |
|
|
strategyCode: formData.value.strategyCode, //策略代码 |
|
|
name: formData.value.name,//名称 |
|
|
name: formData.value.name, //名称 |
|
|
description: formData.value.description,//描述 |
|
|
description: formData.value.description, //描述 |
|
|
priority: formData.value.priority,//优先级 |
|
|
priority: formData.value.priority, //优先级 |
|
|
status: formData.value.status ? 0 : 1,//状态 |
|
|
status: formData.value.status ? 0 : 1, //状态 |
|
|
//规则条件集合 |
|
|
//规则条件集合 |
|
|
condition: JSON.stringify(formData.value.condition), |
|
|
condition: JSON.stringify(formData.value.condition), |
|
|
configuration: JSON.stringify(formData.value.configuration) |
|
|
configuration: JSON.stringify(formData.value.configuration) |
|
@ -370,56 +446,56 @@ const submitForm = async () => { |
|
|
const resetForm = () => { |
|
|
const resetForm = () => { |
|
|
formData.value = { |
|
|
formData.value = { |
|
|
id: '', |
|
|
id: '', |
|
|
strategyCode: formStrategyCode.value,//策略代码id |
|
|
strategyCode: formStrategyCode.value, //策略代码id |
|
|
name: '',//名称 |
|
|
name: '', //名称 |
|
|
description: '',//描述 |
|
|
description: '', //描述 |
|
|
priority: '',//优先级 |
|
|
priority: '', //优先级 |
|
|
status: true,//状态 |
|
|
status: true, //状态 |
|
|
//规则条件集合 |
|
|
//规则条件集合 |
|
|
condition: [ |
|
|
condition: [ |
|
|
// 仓库 |
|
|
// 仓库 |
|
|
{ ParamCode: 'LocationCode', Value: "" }, |
|
|
{ ParamCode: 'LocationCode', Value: '' } |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
configuration: [ |
|
|
configuration: { |
|
|
// 默认库存状态 |
|
|
// 默认库存状态 |
|
|
{ ParamCode: 'DefaultInventoryStatus', Value: 'OK' }, |
|
|
DefaultInventoryStatus: 'OK', |
|
|
// 溢流库位 |
|
|
// 溢流库位 |
|
|
{ ParamCode: 'OverflowLocationCode', Value: '' }, |
|
|
OverflowLocationCode: '', |
|
|
// 可以负库存 |
|
|
// 可以负库存 |
|
|
{ ParamCode: 'EnableNegative', Value: true }, |
|
|
EnableNegative: 'TRUE', |
|
|
// 可以保留零库存 |
|
|
// 可以保留零库存 |
|
|
{ ParamCode: 'EnableKeepZero', Value: true }, |
|
|
EnableKeepZero: 'TRUE', |
|
|
// 可以领料 |
|
|
// 可以领料 |
|
|
{ ParamCode: 'EnablePick', Value: true }, |
|
|
EnablePick: 'TRUE', |
|
|
// 可以过量领料 |
|
|
// 可以过量领料 |
|
|
{ ParamCode: 'EnableOverPick', Value: true }, |
|
|
EnableOverPick: 'TRUE', |
|
|
// 可以整包存储 |
|
|
// 可以整包存储 |
|
|
{ ParamCode: 'EnableWholeStore', Value: true }, |
|
|
EnableWholeStore: 'TRUE', |
|
|
// 可以散件存储 |
|
|
// 可以散件存储 |
|
|
{ ParamCode: 'EnableBreakStore', Value: true }, |
|
|
EnableBreakStore: 'TRUE', |
|
|
// 可以发出 |
|
|
// 可以发出 |
|
|
{ ParamCode: 'EnableShip', Value: true }, |
|
|
EnableShip: 'TRUE', |
|
|
// 可以接收 |
|
|
// 可以接收 |
|
|
{ ParamCode: 'EnableReceive', Value: true }, |
|
|
EnableReceive: 'TRUE', |
|
|
// 可以退货给供应商 |
|
|
// 可以退货给供应商 |
|
|
{ ParamCode: 'EnableReturnToSupplier', Value: true }, |
|
|
EnableReturnToSupplier: 'TRUE', |
|
|
// 可以接收客户退货 |
|
|
// 可以接收客户退货 |
|
|
{ ParamCode: 'EnableReturnFromCustomer', Value: true }, |
|
|
EnableReturnFromCustomer: 'TRUE', |
|
|
// 是否可以拆箱 |
|
|
// 是否可以拆箱 |
|
|
{ ParamCode: 'EnableSplitBox', Value: true }, |
|
|
EnableSplitBox: 'TRUE', |
|
|
// 是否可以拆托 |
|
|
// 是否可以拆托 |
|
|
{ ParamCode: 'EnableSplitPallet', Value: true }, |
|
|
EnableSplitPallet: 'TRUE' |
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 弹窗按钮 |
|
|
// 弹窗按钮 |
|
|
const Butttondata = [ |
|
|
const Butttondata = [ |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formCloseBtn(null), // 关闭 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
] |
|
|
// 按钮事件 |
|
|
// 按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
// 保存 |
|
|
// 保存 |
|
|
if (val == 'save') { |
|
|
if (val == 'save') { |
|
@ -430,7 +506,6 @@ const buttonBaseClick = (val, item) => { |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.item { |
|
|
.item { |
|
@ -473,5 +548,4 @@ const buttonBaseClick = (val, item) => { |
|
|
::v-deep .err-130 .el-form-item__error { |
|
|
::v-deep .err-130 .el-form-item__error { |
|
|
padding-left: 130px !important; |
|
|
padding-left: 130px !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|