|
@@ -715,14 +715,18 @@
|
|
this.msgError('最少添加1个柜门')
|
|
this.msgError('最少添加1个柜门')
|
|
}else{
|
|
}else{
|
|
if (this.newData.cabinetId){//编辑
|
|
if (this.newData.cabinetId){//编辑
|
|
- chemicalStockGetStockByDoorId({doorUniqueId:item.doorUniqueId}).then(response => {
|
|
|
|
- if (response.data){
|
|
|
|
- self.newData.cabinetDoorModelList.splice(index,1);
|
|
|
|
- self.$forceUpdate()
|
|
|
|
- }else{
|
|
|
|
- self.msgError("该柜门不能删除!");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if(item.doorUniqueId){
|
|
|
|
+ chemicalStockGetStockByDoorId({doorUniqueId:item.doorUniqueId}).then(response => {
|
|
|
|
+ if (response.data){
|
|
|
|
+ self.newData.cabinetDoorModelList.splice(index,1);
|
|
|
|
+ self.$forceUpdate()
|
|
|
|
+ }else{
|
|
|
|
+ self.msgError("该柜门不能删除!");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ self.newData.cabinetDoorModelList.splice(index,1);
|
|
|
|
+ }
|
|
}else{//新增
|
|
}else{//新增
|
|
self.newData.cabinetDoorModelList.splice(index,1);
|
|
self.newData.cabinetDoorModelList.splice(index,1);
|
|
self.$forceUpdate()
|
|
self.$forceUpdate()
|