Browse Source

YT-743: 补料策略部分开发

intex
ljlong_2630 2 weeks ago
parent
commit
0b7ccd0f64
  1. 73
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

73
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -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 {

Loading…
Cancel
Save