|
@ -27,6 +27,14 @@ |
|
|
<el-input v-model="formobj.warehouseCode" placeholder="仓库编码" class="item_input" clearable |
|
|
<el-input v-model="formobj.warehouseCode" placeholder="仓库编码" class="item_input" clearable |
|
|
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" /> |
|
|
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="item"> |
|
|
|
|
|
<span class="item_text"><span class="must">*</span> 仓库类型:</span> |
|
|
|
|
|
<el-select v-model="formobj.warehouseTypeValue" placeholder="请选择仓库类型" class="item_input" |
|
|
|
|
|
@change="selectWarehouseTypeChange"> |
|
|
|
|
|
<el-option v-for="item in warehouseTypeList" :key="item.dictKey" :label="item.dictValue" |
|
|
|
|
|
:value="item.dictKey" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
<div class="item"> |
|
|
<div class="item"> |
|
|
<span class="item_text">仓库联系人:</span> |
|
|
<span class="item_text">仓库联系人:</span> |
|
|
<el-input v-model="formobj.contacts" placeholder="仓库联系人" class="item_input" clearable /> |
|
|
<el-input v-model="formobj.contacts" placeholder="仓库联系人" class="item_input" clearable /> |
|
@ -100,6 +108,9 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import req from '@/api/baseinfo/warehouse/warehouse.js' |
|
|
import req from '@/api/baseinfo/warehouse/warehouse.js' |
|
|
|
|
|
import { |
|
|
|
|
|
typeValues, |
|
|
|
|
|
} from '@/api/Common/dictcommons.js' |
|
|
import divAdd from './warehouseAdd2.vue' |
|
|
import divAdd from './warehouseAdd2.vue' |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
@ -114,6 +125,8 @@ |
|
|
sid: '', |
|
|
sid: '', |
|
|
warehouseName: '', |
|
|
warehouseName: '', |
|
|
warehouseCode: '', |
|
|
warehouseCode: '', |
|
|
|
|
|
warehouseTypeKey: '', |
|
|
|
|
|
warehouseTypeValue: '', |
|
|
contacts: "", |
|
|
contacts: "", |
|
|
mob: "", |
|
|
mob: "", |
|
|
telephone: "", |
|
|
telephone: "", |
|
@ -133,6 +146,7 @@ |
|
|
userSid: window.sessionStorage.getItem('userSid'), |
|
|
userSid: window.sessionStorage.getItem('userSid'), |
|
|
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
|
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
|
}, |
|
|
}, |
|
|
|
|
|
warehouseTypeList: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() {}, |
|
|
created() {}, |
|
@ -140,6 +154,29 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getDictValue() { |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
type: "warehouse", |
|
|
|
|
|
psid: '0' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
typeValues(params).then(resp => { |
|
|
|
|
|
console.log('>>>>>>>>>typeValues', resp) |
|
|
|
|
|
this.warehouseTypeList = resp.data |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
selectWarehouseTypeChange(val) { |
|
|
|
|
|
|
|
|
|
|
|
const choose = this.warehouseTypeList.filter((item) => item.dictKey == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectWarehouseTypeChange', choose) |
|
|
|
|
|
this.formobj.warehouseTypeKey = choose[0].dictKey |
|
|
|
|
|
this.formobj.warehouseTypeValue = choose[0].dictValue |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
changeTheme(val) { |
|
|
changeTheme(val) { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -164,6 +201,15 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.formobj.warehouseTypeValue == '' || this.formobj.warehouseTypeKey == '') { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
showClose: true, |
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
message: '仓库类型不能为空' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this.formobj.address == '') { |
|
|
if (this.formobj.address == '') { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
showClose: true, |
|
|
showClose: true, |
|
@ -208,6 +254,8 @@ |
|
|
sid: '', |
|
|
sid: '', |
|
|
warehouseName: '', |
|
|
warehouseName: '', |
|
|
warehouseCode: '', |
|
|
warehouseCode: '', |
|
|
|
|
|
warehouseTypeKey: '', |
|
|
|
|
|
warehouseTypeValue: '', |
|
|
contacts: "", |
|
|
contacts: "", |
|
|
mob: "", |
|
|
mob: "", |
|
|
telephone: "", |
|
|
telephone: "", |
|
@ -230,8 +278,11 @@ |
|
|
this.submitdisabled = false |
|
|
this.submitdisabled = false |
|
|
this.$emit('doback') |
|
|
this.$emit('doback') |
|
|
}, |
|
|
}, |
|
|
showAdd() {}, |
|
|
showAdd() { |
|
|
|
|
|
this.getDictValue() |
|
|
|
|
|
}, |
|
|
showEdit(row) { |
|
|
showEdit(row) { |
|
|
|
|
|
this.getDictValue() |
|
|
req.initWarehouse(row.sid) |
|
|
req.initWarehouse(row.sid) |
|
|
.then(resp => { |
|
|
.then(resp => { |
|
|
if (resp.success) { |
|
|
if (resp.success) { |
|
|