|
|
@ -12,10 +12,10 @@ |
|
|
|
<!-- 规则 --> |
|
|
|
<div class="item"> |
|
|
|
<div class="title">规则</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="代码" prop="strategyCode"> |
|
|
|
<el-input |
|
|
|
<el-row 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 label="名称" prop="name" key="名称formItem"> |
|
|
|
<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 label="描述" prop="description" key="描述formItem"> |
|
|
|
<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 label="优先级" prop="priority" key="优先级formItem"> |
|
|
|
<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 label="状态" prop="status" key="状态formItem"> |
|
|
|
<el-switch key="状态input" 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> |
|
|
|
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index"> |
|
|
|
<el-row 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="'供应商formItem'+index" label="" label-width="0" class="err-240" v-if="index == 0"> |
|
|
|
<el-select :key="'供应商title'+index" |
|
|
|
v-model="item.ParamCode" |
|
|
|
placeholder="" |
|
|
|
style="width: 110px; margin-right: 10px" |
|
|
@ -64,10 +64,10 @@ |
|
|
|
:label="cur.label" |
|
|
|
:value="cur.value" |
|
|
|
v-for="(cur, index) in options.typeOptions" |
|
|
|
: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" |
|
|
@ -77,10 +77,10 @@ |
|
|
|
:label="cur.label" |
|
|
|
:value="cur.value" |
|
|
|
v-for="cur in options.rangeOptions1" |
|
|
|
:key="cur.value" |
|
|
|
:key="'供应商OperatorOption'+index+cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
<el-select :key="'供应商Value'+index" |
|
|
|
v-model="item.Value" |
|
|
|
:placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`" |
|
|
|
style="flex: 1" |
|
|
@ -91,15 +91,15 @@ |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="cur in options.supplierList" |
|
|
|
:key="cur.code" |
|
|
|
:key="'供应商ValueOption'+index+cur.code" |
|
|
|
:label="cur.name" |
|
|
|
:value="cur.code" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 选择物料类型 --> |
|
|
|
<el-form-item label="" label-width="0" class="err-240" v-if="index == 1"> |
|
|
|
<el-select |
|
|
|
<el-form-item :key="'物料类型formItem'+index" label="" label-width="0" class="err-240" v-if="index == 1"> |
|
|
|
<el-select :key="'物料类型title'+index" |
|
|
|
v-model="item.ParamCode" |
|
|
|
placeholder="" |
|
|
|
@change="changeItemsType" |
|
|
@ -110,10 +110,10 @@ |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
v-for="item in options.itemTypeOptions" |
|
|
|
:key="item.value" |
|
|
|
:key="'物料类型title'+index+item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
<el-select :key="'物料类型Operator'+index" |
|
|
|
v-model="item.Operator" |
|
|
|
placeholder="请选择范围" |
|
|
|
style="width: 110px; margin-right: 10px" |
|
|
@ -123,10 +123,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="请选择物料类型" |
|
|
|
style="flex: 1" |
|
|
@ -138,12 +138,12 @@ |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)" |
|
|
|
:key="cur.value" |
|
|
|
:key="'物料类型Value'+index+cur.value" |
|
|
|
:label="cur.label" |
|
|
|
:value="cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
<el-select :key="'ABC类Value'+index" |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请选择ABC类" |
|
|
|
style="flex: 1" |
|
|
@ -155,12 +155,12 @@ |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)" |
|
|
|
:key="cur.value" |
|
|
|
:key="'ABC类Value'+index+cur.value" |
|
|
|
:label="cur.label" |
|
|
|
:value="cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-input |
|
|
|
<el-input :key="'物料分组Value'+index" |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请输入物料分组,多个物料分组以逗号分隔" |
|
|
|
clearable |
|
|
@ -168,7 +168,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 |
|
|
@ -176,7 +176,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 |
|
|
@ -191,17 +191,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="" label-width="0" class="flex-top" prop="configurationRules"> |
|
|
|
<el-form-item key="存储类型formItem" label="" label-width="0" class="flex-top" prop="configurationRules"> |
|
|
|
<div |
|
|
|
style="width: 100%; display: flex; align-items: center; margin-bottom: 10px" |
|
|
|
v-for="(cur, key) in formData.configuration.ManagementPrecision" |
|
|
|
:key="key" |
|
|
|
:key="'存储类型div'+key" |
|
|
|
> |
|
|
|
<div style="width: 26px; display: flex"> |
|
|
|
<Icon |
|
|
|
<Icon :key="'存储类型icon'+key" |
|
|
|
icon="ep:remove" |
|
|
|
color="#757575" |
|
|
|
size="26" |
|
|
@ -214,10 +214,10 @@ |
|
|
|
</div> |
|
|
|
<div class="flex w-[28%]"> |
|
|
|
<div class="ml-10px mr-10px">批次类型</div> |
|
|
|
<el-select v-model="cur.BatchType" placeholder="请选择批次类型" style="flex: 1"> |
|
|
|
<el-select :key="'批次类型'+key" v-model="cur.BatchType" placeholder="请选择批次类型" style="flex: 1"> |
|
|
|
<el-option |
|
|
|
v-for="it in getStrDictOptions(DICT_TYPE.BATCH_TYPE)" |
|
|
|
:key="it.value" |
|
|
|
:key="'批次类型'+key+it.value" |
|
|
|
:label="it.label" |
|
|
|
:value="it.value" |
|
|
|
/> |
|
|
@ -225,7 +225,7 @@ |
|
|
|
</div> |
|
|
|
<div class="flex w-[28%]"> |
|
|
|
<div class="ml-10px mr-10px">批次格式</div> |
|
|
|
<el-input |
|
|
|
<el-input :key="'批次格式'+key" |
|
|
|
v-model="cur.BatchFormat" |
|
|
|
placeholder="yyyyMMDD" |
|
|
|
clearable |
|
|
@ -236,11 +236,11 @@ |
|
|
|
<div class="flex" style="flex: 1"> |
|
|
|
<div class="ml-10px mr-10px">批次方向</div> |
|
|
|
<div class="checkbox"> |
|
|
|
<el-radio-group v-model="cur.BatchDirection"> |
|
|
|
<el-radio-group :key="'批次方向'+key" v-model="cur.BatchDirection"> |
|
|
|
<el-radio |
|
|
|
:label="cur.value" |
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)" |
|
|
|
:key="cur.value" |
|
|
|
:key="'批次方向'+key+cur.value" |
|
|
|
>{{ cur.label }}</el-radio |
|
|
|
> |
|
|
|
</el-radio-group> |
|
|
|