|
@@ -22,7 +22,7 @@
|
|
|
v-decorator="['no', {rules: [{required: false, message: '编码不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
|
|
|
-<!-- <a-form-item
|
|
|
+ <!-- <a-form-item
|
|
|
label="所属公司"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
@@ -51,6 +51,21 @@
|
|
|
</a-select>
|
|
|
</a-form-item>-->
|
|
|
<a-form-item
|
|
|
+ label="等級"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-select v-decorator="['level']" placeholder="请选择" @change="(val)=>level=val">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(label,value) in levelMap"
|
|
|
+ :key="value"
|
|
|
+ :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ v-if="level===2"
|
|
|
label="所属仓库"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
@@ -61,11 +76,26 @@
|
|
|
:treeData="storeTreeDate"
|
|
|
:treeNodeFilterProp="'title'"
|
|
|
:showSearch="true"
|
|
|
- v-decorator="['parentId', {rules: [{required: false, message: '上层仓库不能为空'}]}]"
|
|
|
+ v-decorator="['parentId', {rules: [{required: true, message: '上层仓库不能为空'}]}]"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ v-else-if="level===1"
|
|
|
+ label="所属厂区"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-select @change="handleProjectChange" v-decorator="['factoryArea', {rules: [{required: true, message: '所属厂区不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select-option
|
|
|
+ v-for="({deptId, name}) in projectList"
|
|
|
+ :key="deptId"
|
|
|
+ :label="name"
|
|
|
+ :value="deptId">{{ name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
<a-form-item
|
|
|
label="名称"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -88,21 +118,8 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- <a-form-item
|
|
|
- label="等級"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-select v-decorator="['level']" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in levelMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
-<!-- <a-form-item
|
|
|
+
|
|
|
+ <!-- <a-form-item
|
|
|
label="类型"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
@@ -126,7 +143,7 @@
|
|
|
:min="1"
|
|
|
v-decorator="['sort', {initialValue:1,rules: [{required: true, message: '排序不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
-<!-- <a-form-item
|
|
|
+ <!-- <a-form-item
|
|
|
label="是否删除"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
@@ -149,6 +166,15 @@
|
|
|
:rows="4"
|
|
|
v-decorator="['remark', {rules: [{required: false, message: '备注不能为空'}]}]"/>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ label="是否存在库位"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-switch
|
|
|
+ :rows="4"
|
|
|
+ v-decorator="['remark', {rules: [{required: false, message: '备注不能为空'}]}]"/>
|
|
|
+ </a-form-item>
|
|
|
</a-form>
|
|
|
<template slot="footer">
|
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
@@ -168,6 +194,7 @@ export default {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
|
+ level: null,
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false,
|
|
|
// 下拉框map
|