|
@@ -58,7 +58,10 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
let validateExsit = (rule, value, callback) => {
|
|
|
- //后台方法
|
|
|
+ //后台方法
|
|
|
+ if(this.type=="edit" && value === this.oldName){
|
|
|
+ return true
|
|
|
+ }
|
|
|
this.checkExist(value).then(res => {
|
|
|
res = res.data;
|
|
|
// console.log("check验证:", res);
|
|
@@ -72,6 +75,7 @@ export default {
|
|
|
return {
|
|
|
type: 'add',
|
|
|
currNodeName: '',
|
|
|
+ oldName: '',
|
|
|
tenant: this.initTenant(),
|
|
|
screenWidth: 0,
|
|
|
width: this.initWidth(),
|
|
@@ -105,7 +109,7 @@ export default {
|
|
|
created() {
|
|
|
// 获取【库位类型】数据
|
|
|
this.getWareTypeList()
|
|
|
- },
|
|
|
+ },
|
|
|
computed: {
|
|
|
isVisible: {
|
|
|
get () {
|
|
@@ -149,6 +153,7 @@ export default {
|
|
|
console.log("货架数据:", currNode)
|
|
|
if(val){
|
|
|
this.tenant = { ...val }
|
|
|
+ this.oldName = val.name
|
|
|
}else{ // 如果是新增
|
|
|
// 给【上级层】显示使用
|
|
|
this.currNodeName = currNode.name
|