|
|
@ -99,37 +99,21 @@ |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请选择ABC类" |
|
|
|
placeholder="请选择物料状态" |
|
|
|
style="flex: 1" |
|
|
|
clearable |
|
|
|
multiple |
|
|
|
collapse-tags |
|
|
|
:disabled="formData.priority==0&&formType=='update'" |
|
|
|
v-else-if="item.ParamCode == 'AbcClass'" |
|
|
|
v-else-if="item.ParamCode == 'ItemStatus'" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)" |
|
|
|
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_STATUS)" |
|
|
|
:key="cur.value" |
|
|
|
:label="cur.label" |
|
|
|
:value="cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-input |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请输入物料分组,多个物料分组以逗号分隔" |
|
|
|
clearable |
|
|
|
style="flex: 1" |
|
|
|
:disabled="formData.priority==0&&formType=='update'" |
|
|
|
v-else-if="item.ParamCode == 'ItemGroup'" |
|
|
|
/> |
|
|
|
<el-input |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请输入项目,多个项目以逗号分隔" |
|
|
|
clearable |
|
|
|
style="flex: 1" |
|
|
|
:disabled="formData.priority==0&&formType=='update'" |
|
|
|
v-else-if="item.ParamCode == 'Project'" |
|
|
|
/> |
|
|
|
<el-input |
|
|
|
v-model="item.Value" |
|
|
|
placeholder="请输入物料,多个物料以逗号分隔" |
|
|
@ -277,6 +261,27 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- 自动补料 --> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="是否自动补料" |
|
|
|
prop="configuration.autoFeed" |
|
|
|
:rules="[ |
|
|
|
{ required: true, message: '请选择是否自动补料', trigger: 'change' }, |
|
|
|
]"> |
|
|
|
<el-switch v-model="formData.configuration.autoFeed" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<!-- 邮件提醒 --> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="是否邮件提醒" |
|
|
|
prop="configuration.emailNotification" |
|
|
|
:rules="[ |
|
|
|
{ required: true, message: '请选择是否邮件提醒', trigger: 'change' }, |
|
|
|
]"> |
|
|
|
<el-switch v-model="formData.configuration.emailNotification" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
@ -320,7 +325,7 @@ const formData = ref({ |
|
|
|
//规则条件集合 |
|
|
|
condition: [ |
|
|
|
// 物料类型/物料分组/物料/abc类/项目/ |
|
|
|
{ ParamCode: 'ItemGroup', Operator: 'IN', Value: '' }, |
|
|
|
{ ParamCode: 'itemType', Operator: 'IN', Value: '' }, |
|
|
|
// 仓库 |
|
|
|
{ ParamCode: 'LocationCode', Operator: 'IN', Value: '' } |
|
|
|
], |
|
|
@ -332,7 +337,11 @@ const formData = ref({ |
|
|
|
// 安全库存 |
|
|
|
SafetyQty: 0, |
|
|
|
// 补料数量 |
|
|
|
FeedQty: 0 |
|
|
|
FeedQty: 0, |
|
|
|
// 自动补料 |
|
|
|
autoFeed: false, |
|
|
|
// 邮件提醒 |
|
|
|
emailNotification: true |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
@ -370,9 +379,9 @@ const options = reactive({ |
|
|
|
|
|
|
|
// 物料类型列表 |
|
|
|
itemTypeOptions: [ |
|
|
|
{ value: 'ItemGroup', label: '物料分组' }, |
|
|
|
{ value: 'ItemCode', label: '物料' }, |
|
|
|
{ value: 'Project', label: '项目' } |
|
|
|
{ value: 'ItemType', label: '物料类型' }, |
|
|
|
{ value: 'ItemStatus', label: '物料状态' }, |
|
|
|
{ value: 'ItemCode', label: '物料' } |
|
|
|
], |
|
|
|
|
|
|
|
//仓库列表 |
|
|
@ -593,7 +602,11 @@ const resetForm = () => { |
|
|
|
// 安全库存 |
|
|
|
SafetyQty: 0, |
|
|
|
// 补料数量 |
|
|
|
FeedQty: 0 |
|
|
|
FeedQty: 0, |
|
|
|
// 自动补料 |
|
|
|
autoFeed: false, |
|
|
|
// 邮件提醒 |
|
|
|
emailNotification: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -609,6 +622,16 @@ const validatorNum = (rule: any, value: any, callback: any) => { |
|
|
|
callback() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 添加自定义验证函数 |
|
|
|
const validateFeedQty = (rule, value, callback) => { |
|
|
|
if (formData.value.configuration.autoFeed && value <= 0) { |
|
|
|
callback(new Error('自动补料开启时,补料数量必须大于0')) |
|
|
|
} else { |
|
|
|
callback() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
|
|
.item { |
|
|
|