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