|
@@ -28,6 +28,22 @@
|
|
placeholder="请输入仓库名称(最多30个字符)"
|
|
placeholder="请输入仓库名称(最多30个字符)"
|
|
allowClear />
|
|
allowClear />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
|
+ <a-form-model-item label="地址" prop="address">
|
|
|
|
+ <AreaList id="allocationPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
|
|
+ <a-input
|
|
|
|
+ style="margin-top:24px;"
|
|
|
|
+ id="warehouseEdit-desc"
|
|
|
|
+ v-model.trim="form.desc"
|
|
|
|
+ placeholder="请输入详细地址"
|
|
|
|
+ allowClear />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ <a-form-model-item label="ERP仓库编码" prop="warehouseCode">
|
|
|
|
+ <a-input
|
|
|
|
+ id="warehouseEdit-code"
|
|
|
|
+ v-model.trim="form.code"
|
|
|
|
+ placeholder="请输入ERP仓库编码"
|
|
|
|
+ allowClear />
|
|
|
|
+ </a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
<div class="btn-cont">
|
|
<div class="btn-cont">
|
|
<a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
|
|
<a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
|
|
@@ -42,10 +58,11 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import { warehouseSave } from '@/api/warehouse'
|
|
import { warehouseSave } from '@/api/warehouse'
|
|
|
|
+import AreaList from '@/views/common/areaList.js'
|
|
export default {
|
|
export default {
|
|
name: 'WarehouseEditModal',
|
|
name: 'WarehouseEditModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable },
|
|
|
|
|
|
+ components: { STable, AreaList },
|
|
props: {
|
|
props: {
|
|
openModal: { // 弹框显示状态
|
|
openModal: { // 弹框显示状态
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -74,11 +91,22 @@ export default {
|
|
wrapperCol: { span: 16 }
|
|
wrapperCol: { span: 16 }
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
- name: '' // 仓库名称
|
|
|
|
|
|
+ name: '', // 仓库名称
|
|
|
|
+ address: '',
|
|
|
|
+ provinceSn: undefined,
|
|
|
|
+ citySn: undefined,
|
|
|
|
+ districtSn: undefined,
|
|
|
|
+ code: undefined// ERP仓库编码
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
name: [
|
|
name: [
|
|
{ required: true, message: '请输入仓库名称', trigger: 'blur' }
|
|
{ required: true, message: '请输入仓库名称', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ address: [
|
|
|
|
+ { required: true, message: '请选择详细地址', trigger: 'change' }
|
|
|
|
+ ],
|
|
|
|
+ warehouseCode: [
|
|
|
|
+ { required: true, message: '请输入ERP仓库编码', trigger: 'blur' }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -91,6 +119,12 @@ export default {
|
|
str = str.replace(/[\r\n]/g, '')
|
|
str = str.replace(/[\r\n]/g, '')
|
|
this.form.name = str
|
|
this.form.name = str
|
|
},
|
|
},
|
|
|
|
+ areaChange (val) {
|
|
|
|
+ this.form.address = val
|
|
|
|
+ this.form.provinceSn = val[0] ? val[0] : ''
|
|
|
|
+ this.form.citySn = val[1] ? val[1] : ''
|
|
|
|
+ this.form.districtSn = val[2] ? val[2] : ''
|
|
|
|
+ },
|
|
// 详情
|
|
// 详情
|
|
getDetail () {
|
|
getDetail () {
|
|
this.form = {
|
|
this.form = {
|