|
@@ -303,6 +303,34 @@ export default {
|
|
|
},
|
|
|
//承运商确定按钮
|
|
|
selectMakeSure() {
|
|
|
+ var fatherNum;
|
|
|
+ var sonNum;
|
|
|
+ if (this.selectionList.length > this.carrierTypes.length) {
|
|
|
+ fatherNum=this.selectionList
|
|
|
+ sonNum=this.carrierTypes
|
|
|
+ }else{
|
|
|
+ fatherNum=this.carrierTypes
|
|
|
+ sonNum=this.selectionList
|
|
|
+ }
|
|
|
+ var breaked = false;
|
|
|
+ for (let i = 0; i < fatherNum.length; i++) {
|
|
|
+ for (let j = 0; j <sonNum.length; j++) {
|
|
|
+ if (fatherNum[i].carrierName==sonNum[j].carrierName){
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已有【"+sonNum[j].carrierName+"】承运商,无法重复添加~",
|
|
|
+ })
|
|
|
+ breaked = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (breaked) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (breaked) {
|
|
|
+ return
|
|
|
+ }
|
|
|
for (let i = 0; i < this.carrierTypes.length; i++) {
|
|
|
this.selectionList.push(this.carrierTypes[i])
|
|
|
}
|