更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-08 10:44:25
|
||||
* @LastEditTime: 2023-10-18 16:22:53
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@@ -30,15 +30,15 @@ export default {
|
||||
activated() {
|
||||
},
|
||||
methods: {
|
||||
init(id,bPage) {
|
||||
init(id, bPage) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
if(bPage){
|
||||
if (bPage) {
|
||||
this.dataForm.warehouseId = this.bId;
|
||||
}else{
|
||||
} else {
|
||||
this.dataForm.warehouseId = this.aId;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
@@ -90,24 +90,28 @@ export default {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
if(response.data){
|
||||
if (response.data === -1) {
|
||||
this.$modal.msgWarning('排、列、层不能重复');
|
||||
} else if (response.data === 0) {
|
||||
this.$modal.msgWarning('名称或编码不能重复');
|
||||
} else {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
}else{
|
||||
this.$modal.msgWarning('名称或编码不能重复');;
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
if(response.data){
|
||||
if (response.data === -1) {
|
||||
this.$modal.msgWarning('排、列、层不能重复');
|
||||
} else if (response.data === 0) {
|
||||
this.$modal.msgWarning('名称或编码不能重复');
|
||||
} else {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
}else{
|
||||
this.$modal.msgWarning('名称或编码不能重复');;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user