Browse Source

修复全部不可以申请仲裁问题

pre-production
马远东 1 year ago
parent
commit
814e081365
  1. 164
      src/views/aftersales/aftersalesWorkOrder.vue

164
src/views/aftersales/aftersalesWorkOrder.vue

@ -1111,6 +1111,8 @@ const IndexTable = val => {
details.loadingObj.list = true; //
let data = {
...val,
workOrderStatus:
TabPermissions.value == '0' && UserPermissions.value == '仓库客服' ? '1000' : null,
};
columnList[2].checkarr = []; //
@ -1136,90 +1138,86 @@ const IndexTable = val => {
} else {
TabList.value[2].state = true;
}
if (UserPermissions.value == '仓库客服') {
details.query.workOrderStatus = 1000;
console.log('执行了1000');
}
} else {
TabList.value[2].state = true;
UserPermissions.value = '仓库客服';
}
console.log(UserPermissions.value, '当前角色权限');
});
$_getList(data).then(res => {
Tableheaderswitching(columnList);
console.log(res, '初始化返回值');
details.loadingObj.list = false; //
if (res.data.data) {
page.value.total = res.data.data.total; //
if (res.data.data.records.length) {
res.data.data.records.forEach(item => {
console.log(item, 'item');
// null
// for (const property in item) {
// if (item[property] == null) {
// item[property] = '/';
// }
// }
//
if (item.workOrderType == 1) {
item.workOrderTypeNameS = columnList[2].checkarr[0].label; //
} else if (item.workOrderType == 2) {
item.workOrderTypeNameS = columnList[2].checkarr[1].label; //
} else if (item.workOrderType == 3) {
item.workOrderTypeNameS = columnList[2].checkarr[2].label; //
} else if (item.workOrderType == 4) {
item.workOrderTypeNameS = columnList[2].checkarr[3].label; //
} else if (item.workOrderType == 5) {
item.workOrderTypeNameS = columnList[2].checkarr[4].label; //
}
//
if (item.discoveryNode == 1) {
item.discoveryNodeNameS = columnList[3].checkarr[0].label; //
} else if (item.discoveryNode == 2) {
item.discoveryNodeNameS = columnList[3].checkarr[1].label; //
} else if (item.discoveryNode == 3) {
item.discoveryNodeNameS = columnList[3].checkarr[2].label; //线
} else if (item.discoveryNode == 4) {
item.discoveryNodeNameS = columnList[3].checkarr[3].label; //
} else if (item.discoveryNode == 5) {
item.discoveryNodeNameS = columnList[3].checkarr[4].label; //
} else if (item.discoveryNode == 6) {
item.discoveryNodeNameS = columnList[3].checkarr[5].label; //
} else if (item.discoveryNode == 7) {
item.discoveryNodeNameS = columnList[3].checkarr[6].label; //
} else if (item.discoveryNode == 8) {
item.discoveryNodeNameS = columnList[3].checkarr[7].label; //
}
if (item.workOrderStatus == 10) {
item.workOrderStatusNameS = columnList[17].checkarr[0].label; //
} else if (item.workOrderStatus == 20) {
item.workOrderStatusNameS = columnList[17].checkarr[1].label; //
} else if (item.workOrderStatus == 30) {
item.workOrderStatusNameS = columnList[17].checkarr[2].label; //
} else if (item.workOrderStatus == 40) {
item.workOrderStatusNameS = columnList[17].checkarr[4].label; //
} else if (item.workOrderStatus == 50) {
item.workOrderStatusNameS = columnList[17].checkarr[5].label; //
} else if (item.workOrderStatus == 60) {
item.workOrderStatusNameS = columnList[17].checkarr[3].label; //
} else if (item.workOrderStatus == 70) {
item.workOrderStatusNameS = columnList[17].checkarr[6].label; //
} else if (item.workOrderStatus == 80) {
item.workOrderStatusNameS = columnList[17].checkarr[7].label; //
} else if (item.workOrderStatus == 90) {
item.workOrderStatusNameS = columnList[17].checkarr[8].label; //
}
});
details.data = res.data.data.records;
} else {
details.data = res.data.data.records;
$_getList(data).then(res => {
Tableheaderswitching(columnList);
console.log(res, '初始化返回值');
details.loadingObj.list = false; //
if (res.data.data) {
page.value.total = res.data.data.total; //
if (res.data.data.records.length) {
res.data.data.records.forEach(item => {
console.log(item, 'item');
// null
// for (const property in item) {
// if (item[property] == null) {
// item[property] = '/';
// }
// }
//
if (item.workOrderType == 1) {
item.workOrderTypeNameS = columnList[2].checkarr[0].label; //
} else if (item.workOrderType == 2) {
item.workOrderTypeNameS = columnList[2].checkarr[1].label; //
} else if (item.workOrderType == 3) {
item.workOrderTypeNameS = columnList[2].checkarr[2].label; //
} else if (item.workOrderType == 4) {
item.workOrderTypeNameS = columnList[2].checkarr[3].label; //
} else if (item.workOrderType == 5) {
item.workOrderTypeNameS = columnList[2].checkarr[4].label; //
}
//
if (item.discoveryNode == 1) {
item.discoveryNodeNameS = columnList[3].checkarr[0].label; //
} else if (item.discoveryNode == 2) {
item.discoveryNodeNameS = columnList[3].checkarr[1].label; //
} else if (item.discoveryNode == 3) {
item.discoveryNodeNameS = columnList[3].checkarr[2].label; //线
} else if (item.discoveryNode == 4) {
item.discoveryNodeNameS = columnList[3].checkarr[3].label; //
} else if (item.discoveryNode == 5) {
item.discoveryNodeNameS = columnList[3].checkarr[4].label; //
} else if (item.discoveryNode == 6) {
item.discoveryNodeNameS = columnList[3].checkarr[5].label; //
} else if (item.discoveryNode == 7) {
item.discoveryNodeNameS = columnList[3].checkarr[6].label; //
} else if (item.discoveryNode == 8) {
item.discoveryNodeNameS = columnList[3].checkarr[7].label; //
}
if (item.workOrderStatus == 10) {
item.workOrderStatusNameS = columnList[17].checkarr[0].label; //
} else if (item.workOrderStatus == 20) {
item.workOrderStatusNameS = columnList[17].checkarr[1].label; //
} else if (item.workOrderStatus == 30) {
item.workOrderStatusNameS = columnList[17].checkarr[2].label; //
} else if (item.workOrderStatus == 40) {
item.workOrderStatusNameS = columnList[17].checkarr[4].label; //
} else if (item.workOrderStatus == 50) {
item.workOrderStatusNameS = columnList[17].checkarr[5].label; //
} else if (item.workOrderStatus == 60) {
item.workOrderStatusNameS = columnList[17].checkarr[3].label; //
} else if (item.workOrderStatus == 70) {
item.workOrderStatusNameS = columnList[17].checkarr[6].label; //
} else if (item.workOrderStatus == 80) {
item.workOrderStatusNameS = columnList[17].checkarr[7].label; //
} else if (item.workOrderStatus == 90) {
item.workOrderStatusNameS = columnList[17].checkarr[8].label; //
}
});
details.data = res.data.data.records;
} else {
details.data = res.data.data.records;
}
}
}
loading.value = false; //
loading.value = false; //
});
});
};
@ -2176,7 +2174,7 @@ const tabChenge = val => {
if (val == 0) {
ProcessingPartyState.value = false; //
ArbitrationStatus.value = false; //
ArbitrationStatus.value = true; //
if (UserPermissions.value == '仓库客服') {
data.workOrderStatus = 1000;
details.query.workOrderStatus = 1000;
@ -2652,11 +2650,17 @@ const arbitrate = () => {
});
return;
}
let resultState = details.selectionList.every(item => item.workOrderStatus != '30'); //
if (!resultState) {
ElMessage({
message: '勾选数据不符合(待处理或处理中才可以申请仲裁)',
type: 'warning',
});
return;
}
let data = {
assignList: [],
};
console.log(details.selectionList, '仲裁选中的参数');
details.selectionList.forEach(item => {
data['assignList'].push(item.id);
});

Loading…
Cancel
Save