|
@@ -165,7 +165,7 @@
|
|
|
import { listCategory } from "@/api/business/carrier";
|
|
|
import { listReject } from "@/api/business/reject";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-const route = useRoute();
|
|
|
+import carrierStore from "@/store/modules/carrier";
|
|
|
/** 字典数组区 */
|
|
|
const { carrier_status } = proxy.useDict("carrier_status");
|
|
|
/** 载具类别变量 */
|
|
@@ -201,8 +201,7 @@ const getCategories = () => {
|
|
|
if (carrierCategoryList.value.length > 0) {
|
|
|
currentCategory.value = carrierCategoryList.value[0];
|
|
|
nextTick(() => {
|
|
|
- console.log(route.params.categoryId)
|
|
|
- if (route.params.categoryId != ":categoryId" && route.params.categoryId != undefined ) {
|
|
|
+ if (carrierStore().categoryId != null && carrierStore().carrierCode != null) {
|
|
|
console.log("11")
|
|
|
let a = 0;
|
|
|
let b = 0;
|
|
@@ -210,7 +209,7 @@ const getCategories = () => {
|
|
|
for(let i = 0;i< carrierCategoryList.value.length;i++) {
|
|
|
if(carrierCategoryList.value.children) {
|
|
|
for(let j = 0;j< carrierCategoryList.value[i].children.length;j++) {
|
|
|
- if(carrierCategoryList.value[i].children[j].id == route.params.categoryId) {
|
|
|
+ if(carrierCategoryList.value[i].children[j].id == carrierStore().categoryId) {
|
|
|
a = i;
|
|
|
b = j
|
|
|
return
|
|
@@ -219,8 +218,11 @@ const getCategories = () => {
|
|
|
}
|
|
|
}
|
|
|
currentCategory.value = carrierCategoryList.value[a].children[b];
|
|
|
+ queryCarrierRejectParams.value.code = carrierStore().carrierCode
|
|
|
console.log(currentCategory.value)
|
|
|
- proxy.$refs.categoryTable.setCurrentKey(route.params.categoryId)
|
|
|
+ proxy.$refs.categoryTable.setCurrentKey(carrierStore().categoryId)
|
|
|
+ carrierStore().setCategoryIdQueryParams(null)
|
|
|
+ carrierStore().setCarrierCodeQueryParams(null)
|
|
|
}else{
|
|
|
console.log("22")
|
|
|
proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id);
|
|
@@ -275,10 +277,6 @@ function getNodeIndex(data) {
|
|
|
const getCarriersReject = () => {
|
|
|
carrierRejectLoading.value = true;
|
|
|
queryCarrierRejectParams.value.categoryId = currentCategory.value.id;
|
|
|
- if (route.params.carrierCode != ":carrierCode") {
|
|
|
- console.log("11")
|
|
|
- queryCarrierRejectParams.value.code = route.params.carrierCode
|
|
|
- }
|
|
|
listReject(queryCarrierRejectParams.value).then((res) => {
|
|
|
carrierRejectLoading.value = false;
|
|
|
carrierRejectList.value = res.rows;
|
|
@@ -291,7 +289,7 @@ const handleQueryCarrier = () => {
|
|
|
getCarriersReject();
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
- getCategories();
|
|
|
+ getCategories()
|
|
|
});
|
|
|
</script>
|
|
|
<style scoped>
|