Browse Source

存储容量策略代码优化

hella_online_20240913
yufei_wang 3 months ago
parent
commit
7f7d875ce8
  1. 120
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue

120
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue

@ -12,10 +12,10 @@
<!-- 规则 -->
<div class="item">
<div class="title">规则</div>
<el-row gutter="10">
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input
<el-row gutter="10" key="规则row">
<el-col :span="24" key="代码col">
<el-form-item key="代码formItem" label="代码" prop="strategyCode">
<el-input key="代码input"
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
@ -23,24 +23,24 @@
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-col :span="24" key="名称col">
<el-form-item key="名称formItem" label="名称" prop="name">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-col :span="24" key="描述col">
<el-form-item key="描述formItem" label="描述" prop="description">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="0" :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-col :span="12" key="状态col">
<el-form-item key="状态formItem" label="状态" prop="status">
<el-switch key="优先级switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -49,11 +49,11 @@
<!-- 规则条件 -->
<div class="item mt-20px">
<div class="title">规则条件</div>
<el-row gutter="10">
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<el-row gutter="10" key="规则条件row">
<el-col :span="24" v-for="(item, index) in formData.condition" :key="'规则条件col'+index">
<!-- 选择物料类型 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 0">
<el-select
<el-form-item :key="'物料类型'+index" label="" label-width="0" class="err-240" v-if="index == 0">
<el-select :key="'物料类型title'+index"
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
@ -64,10 +64,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.itemTypeOptions"
:key="cur.value"
:key="'物料类型titleOption'+cur.value"
/>
</el-select>
<el-select
<el-select :key="'物料类型Operator'+index"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -77,10 +77,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
:key="'物料类型OperatorOption'+cur.value"
/>
</el-select>
<el-select
<el-select :key="'物料类型Value'+index"
v-model="item.Value"
placeholder="请选择物料类型"
style="flex: 1"
@ -92,12 +92,12 @@
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
:key="cur.value"
:key="'物料类型Value'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-select
<el-select :key="'ABC类title'+index"
v-model="item.Value"
placeholder="请选择ABC类"
style="flex: 1"
@ -109,12 +109,12 @@
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
:key="cur.value"
:key="'ABC类titleOption'+index+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-input
<el-input :key="'物料分组Value'+index"
v-model="item.Value"
placeholder="请输入物料分组,多个物料分组以逗号分隔"
clearable
@ -122,7 +122,7 @@
v-else-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'"
/>
<el-input
<el-input :key="'项目Value'+index"
v-model="item.Value"
placeholder="请输入项目,多个项目以逗号分隔"
clearable
@ -130,7 +130,7 @@
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'"
/>
<el-input
<el-input :key="'物料Value'+index"
v-model="item.Value"
placeholder="请输入物料,多个物料以逗号分隔"
clearable
@ -140,8 +140,8 @@
/>
</el-form-item>
<!-- 仓库 库区 库位组 库位 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 1">
<el-select
<el-form-item :key="'仓库'+index" label="" label-width="0" class="err-240" v-if="index == 1">
<el-select :key="'仓库title'+index"
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
@ -152,10 +152,10 @@
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.warehouseTypeOptions"
:key="index"
:key="'仓库titleOption'+index+cur.value"
/>
</el-select>
<el-select
<el-select :key="'仓库Operator'+index"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -165,10 +165,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
:key="'仓库Operator'+index+cur.value"
/>
</el-select>
<el-select
<el-select :key="'仓库Value'+index"
v-model="item.Value"
:placeholder="`请选择${
item.ParamCode == 'WarehouseCode'
@ -189,7 +189,7 @@
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:key="'仓库Value'+index+cur.code"
:label="cur.code"
:value="cur.code"
/>
@ -202,17 +202,17 @@
<!-- 规则配置 -->
<div class="item mt-20px">
<div class="title">规则配置</div>
<el-row gutter="10">
<el-col :span="24">
<el-row gutter="10" key="规则配置row">
<el-col :span="24" key="存储类型col">
<!-- 存储类型 -->
<el-form-item label="存储类型">
<el-form-item label="存储类型" key="存储类型formItem">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.StorageType">
<el-radio label="NOTLIMIT">不限制</el-radio>
<el-radio-group key="存储类型radioGroup" v-model="formData.configuration.StorageType">
<el-radio label="NOTLIMIT" key="存储类型不限制">不限制</el-radio>
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="cur.value"
:key="'存储类型radio'+cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
@ -220,9 +220,9 @@
</el-form-item>
</el-col>
<!-- 存储容量 -->
<el-col :span="24">
<el-form-item label="存储容量">
<el-input
<el-col :span="24" key="存储容量col">
<el-form-item label="存储容量" key="存储容量formItem">
<el-input key="存储容量input"
v-model="formData.configuration.StorageQty"
placeholder="请输入存储容量"
clearable
@ -230,15 +230,15 @@
</el-form-item>
</el-col>
<!-- 替代存储类型 -->
<el-col :span="24">
<el-form-item label="替代存储类型">
<el-col :span="24" key="替代存储类型col">
<el-form-item label="替代存储类型" key="替代存储类型formItem">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.AltStorageType">
<el-radio label="NOTLIMIT">不限制</el-radio>
<el-radio-group key="替代存储类型radioGroup" v-model="formData.configuration.AltStorageType">
<el-radio label="NOTLIMIT" key="替代存储类型不限制">不限制</el-radio>
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="cur.value"
:key="'替代存储类型radio'+cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
@ -246,9 +246,9 @@
</el-form-item>
</el-col>
<!-- 替代容量 -->
<el-col :span="24">
<el-form-item label="替代容量">
<el-input
<el-col :span="24" key="替代容量col">
<el-form-item label="替代容量" key="替替代容量formItem">
<el-input key="替替代容量input"
v-model="formData.configuration.AltStorageQty"
placeholder="请输入替代容量"
clearable
@ -256,9 +256,9 @@
</el-form-item>
</el-col>
<!-- 固定位置 -->
<el-col :span="24">
<el-form-item label="固定位置">
<el-switch
<el-col :span="24" key="固定位置col">
<el-form-item label="固定位置" key="固定位置formItem">
<el-switch key="固定位置switch"
v-model="formData.configuration.IsFixed"
active-value="TRUE"
inactive-value="FALSE"
@ -266,9 +266,9 @@
</el-form-item>
</el-col>
<!-- 占用相邻库位 -->
<el-col :span="24">
<el-form-item label="占用相邻库位">
<el-switch
<el-col :span="24" key="占用相邻库位col">
<el-form-item label="占用相邻库位" key="占用相邻库位formItem">
<el-switch key="占用相邻库位switch"
v-model="formData.configuration.IsOccupyAdjacent"
active-value="TRUE"
inactive-value="FALSE"

Loading…
Cancel
Save