|
@@ -287,7 +287,7 @@ export default {
|
287
|
287
|
supplier: {
|
288
|
288
|
supplierName: "",
|
289
|
289
|
supplierCode: "gsy001",
|
290
|
|
- supplierType: "请选择类别",
|
|
290
|
+ supplierType: "",
|
291
|
291
|
vatRate: 0,
|
292
|
292
|
number: "",
|
293
|
293
|
bank: "",
|
|
@@ -565,22 +565,25 @@ export default {
|
565
|
565
|
let params = {
|
566
|
566
|
id: data.id,
|
567
|
567
|
};
|
568
|
|
-
|
569
|
|
- if (this.show_type == 1) {
|
570
|
|
- if (this.recordInfo.contacts.length <= 1) {
|
571
|
|
- return;
|
572
|
|
- } else {
|
573
|
|
- this.recordInfo.contacts.splice(index, 1);
|
574
|
|
- }
|
575
|
|
- } else if (this.show_type == 2) {
|
576
|
|
- delcontactone(params).then((res) => {
|
577
|
|
- if (res.data.state == 1) {
|
578
|
|
- this.$message.success("删除成功");
|
579
|
|
- this.getcontacts(this.supplier_ids);
|
|
568
|
+ if (params.id==undefined||params.id=="undefined") {
|
|
569
|
+ this.recordInfo.contacts.splice(index, 1);
|
|
570
|
+ }else {
|
|
571
|
+ if (this.show_type == 1) {
|
|
572
|
+ if (this.recordInfo.contacts.length <= 1) {
|
|
573
|
+ return;
|
580
|
574
|
} else {
|
581
|
|
- this.$message.error(res.data.data.list);
|
|
575
|
+ this.recordInfo.contacts.splice(index, 1);
|
582
|
576
|
}
|
583
|
|
- });
|
|
577
|
+ } else if (this.show_type == 2) {
|
|
578
|
+ delcontactone(params).then((res) => {
|
|
579
|
+ if (res.data.state == 1) {
|
|
580
|
+ this.$message.success("删除成功!!:",index);
|
|
581
|
+ this.getcontacts(this.supplier_ids);
|
|
582
|
+ } else {
|
|
583
|
+ this.$message.error(res.data.data.list);
|
|
584
|
+ }
|
|
585
|
+ });
|
|
586
|
+ }
|
584
|
587
|
}
|
585
|
588
|
},
|
586
|
589
|
|