Browse Source

器具容量策略代码优化

hella_online_20240913
yufei_wang 3 months ago
parent
commit
59bd7276ef
  1. 80
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue

80
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue

@ -12,10 +12,10 @@
<!-- 规则 --> <!-- 规则 -->
<div class="item"> <div class="item">
<div class="title">规则</div> <div class="title">规则</div>
<el-row gutter="10"> <el-row gutter="10" key="规则row">
<el-col :span="24"> <el-col :span="24" key="代码col">
<el-form-item label="代码" prop="strategyCode"> <el-form-item key="代码formItem" label="代码" prop="strategyCode">
<el-input <el-input key="代码input"
v-model="formData.strategyCode" v-model="formData.strategyCode"
placeholder="请输入代码" placeholder="请输入代码"
clearable clearable
@ -23,24 +23,24 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24" key="名称col">
<el-form-item label="名称" prop="name"> <el-form-item key="名称formItem" label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/> <el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24" key="描述col">
<el-form-item label="描述" prop="description"> <el-form-item key="描述formItem" label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/> <el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" key="优先级col">
<el-form-item label="优先级" prop="priority"> <el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" :disabled="formData.name=='默认规则'&&formType=='update'"/> <el-input-number key="优先级input" v-model="formData.priority" :min="0" :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" key="状态col">
<el-form-item label="状态" prop="status"> <el-form-item key="状态formItem" label="状态" prop="status">
<el-switch v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/> <el-switch key="状态switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -49,11 +49,11 @@
<!-- 规则条件 --> <!-- 规则条件 -->
<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" key="规则条件row">
<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="'规则条件col'+index">
<!-- 器具类型 --> <!-- 器具类型 -->
<el-form-item <el-form-item key="器具类型formItem"
label="器具类型" :key="'器具类型col'+index"
class="err-120" class="err-120"
v-if="index == 0" v-if="index == 0"
:prop="'condition.' + index + '.Value'" :prop="'condition.' + index + '.Value'"
@ -63,7 +63,7 @@
trigger: 'change' trigger: 'change'
}" }"
> >
<el-select <el-select :key="'器具类型Operator'+index"
v-model="item.Operator" v-model="item.Operator"
placeholder="请选择范围" placeholder="请选择范围"
style="width: 110px; margin-right: 10px" style="width: 110px; margin-right: 10px"
@ -73,10 +73,10 @@
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
v-for="cur in options.rangeOptions1" v-for="cur in options.rangeOptions1"
:key="cur.value" :key="'器具类型OperatorOption'+index+cur.value"
/> />
</el-select> </el-select>
<el-select <el-select :key="'器具类型Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请选择器具类型" placeholder="请选择器具类型"
style="flex: 1" style="flex: 1"
@ -87,15 +87,15 @@
> >
<el-option <el-option
v-for="cur in getStrDictOptions(DICT_TYPE.CONTAINER_TYPE)" v-for="cur in getStrDictOptions(DICT_TYPE.CONTAINER_TYPE)"
:key="cur.value" :key="'器具类型ValueOption'+index+cur.value"
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 选择物料类型 --> <!-- 选择物料类型 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 1"> <el-form-item key="物料类型formItem" label="" label-width="0" class="err-240" v-if="index == 1">
<el-select <el-select :key="'物料类型title'+index"
v-model="item.ParamCode" v-model="item.ParamCode"
placeholder="" placeholder=""
@change="changeItemsType" @change="changeItemsType"
@ -106,10 +106,10 @@
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
v-for="cur in options.itemTypeOptions" v-for="cur in options.itemTypeOptions"
:key="cur.value" :key="'物料类型titleOption'+index+cur.value"
/> />
</el-select> </el-select>
<el-select <el-select :key="'物料类型Operator'+index"
v-model="item.Operator" v-model="item.Operator"
placeholder="请选择范围" placeholder="请选择范围"
style="width: 110px; margin-right: 10px" style="width: 110px; margin-right: 10px"
@ -119,10 +119,10 @@
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
v-for="cur in options.rangeOptions1" v-for="cur in options.rangeOptions1"
:key="cur.value" :key="'物料类型Operator'+index+cur.value"
/> />
</el-select> </el-select>
<el-select <el-select :key="'物料类型Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请选择物料类型" placeholder="请选择物料类型"
style="flex: 1" style="flex: 1"
@ -134,12 +134,12 @@
> >
<el-option <el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)" v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
:key="cur.value" :key="'物料类型ValueOption'+index+cur.value"
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
/> />
</el-select> </el-select>
<el-select <el-select :key="'ABC类Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请选择ABC类" placeholder="请选择ABC类"
style="flex: 1" style="flex: 1"
@ -151,12 +151,12 @@
> >
<el-option <el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)" v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
:key="cur.value" :key="'ABC类ValueOption'+indexcur.value"
:label="cur.label" :label="cur.label"
:value="cur.value" :value="cur.value"
/> />
</el-select> </el-select>
<el-input <el-input :key="'物料分组Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请输入物料分组,多个物料分组以逗号分隔" placeholder="请输入物料分组,多个物料分组以逗号分隔"
clearable clearable
@ -164,7 +164,7 @@
v-else-if="item.ParamCode == 'ItemGroup'" v-else-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'" :disabled="formData.name=='默认规则'&&formType=='update'"
/> />
<el-input <el-input :key="'项目Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请输入项目,多个项目以逗号分隔" placeholder="请输入项目,多个项目以逗号分隔"
clearable clearable
@ -172,7 +172,7 @@
v-else-if="item.ParamCode == 'Project'" v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'" :disabled="formData.name=='默认规则'&&formType=='update'"
/> />
<el-input <el-input :key="'物料Value'+index"
v-model="item.Value" v-model="item.Value"
placeholder="请输入物料,多个物料以逗号分隔" placeholder="请输入物料,多个物料以逗号分隔"
clearable clearable
@ -188,15 +188,15 @@
<!-- 规则配置 --> <!-- 规则配置 -->
<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" key="规则配置row">
<el-col :span="24"> <el-col :span="24" key="规则配置col">
<!-- 容纳数量 --> <!-- 容纳数量 -->
<el-form-item <el-form-item key="容纳数量formItem"
label="容纳数量" label="容纳数量"
prop="configuration.ContentCount" prop="configuration.ContentCount"
:rules="[{ required: true, message: '请输入容纳数量', trigger: 'change' }]" :rules="[{ required: true, message: '请输入容纳数量', trigger: 'change' }]"
> >
<el-input-number <el-input-number key="容纳数量input"
v-model="formData.configuration.ContentCount" v-model="formData.configuration.ContentCount"
:min="-1" :min="-1"
controls-position="right" controls-position="right"

Loading…
Cancel
Save